changeset 534:6c96725718c3

armio.c: C11x GPIO setup properly separated from C139
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 05 Nov 2018 17:10:06 +0000
parents 09afc37e8069
children bb9a08797022
files src/cs/drivers/drv_core/armio/armio.c
diffstat 1 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/cs/drivers/drv_core/armio/armio.c	Mon Nov 05 09:54:16 2018 +0000
+++ b/src/cs/drivers/drv_core/armio/armio.c	Mon Nov 05 17:10:06 2018 +0000
@@ -207,13 +207,22 @@
   // set IOs 8,9,10,11,12 and 13 as high
   // set IOs 0 to 7 as low
 
-  #if defined(CONFIG_TARGET_C139) || defined(CONFIG_TARGET_C11X)
+  #ifdef CONFIG_TARGET_C11X
+    /* C11x GPIO configuration mimics what the original fw sets */
+
+    /* GPIO out all zeros */
+    *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x0000;
+
+    /* setting of GPIOs as outputs: register setting from the original fw */
+    *((volatile SYS_UWORD16 *) ARMIO_IO_CNTL) = 0x2209;
+
+  #elif defined(CONFIG_TARGET_C139)
     /* C139 GPIO configuration mimics what the original fw sets */
 
     /* GPIO out all zeros - the LCD backlight is OFF */
     *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x0000;
 
-    /* setting of GPIOs as outputs also mimics what the original fw sets */
+    /* setting of GPIOs as outputs: register setting from the original fw */
     *((volatile SYS_UWORD16 *) ARMIO_IO_CNTL) = 0x2A09;
 
   #elif defined(CONFIG_TARGET_C155)