git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git]
/
drivers
/
pcmcia
/
au1000_pb1x00.c
diff --git
a/drivers/pcmcia/au1000_pb1x00.c
b/drivers/pcmcia/au1000_pb1x00.c
index
40d5037
..
fd5522e
100644
(file)
--- a/
drivers/pcmcia/au1000_pb1x00.c
+++ b/
drivers/pcmcia/au1000_pb1x00.c
@@
-21,6
+21,7
@@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
*/
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
*/
+#include <linux/config.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/delay.h>
@@
-32,7
+33,6
@@
#include <linux/proc_fs.h>
#include <linux/types.h>
#include <linux/proc_fs.h>
#include <linux/types.h>
-#include <pcmcia/version.h>
#include <pcmcia/cs_types.h>
#include <pcmcia/cs.h>
#include <pcmcia/ss.h>
#include <pcmcia/cs_types.h>
#include <pcmcia/cs.h>
#include <pcmcia/ss.h>
@@
-55,7
+55,7
@@
#define PCMCIA_IRQ AU1000_GPIO_15
#elif defined (CONFIG_MIPS_PB1500)
#include <asm/pb1500.h>
#define PCMCIA_IRQ AU1000_GPIO_15
#elif defined (CONFIG_MIPS_PB1500)
#include <asm/pb1500.h>
-#define PCMCIA_IRQ AU1
000_GPIO_11 /* fixme */
+#define PCMCIA_IRQ AU1
500_GPIO_203
#elif defined (CONFIG_MIPS_PB1100)
#include <asm/pb1100.h>
#define PCMCIA_IRQ AU1000_GPIO_11
#elif defined (CONFIG_MIPS_PB1100)
#include <asm/pb1100.h>
#define PCMCIA_IRQ AU1000_GPIO_11
@@
-82,9
+82,9
@@
static int pb1x00_pcmcia_init(struct pcmcia_init *init)
#else /* fixme -- take care of the Pb1500 at some point */
u16 pcr;
#else /* fixme -- take care of the Pb1500 at some point */
u16 pcr;
- pcr = au_readw(P
B1100_MEM_PCMCIA
) & ~0xf; /* turn off power */
- pcr &= ~(P
B1100_PC_DEASSERT_RST | PB1100_
PC_DRV_EN);
- au_writew(pcr, P
B1100_MEM_PCMCIA
);
+ pcr = au_readw(P
CMCIA_BOARD_REG
) & ~0xf; /* turn off power */
+ pcr &= ~(P
C_DEASSERT_RST |
PC_DRV_EN);
+ au_writew(pcr, P
CMCIA_BOARD_REG
);
au_sync_delay(500);
return PCMCIA_NUM_SOCKS;
#endif
au_sync_delay(500);
return PCMCIA_NUM_SOCKS;
#endif
@@
-102,9
+102,9
@@
static int pb1x00_pcmcia_shutdown(void)
return 0;
#else
u16 pcr;
return 0;
#else
u16 pcr;
- pcr = au_readw(P
B1100_MEM_PCMCIA
) & ~0xf; /* turn off power */
- pcr &= ~(P
B1100_PC_DEASSERT_RST | PB1100_
PC_DRV_EN);
- au_writew(pcr, P
B1100_MEM_PCMCIA
);
+ pcr = au_readw(P
CMCIA_BOARD_REG
) & ~0xf; /* turn off power */
+ pcr &= ~(P
C_DEASSERT_RST |
PC_DRV_EN);
+ au_writew(pcr, P
CMCIA_BOARD_REG
);
au_sync_delay(2);
return 0;
#endif
au_sync_delay(2);
return 0;
#endif
@@
-123,9
+123,14
@@
pb1x00_pcmcia_socket_state(unsigned sock, struct pcmcia_state *state)
vs0 = (vs0 >> 4) & 0x3;
vs1 = (vs1 >> 12) & 0x3;
#else
vs0 = (vs0 >> 4) & 0x3;
vs1 = (vs1 >> 12) & 0x3;
#else
- vs0 = (au_readw(PB1100_BOARD_STATUS) >> 4) & 0x3;
+ vs0 = (au_readw(BOARD_STATUS_REG) >> 4) & 0x3;
+#ifdef CONFIG_MIPS_PB1500
+ inserted0 = !((au_readl(GPIO2_PINSTATE) >> 1) & 0x1); /* gpio 201 */
+#else /* Pb1100 */
inserted0 = !((au_readl(SYS_PINSTATERD) >> 9) & 0x1); /* gpio 9 */
#endif
inserted0 = !((au_readl(SYS_PINSTATERD) >> 9) & 0x1); /* gpio 9 */
#endif
+ inserted1 = 0;
+#endif
state->ready = 0;
state->vs_Xv = 0;
state->ready = 0;
state->vs_Xv = 0;
@@
-145,7
+150,7
@@
pb1x00_pcmcia_socket_state(unsigned sock, struct pcmcia_state *state)
/* return without setting 'detect' */
printk(KERN_ERR "pb1x00 bad VS (%d)\n",
vs0);
/* return without setting 'detect' */
printk(KERN_ERR "pb1x00 bad VS (%d)\n",
vs0);
- return;
+ return
0
;
}
state->detect = 1;
}
}
state->detect = 1;
}
@@
-163,7
+168,7
@@
pb1x00_pcmcia_socket_state(unsigned sock, struct pcmcia_state *state)
/* return without setting 'detect' */
printk(KERN_ERR "pb1x00 bad VS (%d)\n",
vs1);
/* return without setting 'detect' */
printk(KERN_ERR "pb1x00 bad VS (%d)\n",
vs1);
- return;
+ return
0
;
}
state->detect = 1;
}
}
state->detect = 1;
}
@@
-324,7
+329,7
@@
pb1x00_pcmcia_configure_socket(const struct pcmcia_configure *configure)
#else
#else
- pcr = au_readw(P
B1100_MEM_PCMCIA
) & ~0xf;
+ pcr = au_readw(P
CMCIA_BOARD_REG
) & ~0xf;
debug("Vcc %dV Vpp %dV, pcr %x, reset %d\n",
configure->vcc, configure->vpp, pcr, configure->reset);
debug("Vcc %dV Vpp %dV, pcr %x, reset %d\n",
configure->vcc, configure->vpp, pcr, configure->reset);
@@
-383,26
+388,27
@@
pb1x00_pcmcia_configure_socket(const struct pcmcia_configure *configure)
break;
}
break;
}
- au_writew(pcr, P
B1100_MEM_PCMCIA
);
+ au_writew(pcr, P
CMCIA_BOARD_REG
);
au_sync_delay(300);
if (!configure->reset) {
au_sync_delay(300);
if (!configure->reset) {
- pcr |= P
B1100_P
C_DRV_EN;
- au_writew(pcr, P
B1100_MEM_PCMCIA
);
+ pcr |= PC_DRV_EN;
+ au_writew(pcr, P
CMCIA_BOARD_REG
);
au_sync_delay(100);
au_sync_delay(100);
- pcr |= P
B1100_P
C_DEASSERT_RST;
- au_writew(pcr, P
B1100_MEM_PCMCIA
);
+ pcr |= PC_DEASSERT_RST;
+ au_writew(pcr, P
CMCIA_BOARD_REG
);
au_sync_delay(100);
}
else {
au_sync_delay(100);
}
else {
- pcr &= ~(P
B1100_PC_DEASSERT_RST | PB1100_
PC_DRV_EN);
- au_writew(pcr, P
B1100_MEM_PCMCIA
);
+ pcr &= ~(P
C_DEASSERT_RST |
PC_DRV_EN);
+ au_writew(pcr, P
CMCIA_BOARD_REG
);
au_sync_delay(100);
}
#endif
return 0;
}
au_sync_delay(100);
}
#endif
return 0;
}
+
struct pcmcia_low_level pb1x00_pcmcia_ops = {
pb1x00_pcmcia_init,
pb1x00_pcmcia_shutdown,
struct pcmcia_low_level pb1x00_pcmcia_ops = {
pb1x00_pcmcia_init,
pb1x00_pcmcia_shutdown,