tools:mkimage_multidtb: Align less than PAD size
authorInha Song <ideal.song@samsung.com>
Wed, 5 Aug 2015 05:05:03 +0000 (14:05 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Thu, 10 Oct 2019 04:38:36 +0000 (13:38 +0900)
This patch fix align error in mkimage_multidtb tools.
if DTB size is aigned to $PAD, $PAD_CNT should be zero not $PAD.

Change-Id: I2bf8343dae9b2bb71a70abf1df61bd215c2996f8
Signed-off-by: Inha Song <ideal.song@samsung.com>
board/samsung/common/exynos5-dt.c
include/configs/odroid_xu3.h
tools/mkimage_multidtb.sh

index 387d1b9..b0e7f7d 100644 (file)
@@ -37,6 +37,18 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int exynos_init(void)
 {
+#ifdef EXYNOS5422_MFC_CPLL_FIX
+       /*
+        * A workaround for MFC crash on Odroid XU3:
+        * 1. set ACLK333 divider to 1
+        * 2. set CPLL rate to 480MHz
+        */
+       writel(0xa0500201, 0x10020120);
+       udelay(10);
+
+       writel(0x03100900, 0x10020504);
+       udelay(10);
+#endif
        return 0;
 }
 
index eecc73f..1565067 100644 (file)
        "dfu_alt_system="CONFIG_DFU_ALT_SYSTEM \
        "dfu_alt_info=Autoset by THOR/DFU command run.\0"
 
+/* Hacking */
+#define EXYNOS5422_MFC_CPLL_FIX
+
 #endif /* __CONFIG_H */
index 0405fd6..fc107ac 100755 (executable)
@@ -59,7 +59,7 @@ for I in ${DTB[*]}; do
                touch padding
 
                if [ $CNT -lt $(($DTB_CNT)) ]; then
-                       PAD_CNT=$(($PAD - $(($SIZE % $PAD))))
+                       PAD_CNT=$(($(($PAD - $(($SIZE % $PAD)))) % $PAD))
                        if [ $PAD_CNT -ge 0 ]; then
                                echo -en " | PAD: $PAD_CNT B |"
                                rm padding