summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/cpu/armv7/sunxi/dram.c4
-rw-r--r--board/sunxi/Kconfig7
2 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/sunxi/dram.c b/arch/arm/cpu/armv7/sunxi/dram.c
index 0cbcf5767c..3cf3cbf19a 100644
--- a/arch/arm/cpu/armv7/sunxi/dram.c
+++ b/arch/arm/cpu/armv7/sunxi/dram.c
@@ -262,6 +262,10 @@ static void mctl_setup_dram_clock(u32 clk, u32 mbus_clk)
reg_val &= ~CCM_PLL5_CTRL_K_MASK; /* set K to 0 (x1) */
reg_val &= ~CCM_PLL5_CTRL_N_MASK; /* set N to 0 (x0) */
reg_val &= ~CCM_PLL5_CTRL_P_MASK; /* set P to 0 (x1) */
+#ifdef CONFIG_OLD_SUNXI_KERNEL_COMPAT
+ /* Old kernels are hardcoded to P=1 (divide by 2) */
+ reg_val |= CCM_PLL5_CTRL_P(1);
+#endif
if (clk >= 540 && clk < 552) {
/* dram = 540MHz */
reg_val |= CCM_PLL5_CTRL_M(CCM_PLL5_CTRL_M_X(2));
diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index 449c0460f9..31a15037d0 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -20,6 +20,13 @@ config SYS_SOC
config FDTFILE
string "Default fdtfile env setting for this board"
+config OLD_SUNXI_KERNEL_COMPAT
+ boolean "Enable workarounds for booting old kernels"
+ default n
+ ---help---
+ Set this to enable various workarounds for old kernels, this results in
+ sub-optimal settings for newer kernels, only enable if needed.
+
config MMC0_CD_PIN
string "Card detect pin for mmc0"
default ""
OpenPOWER on IntegriCloud