Skip to content

Commit 906da80

Browse files
olofjLinus Torvalds
authored andcommitted
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>
1 parent ecb8a84 commit 906da80

22 files changed

Lines changed: 228 additions & 222 deletions

File tree

‎Documentation/pcmcia/driver-changes.txt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ This file details changes in 2.6 which affect PCMCIA card driver authors:
3333
and can be used (e.g. for SET_NETDEV_DEV) by using
3434
handle_to_dev(client_handle_t * handle).
3535

36-
* Convert internal I/O port addresses to unsigned long (as of 2.6.11)
37-
ioaddr_t should be replaced by kio_addr_t in PCMCIA card drivers.
36+
* Convert internal I/O port addresses to unsigned int (as of 2.6.11)
37+
ioaddr_t should be replaced by unsigned int in PCMCIA card drivers.
3838

3939
* irq_mask and irq_list parameters (as of 2.6.11)
4040
The irq_mask and irq_list parameters should no longer be used in

‎drivers/bluetooth/bt3c_cs.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ static int next_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *
704704

705705
static int bt3c_config(struct pcmcia_device *link)
706706
{
707-
static kio_addr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 };
707+
static unsigned int base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 };
708708
bt3c_info_t *info = link->priv;
709709
tuple_t tuple;
710710
u_short buf[256];

‎drivers/bluetooth/btuart_cs.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ static int next_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *
634634

635635
static int btuart_config(struct pcmcia_device *link)
636636
{
637-
static kio_addr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 };
637+
static unsigned int base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 };
638638
btuart_info_t *info = link->priv;
639639
tuple_t tuple;
640640
u_short buf[256];

‎drivers/net/pcmcia/3c574_cs.c‎

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,11 @@ static char mii_preamble_required = 0;
230230
static int tc574_config(struct pcmcia_device *link);
231231
static void tc574_release(struct pcmcia_device *link);
232232

233-
static void mdio_sync(kio_addr_t ioaddr, int bits);
234-
static int mdio_read(kio_addr_t ioaddr, int phy_id, int location);
235-
static void mdio_write(kio_addr_t ioaddr, int phy_id, int location, int value);
236-
static unsigned short read_eeprom(kio_addr_t ioaddr, int index);
233+
static void mdio_sync(unsigned int ioaddr, int bits);
234+
static int mdio_read(unsigned int ioaddr, int phy_id, int location);
235+
static void mdio_write(unsigned int ioaddr, int phy_id, int location,
236+
int value);
237+
static unsigned short read_eeprom(unsigned int ioaddr, int index);
237238
static void tc574_wait_for_completion(struct net_device *dev, int cmd);
238239

239240
static void tc574_reset(struct net_device *dev);
@@ -341,7 +342,7 @@ static int tc574_config(struct pcmcia_device *link)
341342
tuple_t tuple;
342343
__le16 buf[32];
343344
int last_fn, last_ret, i, j;
344-
kio_addr_t ioaddr;
345+
unsigned int ioaddr;
345346
__be16 *phys_addr;
346347
char *cardname;
347348
__u32 config;
@@ -515,7 +516,7 @@ static int tc574_resume(struct pcmcia_device *link)
515516

