From: Inha Song Date: Wed, 5 Aug 2015 05:05:03 +0000 (+0900) Subject: tools:mkimage_multidtb: Align less than PAD size X-Git-Tag: submit/tizen/20201110.005738~342 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=995965bcde88a20890413f447cf316992752b13c;p=platform%2Fkernel%2Fu-boot.git tools:mkimage_multidtb: Align less than PAD size 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 --- diff --git a/board/samsung/common/exynos5-dt.c b/board/samsung/common/exynos5-dt.c index 69aa2120e1..2727211e3c 100644 --- a/board/samsung/common/exynos5-dt.c +++ b/board/samsung/common/exynos5-dt.c @@ -38,6 +38,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; } diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h index b8bec550c8..fae9878be9 100644 --- a/include/configs/odroid_xu3.h +++ b/include/configs/odroid_xu3.h @@ -124,4 +124,7 @@ "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 */ diff --git a/tools/mkimage_multidtb.sh b/tools/mkimage_multidtb.sh index 0405fd6804..fc107acab0 100755 --- a/tools/mkimage_multidtb.sh +++ b/tools/mkimage_multidtb.sh @@ -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