From ff3b2b9de65bc182feb7335686d59bdb4ec977fc Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Thu, 17 Sep 2015 12:53:16 +0200 Subject: [PATCH] OdroidXU3: add workaround for MFC crash issue Most versions of MFC v8 firmware suffer from various hang and crash issues. Most of those issues has been fixed in updated MFC v8 firmware available for Exynos 5433, however using it on Odroid XU3 sometimes causes random crashes. In our experiments it turned out that such firmware works stable after increasing the MFC sclk rate from default 333MHz to 480MHz. This has been achieved by setting ACLK333 clock divider to 1 (from 2) and setting CPLL rate to 480MHz (from 666MHz). Signed-off-by: Marek Szyprowski Change-Id: Id38d914fddea7fa8fe7144e25cc47948184f9579 --- board/samsung/common/exynos5-dt.c | 12 ++++++++++++ include/configs/odroid_xu3.h | 3 +++ 2 files changed, 15 insertions(+) diff --git a/board/samsung/common/exynos5-dt.c b/board/samsung/common/exynos5-dt.c index 4d9e151756..1f284fd4a0 100644 --- a/board/samsung/common/exynos5-dt.c +++ b/board/samsung/common/exynos5-dt.c @@ -66,6 +66,18 @@ int exynos_init(void) { board_enable_audio_codec(); +#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 8957f543c4..a05eaa33d4 100644 --- a/include/configs/odroid_xu3.h +++ b/include/configs/odroid_xu3.h @@ -164,4 +164,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 */ -- 2.34.1