patch-2.4.19 linux-2.4.19/drivers/pcmcia/sa1100_simpad.c
Next file: linux-2.4.19/drivers/pcmcia/sa1100_stork.c
Previous file: linux-2.4.19/drivers/pcmcia/sa1100_shannon.c
Back to the patch index
Back to the overall index
- Lines: 60
- Date:
Fri Aug 2 17:39:44 2002
- Orig file:
linux-2.4.18/drivers/pcmcia/sa1100_simpad.c
- Orig date:
Thu Oct 25 13:53:48 2001
diff -urN linux-2.4.18/drivers/pcmcia/sa1100_simpad.c linux-2.4.19/drivers/pcmcia/sa1100_simpad.c
@@ -9,7 +9,7 @@
#include <asm/hardware.h>
#include <asm/irq.h>
-#include <asm/arch/pcmcia.h>
+#include "sa1100_generic.h"
extern long get_cs3_shadow(void);
extern void set_cs3_bit(int value);
@@ -19,9 +19,6 @@
static int simpad_pcmcia_init(struct pcmcia_init *init){
int irq, res;
- /* set GPIO_CF_CD & GPIO_CF_IRQ as inputs */
- GPDR &= ~(GPIO_CF_CD|GPIO_CF_IRQ);
-
set_cs3_bit(PCMCIA_RESET);
clear_cs3_bit(PCMCIA_BUFF_DIS);
clear_cs3_bit(PCMCIA_RESET);
@@ -29,7 +26,7 @@
clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1);
/* Set transition detect */
- set_GPIO_IRQ_edge( GPIO_CF_CD, GPIO_BOTH_EDGES );
+ set_GPIO_IRQ_edge( GPIO_CF_CD, GPIO_NO_EDGES );
set_GPIO_IRQ_edge( GPIO_CF_IRQ, GPIO_FALLING_EDGE );
/* Register interrupts */
@@ -146,11 +143,26 @@
return 0;
}
+static int simpad_pcmcia_socket_init(int sock)
+{
+ set_GPIO_IRQ_edge(GPIO_CF_CD, GPIO_BOTH_EDGES);
+ return 0;
+}
+
+static int simpad_pcmcia_socket_suspend(int sock)
+{
+ set_GPIO_IRQ_edge(GPIO_CF_CD, GPIO_NO_EDGES);
+ return 0;
+}
+
struct pcmcia_low_level simpad_pcmcia_ops = {
- simpad_pcmcia_init,
- simpad_pcmcia_shutdown,
- simpad_pcmcia_socket_state,
- simpad_pcmcia_get_irq_info,
- simpad_pcmcia_configure_socket
+ init: simpad_pcmcia_init,
+ shutdown: simpad_pcmcia_shutdown,
+ socket_state: simpad_pcmcia_socket_state,
+ get_irq_info: simpad_pcmcia_get_irq_info,
+ configure_socket: simpad_pcmcia_configure_socket,
+
+ socket_init: simpad_pcmcia_socket_init,
+ socket_suspend: simpad_pcmcia_socket_suspend,
};
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)