changeset 45:e1379873c398

armio.c: GPIO config following Mot's original fw
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Thu, 12 Nov 2015 02:38:40 +0000
parents a39516059f83
children f297861532cf
files chipsetsw/drivers/drv_core/armio/armio.c
diffstat 1 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/chipsetsw/drivers/drv_core/armio/armio.c	Wed Nov 11 23:34:43 2015 +0000
+++ b/chipsetsw/drivers/drv_core/armio/armio.c	Thu Nov 12 02:38:40 2015 +0000
@@ -231,13 +231,21 @@
   // reset the IOs config
   AI_ResetIoConfig();
 
-  /* same minimal config as OsmocomBB and FreeCalypso for now */
+  /* C139 GPIO configuration mimics what the original fw sets */
+  AI_EnableBit(0);
+  AI_EnableBit(2);
+  AI_EnableBit(4);
+  AI_EnableBit(5);
+  AI_EnableBit(6);
+  AI_EnableBit(7);
+  AI_EnableBit(8);
+  AI_EnableBit(9);
 
   /* GPIO out all zeros, except for IO1 enabling the LCD backlight */
   *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x0002;
-  /* make GPIOs 1 and 3 outputs */
-  AI_ConfigBitAsOutput(1);
-  AI_ConfigBitAsOutput(3);
+
+  /* setting of GPIOs as outputs also mimics what the original fw sets */
+  *((volatile SYS_UWORD16 *) ARMIO_IO_CNTL) = 0x2A09;
 }
 
 /*