[U-Boot] [PATCH 1/2] edminiv2.h: fix GPIO output value settings
Albert Aribaud
albert.aribaud at free.fr
Sat Sep 4 09:12:25 CEST 2010
Wrong output value was harmless as long as orion5x did not use it.
Upcoming patch fixes orion5x, thus must fix edminiv2 config as well.
Also update comments to clarify edminiv2 GPIO directions and values.
Signed-off-by: Albert Aribaud <albert.aribaud at free.fr>
---
include/configs/edminiv2.h | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/include/configs/edminiv2.h b/include/configs/edminiv2.h
index ccfc660..586ce06 100644
--- a/include/configs/edminiv2.h
+++ b/include/configs/edminiv2.h
@@ -52,10 +52,10 @@
#define CONFIG_SYS_HZ 1000
/*
- * Board-specific values for Orion5x MPP low level init:
+ * Board-specific MPP settings for Orion5x:
* - MPPs 12 to 15 are SATA LEDs (mode 5)
* - Others are GPIO/unused (mode 3 for MPP0, mode 5 for
- * MPP16 to MPP19, mode 0 for others
+ * MPP16 to MPP19, mode 0 for others)
*/
#define ORION5X_MPP0_7 0x00000003
@@ -63,18 +63,24 @@
#define ORION5X_MPP16_23 0x00005555
/*
- * Board-specific values for Orion5x GPIO low level init:
+ * Board-specific GPIO directions for Orion5x:
* - GPIO3 is input (RTC interrupt)
- * - GPIO16 is Power LED control (0 = on, 1 = off)
+ * - GPIO16 is Power LED control (BEWARE: 0 = ON, 1 = OFF)
* - GPIO17 is Power LED source select (0 = CPLD, 1 = GPIO16)
* - GPIO18 is Power Button status (0 = Released, 1 = Pressed)
* - Last GPIO is 26, further bits are supposed to be 0.
- * Enable mask has ones for INPUT, 0 for OUTPUT.
- * Default is LED ON.
+ * (Reminder: each enable bit is 1 for INPUT, 0 for OUTPUT)
*/
#define ORION5X_GPIO_OUT_ENABLE 0x03fcffff
-#define ORION5X_GPIO_OUT_VALUE 0x03fcffff
+
+/*
+ * Board-specific GPIO output values for Orion5x:
+ * - GPIO16 (Power LED control) = 0 (on)
+ * - GPIO17 (is Power LED source) = 1 (GPIO16)
+ */
+
+#define ORION5X_GPIO_OUT_VALUE 0x00020000
/*
* NS16550 Configuration
--
1.7.0.4
More information about the U-Boot
mailing list