This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

iPAQ - Fix PCMCIA dual slot support


Index: devs/pcmcia/arm/ipaq/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/devs/pcmcia/arm/ipaq/current/ChangeLog,v
retrieving revision 1.5
diff -u -5 -p -r1.5 ChangeLog
--- devs/pcmcia/arm/ipaq/current/ChangeLog	20 Sep 2002 21:19:39 -0000	1.5
+++ devs/pcmcia/arm/ipaq/current/ChangeLog	20 Sep 2002 21:32:27 -0000
@@ -1,10 +1,10 @@
 2002-09-20  Gary Thomas  <gthomas@ecoscentric.com>
 
 	* src/ipaq_pcmcia.c: Additional setup required for Compaq dual
-	PCMCIA sleeve.
-
+	PCMCIA sleeve.  Add card reset which is necessary for some older cards.
+	
 2002-04-12  Gary Thomas  <gthomas@redhat.com>
 
 	* src/ipaq_pcmcia.c: Clean up warnings.
 
 2001-07-13  Gary Thomas  <gthomas@redhat.com>
Index: devs/pcmcia/arm/ipaq/current/src/ipaq_pcmcia.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/devs/pcmcia/arm/ipaq/current/src/ipaq_pcmcia.c,v
retrieving revision 1.5
diff -u -5 -p -r1.5 ipaq_pcmcia.c
--- devs/pcmcia/arm/ipaq/current/src/ipaq_pcmcia.c	20 Sep 2002 21:19:39 -0000	1.5
+++ devs/pcmcia/arm/ipaq/current/src/ipaq_pcmcia.c	20 Sep 2002 21:26:47 -0000
@@ -228,18 +228,24 @@ cf_hwr_change_state(struct cf_slot *slot
             ipaq_EGPIO( SA1110_EIO_OPT_PWR | SA1110_EIO_OPT | SA1110_EIO_CF_RESET,
                         SA1110_EIO_OPT_PWR_ON | SA1110_EIO_OPT_ON | SA1110_EIO_CF_RESET_DISABLE);
             do_delay(30);  // At least 300 ms
             slot->state = CF_SLOT_STATE_Powered;
             ipaq_EGPIO( SA1110_EIO_CF_RESET, SA1110_EIO_CF_RESET_ENABLE);
+            *(volatile unsigned short *)IPAQ_CF_CTRL = IPAQ_CF_CTRL_V5_DISABLE | 
+                                                       IPAQ_CF_CTRL_V3_ENABLE | 
+                                                       IPAQ_CF_CTRL_RESET_ENABLE | 
+                                                       IPAQ_CF_CTRL_APOE_ENABLE | 
+                                                       IPAQ_CF_CTRL_SOE_ENABLE;
             do_delay(1);  // At least 10 us
             slot->state = CF_SLOT_STATE_Reset;
             ipaq_EGPIO( SA1110_EIO_CF_RESET, SA1110_EIO_CF_RESET_DISABLE);
             do_delay(5); // At least 20 ms
             // This is necessary for the two slot sleeve and doesn't seem to
             // hurt on the single slot versions.  Note: only 3.3V is ever used!
             *(volatile unsigned short *)IPAQ_CF_CTRL = IPAQ_CF_CTRL_V5_DISABLE | 
                                                        IPAQ_CF_CTRL_V3_ENABLE | 
+                                                       IPAQ_CF_CTRL_RESET_DISABLE | 
                                                        IPAQ_CF_CTRL_APOE_ENABLE | 
                                                        IPAQ_CF_CTRL_SOE_ENABLE;
             do_delay(5); // At least 20 ms
             // Wait until the card is ready to talk
             for (i = 0;  i < 10;  i++) {
Index: hal/arm/sa11x0/ipaq/current/include/ipaq.h
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/arm/sa11x0/ipaq/current/include/ipaq.h,v
retrieving revision 1.4
diff -u -5 -p -r1.4 ipaq.h
--- hal/arm/sa11x0/ipaq/current/include/ipaq.h	20 Sep 2002 21:19:49 -0000	1.4
+++ hal/arm/sa11x0/ipaq/current/include/ipaq.h	20 Sep 2002 21:26:50 -0000
@@ -159,10 +159,12 @@ extern void ipaq_EGPIO(unsigned long mas
 #define IPAQ_CF_CTRL_V3_ENABLE        _LOGIC_ZERO(IPAQ_CF_CTRL_V3)
 #define IPAQ_CF_CTRL_V3_DISABLE       _LOGIC_ONE(IPAQ_CF_CTRL_V3)
 #define IPAQ_CF_CTRL_VCC              0x0004   // Vcc power enable
 #define IPAQ_CF_CTRL_V12              0x0008   // 12v power enable
 #define IPAQ_CF_CTRL_RESET            0x0010   // Reset card
+#define IPAQ_CF_CTRL_RESET_ENABLE     _LOGIC_ONE(IPAQ_CF_CTRL_RESET)
+#define IPAQ_CF_CTRL_RESET_DISABLE    _LOGIC_ZERO(IPAQ_CF_CTRL_RESET)
 #define IPAQ_CF_CTRL_APOE             0x0020   // Auto power off
 #define IPAQ_CF_CTRL_APOE_ENABLE      _LOGIC_ONE(IPAQ_CF_CTRL_APOE)
 #define IPAQ_CF_CTRL_APOE_DISABLE     _LOGIC_ZERO(IPAQ_CF_CTRL_APOE)
 #define IPAQ_CF_CTRL_CFE              0x0040   // Compact Flash [addressing] enable
 #define IPAQ_CF_CTRL_SOE              0x0080   // Enable signal outputs


-- 
------------------------------------------------------------
Gary Thomas                  |
eCosCentric, Ltd.            |  
+1 (970) 229-1963            |  eCos & RedBoot experts
gthomas@ecoscentric.com      |
http://www.ecoscentric.com/  |
------------------------------------------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]