516517
static void dump_status(struct net_device *dev)
517518
{
518-
kio_addr_t ioaddr = dev->base_addr;
519+
unsigned int ioaddr = dev->base_addr;
519520
EL3WINDOW(1);
520521
printk(KERN_INFO " irq status %04x, rx status %04x, tx status "
521522
"%02x, tx free %04x\n", inw(ioaddr+EL3_STATUS),
@@ -544,7 +545,7 @@ static void tc574_wait_for_completion(struct net_device *dev, int cmd)
544545
/* Read a word from the EEPROM using the regular EEPROM access register.
545546
Assume that we are in register window zero.
546547
*/
547-
static unsigned short read_eeprom(kio_addr_t ioaddr, int index)
548+
static unsigned short read_eeprom(unsigned int ioaddr, int index)
548549
{
549550
int timer;
550551
outw(EEPROM_Read + index, ioaddr + Wn0EepromCmd);
@@ -572,9 +573,9 @@ static unsigned short read_eeprom(kio_addr_t ioaddr, int index)
572573

573574
/* Generate the preamble required for initial synchronization and
574575
a few older transceivers. */
575-
static void mdio_sync(kio_addr_t ioaddr, int bits)
576+
static void mdio_sync(unsigned int ioaddr, int bits)
576577
{
577-
kio_addr_t mdio_addr = ioaddr + Wn4_PhysicalMgmt;
578+
unsigned int mdio_addr = ioaddr + Wn4_PhysicalMgmt;
578579

579580
/* Establish sync by sending at least 32 logic ones. */
580581
while (-- bits >= 0) {
@@ -583,12 +584,12 @@ static void mdio_sync(kio_addr_t ioaddr, int bits)
583584
}
584585
}
585586

586-
static int mdio_read(kio_addr_t ioaddr, int phy_id, int location)
587+
static int mdio_read(unsigned int ioaddr, int phy_id, int location)
587588
{
588589
int i;
589590
int read_cmd = (0xf6 << 10) | (phy_id << 5) | location;
590591
unsigned int retval = 0;
591-
kio_addr_t mdio_addr = ioaddr + Wn4_PhysicalMgmt;
592+
unsigned int mdio_addr = ioaddr + Wn4_PhysicalMgmt;
592593

593594
if (mii_preamble_required)
594595
mdio_sync(ioaddr, 32);
@@ -608,10 +609,10 @@ static int mdio_read(kio_addr_t ioaddr, int phy_id, int location)
608609
return (retval>>1) & 0xffff;
609610
}
610611

611-
static void mdio_write(kio_addr_t ioaddr, int phy_id, int location, int value)
612+
static void mdio_write(unsigned int ioaddr, int phy_id, int location, int value)
612613
{
613614
int write_cmd = 0x50020000 | (phy_id << 23) | (location << 18) | value;
614-
kio_addr_t mdio_addr = ioaddr + Wn4_PhysicalMgmt;
615+
unsigned int mdio_addr = ioaddr + Wn4_PhysicalMgmt;
615616
int i;
616617

617618
if (mii_preamble_required)
@@ -637,7 +638,7 @@ static void tc574_reset(struct net_device *dev)
637638
{
638639
struct el3_private *lp = netdev_priv(dev);
639640
int i;
640-
kio_addr_t ioaddr = dev->base_addr;
641+
unsigned int ioaddr = dev->base_addr;
641642
unsigned long flags;
642643

643644
tc574_wait_for_completion(dev, TotalReset|0x10);
@@ -741,7 +742,7 @@ static int el3_open(struct net_device *dev)
741742
static void el3_tx_timeout(struct net_device *dev)
742743
{
743744
struct el3_private *lp = netdev_priv(dev);
744-
kio_addr_t ioaddr = dev->base_addr;
745+
unsigned int ioaddr = dev->base_addr;
745746

746747
printk(KERN_NOTICE "%s: Transmit timed out!\n", dev->name);
747748
dump_status(dev);
@@ -756,7 +757,7 @@ static void el3_tx_timeout(struct net_device *dev)
756757
static void pop_tx_status(struct net_device *dev)
757758
{
758759
struct el3_private *lp = netdev_priv(dev);
759-
kio_addr_t ioaddr = dev->base_addr;
760+
unsigned int ioaddr = dev->base_addr;
760761
int i;
761762

762763
/* Clear the Tx status stack. */
@@ -779,7 +780,7 @@ static void pop_tx_status(struct net_device *dev)
779780

780781
static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev)
781782
{
782-
kio_addr_t ioaddr = dev->base_addr;
783+
unsigned int ioaddr = dev->base_addr;
783784
struct el3_private *lp = netdev_priv(dev);
784785
unsigned long flags;
785786

@@ -813,7 +814,7 @@ static irqreturn_t el3_interrupt(int irq, void *dev_id)
813814
{
814815
struct net_device *dev = (struct net_device *) dev_id;
815816
struct el3_private *lp = netdev_priv(dev);
816-
kio_addr_t ioaddr;
817+
unsigned int ioaddr;
817818
unsigned status;
818819
int work_budget = max_interrupt_work;
819820
int handled = 0;
@@ -907,7 +908,7 @@ static void media_check(unsigned long arg)
907908
{
908909
struct net_device *dev = (struct net_device *) arg;
909910
struct el3_private *lp = netdev_priv(dev);
910-
kio_addr_t ioaddr = dev->base_addr;
911+
unsigned int ioaddr = dev->base_addr;
911912
unsigned long flags;
912913
unsigned short /* cable, */ media, partner;
913914

@@ -996,7 +997,7 @@ static struct net_device_stats *el3_get_stats(struct net_device *dev)
996997
static void update_stats(struct net_device *dev)
997998
{
998999
struct el3_private *lp = netdev_priv(dev);
999-
kio_addr_t ioaddr = dev->base_addr;
1000+
unsigned int ioaddr = dev->base_addr;
10001001
u8 rx, tx, up;
10011002

10021003
DEBUG(2, "%s: updating the statistics.\n", dev->name);
@@ -1033,7 +1034,7 @@ static void update_stats(struct net_device *dev)
10331034
static int el3_rx(struct net_device *dev, int worklimit)
10341035
{
10351036
struct el3_private *lp = netdev_priv(dev);
1036-
kio_addr_t ioaddr = dev->base_addr;
1037+
unsigned int ioaddr = dev->base_addr;
10371038
short rx_status;
10381039

10391040
DEBUG(3, "%s: in rx_packet(), status %4.4x, rx_status %4.4x.\n",
@@ -1094,7 +1095,7 @@ static const struct ethtool_ops netdev_ethtool_ops = {
10941095
static int el3_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
10951096
{
10961097
struct el3_private *lp = netdev_priv(dev);
1097-
kio_addr_t ioaddr = dev->base_addr;
1098+
unsigned int ioaddr = dev->base_addr;
10981099
u16 *data = (u16 *)&rq->ifr_ifru;
10991100
int phy = lp->phys & 0x1f;
11001101

@@ -1148,7 +1149,7 @@ static int el3_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
11481149

11491150
static void set_rx_mode(struct net_device *dev)
11501151
{
1151-
kio_addr_t ioaddr = dev->base_addr;
1152+
unsigned int ioaddr = dev->base_addr;
11521153

11531154
if (dev->flags & IFF_PROMISC)
11541155
outw(SetRxFilter | RxStation | RxMulticast | RxBroadcast | RxProm,
@@ -1161,7 +1162,7 @@ static void set_rx_mode(struct net_device *dev)
11611162

11621163
static int el3_close(struct net_device *dev)
11631164
{
1164-
kio_addr_t ioaddr = dev->base_addr;
1165+
unsigned int ioaddr = dev->base_addr;
11651166
struct el3_private *lp = netdev_priv(dev);
11661167
struct pcmcia_device *link = lp->p_dev;
11671168

‎drivers/net/pcmcia/3c589_cs.c‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ DRV_NAME ".c " DRV_VERSION " 2001/10/13 00:08:50 (David Hinds)";
145145
static int tc589_config(struct pcmcia_device *link);
146146
static void tc589_release(struct pcmcia_device *link);
147147

148-
static u16 read_eeprom(kio_addr_t ioaddr, int index);
148+
static u16 read_eeprom(unsigned int ioaddr, int index);
149149
static void tc589_reset(struct net_device *dev);
150150
static void media_check(unsigned long arg);
151151
static int el3_config(struct net_device *dev, struct ifmap *map);
@@ -254,7 +254,7 @@ static int tc589_config(struct pcmcia_device *link)
254254
__le16 buf[32];
255255
__be16 *phys_addr;
256256
int last_fn, last_ret, i, j, multi = 0, fifo;
257-
kio_addr_t ioaddr;
257+
unsigned int ioaddr;
258258
char *ram_split[] = {"5:3", "3:1", "1:1", "3:5"};
259259
DECLARE_MAC_BUF(mac);
260260

@@ -403,7 +403,7 @@ static void tc589_wait_for_completion(struct net_device *dev, int cmd)
403403
Read a word from the EEPROM using the regular EEPROM access register.
404404
Assume that we are in register window zero.
405405
*/
406-
static u16 read_eeprom(kio_addr_t ioaddr, int index)
406+
static u16 read_eeprom(unsigned int ioaddr, int index)
407407
{
408408
int i;
409409
outw(EEPROM_READ + index, ioaddr + 10);
@@ -421,7 +421,7 @@ static u16 read_eeprom(kio_addr_t ioaddr, int index)
421421
static void tc589_set_xcvr(struct net_device *dev, int if_port)
422422
{
423423
struct el3_private *lp = netdev_priv(dev);
424-
kio_addr_t ioaddr = dev->base_addr;
424+
unsigned int ioaddr = dev->base_addr;
425425

426426
EL3WINDOW(0);
427427
switch (if_port) {
@@ -443,7 +443,7 @@ static void tc589_set_xcvr(struct net_device *dev, int if_port)
443443

444444
static void dump_status(struct net_device *dev)
445445
{
446-
kio_addr_t ioaddr = dev->base_addr;
446+
unsigned int ioaddr = dev->base_addr;
447447
EL3WINDOW(1);
448448
printk(KERN_INFO " irq status %04x, rx status %04x, tx status "
449449
"%02x tx free %04x\n", inw(ioaddr+EL3_STATUS),
@@ -459,7 +459,7 @@ static void dump_status(struct net_device *dev)
459459
/* Reset and restore all of the 3c589 registers. */
460460
static void tc589_reset(struct net_device *dev)
461461
{
462-
kio_addr_t ioaddr = dev->base_addr;
462+
unsigned int ioaddr = dev->base_addr;
463463
int i;
464464

465465
EL3WINDOW(0);
@@ -567,7 +567,7 @@ static int el3_open(struct net_device *dev)
567567
static void el3_tx_timeout(struct net_device *dev)
568568
{
569569
struct el3_private *lp = netdev_priv(dev);
570-
kio_addr_t ioaddr = dev->base_addr;
570+
unsigned int ioaddr = dev->base_addr;
571571

572572
printk(KERN_WARNING "%s: Transmit timed out!\n", dev->name);
573573
dump_status(dev);
@@ -582,7 +582,7 @@ static void el3_tx_timeout(struct net_device *dev)
582582
static void pop_tx_status(struct net_device *dev)
583583
{
584584
struct el3_private *lp = netdev_priv(dev);
585-
kio_addr_t ioaddr = dev->base_addr;
585+
unsigned int ioaddr = dev->base_addr;
586586
int i;
587587

588588
/* Clear the Tx status stack. */
@@ -604,7 +604,7 @@ static void pop_tx_status(struct net_device *dev)
604604

605605
static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev)
606606
{
607-
kio_addr_t ioaddr = dev->base_addr;
607+
unsigned int ioaddr = dev->base_addr;
608608
struct el3_private *priv = netdev_priv(dev);
609609
unsigned long flags;
610610

@@ -641,7 +641,7 @@ static irqreturn_t el3_interrupt(int irq, void *dev_id)
641641
{
642642
struct net_device *dev = (struct net_device *) dev_id;
643643
struct el3_private *lp = netdev_priv(dev);
644-
kio_addr_t ioaddr;
644+
unsigned int ioaddr;
645645
__u16 status;
646646
int i = 0, handled = 1;
647647

@@ -727,7 +727,7 @@ static void media_check(unsigned long arg)
727727
{
728728
struct net_device *dev = (struct net_device *)(arg);
729729
struct el3_private *lp = netdev_priv(dev);
730-
kio_addr_t ioaddr = dev->base_addr;
730+
unsigned int ioaddr = dev->base_addr;
731731
u16 media, errs;
732732
unsigned long flags;
733733

@@ -828,7 +828,7 @@ static struct net_device_stats *el3_get_stats(struct net_device *dev)
828828
static void update_stats(struct net_device *dev)
829829
{
830830
struct el3_private *lp = netdev_priv(dev);
831-
kio_addr_t ioaddr = dev->base_addr;
831+
unsigned int ioaddr = dev->base_addr;
832832

833833
DEBUG(2, "%s: updating the statistics.\n", dev->name);
834834
/* Turn off statistics updates while reading. */
@@ -855,7 +855,7 @@ static void update_stats(struct net_device *dev)
855855
static int el3_rx(struct net_device *dev)
856856
{
857857
struct el3_private *lp = netdev_priv(dev);
858-
kio_addr_t ioaddr = dev->base_addr;
858+
unsigned int ioaddr = dev->base_addr;
859859
int worklimit = 32;
860860
short rx_status;
861861

@@ -909,7 +909,7 @@ static void set_multicast_list(struct net_device *dev)
909909
{
910910
struct el3_private *lp = netdev_priv(dev);
911911
struct pcmcia_device *link = lp->p_dev;
912-
kio_addr_t ioaddr = dev->base_addr;
912+
unsigned int ioaddr = dev->base_addr;
913913
u16 opts = SetRxFilter | RxStation | RxBroadcast;
914914

915915
if (!pcmcia_dev_present(link)) return;
@@ -924,7 +924,7 @@ static int el3_close(struct net_device *dev)
924924
{
925925
struct el3_private *lp = netdev_priv(dev);
926926
struct pcmcia_device *link = lp->p_dev;
927-
kio_addr_t ioaddr = dev->base_addr;
927+
unsigned int ioaddr = dev->base_addr;
928928

929929
DEBUG(1, "%s: shutting down ethercard.\n", dev->name);
930930

0 commit comments

Comments
 (0)