[U-Boot] [PATCH u-boot sunxi 03/12] sunxi: FIXUP: sunxi: initial sun7i clocks and timer support.

Hans de Goede hdegoede at redhat.com
Tue Mar 18 00:00:47 CET 2014


Add #ifdef CONFIG_SUN7I were appropriate to make adding sun4i / sun5i support
later easier.

Signed-off-by: Hans de Goede <hdegoede at redhat.com>
---
 arch/arm/cpu/armv7/sunxi/clock.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/cpu/armv7/sunxi/clock.c b/arch/arm/cpu/armv7/sunxi/clock.c
index 9cdcc8a..dd01be6 100644
--- a/arch/arm/cpu/armv7/sunxi/clock.c
+++ b/arch/arm/cpu/armv7/sunxi/clock.c
@@ -33,10 +33,12 @@ static void clock_init_safe(void)
 	       APB0_DIV_1 << APB0_DIV_SHIFT |
 	       CPU_CLK_SRC_PLL1 << CPU_CLK_SRC_SHIFT,
 	       &ccm->cpu_ahb_apb0_cfg);
+#ifdef CONFIG_SUN7I
 	writel(0x1 << AHB_GATE_OFFSET_DMA | readl(&ccm->ahb_gate0),
 	       &ccm->ahb_gate0);
 	writel(0x1 << PLL6_ENABLE_OFFSET | readl(&ccm->pll6_cfg),
 	       &ccm->pll6_cfg);
+#endif
 }
 #endif
 
-- 
1.9.0



More information about the U-Boot mailing list