GPIO output values from config file were ignored.
Set them, before enabling to avoid glitches.

Signed-off-by: Albert Aribaud <[email protected]>
---
 arch/arm/cpu/arm926ejs/orion5x/cpu.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/orion5x/cpu.c 
b/arch/arm/cpu/arm926ejs/orion5x/cpu.c
index 260f88b..d2d7ba5 100644
--- a/arch/arm/cpu/arm926ejs/orion5x/cpu.c
+++ b/arch/arm/cpu/arm926ejs/orion5x/cpu.c
@@ -258,11 +258,14 @@ int arch_misc_init(void)
        temp = get_cr();
        set_cr(temp & ~CR_V);
 
-       /* Set CPIOs and MPPs - values provided by board
-          include file */
+       /* Set MPPs as provided by board config file */
        writel(ORION5X_MPP0_7, ORION5X_MPP_BASE+0x00);
        writel(ORION5X_MPP8_15, ORION5X_MPP_BASE+0x04);
        writel(ORION5X_MPP16_23, ORION5X_MPP_BASE+0x50);
+
+       /* set GPIOs as provided by board config file */
+       /* set values first to avoid glitches on outputs */
+       writel(ORION5X_GPIO_OUT_VALUE, ORION5X_GPIO_BASE+0x0);
        writel(ORION5X_GPIO_OUT_ENABLE, ORION5X_GPIO_BASE+0x04);
 
        return 0;
-- 
1.7.0.4

_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to