changeset 589:9b81b68e8e64

armio.c: SE J100 GPIO config changed to new knowledge from disassembly
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 14 Mar 2019 23:51:42 +0000
parents f2e752052db5
children ea22e20c3d70
files src/cs/drivers/drv_core/armio/armio.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/cs/drivers/drv_core/armio/armio.c	Wed Mar 13 18:08:34 2019 +0000
+++ b/src/cs/drivers/drv_core/armio/armio.c	Thu Mar 14 23:51:42 2019 +0000
@@ -238,12 +238,16 @@
     AI_ConfigBitAsOutput(12);	/* MUSIC_ON */
 
   #elif defined(CONFIG_TARGET_J100)
+    /*
+     * GPIO config on this target is based on the disassembly of
+     * Init_Target() and AI_InitIOConfig() functions in the official fw.
+     */
 
     /* GPIO out all zeros - the LCD backlight is OFF */
     *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x0000;
 
-    AI_ConfigBitAsOutput(1);	/* LCD backlight control */
-    AI_ConfigBitAsOutput(3);	/* LCDA0 (?) */
+    /* setting of GPIOs as outputs: register setting from the original fw */
+    *((volatile SYS_UWORD16 *) ARMIO_IO_CNTL) = 0x2A59;
 
   #elif defined(CONFIG_TARGET_PIRELLI)