[U-Boot] [PATCH 2/2] orion5x: set GPIO output value before enabling
Albert Aribaud
albert.aribaud at free.fr
Sat Sep 4 09:12:26 CEST 2010
GPIO output values from config file were ignored.
Set them, before enabling to avoid glitches.
Signed-off-by: Albert Aribaud <albert.aribaud at free.fr>
---
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
More information about the U-Boot
mailing list