changeset 409:6c3f68021c53

armio.c: GPIO directions restored to TI's original on the D-Sample
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 18 Jan 2018 05:59:41 +0000
parents 336edc558a30
children bc1654e1e80d
files src/cs/drivers/drv_core/armio/armio.c
diffstat 1 files changed, 20 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/src/cs/drivers/drv_core/armio/armio.c	Thu Jan 18 05:01:14 2018 +0000
+++ b/src/cs/drivers/drv_core/armio/armio.c	Thu Jan 18 05:59:41 2018 +0000
@@ -224,42 +224,46 @@
   #else	/* classic TI/Openmoko/FreeCalypso targets */
     // set IOs 1 and 8 to 13 as high
     // set IOs 0 and 2 to 7 as low
-    // On D-Sample GPIO 1 must be set to high to enable the audio amplifier.
-    #if (OP_L1_STANDALONE == 0)
-// CC test    
-#if 1 // Dmitriy: GPIO 1 is the interrupt for the ext host, set it to 0
+    // On D-Sample GPIO 1 must be set to high to enable the audio amplifier,
+    // but on Openmoko's modem it is the interrupt to the AP.
+    // On the FCDEV3B it also controls the audio amplifier.
+    // For now we initialize it to low on all targets.
+#if 1
       *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F00;
 #else
       *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F02;
 #endif
-      //*((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F01;
-// end 
-    #else
-      *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F01;
-    #endif
 
     // ARMIO_CNTL_REG register configuration :
     // set IOs 1,2,5,7,9,14 and 15 as ouputs.
-    AI_ConfigBitAsOutput(0);	/* FreeCalypso addition */
-// CC test 0316
+    #ifndef CONFIG_TARGET_DSAMPLE
+      AI_ConfigBitAsOutput(0);	/* FreeCalypso addition */
+    #endif
     AI_ConfigBitAsOutput(1);	
-// end
     AI_ConfigBitAsOutput(2);
     #ifdef CONFIG_TARGET_GTAMODEM
       AI_ConfigBitAsOutput(3);
     #endif
-    AI_ConfigBitAsOutput(4);	/* FreeCalypso addition */
+    #ifndef CONFIG_TARGET_DSAMPLE
+      AI_ConfigBitAsOutput(4);	/* FreeCalypso addition */
+    #endif
     AI_ConfigBitAsOutput(5);
-    AI_ConfigBitAsOutput(6);	/* FreeCalypso addition */
+    #ifndef CONFIG_TARGET_DSAMPLE
+      AI_ConfigBitAsOutput(6);	/* FreeCalypso addition */
+    #endif
     AI_ConfigBitAsOutput(7);
-    AI_ConfigBitAsOutput(8);	/* FreeCalypso addition */
+    #ifndef CONFIG_TARGET_DSAMPLE
+      AI_ConfigBitAsOutput(8);	/* FreeCalypso addition */
+    #endif
     AI_ConfigBitAsOutput(9);
     #ifdef CONFIG_TARGET_GTAMODEM
       AI_ConfigBitAsOutput(10);
       AI_ConfigBitAsOutput(11);
       AI_ConfigBitAsOutput(12);
     #endif
-    AI_ConfigBitAsOutput(13);	/* FreeCalypso addition */
+    #ifndef CONFIG_TARGET_DSAMPLE
+      AI_ConfigBitAsOutput(13);	/* FreeCalypso addition */
+    #endif
     AI_ConfigBitAsOutput(14);
     AI_ConfigBitAsOutput(15);
   #endif