14 #include <linux/module.h>
16 #include <linux/kernel.h>
17 #include <linux/errno.h>
22 #include <mach/hardware.h>
28 #define NO_KEEP_VS 0x0001
29 #define SCOOP_DEV platform_scoop_config->devs
62 unsigned short cpr,
csr;
81 else if (cpr & 0x0003) {
88 if ((machine_is_spitz() || machine_is_borzoi()) && skt->
nr == 1) {
95 state->
detect = (csr & 0x0004) ? 0 : 1;
96 state->
ready = (csr & 0x0002) ? 1 : 0;
97 state->
bvd1 = (csr & 0x0010) ? 1 : 0;
98 state->
bvd2 = (csr & 0x0020) ? 1 : 0;
99 state->
wrprot = (csr & 0x0008) ? 1 : 0;
100 state->
vs_3v = (csr & 0x0040) ? 0 : 1;
101 state->
vs_Xv = (csr & 0x0080) ? 0 : 1;
103 if ((cpr & 0x0080) && ((cpr & 0x8040) != 0x8040)) {
104 printk(
KERN_ERR "sharpsl_pcmcia_socket_state(): CPR=%04X, Low voltage!\n", cpr);
115 unsigned short cpr, ncpr,
ccr, nccr, mcr, nmcr,
imr, nimr;
117 switch (state->
Vcc) {
126 if ((state->
Vpp!=state->
Vcc) && (state->
Vpp!=0)) {
138 if ((machine_is_spitz() || machine_is_borzoi() || machine_is_akita()) && skt->
nr == 0) {
139 ncpr |= (state->
Vcc == 33) ? 0x0002 :
140 (state->
Vcc == 50) ? 0x0002 : 0;
142 ncpr |= (state->
Vcc == 33) ? 0x0001 :
143 (state->
Vcc == 50) ? 0x0002 : 0;
155 if (!(ncpr & 0x0003)) {
184 sharpsl_pcmcia_init_reset(skt);
194 sharpsl_pcmcia_init_reset(skt);
199 .hw_init = sharpsl_pcmcia_hw_init,
200 .socket_state = sharpsl_pcmcia_socket_state,
201 .configure_socket = sharpsl_pcmcia_configure_socket,
202 .socket_init = sharpsl_pcmcia_socket_init,
203 .socket_suspend = sharpsl_pcmcia_socket_suspend,
208 #ifdef CONFIG_SA1100_COLLIE
215 if (machine_is_collie())
225 static int __init sharpsl_pcmcia_init(
void)
235 if (!sharpsl_pcmcia_device)
239 &sharpsl_pcmcia_ops,
sizeof(sharpsl_pcmcia_ops));
251 static void __exit sharpsl_pcmcia_exit(
void)