aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2008-02-05 01:27:35 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-05 12:44:08 -0500
commit906da809c5be30b4c7f32bb6a489fb25ad794878 (patch)
tree9516df9eb1a64ee94d185d2711bde3d1defaabb5 /drivers/pcmcia
parentecb8a8472f6d314096f20885722f2033d2071719 (diff)
pcmcia: replace kio_addr_t with unsigned int everywhere
Remove kio_addr_t, and replace it with unsigned int. No known architecture needs more than 32 bits for IO addresses and ports and having a separate type for it is just messy. Signed-off-by: Olof Johansson <olof@lixom.net> Cc: Christoph Hellwig <hch@lst.de> Cc: Matthew Wilcox <matthew@wil.cx> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/i82092.c2
-rw-r--r--drivers/pcmcia/i82365.c18
-rw-r--r--drivers/pcmcia/m32r_cfc.c7
-rw-r--r--drivers/pcmcia/m32r_pcc.c7
-rw-r--r--drivers/pcmcia/rsrc_nonstatic.c11
-rw-r--r--drivers/pcmcia/tcic.c2
6 files changed, 25 insertions, 22 deletions
diff --git a/drivers/pcmcia/i82092.c b/drivers/pcmcia/i82092.c
index df21e2d16f87..749515534cc0 100644
--- a/drivers/pcmcia/i82092.c
+++ b/drivers/pcmcia/i82092.c
@@ -82,7 +82,7 @@ struct socket_info {
82 1 = empty socket, 82 1 = empty socket,
83 2 = card but not initialized, 83 2 = card but not initialized,
84 3 = operational card */ 84 3 = operational card */
85 kio_addr_t io_base; /* base io address of the socket */ 85 unsigned int io_base; /* base io address of the socket */
86 86
87 struct pcmcia_socket socket; 87 struct pcmcia_socket socket;
88 struct pci_dev *dev; /* The PCI device for the socket */ 88 struct pci_dev *dev; /* The PCI device for the socket */
diff --git a/drivers/pcmcia/i82365.c b/drivers/pcmcia/i82365.c
index 839bb1c0db58..32a2ab119798 100644
--- a/drivers/pcmcia/i82365.c
+++ b/drivers/pcmcia/i82365.c
@@ -164,7 +164,7 @@ struct i82365_socket {
164 u_short type, flags; 164 u_short type, flags;
165 struct pcmcia_socket socket; 165 struct pcmcia_socket socket;
166 unsigned int number; 166 unsigned int number;
167 kio_addr_t ioaddr; 167 unsigned int ioaddr;
168 u_short psock; 168 u_short psock;
169 u_char cs_irq, intr; 169 u_char cs_irq, intr;
170 union { 170 union {
@@ -238,7 +238,7 @@ static u_char i365_get(u_short sock, u_short reg)
238 unsigned long flags; 238 unsigned long flags;
239 spin_lock_irqsave(&bus_lock,flags); 239 spin_lock_irqsave(&bus_lock,flags);
240 { 240 {
241 kio_addr_t port = socket[sock].ioaddr; 241 unsigned int port = socket[sock].ioaddr;
242 u_char val; 242 u_char val;
243 reg = I365_REG(socket[sock].psock, reg); 243 reg = I365_REG(socket[sock].psock, reg);
244 outb(reg, port); val = inb(port+1); 244 outb(reg, port); val = inb(port+1);
@@ -252,7 +252,7 @@ static void i365_set(u_short sock, u_short reg, u_char data)
252 unsigned long flags; 252 unsigned long flags;
253 spin_lock_irqsave(&bus_lock,flags); 253 spin_lock_irqsave(&bus_lock,flags);
254 { 254 {
255 kio_addr_t port = socket[sock].ioaddr; 255 unsigned int port = socket[sock].ioaddr;
256 u_char val = I365_REG(socket[sock].psock, reg); 256 u_char val = I365_REG(socket[sock].psock, reg);
257 outb(val, port); outb(data, port+1); 257 outb(val, port); outb(data, port+1);
258 spin_unlock_irqrestore(&bus_lock,flags); 258 spin_unlock_irqrestore(&bus_lock,flags);
@@ -588,7 +588,7 @@ static int to_cycles(int ns)
588 588
589/*====================================================================*/ 589/*====================================================================*/
590 590
591static int __init identify(kio_addr_t port, u_short sock) 591static int __init identify(unsigned int port, u_short sock)
592{ 592{
593 u_char val; 593 u_char val;
594 int type = -1; 594 int type = -1;
@@ -659,7 +659,7 @@ static int __init identify(kio_addr_t port, u_short sock)
659static int __init is_alive(u_short sock) 659static int __init is_alive(u_short sock)
660{ 660{
661 u_char stat; 661 u_char stat;
662 kio_addr_t start, stop; 662 unsigned int start, stop;
663 663
664 stat = i365_get(sock, I365_STATUS); 664 stat = i365_get(sock, I365_STATUS);
665 start = i365_get_pair(sock, I365_IO(0)+I365_W_START); 665 start = i365_get_pair(sock, I365_IO(0)+I365_W_START);
@@ -678,7 +678,7 @@ static int __init is_alive(u_short sock)
678 678
679/*====================================================================*/ 679/*====================================================================*/
680 680
681static void __init add_socket(kio_addr_t port, int psock, int type) 681static void __init add_socket(unsigned int port, int psock, int type)
682{ 682{
683 socket[sockets].ioaddr = port; 683 socket[sockets].ioaddr = port;
684 socket[sockets].psock = psock; 684 socket[sockets].psock = psock;
@@ -698,7 +698,7 @@ static void __init add_pcic(int ns, int type)
698 base = sockets-ns; 698 base = sockets-ns;
699 if (base == 0) printk("\n"); 699 if (base == 0) printk("\n");
700 printk(KERN_INFO " %s", pcic[type].name); 700 printk(KERN_INFO " %s", pcic[type].name);
701 printk(" ISA-to-PCMCIA at port %#lx ofs 0x%02x", 701 printk(" ISA-to-PCMCIA at port %#x ofs 0x%02x",
702 t->ioaddr, t->psock*0x40); 702 t->ioaddr, t->psock*0x40);
703 printk(", %d socket%s\n", ns, ((ns > 1) ? "s" : "")); 703 printk(", %d socket%s\n", ns, ((ns > 1) ? "s" : ""));
704 704
@@ -772,7 +772,7 @@ static struct pnp_dev *i82365_pnpdev;
772static void __init isa_probe(void) 772static void __init isa_probe(void)
773{ 773{
774 int i, j, sock, k, ns, id; 774 int i, j, sock, k, ns, id;
775 kio_addr_t port; 775 unsigned int port;
776#ifdef CONFIG_PNP 776#ifdef CONFIG_PNP
777 struct isapnp_device_id *devid; 777 struct isapnp_device_id *devid;
778 struct pnp_dev *dev; 778 struct pnp_dev *dev;
@@ -1053,7 +1053,7 @@ static int i365_set_io_map(u_short sock, struct pccard_io_map *io)
1053 u_char map, ioctl; 1053 u_char map, ioctl;
1054 1054
1055 debug(1, "SetIOMap(%d, %d, %#2.2x, %d ns, " 1055 debug(1, "SetIOMap(%d, %d, %#2.2x, %d ns, "
1056 "%#lx-%#lx)\n", sock, io->map, io->flags, 1056 "%#x-%#x)\n", sock, io->map, io->flags,
1057 io->speed, io->start, io->stop); 1057 io->speed, io->start, io->stop);
1058 map = io->map; 1058 map = io->map;
1059 if ((map > 1) || (io->start > 0xffff) || (io->stop > 0xffff) || 1059 if ((map > 1) || (io->start > 0xffff) || (io->stop > 0xffff) ||
diff --git a/drivers/pcmcia/m32r_cfc.c b/drivers/pcmcia/m32r_cfc.c
index 91da15b5a81e..3616da227152 100644
--- a/drivers/pcmcia/m32r_cfc.c
+++ b/drivers/pcmcia/m32r_cfc.c
@@ -58,7 +58,7 @@ typedef struct pcc_socket {
58 u_short type, flags; 58 u_short type, flags;
59 struct pcmcia_socket socket; 59 struct pcmcia_socket socket;
60 unsigned int number; 60 unsigned int number;
61 kio_addr_t ioaddr; 61 unsigned int ioaddr;
62 u_long mapaddr; 62 u_long mapaddr;
63 u_long base; /* PCC register base */ 63 u_long base; /* PCC register base */
64 u_char cs_irq1, cs_irq2, intr; 64 u_char cs_irq1, cs_irq2, intr;
@@ -298,7 +298,8 @@ static int __init is_alive(u_short sock)
298 return 0; 298 return 0;
299} 299}
300 300
301static void add_pcc_socket(ulong base, int irq, ulong mapaddr, kio_addr_t ioaddr) 301static void add_pcc_socket(ulong base, int irq, ulong mapaddr,
302 unsigned int ioaddr)
302{ 303{
303 pcc_socket_t *t = &socket[pcc_sockets]; 304 pcc_socket_t *t = &socket[pcc_sockets];
304 305
@@ -738,7 +739,7 @@ static int __init init_m32r_pcc(void)
738#else /* CONFIG_PLAT_USRV */ 739#else /* CONFIG_PLAT_USRV */
739 { 740 {
740 ulong base, mapaddr; 741 ulong base, mapaddr;
741 kio_addr_t ioaddr; 742 unsigned int ioaddr;
742 743
743 for (i = 0 ; i < M32R_MAX_PCC ; i++) { 744 for (i = 0 ; i < M32R_MAX_PCC ; i++) {
744 base = (ulong)PLD_CFRSTCR; 745 base = (ulong)PLD_CFRSTCR;
diff --git a/drivers/pcmcia/m32r_pcc.c b/drivers/pcmcia/m32r_pcc.c
index ec4c1253ebbb..2b42b7155e34 100644
--- a/drivers/pcmcia/m32r_pcc.c
+++ b/drivers/pcmcia/m32r_pcc.c
@@ -65,7 +65,7 @@ typedef struct pcc_socket {
65 u_short type, flags; 65 u_short type, flags;
66 struct pcmcia_socket socket; 66 struct pcmcia_socket socket;
67 unsigned int number; 67 unsigned int number;
68 kio_addr_t ioaddr; 68 unsigned int ioaddr;
69 u_long mapaddr; 69 u_long mapaddr;
70 u_long base; /* PCC register base */ 70 u_long base; /* PCC register base */
71 u_char cs_irq, intr; 71 u_char cs_irq, intr;
@@ -310,7 +310,8 @@ static int __init is_alive(u_short sock)
310 return 0; 310 return 0;
311} 311}
312 312
313static void add_pcc_socket(ulong base, int irq, ulong mapaddr, kio_addr_t ioaddr) 313static void add_pcc_socket(ulong base, int irq, ulong mapaddr,
314 unsigned int ioaddr)
314{ 315{
315 pcc_socket_t *t = &socket[pcc_sockets]; 316 pcc_socket_t *t = &socket[pcc_sockets];
316 317
@@ -491,7 +492,7 @@ static int _pcc_set_io_map(u_short sock, struct pccard_io_map *io)
491 u_char map; 492 u_char map;
492 493
493 debug(3, "m32r-pcc: SetIOMap(%d, %d, %#2.2x, %d ns, " 494 debug(3, "m32r-pcc: SetIOMap(%d, %d, %#2.2x, %d ns, "
494 "%#lx-%#lx)\n", sock, io->map, io->flags, 495 "%#x-%#x)\n", sock, io->map, io->flags,
495 io->speed, io->start, io->stop); 496 io->speed, io->start, io->stop);
496 map = io->map; 497 map = io->map;
497 498
diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c
index bfcaad6021cf..a8d100707721 100644
--- a/drivers/pcmcia/rsrc_nonstatic.c
+++ b/drivers/pcmcia/rsrc_nonstatic.c
@@ -186,15 +186,16 @@ static int sub_interval(struct resource_map *map, u_long base, u_long num)
186======================================================================*/ 186======================================================================*/
187 187
188#ifdef CONFIG_PCMCIA_PROBE 188#ifdef CONFIG_PCMCIA_PROBE
189static void do_io_probe(struct pcmcia_socket *s, kio_addr_t base, kio_addr_t num) 189static void do_io_probe(struct pcmcia_socket *s, unsigned int base,
190 unsigned int num)
190{ 191{
191 struct resource *res; 192 struct resource *res;
192 struct socket_data *s_data = s->resource_data; 193 struct socket_data *s_data = s->resource_data;
193 kio_addr_t i, j, bad; 194 unsigned int i, j, bad;
194 int any; 195 int any;
195 u_char *b, hole, most; 196 u_char *b, hole, most;
196 197
197 printk(KERN_INFO "cs: IO port probe %#lx-%#lx:", 198 printk(KERN_INFO "cs: IO port probe %#x-%#x:",
198 base, base+num-1); 199 base, base+num-1);
199 200
200 /* First, what does a floating port look like? */ 201 /* First, what does a floating port look like? */
@@ -233,7 +234,7 @@ static void do_io_probe(struct pcmcia_socket *s, kio_addr_t base, kio_addr_t num
233 } else { 234 } else {
234 if (bad) { 235 if (bad) {
235 sub_interval(&s_data->io_db, bad, i-bad); 236 sub_interval(&s_data->io_db, bad, i-bad);
236 printk(" %#lx-%#lx", bad, i-1); 237 printk(" %#x-%#x", bad, i-1);
237 bad = 0; 238 bad = 0;
238 } 239 }
239 } 240 }
@@ -244,7 +245,7 @@ static void do_io_probe(struct pcmcia_socket *s, kio_addr_t base, kio_addr_t num
244 return; 245 return;
245 } else { 246 } else {
246 sub_interval(&s_data->io_db, bad, i-bad); 247 sub_interval(&s_data->io_db, bad, i-bad);
247 printk(" %#lx-%#lx", bad, i-1); 248 printk(" %#x-%#x", bad, i-1);
248 } 249 }
249 } 250 }
250 251
diff --git a/drivers/pcmcia/tcic.c b/drivers/pcmcia/tcic.c
index 749ac3710914..5792bd5c54f9 100644
--- a/drivers/pcmcia/tcic.c
+++ b/drivers/pcmcia/tcic.c
@@ -719,7 +719,7 @@ static int tcic_set_io_map(struct pcmcia_socket *sock, struct pccard_io_map *io)
719 u_short base, len, ioctl; 719 u_short base, len, ioctl;
720 720
721 debug(1, "SetIOMap(%d, %d, %#2.2x, %d ns, " 721 debug(1, "SetIOMap(%d, %d, %#2.2x, %d ns, "
722 "%#lx-%#lx)\n", psock, io->map, io->flags, 722 "%#x-%#x)\n", psock, io->map, io->flags,
723 io->speed, io->start, io->stop); 723 io->speed, io->start, io->stop);
724 if ((io->map > 1) || (io->start > 0xffff) || (io->stop > 0xffff) || 724 if ((io->map > 1) || (io->start > 0xffff) || (io->stop > 0xffff) ||
725 (io->stop < io->start)) return -EINVAL; 725 (io->stop < io->start)) return -EINVAL;