Commit e49546f9 authored by Dominik Brodowski's avatar Dominik Brodowski Committed by Linus Torvalds

[PATCH] pcmcia: use unsigned long for IO port address

With Randy Dunlap <rddunlap@osdl.org>

PCMCIA: convert internal I/O port addresses to unsigned long (kio_addr_t).

Dominik pointed out that some ioaddr_t data are exposed to userspace, so don't
touch those structures.

Linus said:
But the right thing is definitely to make an IO port pointer be
"unsigned int" or even "unsigned long".
URL:  http://lkml.org/lkml/2005/1/11/168Signed-off-by: default avatarRandy Dunlap <rddunlap@osdl.org>
Signed-off-by: default avatarDominik Brodowski <linux@brodo.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 38be2661
...@@ -771,7 +771,7 @@ static int next_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse) ...@@ -771,7 +771,7 @@ static int next_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
static void bt3c_config(dev_link_t *link) static void bt3c_config(dev_link_t *link)
{ {
static ioaddr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 }; static kio_addr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 };
client_handle_t handle = link->handle; client_handle_t handle = link->handle;
bt3c_info_t *info = link->priv; bt3c_info_t *info = link->priv;
tuple_t tuple; tuple_t tuple;
......
...@@ -690,7 +690,7 @@ static int next_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse) ...@@ -690,7 +690,7 @@ static int next_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
static void btuart_config(dev_link_t *link) static void btuart_config(dev_link_t *link)
{ {
static ioaddr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 }; static kio_addr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 };
client_handle_t handle = link->handle; client_handle_t handle = link->handle;
btuart_info_t *info = link->priv; btuart_info_t *info = link->priv;
tuple_t tuple; tuple_t tuple;
......
...@@ -231,10 +231,10 @@ static void tc574_release(dev_link_t *link); ...@@ -231,10 +231,10 @@ static void tc574_release(dev_link_t *link);
static int tc574_event(event_t event, int priority, static int tc574_event(event_t event, int priority,
event_callback_args_t *args); event_callback_args_t *args);
static void mdio_sync(ioaddr_t ioaddr, int bits); static void mdio_sync(kio_addr_t ioaddr, int bits);
static int mdio_read(ioaddr_t ioaddr, int phy_id, int location); static int mdio_read(kio_addr_t ioaddr, int phy_id, int location);
static void mdio_write(ioaddr_t ioaddr, int phy_id, int location, int value); static void mdio_write(kio_addr_t ioaddr, int phy_id, int location, int value);
static unsigned short read_eeprom(ioaddr_t ioaddr, int index); static unsigned short read_eeprom(kio_addr_t ioaddr, int index);
static void tc574_wait_for_completion(struct net_device *dev, int cmd); static void tc574_wait_for_completion(struct net_device *dev, int cmd);
static void tc574_reset(struct net_device *dev); static void tc574_reset(struct net_device *dev);
...@@ -385,7 +385,7 @@ static void tc574_config(dev_link_t *link) ...@@ -385,7 +385,7 @@ static void tc574_config(dev_link_t *link)
cisparse_t parse; cisparse_t parse;
unsigned short buf[32]; unsigned short buf[32];
int last_fn, last_ret, i, j; int last_fn, last_ret, i, j;
ioaddr_t ioaddr; kio_addr_t ioaddr;
u16 *phys_addr; u16 *phys_addr;
char *cardname; char *cardname;
union wn3_config config; union wn3_config config;
...@@ -606,7 +606,7 @@ static int tc574_event(event_t event, int priority, ...@@ -606,7 +606,7 @@ static int tc574_event(event_t event, int priority,
static void dump_status(struct net_device *dev) static void dump_status(struct net_device *dev)
{ {
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
EL3WINDOW(1); EL3WINDOW(1);
printk(KERN_INFO " irq status %04x, rx status %04x, tx status " printk(KERN_INFO " irq status %04x, rx status %04x, tx status "
"%02x, tx free %04x\n", inw(ioaddr+EL3_STATUS), "%02x, tx free %04x\n", inw(ioaddr+EL3_STATUS),
...@@ -635,7 +635,7 @@ static void tc574_wait_for_completion(struct net_device *dev, int cmd) ...@@ -635,7 +635,7 @@ static void tc574_wait_for_completion(struct net_device *dev, int cmd)
/* Read a word from the EEPROM using the regular EEPROM access register. /* Read a word from the EEPROM using the regular EEPROM access register.
Assume that we are in register window zero. Assume that we are in register window zero.
*/ */
static unsigned short read_eeprom(ioaddr_t ioaddr, int index) static unsigned short read_eeprom(kio_addr_t ioaddr, int index)
{ {
int timer; int timer;
outw(EEPROM_Read + index, ioaddr + Wn0EepromCmd); outw(EEPROM_Read + index, ioaddr + Wn0EepromCmd);
...@@ -663,9 +663,9 @@ static unsigned short read_eeprom(ioaddr_t ioaddr, int index) ...@@ -663,9 +663,9 @@ static unsigned short read_eeprom(ioaddr_t ioaddr, int index)
/* Generate the preamble required for initial synchronization and /* Generate the preamble required for initial synchronization and
a few older transceivers. */ a few older transceivers. */
static void mdio_sync(ioaddr_t ioaddr, int bits) static void mdio_sync(kio_addr_t ioaddr, int bits)
{ {
int mdio_addr = ioaddr + Wn4_PhysicalMgmt; kio_addr_t mdio_addr = ioaddr + Wn4_PhysicalMgmt;
/* Establish sync by sending at least 32 logic ones. */ /* Establish sync by sending at least 32 logic ones. */
while (-- bits >= 0) { while (-- bits >= 0) {
...@@ -674,12 +674,12 @@ static void mdio_sync(ioaddr_t ioaddr, int bits) ...@@ -674,12 +674,12 @@ static void mdio_sync(ioaddr_t ioaddr, int bits)
} }
} }
static int mdio_read(ioaddr_t ioaddr, int phy_id, int location) static int mdio_read(kio_addr_t ioaddr, int phy_id, int location)
{ {
int i; int i;
int read_cmd = (0xf6 << 10) | (phy_id << 5) | location; int read_cmd = (0xf6 << 10) | (phy_id << 5) | location;
unsigned int retval = 0; unsigned int retval = 0;
int mdio_addr = ioaddr + Wn4_PhysicalMgmt; kio_addr_t mdio_addr = ioaddr + Wn4_PhysicalMgmt;
if (mii_preamble_required) if (mii_preamble_required)
mdio_sync(ioaddr, 32); mdio_sync(ioaddr, 32);
...@@ -699,10 +699,10 @@ static int mdio_read(ioaddr_t ioaddr, int phy_id, int location) ...@@ -699,10 +699,10 @@ static int mdio_read(ioaddr_t ioaddr, int phy_id, int location)
return (retval>>1) & 0xffff; return (retval>>1) & 0xffff;
} }
static void mdio_write(ioaddr_t ioaddr, int phy_id, int location, int value) static void mdio_write(kio_addr_t ioaddr, int phy_id, int location, int value)
{ {
int write_cmd = 0x50020000 | (phy_id << 23) | (location << 18) | value; int write_cmd = 0x50020000 | (phy_id << 23) | (location << 18) | value;
int mdio_addr = ioaddr + Wn4_PhysicalMgmt; kio_addr_t mdio_addr = ioaddr + Wn4_PhysicalMgmt;
int i; int i;
if (mii_preamble_required) if (mii_preamble_required)
...@@ -727,7 +727,8 @@ static void mdio_write(ioaddr_t ioaddr, int phy_id, int location, int value) ...@@ -727,7 +727,8 @@ static void mdio_write(ioaddr_t ioaddr, int phy_id, int location, int value)
static void tc574_reset(struct net_device *dev) static void tc574_reset(struct net_device *dev)
{ {
struct el3_private *lp = netdev_priv(dev); struct el3_private *lp = netdev_priv(dev);
int i, ioaddr = dev->base_addr; int i;
kio_addr_t ioaddr = dev->base_addr;
unsigned long flags; unsigned long flags;
tc574_wait_for_completion(dev, TotalReset|0x10); tc574_wait_for_completion(dev, TotalReset|0x10);
...@@ -831,7 +832,7 @@ static int el3_open(struct net_device *dev) ...@@ -831,7 +832,7 @@ static int el3_open(struct net_device *dev)
static void el3_tx_timeout(struct net_device *dev) static void el3_tx_timeout(struct net_device *dev)
{ {
struct el3_private *lp = netdev_priv(dev); struct el3_private *lp = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
printk(KERN_NOTICE "%s: Transmit timed out!\n", dev->name); printk(KERN_NOTICE "%s: Transmit timed out!\n", dev->name);
dump_status(dev); dump_status(dev);
...@@ -846,7 +847,7 @@ static void el3_tx_timeout(struct net_device *dev) ...@@ -846,7 +847,7 @@ static void el3_tx_timeout(struct net_device *dev)
static void pop_tx_status(struct net_device *dev) static void pop_tx_status(struct net_device *dev)
{ {
struct el3_private *lp = netdev_priv(dev); struct el3_private *lp = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
int i; int i;
/* Clear the Tx status stack. */ /* Clear the Tx status stack. */
...@@ -869,7 +870,7 @@ static void pop_tx_status(struct net_device *dev) ...@@ -869,7 +870,7 @@ static void pop_tx_status(struct net_device *dev)
static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev) static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev)
{ {
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
struct el3_private *lp = netdev_priv(dev); struct el3_private *lp = netdev_priv(dev);
unsigned long flags; unsigned long flags;
...@@ -903,7 +904,8 @@ static irqreturn_t el3_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -903,7 +904,8 @@ static irqreturn_t el3_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{ {
struct net_device *dev = (struct net_device *) dev_id; struct net_device *dev = (struct net_device *) dev_id;
struct el3_private *lp = netdev_priv(dev); struct el3_private *lp = netdev_priv(dev);
ioaddr_t ioaddr, status; kio_addr_t ioaddr;
unsigned status;
int work_budget = max_interrupt_work; int work_budget = max_interrupt_work;
int handled = 0; int handled = 0;
...@@ -996,7 +998,7 @@ static void media_check(unsigned long arg) ...@@ -996,7 +998,7 @@ static void media_check(unsigned long arg)
{ {
struct net_device *dev = (struct net_device *) arg; struct net_device *dev = (struct net_device *) arg;
struct el3_private *lp = netdev_priv(dev); struct el3_private *lp = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
unsigned long flags; unsigned long flags;
unsigned short /* cable, */ media, partner; unsigned short /* cable, */ media, partner;
...@@ -1085,7 +1087,7 @@ static struct net_device_stats *el3_get_stats(struct net_device *dev) ...@@ -1085,7 +1087,7 @@ static struct net_device_stats *el3_get_stats(struct net_device *dev)
static void update_stats(struct net_device *dev) static void update_stats(struct net_device *dev)
{ {
struct el3_private *lp = netdev_priv(dev); struct el3_private *lp = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
u8 rx, tx, up; u8 rx, tx, up;
DEBUG(2, "%s: updating the statistics.\n", dev->name); DEBUG(2, "%s: updating the statistics.\n", dev->name);
...@@ -1122,7 +1124,7 @@ static void update_stats(struct net_device *dev) ...@@ -1122,7 +1124,7 @@ static void update_stats(struct net_device *dev)
static int el3_rx(struct net_device *dev, int worklimit) static int el3_rx(struct net_device *dev, int worklimit)
{ {
struct el3_private *lp = netdev_priv(dev); struct el3_private *lp = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
short rx_status; short rx_status;
DEBUG(3, "%s: in rx_packet(), status %4.4x, rx_status %4.4x.\n", DEBUG(3, "%s: in rx_packet(), status %4.4x, rx_status %4.4x.\n",
...@@ -1184,7 +1186,7 @@ static struct ethtool_ops netdev_ethtool_ops = { ...@@ -1184,7 +1186,7 @@ static struct ethtool_ops netdev_ethtool_ops = {
static int el3_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) static int el3_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{ {
struct el3_private *lp = netdev_priv(dev); struct el3_private *lp = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
u16 *data = (u16 *)&rq->ifr_ifru; u16 *data = (u16 *)&rq->ifr_ifru;
int phy = lp->phys & 0x1f; int phy = lp->phys & 0x1f;
...@@ -1238,7 +1240,7 @@ static int el3_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -1238,7 +1240,7 @@ static int el3_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
static void set_rx_mode(struct net_device *dev) static void set_rx_mode(struct net_device *dev)
{ {
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
if (dev->flags & IFF_PROMISC) if (dev->flags & IFF_PROMISC)
outw(SetRxFilter | RxStation | RxMulticast | RxBroadcast | RxProm, outw(SetRxFilter | RxStation | RxMulticast | RxBroadcast | RxProm,
...@@ -1251,7 +1253,7 @@ static void set_rx_mode(struct net_device *dev) ...@@ -1251,7 +1253,7 @@ static void set_rx_mode(struct net_device *dev)
static int el3_close(struct net_device *dev) static int el3_close(struct net_device *dev)
{ {
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
struct el3_private *lp = netdev_priv(dev); struct el3_private *lp = netdev_priv(dev);
dev_link_t *link = &lp->link; dev_link_t *link = &lp->link;
......
...@@ -147,7 +147,7 @@ static void tc589_release(dev_link_t *link); ...@@ -147,7 +147,7 @@ static void tc589_release(dev_link_t *link);
static int tc589_event(event_t event, int priority, static int tc589_event(event_t event, int priority,
event_callback_args_t *args); event_callback_args_t *args);
static u16 read_eeprom(ioaddr_t ioaddr, int index); static u16 read_eeprom(kio_addr_t ioaddr, int index);
static void tc589_reset(struct net_device *dev); static void tc589_reset(struct net_device *dev);
static void media_check(unsigned long arg); static void media_check(unsigned long arg);
static int el3_config(struct net_device *dev, struct ifmap *map); static int el3_config(struct net_device *dev, struct ifmap *map);
...@@ -299,7 +299,7 @@ static void tc589_config(dev_link_t *link) ...@@ -299,7 +299,7 @@ static void tc589_config(dev_link_t *link)
cisparse_t parse; cisparse_t parse;
u16 buf[32], *phys_addr; u16 buf[32], *phys_addr;
int last_fn, last_ret, i, j, multi = 0, fifo; int last_fn, last_ret, i, j, multi = 0, fifo;
ioaddr_t ioaddr; kio_addr_t ioaddr;
char *ram_split[] = {"5:3", "3:1", "1:1", "3:5"}; char *ram_split[] = {"5:3", "3:1", "1:1", "3:5"};
DEBUG(0, "3c589_config(0x%p)\n", link); DEBUG(0, "3c589_config(0x%p)\n", link);
...@@ -500,7 +500,7 @@ static void tc589_wait_for_completion(struct net_device *dev, int cmd) ...@@ -500,7 +500,7 @@ static void tc589_wait_for_completion(struct net_device *dev, int cmd)
Read a word from the EEPROM using the regular EEPROM access register. Read a word from the EEPROM using the regular EEPROM access register.
Assume that we are in register window zero. Assume that we are in register window zero.
*/ */
static u16 read_eeprom(ioaddr_t ioaddr, int index) static u16 read_eeprom(kio_addr_t ioaddr, int index)
{ {
int i; int i;
outw(EEPROM_READ + index, ioaddr + 10); outw(EEPROM_READ + index, ioaddr + 10);
...@@ -518,7 +518,7 @@ static u16 read_eeprom(ioaddr_t ioaddr, int index) ...@@ -518,7 +518,7 @@ static u16 read_eeprom(ioaddr_t ioaddr, int index)
static void tc589_set_xcvr(struct net_device *dev, int if_port) static void tc589_set_xcvr(struct net_device *dev, int if_port)
{ {
struct el3_private *lp = netdev_priv(dev); struct el3_private *lp = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
EL3WINDOW(0); EL3WINDOW(0);
switch (if_port) { switch (if_port) {
...@@ -540,7 +540,7 @@ static void tc589_set_xcvr(struct net_device *dev, int if_port) ...@@ -540,7 +540,7 @@ static void tc589_set_xcvr(struct net_device *dev, int if_port)
static void dump_status(struct net_device *dev) static void dump_status(struct net_device *dev)
{ {
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
EL3WINDOW(1); EL3WINDOW(1);
printk(KERN_INFO " irq status %04x, rx status %04x, tx status " printk(KERN_INFO " irq status %04x, rx status %04x, tx status "
"%02x tx free %04x\n", inw(ioaddr+EL3_STATUS), "%02x tx free %04x\n", inw(ioaddr+EL3_STATUS),
...@@ -556,7 +556,7 @@ static void dump_status(struct net_device *dev) ...@@ -556,7 +556,7 @@ static void dump_status(struct net_device *dev)
/* Reset and restore all of the 3c589 registers. */ /* Reset and restore all of the 3c589 registers. */
static void tc589_reset(struct net_device *dev) static void tc589_reset(struct net_device *dev)
{ {
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
int i; int i;
EL3WINDOW(0); EL3WINDOW(0);
...@@ -664,7 +664,7 @@ static int el3_open(struct net_device *dev) ...@@ -664,7 +664,7 @@ static int el3_open(struct net_device *dev)
static void el3_tx_timeout(struct net_device *dev) static void el3_tx_timeout(struct net_device *dev)
{ {
struct el3_private *lp = netdev_priv(dev); struct el3_private *lp = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
printk(KERN_WARNING "%s: Transmit timed out!\n", dev->name); printk(KERN_WARNING "%s: Transmit timed out!\n", dev->name);
dump_status(dev); dump_status(dev);
...@@ -679,7 +679,7 @@ static void el3_tx_timeout(struct net_device *dev) ...@@ -679,7 +679,7 @@ static void el3_tx_timeout(struct net_device *dev)
static void pop_tx_status(struct net_device *dev) static void pop_tx_status(struct net_device *dev)
{ {
struct el3_private *lp = netdev_priv(dev); struct el3_private *lp = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
int i; int i;
/* Clear the Tx status stack. */ /* Clear the Tx status stack. */
...@@ -701,7 +701,7 @@ static void pop_tx_status(struct net_device *dev) ...@@ -701,7 +701,7 @@ static void pop_tx_status(struct net_device *dev)
static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev) static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev)
{ {
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
struct el3_private *priv = netdev_priv(dev); struct el3_private *priv = netdev_priv(dev);
DEBUG(3, "%s: el3_start_xmit(length = %ld) called, " DEBUG(3, "%s: el3_start_xmit(length = %ld) called, "
...@@ -734,7 +734,8 @@ static irqreturn_t el3_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -734,7 +734,8 @@ static irqreturn_t el3_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{ {
struct net_device *dev = (struct net_device *) dev_id; struct net_device *dev = (struct net_device *) dev_id;
struct el3_private *lp = netdev_priv(dev); struct el3_private *lp = netdev_priv(dev);
ioaddr_t ioaddr, status; kio_addr_t ioaddr;
__u16 status;
int i = 0, handled = 1; int i = 0, handled = 1;
if (!netif_device_present(dev)) if (!netif_device_present(dev))
...@@ -819,7 +820,7 @@ static void media_check(unsigned long arg) ...@@ -819,7 +820,7 @@ static void media_check(unsigned long arg)
{ {
struct net_device *dev = (struct net_device *)(arg); struct net_device *dev = (struct net_device *)(arg);
struct el3_private *lp = netdev_priv(dev); struct el3_private *lp = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
u16 media, errs; u16 media, errs;
unsigned long flags; unsigned long flags;
...@@ -921,7 +922,7 @@ static struct net_device_stats *el3_get_stats(struct net_device *dev) ...@@ -921,7 +922,7 @@ static struct net_device_stats *el3_get_stats(struct net_device *dev)
static void update_stats(struct net_device *dev) static void update_stats(struct net_device *dev)
{ {
struct el3_private *lp = netdev_priv(dev); struct el3_private *lp = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
DEBUG(2, "%s: updating the statistics.\n", dev->name); DEBUG(2, "%s: updating the statistics.\n", dev->name);
/* Turn off statistics updates while reading. */ /* Turn off statistics updates while reading. */
...@@ -948,7 +949,7 @@ static void update_stats(struct net_device *dev) ...@@ -948,7 +949,7 @@ static void update_stats(struct net_device *dev)
static int el3_rx(struct net_device *dev) static int el3_rx(struct net_device *dev)
{ {
struct el3_private *lp = netdev_priv(dev); struct el3_private *lp = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
int worklimit = 32; int worklimit = 32;
short rx_status; short rx_status;
...@@ -1003,7 +1004,7 @@ static void set_multicast_list(struct net_device *dev) ...@@ -1003,7 +1004,7 @@ static void set_multicast_list(struct net_device *dev)
{ {
struct el3_private *lp = netdev_priv(dev); struct el3_private *lp = netdev_priv(dev);
dev_link_t *link = &lp->link; dev_link_t *link = &lp->link;
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
u16 opts = SetRxFilter | RxStation | RxBroadcast; u16 opts = SetRxFilter | RxStation | RxBroadcast;
if (!(DEV_OK(link))) return; if (!(DEV_OK(link))) return;
...@@ -1018,7 +1019,7 @@ static int el3_close(struct net_device *dev) ...@@ -1018,7 +1019,7 @@ static int el3_close(struct net_device *dev)
{ {
struct el3_private *lp = netdev_priv(dev); struct el3_private *lp = netdev_priv(dev);
dev_link_t *link = &lp->link; dev_link_t *link = &lp->link;
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
DEBUG(1, "%s: shutting down ethercard.\n", dev->name); DEBUG(1, "%s: shutting down ethercard.\n", dev->name);
......
...@@ -98,8 +98,8 @@ static irqreturn_t ei_irq_wrapper(int irq, void *dev_id, struct pt_regs *regs); ...@@ -98,8 +98,8 @@ static irqreturn_t ei_irq_wrapper(int irq, void *dev_id, struct pt_regs *regs);
static void ei_watchdog(u_long arg); static void ei_watchdog(u_long arg);
static void axnet_reset_8390(struct net_device *dev); static void axnet_reset_8390(struct net_device *dev);
static int mdio_read(ioaddr_t addr, int phy_id, int loc); static int mdio_read(kio_addr_t addr, int phy_id, int loc);
static void mdio_write(ioaddr_t addr, int phy_id, int loc, int value); static void mdio_write(kio_addr_t addr, int phy_id, int loc, int value);
static void get_8390_hdr(struct net_device *, static void get_8390_hdr(struct net_device *,
struct e8390_pkt_hdr *, int); struct e8390_pkt_hdr *, int);
...@@ -243,7 +243,7 @@ static void axnet_detach(dev_link_t *link) ...@@ -243,7 +243,7 @@ static void axnet_detach(dev_link_t *link)
static int get_prom(dev_link_t *link) static int get_prom(dev_link_t *link)
{ {
struct net_device *dev = link->priv; struct net_device *dev = link->priv;
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
int i, j; int i, j;
/* This is based on drivers/net/ne.c */ /* This is based on drivers/net/ne.c */
...@@ -563,7 +563,7 @@ static int axnet_event(event_t event, int priority, ...@@ -563,7 +563,7 @@ static int axnet_event(event_t event, int priority,
#define MDIO_MASK 0x0f #define MDIO_MASK 0x0f
#define MDIO_ENB_IN 0x02 #define MDIO_ENB_IN 0x02
static void mdio_sync(ioaddr_t addr) static void mdio_sync(kio_addr_t addr)
{ {
int bits; int bits;
for (bits = 0; bits < 32; bits++) { for (bits = 0; bits < 32; bits++) {
...@@ -572,7 +572,7 @@ static void mdio_sync(ioaddr_t addr) ...@@ -572,7 +572,7 @@ static void mdio_sync(ioaddr_t addr)
} }
} }
static int mdio_read(ioaddr_t addr, int phy_id, int loc) static int mdio_read(kio_addr_t addr, int phy_id, int loc)
{ {
u_int cmd = (0xf6<<10)|(phy_id<<5)|loc; u_int cmd = (0xf6<<10)|(phy_id<<5)|loc;
int i, retval = 0; int i, retval = 0;
...@@ -591,7 +591,7 @@ static int mdio_read(ioaddr_t addr, int phy_id, int loc) ...@@ -591,7 +591,7 @@ static int mdio_read(ioaddr_t addr, int phy_id, int loc)
return (retval>>1) & 0xffff; return (retval>>1) & 0xffff;
} }
static void mdio_write(ioaddr_t addr, int phy_id, int loc, int value) static void mdio_write(kio_addr_t addr, int phy_id, int loc, int value)
{ {
u_int cmd = (0x05<<28)|(phy_id<<23)|(loc<<18)|(1<<17)|value; u_int cmd = (0x05<<28)|(phy_id<<23)|(loc<<18)|(1<<17)|value;
int i; int i;
...@@ -662,7 +662,7 @@ static int axnet_close(struct net_device *dev) ...@@ -662,7 +662,7 @@ static int axnet_close(struct net_device *dev)
static void axnet_reset_8390(struct net_device *dev) static void axnet_reset_8390(struct net_device *dev)
{ {
ioaddr_t nic_base = dev->base_addr; kio_addr_t nic_base = dev->base_addr;
int i; int i;
ei_status.txing = ei_status.dmaing = 0; ei_status.txing = ei_status.dmaing = 0;
...@@ -697,8 +697,8 @@ static void ei_watchdog(u_long arg) ...@@ -697,8 +697,8 @@ static void ei_watchdog(u_long arg)
{ {
struct net_device *dev = (struct net_device *)(arg); struct net_device *dev = (struct net_device *)(arg);
axnet_dev_t *info = PRIV(dev); axnet_dev_t *info = PRIV(dev);
ioaddr_t nic_base = dev->base_addr; kio_addr_t nic_base = dev->base_addr;
ioaddr_t mii_addr = nic_base + AXNET_MII_EEP; kio_addr_t mii_addr = nic_base + AXNET_MII_EEP;
u_short link; u_short link;
if (!netif_device_present(dev)) goto reschedule; if (!netif_device_present(dev)) goto reschedule;
...@@ -768,7 +768,7 @@ static int axnet_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -768,7 +768,7 @@ static int axnet_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{ {
axnet_dev_t *info = PRIV(dev); axnet_dev_t *info = PRIV(dev);
u16 *data = (u16 *)&rq->ifr_ifru; u16 *data = (u16 *)&rq->ifr_ifru;
ioaddr_t mii_addr = dev->base_addr + AXNET_MII_EEP; kio_addr_t mii_addr = dev->base_addr + AXNET_MII_EEP;
switch (cmd) { switch (cmd) {
case SIOCGMIIPHY: case SIOCGMIIPHY:
data[0] = info->phy_id; data[0] = info->phy_id;
...@@ -790,7 +790,7 @@ static void get_8390_hdr(struct net_device *dev, ...@@ -790,7 +790,7 @@ static void get_8390_hdr(struct net_device *dev,
struct e8390_pkt_hdr *hdr, struct e8390_pkt_hdr *hdr,
int ring_page) int ring_page)
{ {
ioaddr_t nic_base = dev->base_addr; kio_addr_t nic_base = dev->base_addr;
outb_p(0, nic_base + EN0_RSARLO); /* On page boundary */ outb_p(0, nic_base + EN0_RSARLO); /* On page boundary */
outb_p(ring_page, nic_base + EN0_RSARHI); outb_p(ring_page, nic_base + EN0_RSARHI);
...@@ -808,7 +808,7 @@ static void get_8390_hdr(struct net_device *dev, ...@@ -808,7 +808,7 @@ static void get_8390_hdr(struct net_device *dev,
static void block_input(struct net_device *dev, int count, static void block_input(struct net_device *dev, int count,
struct sk_buff *skb, int ring_offset) struct sk_buff *skb, int ring_offset)
{ {
ioaddr_t nic_base = dev->base_addr; kio_addr_t nic_base = dev->base_addr;
int xfer_count = count; int xfer_count = count;
char *buf = skb->data; char *buf = skb->data;
...@@ -831,7 +831,7 @@ static void block_input(struct net_device *dev, int count, ...@@ -831,7 +831,7 @@ static void block_input(struct net_device *dev, int count,
static void block_output(struct net_device *dev, int count, static void block_output(struct net_device *dev, int count,
const u_char *buf, const int start_page) const u_char *buf, const int start_page)
{ {
ioaddr_t nic_base = dev->base_addr; kio_addr_t nic_base = dev->base_addr;
#ifdef PCMCIA_DEBUG #ifdef PCMCIA_DEBUG
if (ei_debug > 4) if (ei_debug > 4)
......
...@@ -343,7 +343,7 @@ do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) ...@@ -343,7 +343,7 @@ do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
static int mfc_try_io_port(dev_link_t *link) static int mfc_try_io_port(dev_link_t *link)
{ {
int i, ret; int i, ret;
static ioaddr_t serial_base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 }; static kio_addr_t serial_base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 };
for (i = 0; i < 5; i++) { for (i = 0; i < 5; i++) {
link->io.BasePort2 = serial_base[i]; link->io.BasePort2 = serial_base[i];
...@@ -361,7 +361,7 @@ static int mfc_try_io_port(dev_link_t *link) ...@@ -361,7 +361,7 @@ static int mfc_try_io_port(dev_link_t *link)
static int ungermann_try_io_port(dev_link_t *link) static int ungermann_try_io_port(dev_link_t *link)
{ {
int ret; int ret;
ioaddr_t ioaddr; kio_addr_t ioaddr;
/* /*
Ungermann-Bass Access/CARD accepts 0x300,0x320,0x340,0x360 Ungermann-Bass Access/CARD accepts 0x300,0x320,0x340,0x360
0x380,0x3c0 only for ioport. 0x380,0x3c0 only for ioport.
...@@ -388,7 +388,7 @@ static void fmvj18x_config(dev_link_t *link) ...@@ -388,7 +388,7 @@ static void fmvj18x_config(dev_link_t *link)
cisparse_t parse; cisparse_t parse;
u_short buf[32]; u_short buf[32];
int i, last_fn, last_ret, ret; int i, last_fn, last_ret, ret;
ioaddr_t ioaddr; kio_addr_t ioaddr;
cardtype_t cardtype; cardtype_t cardtype;
char *card_name = "unknown"; char *card_name = "unknown";
u_char *node_id; u_char *node_id;
...@@ -668,7 +668,7 @@ static int fmvj18x_setup_mfc(dev_link_t *link) ...@@ -668,7 +668,7 @@ static int fmvj18x_setup_mfc(dev_link_t *link)
u_char __iomem *base; u_char __iomem *base;
int i, j; int i, j;
struct net_device *dev = link->priv; struct net_device *dev = link->priv;
ioaddr_t ioaddr; kio_addr_t ioaddr;
/* Allocate a small memory window */ /* Allocate a small memory window */
req.Attributes = WIN_DATA_WIDTH_8|WIN_MEMORY_TYPE_AM|WIN_ENABLE; req.Attributes = WIN_DATA_WIDTH_8|WIN_MEMORY_TYPE_AM|WIN_ENABLE;
...@@ -793,7 +793,7 @@ static irqreturn_t fjn_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -793,7 +793,7 @@ static irqreturn_t fjn_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{ {
struct net_device *dev = dev_id; struct net_device *dev = dev_id;
local_info_t *lp = netdev_priv(dev); local_info_t *lp = netdev_priv(dev);
ioaddr_t ioaddr; kio_addr_t ioaddr;
unsigned short tx_stat, rx_stat; unsigned short tx_stat, rx_stat;
if (lp == NULL) { if (lp == NULL) {
...@@ -852,7 +852,7 @@ static irqreturn_t fjn_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -852,7 +852,7 @@ static irqreturn_t fjn_interrupt(int irq, void *dev_id, struct pt_regs *regs)
static void fjn_tx_timeout(struct net_device *dev) static void fjn_tx_timeout(struct net_device *dev)
{ {
struct local_info_t *lp = netdev_priv(dev); struct local_info_t *lp = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
printk(KERN_NOTICE "%s: transmit timed out with status %04x, %s?\n", printk(KERN_NOTICE "%s: transmit timed out with status %04x, %s?\n",
dev->name, htons(inw(ioaddr + TX_STATUS)), dev->name, htons(inw(ioaddr + TX_STATUS)),
...@@ -882,7 +882,7 @@ static void fjn_tx_timeout(struct net_device *dev) ...@@ -882,7 +882,7 @@ static void fjn_tx_timeout(struct net_device *dev)
static int fjn_start_xmit(struct sk_buff *skb, struct net_device *dev) static int fjn_start_xmit(struct sk_buff *skb, struct net_device *dev)
{ {
struct local_info_t *lp = netdev_priv(dev); struct local_info_t *lp = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
short length = skb->len; short length = skb->len;
if (length < ETH_ZLEN) if (length < ETH_ZLEN)
...@@ -956,7 +956,7 @@ static int fjn_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -956,7 +956,7 @@ static int fjn_start_xmit(struct sk_buff *skb, struct net_device *dev)
static void fjn_reset(struct net_device *dev) static void fjn_reset(struct net_device *dev)
{ {
struct local_info_t *lp = netdev_priv(dev); struct local_info_t *lp = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
int i; int i;
DEBUG(4, "fjn_reset(%s) called.\n",dev->name); DEBUG(4, "fjn_reset(%s) called.\n",dev->name);
...@@ -1042,7 +1042,7 @@ static void fjn_reset(struct net_device *dev) ...@@ -1042,7 +1042,7 @@ static void fjn_reset(struct net_device *dev)
static void fjn_rx(struct net_device *dev) static void fjn_rx(struct net_device *dev)
{ {
struct local_info_t *lp = netdev_priv(dev); struct local_info_t *lp = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
int boguscount = 10; /* 5 -> 10: by agy 19940922 */ int boguscount = 10; /* 5 -> 10: by agy 19940922 */
DEBUG(4, "%s: in rx_packet(), rx_status %02x.\n", DEBUG(4, "%s: in rx_packet(), rx_status %02x.\n",
...@@ -1197,7 +1197,7 @@ static int fjn_close(struct net_device *dev) ...@@ -1197,7 +1197,7 @@ static int fjn_close(struct net_device *dev)
{ {
struct local_info_t *lp = netdev_priv(dev); struct local_info_t *lp = netdev_priv(dev);
dev_link_t *link = &lp->link; dev_link_t *link = &lp->link;
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
DEBUG(4, "fjn_close('%s').\n", dev->name); DEBUG(4, "fjn_close('%s').\n", dev->name);
...@@ -1240,7 +1240,7 @@ static struct net_device_stats *fjn_get_stats(struct net_device *dev) ...@@ -1240,7 +1240,7 @@ static struct net_device_stats *fjn_get_stats(struct net_device *dev)
static void set_rx_mode(struct net_device *dev) static void set_rx_mode(struct net_device *dev)
{ {
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
struct local_info_t *lp = netdev_priv(dev); struct local_info_t *lp = netdev_priv(dev);
u_char mc_filter[8]; /* Multicast hash filter */ u_char mc_filter[8]; /* Multicast hash filter */
u_long flags; u_long flags;
......
...@@ -561,7 +561,7 @@ mace_read ...@@ -561,7 +561,7 @@ mace_read
assuming that during normal operation, the MACE is always in assuming that during normal operation, the MACE is always in
bank 0. bank 0.
---------------------------------------------------------------------------- */ ---------------------------------------------------------------------------- */
static int mace_read(mace_private *lp, ioaddr_t ioaddr, int reg) static int mace_read(mace_private *lp, kio_addr_t ioaddr, int reg)
{ {
int data = 0xFF; int data = 0xFF;
unsigned long flags; unsigned long flags;
...@@ -588,7 +588,7 @@ mace_write ...@@ -588,7 +588,7 @@ mace_write
are assuming that during normal operation, the MACE is always in are assuming that during normal operation, the MACE is always in
bank 0. bank 0.
---------------------------------------------------------------------------- */ ---------------------------------------------------------------------------- */
static void mace_write(mace_private *lp, ioaddr_t ioaddr, int reg, int data) static void mace_write(mace_private *lp, kio_addr_t ioaddr, int reg, int data)
{ {
unsigned long flags; unsigned long flags;
...@@ -610,7 +610,7 @@ static void mace_write(mace_private *lp, ioaddr_t ioaddr, int reg, int data) ...@@ -610,7 +610,7 @@ static void mace_write(mace_private *lp, ioaddr_t ioaddr, int reg, int data)
mace_init mace_init
Resets the MACE chip. Resets the MACE chip.
---------------------------------------------------------------------------- */ ---------------------------------------------------------------------------- */
static int mace_init(mace_private *lp, ioaddr_t ioaddr, char *enet_addr) static int mace_init(mace_private *lp, kio_addr_t ioaddr, char *enet_addr)
{ {
int i; int i;
int ct = 0; int ct = 0;
...@@ -702,7 +702,7 @@ static void nmclan_config(dev_link_t *link) ...@@ -702,7 +702,7 @@ static void nmclan_config(dev_link_t *link)
cisparse_t parse; cisparse_t parse;
u_char buf[64]; u_char buf[64];
int i, last_ret, last_fn; int i, last_ret, last_fn;
ioaddr_t ioaddr; kio_addr_t ioaddr;
DEBUG(0, "nmclan_config(0x%p)\n", link); DEBUG(0, "nmclan_config(0x%p)\n", link);
...@@ -935,7 +935,7 @@ mace_open ...@@ -935,7 +935,7 @@ mace_open
---------------------------------------------------------------------------- */ ---------------------------------------------------------------------------- */
static int mace_open(struct net_device *dev) static int mace_open(struct net_device *dev)
{ {
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
mace_private *lp = netdev_priv(dev); mace_private *lp = netdev_priv(dev);
dev_link_t *link = &lp->link; dev_link_t *link = &lp->link;
...@@ -958,7 +958,7 @@ mace_close ...@@ -958,7 +958,7 @@ mace_close
---------------------------------------------------------------------------- */ ---------------------------------------------------------------------------- */
static int mace_close(struct net_device *dev) static int mace_close(struct net_device *dev)
{ {
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
mace_private *lp = netdev_priv(dev); mace_private *lp = netdev_priv(dev);
dev_link_t *link = &lp->link; dev_link_t *link = &lp->link;
...@@ -1031,7 +1031,7 @@ static void mace_tx_timeout(struct net_device *dev) ...@@ -1031,7 +1031,7 @@ static void mace_tx_timeout(struct net_device *dev)
static int mace_start_xmit(struct sk_buff *skb, struct net_device *dev) static int mace_start_xmit(struct sk_buff *skb, struct net_device *dev)
{ {
mace_private *lp = netdev_priv(dev); mace_private *lp = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
netif_stop_queue(dev); netif_stop_queue(dev);
...@@ -1092,7 +1092,7 @@ static irqreturn_t mace_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -1092,7 +1092,7 @@ static irqreturn_t mace_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{ {
struct net_device *dev = (struct net_device *) dev_id; struct net_device *dev = (struct net_device *) dev_id;
mace_private *lp = netdev_priv(dev); mace_private *lp = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
int status; int status;
int IntrCnt = MACE_MAX_IR_ITERATIONS; int IntrCnt = MACE_MAX_IR_ITERATIONS;
...@@ -1234,7 +1234,7 @@ mace_rx ...@@ -1234,7 +1234,7 @@ mace_rx
static int mace_rx(struct net_device *dev, unsigned char RxCnt) static int mace_rx(struct net_device *dev, unsigned char RxCnt)
{ {
mace_private *lp = netdev_priv(dev); mace_private *lp = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
unsigned char rx_framecnt; unsigned char rx_framecnt;
unsigned short rx_status; unsigned short rx_status;
...@@ -1398,7 +1398,7 @@ update_stats ...@@ -1398,7 +1398,7 @@ update_stats
card's SRAM fast enough. If this happens, something is card's SRAM fast enough. If this happens, something is
seriously wrong with the hardware. seriously wrong with the hardware.
---------------------------------------------------------------------------- */ ---------------------------------------------------------------------------- */
static void update_stats(ioaddr_t ioaddr, struct net_device *dev) static void update_stats(kio_addr_t ioaddr, struct net_device *dev)
{ {
mace_private *lp = netdev_priv(dev); mace_private *lp = netdev_priv(dev);
...@@ -1544,7 +1544,7 @@ static void restore_multicast_list(struct net_device *dev) ...@@ -1544,7 +1544,7 @@ static void restore_multicast_list(struct net_device *dev)
mace_private *lp = netdev_priv(dev); mace_private *lp = netdev_priv(dev);
int num_addrs = lp->multicast_num_addrs; int num_addrs = lp->multicast_num_addrs;
int *ladrf = lp->multicast_ladrf; int *ladrf = lp->multicast_ladrf;
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
int i; int i;
DEBUG(2, "%s: restoring Rx mode to %d addresses.\n", DEBUG(2, "%s: restoring Rx mode to %d addresses.\n",
...@@ -1636,7 +1636,7 @@ static void set_multicast_list(struct net_device *dev) ...@@ -1636,7 +1636,7 @@ static void set_multicast_list(struct net_device *dev)
static void restore_multicast_list(struct net_device *dev) static void restore_multicast_list(struct net_device *dev)
{ {
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
mace_private *lp = netdev_priv(dev); mace_private *lp = netdev_priv(dev);
DEBUG(2, "%s: restoring Rx mode to %d addresses.\n", dev->name, DEBUG(2, "%s: restoring Rx mode to %d addresses.\n", dev->name,
......
...@@ -388,7 +388,7 @@ static hw_info_t *get_hwinfo(dev_link_t *link) ...@@ -388,7 +388,7 @@ static hw_info_t *get_hwinfo(dev_link_t *link)
static hw_info_t *get_prom(dev_link_t *link) static hw_info_t *get_prom(dev_link_t *link)
{ {
struct net_device *dev = link->priv; struct net_device *dev = link->priv;
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
u_char prom[32]; u_char prom[32];
int i, j; int i, j;
...@@ -464,7 +464,7 @@ static hw_info_t *get_dl10019(dev_link_t *link) ...@@ -464,7 +464,7 @@ static hw_info_t *get_dl10019(dev_link_t *link)
static hw_info_t *get_ax88190(dev_link_t *link) static hw_info_t *get_ax88190(dev_link_t *link)
{ {
struct net_device *dev = link->priv; struct net_device *dev = link->priv;
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
int i, j; int i, j;
/* Not much of a test, but the alternatives are messy */ /* Not much of a test, but the alternatives are messy */
...@@ -852,7 +852,7 @@ static int pcnet_event(event_t event, int priority, ...@@ -852,7 +852,7 @@ static int pcnet_event(event_t event, int priority,
#define MDIO_DATA_READ 0x10 #define MDIO_DATA_READ 0x10
#define MDIO_MASK 0x0f #define MDIO_MASK 0x0f
static void mdio_sync(ioaddr_t addr) static void mdio_sync(kio_addr_t addr)
{ {
int bits, mask = inb(addr) & MDIO_MASK; int bits, mask = inb(addr) & MDIO_MASK;
for (bits = 0; bits < 32; bits++) { for (bits = 0; bits < 32; bits++) {
...@@ -861,7 +861,7 @@ static void mdio_sync(ioaddr_t addr) ...@@ -861,7 +861,7 @@ static void mdio_sync(ioaddr_t addr)
} }
} }
static int mdio_read(ioaddr_t addr, int phy_id, int loc) static int mdio_read(kio_addr_t addr, int phy_id, int loc)
{ {
u_int cmd = (0x06<<10)|(phy_id<<5)|loc; u_int cmd = (0x06<<10)|(phy_id<<5)|loc;
int i, retval = 0, mask = inb(addr) & MDIO_MASK; int i, retval = 0, mask = inb(addr) & MDIO_MASK;
...@@ -880,7 +880,7 @@ static int mdio_read(ioaddr_t addr, int phy_id, int loc) ...@@ -880,7 +880,7 @@ static int mdio_read(ioaddr_t addr, int phy_id, int loc)
return (retval>>1) & 0xffff; return (retval>>1) & 0xffff;
} }
static void mdio_write(ioaddr_t addr, int phy_id, int loc, int value) static void mdio_write(kio_addr_t addr, int phy_id, int loc, int value)
{ {
u_int cmd = (0x05<<28)|(phy_id<<23)|(loc<<18)|(1<<17)|value; u_int cmd = (0x05<<28)|(phy_id<<23)|(loc<<18)|(1<<17)|value;
int i, mask = inb(addr) & MDIO_MASK; int i, mask = inb(addr) & MDIO_MASK;
...@@ -897,7 +897,7 @@ static void mdio_write(ioaddr_t addr, int phy_id, int loc, int value) ...@@ -897,7 +897,7 @@ static void mdio_write(ioaddr_t addr, int phy_id, int loc, int value)
} }
} }
static void mdio_reset(ioaddr_t addr, int phy_id) static void mdio_reset(kio_addr_t addr, int phy_id)
{ {
outb_p(0x08, addr); outb_p(0x08, addr);
outb_p(0x0c, addr); outb_p(0x0c, addr);
...@@ -923,10 +923,10 @@ static void mdio_reset(ioaddr_t addr, int phy_id) ...@@ -923,10 +923,10 @@ static void mdio_reset(ioaddr_t addr, int phy_id)
#define DL19FDUPLX 0x0400 /* DL10019 Full duplex mode */ #define DL19FDUPLX 0x0400 /* DL10019 Full duplex mode */
static int read_eeprom(ioaddr_t ioaddr, int location) static int read_eeprom(kio_addr_t ioaddr, int location)
{ {
int i, retval = 0; int i, retval = 0;
ioaddr_t ee_addr = ioaddr + DLINK_EEPROM; kio_addr_t ee_addr = ioaddr + DLINK_EEPROM;
int read_cmd = location | (EE_READ_CMD << 8); int read_cmd = location | (EE_READ_CMD << 8);
outb(0, ee_addr); outb(0, ee_addr);
...@@ -957,10 +957,10 @@ static int read_eeprom(ioaddr_t ioaddr, int location) ...@@ -957,10 +957,10 @@ static int read_eeprom(ioaddr_t ioaddr, int location)
In ASIC mode, EE_ADOT is used to output the data to the ASIC. In ASIC mode, EE_ADOT is used to output the data to the ASIC.
*/ */
static void write_asic(ioaddr_t ioaddr, int location, short asic_data) static void write_asic(kio_addr_t ioaddr, int location, short asic_data)
{ {
int i; int i;
ioaddr_t ee_addr = ioaddr + DLINK_EEPROM; kio_addr_t ee_addr = ioaddr + DLINK_EEPROM;
short dataval; short dataval;
int read_cmd = location | (EE_READ_CMD << 8); int read_cmd = location | (EE_READ_CMD << 8);
...@@ -1002,7 +1002,7 @@ static void write_asic(ioaddr_t ioaddr, int location, short asic_data) ...@@ -1002,7 +1002,7 @@ static void write_asic(ioaddr_t ioaddr, int location, short asic_data)
static void set_misc_reg(struct net_device *dev) static void set_misc_reg(struct net_device *dev)
{ {
ioaddr_t nic_base = dev->base_addr; kio_addr_t nic_base = dev->base_addr;
pcnet_dev_t *info = PRIV(dev); pcnet_dev_t *info = PRIV(dev);
u_char tmp; u_char tmp;
...@@ -1034,7 +1034,7 @@ static void set_misc_reg(struct net_device *dev) ...@@ -1034,7 +1034,7 @@ static void set_misc_reg(struct net_device *dev)
static void mii_phy_probe(struct net_device *dev) static void mii_phy_probe(struct net_device *dev)
{ {
pcnet_dev_t *info = PRIV(dev); pcnet_dev_t *info = PRIV(dev);
ioaddr_t mii_addr = dev->base_addr + DLINK_GPIO; kio_addr_t mii_addr = dev->base_addr + DLINK_GPIO;
int i; int i;
u_int tmp, phyid; u_int tmp, phyid;
...@@ -1109,7 +1109,7 @@ static int pcnet_close(struct net_device *dev) ...@@ -1109,7 +1109,7 @@ static int pcnet_close(struct net_device *dev)
static void pcnet_reset_8390(struct net_device *dev) static void pcnet_reset_8390(struct net_device *dev)
{ {
ioaddr_t nic_base = dev->base_addr; kio_addr_t nic_base = dev->base_addr;
int i; int i;
ei_status.txing = ei_status.dmaing = 0; ei_status.txing = ei_status.dmaing = 0;
...@@ -1167,8 +1167,8 @@ static void ei_watchdog(u_long arg) ...@@ -1167,8 +1167,8 @@ static void ei_watchdog(u_long arg)
{ {
struct net_device *dev = (struct net_device *)arg; struct net_device *dev = (struct net_device *)arg;
pcnet_dev_t *info = PRIV(dev); pcnet_dev_t *info = PRIV(dev);
ioaddr_t nic_base = dev->base_addr; kio_addr_t nic_base = dev->base_addr;
ioaddr_t mii_addr = nic_base + DLINK_GPIO; kio_addr_t mii_addr = nic_base + DLINK_GPIO;
u_short link; u_short link;
if (!netif_device_present(dev)) goto reschedule; if (!netif_device_present(dev)) goto reschedule;
...@@ -1271,7 +1271,7 @@ static int ei_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -1271,7 +1271,7 @@ static int ei_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{ {
pcnet_dev_t *info = PRIV(dev); pcnet_dev_t *info = PRIV(dev);
u16 *data = (u16 *)&rq->ifr_ifru; u16 *data = (u16 *)&rq->ifr_ifru;
ioaddr_t mii_addr = dev->base_addr + DLINK_GPIO; kio_addr_t mii_addr = dev->base_addr + DLINK_GPIO;
switch (cmd) { switch (cmd) {
case SIOCGMIIPHY: case SIOCGMIIPHY:
data[0] = info->phy_id; data[0] = info->phy_id;
...@@ -1293,7 +1293,7 @@ static void dma_get_8390_hdr(struct net_device *dev, ...@@ -1293,7 +1293,7 @@ static void dma_get_8390_hdr(struct net_device *dev,
struct e8390_pkt_hdr *hdr, struct e8390_pkt_hdr *hdr,
int ring_page) int ring_page)
{ {
ioaddr_t nic_base = dev->base_addr; kio_addr_t nic_base = dev->base_addr;
if (ei_status.dmaing) { if (ei_status.dmaing) {
printk(KERN_NOTICE "%s: DMAing conflict in dma_block_input." printk(KERN_NOTICE "%s: DMAing conflict in dma_block_input."
...@@ -1324,7 +1324,7 @@ static void dma_get_8390_hdr(struct net_device *dev, ...@@ -1324,7 +1324,7 @@ static void dma_get_8390_hdr(struct net_device *dev,
static void dma_block_input(struct net_device *dev, int count, static void dma_block_input(struct net_device *dev, int count,
struct sk_buff *skb, int ring_offset) struct sk_buff *skb, int ring_offset)
{ {
ioaddr_t nic_base = dev->base_addr; kio_addr_t nic_base = dev->base_addr;
int xfer_count = count; int xfer_count = count;
char *buf = skb->data; char *buf = skb->data;
...@@ -1379,7 +1379,7 @@ static void dma_block_input(struct net_device *dev, int count, ...@@ -1379,7 +1379,7 @@ static void dma_block_input(struct net_device *dev, int count,
static void dma_block_output(struct net_device *dev, int count, static void dma_block_output(struct net_device *dev, int count,
const u_char *buf, const int start_page) const u_char *buf, const int start_page)
{ {
ioaddr_t nic_base = dev->base_addr; kio_addr_t nic_base = dev->base_addr;
pcnet_dev_t *info = PRIV(dev); pcnet_dev_t *info = PRIV(dev);
#ifdef PCMCIA_DEBUG #ifdef PCMCIA_DEBUG
int retries = 0; int retries = 0;
......
...@@ -295,7 +295,7 @@ static int s9k_config(struct net_device *dev, struct ifmap *map); ...@@ -295,7 +295,7 @@ static int s9k_config(struct net_device *dev, struct ifmap *map);
static void smc_set_xcvr(struct net_device *dev, int if_port); static void smc_set_xcvr(struct net_device *dev, int if_port);
static void smc_reset(struct net_device *dev); static void smc_reset(struct net_device *dev);
static void media_check(u_long arg); static void media_check(u_long arg);
static void mdio_sync(ioaddr_t addr); static void mdio_sync(kio_addr_t addr);
static int mdio_read(struct net_device *dev, int phy_id, int loc); static int mdio_read(struct net_device *dev, int phy_id, int loc);
static void mdio_write(struct net_device *dev, int phy_id, int loc, int value); static void mdio_write(struct net_device *dev, int phy_id, int loc, int value);
static int smc_link_ok(struct net_device *dev); static int smc_link_ok(struct net_device *dev);
...@@ -611,8 +611,8 @@ static void mot_config(dev_link_t *link) ...@@ -611,8 +611,8 @@ static void mot_config(dev_link_t *link)
{ {
struct net_device *dev = link->priv; struct net_device *dev = link->priv;
struct smc_private *smc = netdev_priv(dev); struct smc_private *smc = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
ioaddr_t iouart = link->io.BasePort2; kio_addr_t iouart = link->io.BasePort2;
/* Set UART base address and force map with COR bit 1 */ /* Set UART base address and force map with COR bit 1 */
writeb(iouart & 0xff, smc->base + MOT_UART + CISREG_IOBASE_0); writeb(iouart & 0xff, smc->base + MOT_UART + CISREG_IOBASE_0);
...@@ -631,7 +631,7 @@ static void mot_config(dev_link_t *link) ...@@ -631,7 +631,7 @@ static void mot_config(dev_link_t *link)
static int mot_setup(dev_link_t *link) static int mot_setup(dev_link_t *link)
{ {
struct net_device *dev = link->priv; struct net_device *dev = link->priv;
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
int i, wait, loop; int i, wait, loop;
u_int addr; u_int addr;
...@@ -739,7 +739,7 @@ static int smc_setup(dev_link_t *link) ...@@ -739,7 +739,7 @@ static int smc_setup(dev_link_t *link)
static int osi_config(dev_link_t *link) static int osi_config(dev_link_t *link)
{ {
struct net_device *dev = link->priv; struct net_device *dev = link->priv;
static ioaddr_t com[4] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8 }; static kio_addr_t com[4] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8 };
int i, j; int i, j;
link->conf.Attributes |= CONF_ENABLE_SPKR; link->conf.Attributes |= CONF_ENABLE_SPKR;
...@@ -828,7 +828,7 @@ static int osi_setup(dev_link_t *link, u_short manfid, u_short cardid) ...@@ -828,7 +828,7 @@ static int osi_setup(dev_link_t *link, u_short manfid, u_short cardid)
static int check_sig(dev_link_t *link) static int check_sig(dev_link_t *link)
{ {
struct net_device *dev = link->priv; struct net_device *dev = link->priv;
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
int width; int width;
u_short s; u_short s;
...@@ -892,7 +892,7 @@ static void smc91c92_config(dev_link_t *link) ...@@ -892,7 +892,7 @@ static void smc91c92_config(dev_link_t *link)
u_short buf[32]; u_short buf[32];
char *name; char *name;
int i, j, rev; int i, j, rev;
ioaddr_t ioaddr; kio_addr_t ioaddr;
u_long mir; u_long mir;
DEBUG(0, "smc91c92_config(0x%p)\n", link); DEBUG(0, "smc91c92_config(0x%p)\n", link);
...@@ -1171,7 +1171,7 @@ static int smc91c92_event(event_t event, int priority, ...@@ -1171,7 +1171,7 @@ static int smc91c92_event(event_t event, int priority,
#define MDIO_DATA_WRITE1 (MDIO_DIR_WRITE | MDIO_DATA_OUT) #define MDIO_DATA_WRITE1 (MDIO_DIR_WRITE | MDIO_DATA_OUT)
#define MDIO_DATA_READ 0x02 #define MDIO_DATA_READ 0x02
static void mdio_sync(ioaddr_t addr) static void mdio_sync(kio_addr_t addr)
{ {
int bits; int bits;
for (bits = 0; bits < 32; bits++) { for (bits = 0; bits < 32; bits++) {
...@@ -1182,7 +1182,7 @@ static void mdio_sync(ioaddr_t addr) ...@@ -1182,7 +1182,7 @@ static void mdio_sync(ioaddr_t addr)
static int mdio_read(struct net_device *dev, int phy_id, int loc) static int mdio_read(struct net_device *dev, int phy_id, int loc)
{ {
ioaddr_t addr = dev->base_addr + MGMT; kio_addr_t addr = dev->base_addr + MGMT;
u_int cmd = (0x06<<10)|(phy_id<<5)|loc; u_int cmd = (0x06<<10)|(phy_id<<5)|loc;
int i, retval = 0; int i, retval = 0;
...@@ -1202,7 +1202,7 @@ static int mdio_read(struct net_device *dev, int phy_id, int loc) ...@@ -1202,7 +1202,7 @@ static int mdio_read(struct net_device *dev, int phy_id, int loc)
static void mdio_write(struct net_device *dev, int phy_id, int loc, int value) static void mdio_write(struct net_device *dev, int phy_id, int loc, int value)
{ {
ioaddr_t addr = dev->base_addr + MGMT; kio_addr_t addr = dev->base_addr + MGMT;
u_int cmd = (0x05<<28)|(phy_id<<23)|(loc<<18)|(1<<17)|value; u_int cmd = (0x05<<28)|(phy_id<<23)|(loc<<18)|(1<<17)|value;
int i; int i;
...@@ -1228,7 +1228,7 @@ static void mdio_write(struct net_device *dev, int phy_id, int loc, int value) ...@@ -1228,7 +1228,7 @@ static void mdio_write(struct net_device *dev, int phy_id, int loc, int value)
#ifdef PCMCIA_DEBUG #ifdef PCMCIA_DEBUG
static void smc_dump(struct net_device *dev) static void smc_dump(struct net_device *dev)
{ {
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
u_short i, w, save; u_short i, w, save;
save = inw(ioaddr + BANK_SELECT); save = inw(ioaddr + BANK_SELECT);
for (w = 0; w < 4; w++) { for (w = 0; w < 4; w++) {
...@@ -1283,7 +1283,7 @@ static int smc_close(struct net_device *dev) ...@@ -1283,7 +1283,7 @@ static int smc_close(struct net_device *dev)
{ {
struct smc_private *smc = netdev_priv(dev); struct smc_private *smc = netdev_priv(dev);
dev_link_t *link = &smc->link; dev_link_t *link = &smc->link;
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
DEBUG(0, "%s: smc_close(), status %4.4x.\n", DEBUG(0, "%s: smc_close(), status %4.4x.\n",
dev->name, inw(ioaddr + BANK_SELECT)); dev->name, inw(ioaddr + BANK_SELECT));
...@@ -1320,7 +1320,7 @@ static void smc_hardware_send_packet(struct net_device * dev) ...@@ -1320,7 +1320,7 @@ static void smc_hardware_send_packet(struct net_device * dev)
{ {
struct smc_private *smc = netdev_priv(dev); struct smc_private *smc = netdev_priv(dev);
struct sk_buff *skb = smc->saved_skb; struct sk_buff *skb = smc->saved_skb;
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
u_char packet_no; u_char packet_no;
if (!skb) { if (!skb) {
...@@ -1384,7 +1384,7 @@ static void smc_hardware_send_packet(struct net_device * dev) ...@@ -1384,7 +1384,7 @@ static void smc_hardware_send_packet(struct net_device * dev)
static void smc_tx_timeout(struct net_device *dev) static void smc_tx_timeout(struct net_device *dev)
{ {
struct smc_private *smc = netdev_priv(dev); struct smc_private *smc = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
printk(KERN_NOTICE "%s: SMC91c92 transmit timed out, " printk(KERN_NOTICE "%s: SMC91c92 transmit timed out, "
"Tx_status %2.2x status %4.4x.\n", "Tx_status %2.2x status %4.4x.\n",
...@@ -1399,7 +1399,7 @@ static void smc_tx_timeout(struct net_device *dev) ...@@ -1399,7 +1399,7 @@ static void smc_tx_timeout(struct net_device *dev)
static int smc_start_xmit(struct sk_buff *skb, struct net_device *dev) static int smc_start_xmit(struct sk_buff *skb, struct net_device *dev)
{ {
struct smc_private *smc = netdev_priv(dev); struct smc_private *smc = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
u_short num_pages; u_short num_pages;
short time_out, ir; short time_out, ir;
...@@ -1465,7 +1465,7 @@ static int smc_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -1465,7 +1465,7 @@ static int smc_start_xmit(struct sk_buff *skb, struct net_device *dev)
static void smc_tx_err(struct net_device * dev) static void smc_tx_err(struct net_device * dev)
{ {
struct smc_private *smc = netdev_priv(dev); struct smc_private *smc = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
int saved_packet = inw(ioaddr + PNR_ARR) & 0xff; int saved_packet = inw(ioaddr + PNR_ARR) & 0xff;
int packet_no = inw(ioaddr + FIFO_PORTS) & 0x7f; int packet_no = inw(ioaddr + FIFO_PORTS) & 0x7f;
int tx_status; int tx_status;
...@@ -1509,7 +1509,7 @@ static void smc_tx_err(struct net_device * dev) ...@@ -1509,7 +1509,7 @@ static void smc_tx_err(struct net_device * dev)
static void smc_eph_irq(struct net_device *dev) static void smc_eph_irq(struct net_device *dev)
{ {
struct smc_private *smc = netdev_priv(dev); struct smc_private *smc = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
u_short card_stats, ephs; u_short card_stats, ephs;
SMC_SELECT_BANK(0); SMC_SELECT_BANK(0);
...@@ -1544,7 +1544,7 @@ static irqreturn_t smc_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -1544,7 +1544,7 @@ static irqreturn_t smc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{ {
struct net_device *dev = dev_id; struct net_device *dev = dev_id;
struct smc_private *smc = netdev_priv(dev); struct smc_private *smc = netdev_priv(dev);
ioaddr_t ioaddr; kio_addr_t ioaddr;
u_short saved_bank, saved_pointer, mask, status; u_short saved_bank, saved_pointer, mask, status;
unsigned int handled = 1; unsigned int handled = 1;
char bogus_cnt = INTR_WORK; /* Work we are willing to do. */ char bogus_cnt = INTR_WORK; /* Work we are willing to do. */
...@@ -1662,7 +1662,7 @@ static irqreturn_t smc_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -1662,7 +1662,7 @@ static irqreturn_t smc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
static void smc_rx(struct net_device *dev) static void smc_rx(struct net_device *dev)
{ {
struct smc_private *smc = netdev_priv(dev); struct smc_private *smc = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
int rx_status; int rx_status;
int packet_length; /* Caution: not frame length, rather words int packet_length; /* Caution: not frame length, rather words
to transfer from the chip. */ to transfer from the chip. */
...@@ -1768,7 +1768,7 @@ static void fill_multicast_tbl(int count, struct dev_mc_list *addrs, ...@@ -1768,7 +1768,7 @@ static void fill_multicast_tbl(int count, struct dev_mc_list *addrs,
static void set_rx_mode(struct net_device *dev) static void set_rx_mode(struct net_device *dev)
{ {
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
struct smc_private *smc = netdev_priv(dev); struct smc_private *smc = netdev_priv(dev);
u_int multicast_table[ 2 ] = { 0, }; u_int multicast_table[ 2 ] = { 0, };
unsigned long flags; unsigned long flags;
...@@ -1835,7 +1835,7 @@ static int s9k_config(struct net_device *dev, struct ifmap *map) ...@@ -1835,7 +1835,7 @@ static int s9k_config(struct net_device *dev, struct ifmap *map)
static void smc_set_xcvr(struct net_device *dev, int if_port) static void smc_set_xcvr(struct net_device *dev, int if_port)
{ {
struct smc_private *smc = netdev_priv(dev); struct smc_private *smc = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
u_short saved_bank; u_short saved_bank;
saved_bank = inw(ioaddr + BANK_SELECT); saved_bank = inw(ioaddr + BANK_SELECT);
...@@ -1858,7 +1858,7 @@ static void smc_set_xcvr(struct net_device *dev, int if_port) ...@@ -1858,7 +1858,7 @@ static void smc_set_xcvr(struct net_device *dev, int if_port)
static void smc_reset(struct net_device *dev) static void smc_reset(struct net_device *dev)
{ {
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
struct smc_private *smc = netdev_priv(dev); struct smc_private *smc = netdev_priv(dev);
int i; int i;
...@@ -1935,7 +1935,7 @@ static void media_check(u_long arg) ...@@ -1935,7 +1935,7 @@ static void media_check(u_long arg)
{ {
struct net_device *dev = (struct net_device *) arg; struct net_device *dev = (struct net_device *) arg;
struct smc_private *smc = netdev_priv(dev); struct smc_private *smc = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
u_short i, media, saved_bank; u_short i, media, saved_bank;
u_short link; u_short link;
...@@ -2047,7 +2047,7 @@ static void media_check(u_long arg) ...@@ -2047,7 +2047,7 @@ static void media_check(u_long arg)
static int smc_link_ok(struct net_device *dev) static int smc_link_ok(struct net_device *dev)
{ {
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
struct smc_private *smc = netdev_priv(dev); struct smc_private *smc = netdev_priv(dev);
if (smc->cfg & CFG_MII_SELECT) { if (smc->cfg & CFG_MII_SELECT) {
...@@ -2061,7 +2061,7 @@ static int smc_link_ok(struct net_device *dev) ...@@ -2061,7 +2061,7 @@ static int smc_link_ok(struct net_device *dev)
static int smc_netdev_get_ecmd(struct net_device *dev, struct ethtool_cmd *ecmd) static int smc_netdev_get_ecmd(struct net_device *dev, struct ethtool_cmd *ecmd)
{ {
u16 tmp; u16 tmp;
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
ecmd->supported = (SUPPORTED_TP | SUPPORTED_AUI | ecmd->supported = (SUPPORTED_TP | SUPPORTED_AUI |
SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full); SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full);
...@@ -2083,7 +2083,7 @@ static int smc_netdev_get_ecmd(struct net_device *dev, struct ethtool_cmd *ecmd) ...@@ -2083,7 +2083,7 @@ static int smc_netdev_get_ecmd(struct net_device *dev, struct ethtool_cmd *ecmd)
static int smc_netdev_set_ecmd(struct net_device *dev, struct ethtool_cmd *ecmd) static int smc_netdev_set_ecmd(struct net_device *dev, struct ethtool_cmd *ecmd)
{ {
u16 tmp; u16 tmp;
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
if (ecmd->speed != SPEED_10) if (ecmd->speed != SPEED_10)
return -EINVAL; return -EINVAL;
...@@ -2126,7 +2126,7 @@ static void smc_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info ...@@ -2126,7 +2126,7 @@ static void smc_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info
static int smc_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd) static int smc_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
{ {
struct smc_private *smc = netdev_priv(dev); struct smc_private *smc = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
u16 saved_bank = inw(ioaddr + BANK_SELECT); u16 saved_bank = inw(ioaddr + BANK_SELECT);
int ret; int ret;
...@@ -2144,7 +2144,7 @@ static int smc_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd) ...@@ -2144,7 +2144,7 @@ static int smc_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
static int smc_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) static int smc_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
{ {
struct smc_private *smc = netdev_priv(dev); struct smc_private *smc = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
u16 saved_bank = inw(ioaddr + BANK_SELECT); u16 saved_bank = inw(ioaddr + BANK_SELECT);
int ret; int ret;
...@@ -2162,7 +2162,7 @@ static int smc_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) ...@@ -2162,7 +2162,7 @@ static int smc_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
static u32 smc_get_link(struct net_device *dev) static u32 smc_get_link(struct net_device *dev)
{ {
struct smc_private *smc = netdev_priv(dev); struct smc_private *smc = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
u16 saved_bank = inw(ioaddr + BANK_SELECT); u16 saved_bank = inw(ioaddr + BANK_SELECT);
u32 ret; u32 ret;
...@@ -2190,7 +2190,7 @@ static int smc_nway_reset(struct net_device *dev) ...@@ -2190,7 +2190,7 @@ static int smc_nway_reset(struct net_device *dev)
{ {
struct smc_private *smc = netdev_priv(dev); struct smc_private *smc = netdev_priv(dev);
if (smc->cfg & CFG_MII_SELECT) { if (smc->cfg & CFG_MII_SELECT) {
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
u16 saved_bank = inw(ioaddr + BANK_SELECT); u16 saved_bank = inw(ioaddr + BANK_SELECT);
int res; int res;
...@@ -2222,7 +2222,7 @@ static int smc_ioctl (struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -2222,7 +2222,7 @@ static int smc_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
struct mii_ioctl_data *mii = if_mii(rq); struct mii_ioctl_data *mii = if_mii(rq);
int rc = 0; int rc = 0;
u16 saved_bank; u16 saved_bank;
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
if (!netif_running(dev)) if (!netif_running(dev))
return -EINVAL; return -EINVAL;
......
...@@ -274,12 +274,12 @@ INT_MODULE_PARM(lockup_hack, 0); /* anti lockup hack */ ...@@ -274,12 +274,12 @@ INT_MODULE_PARM(lockup_hack, 0); /* anti lockup hack */
static unsigned maxrx_bytes = 22000; static unsigned maxrx_bytes = 22000;
/* MII management prototypes */ /* MII management prototypes */
static void mii_idle(ioaddr_t ioaddr); static void mii_idle(kio_addr_t ioaddr);
static void mii_putbit(ioaddr_t ioaddr, unsigned data); static void mii_putbit(kio_addr_t ioaddr, unsigned data);
static int mii_getbit(ioaddr_t ioaddr); static int mii_getbit(kio_addr_t ioaddr);
static void mii_wbits(ioaddr_t ioaddr, unsigned data, int len); static void mii_wbits(kio_addr_t ioaddr, unsigned data, int len);
static unsigned mii_rd(ioaddr_t ioaddr, u_char phyaddr, u_char phyreg); static unsigned mii_rd(kio_addr_t ioaddr, u_char phyaddr, u_char phyreg);
static void mii_wr(ioaddr_t ioaddr, u_char phyaddr, u_char phyreg, static void mii_wr(kio_addr_t ioaddr, u_char phyaddr, u_char phyreg,
unsigned data, int len); unsigned data, int len);
/* /*
...@@ -425,7 +425,7 @@ next_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse) ...@@ -425,7 +425,7 @@ next_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
static void static void
PrintRegisters(struct net_device *dev) PrintRegisters(struct net_device *dev)
{ {
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
if (pc_debug > 1) { if (pc_debug > 1) {
int i, page; int i, page;
...@@ -461,7 +461,7 @@ PrintRegisters(struct net_device *dev) ...@@ -461,7 +461,7 @@ PrintRegisters(struct net_device *dev)
* Turn around for read * Turn around for read
*/ */
static void static void
mii_idle(ioaddr_t ioaddr) mii_idle(kio_addr_t ioaddr)
{ {
PutByte(XIRCREG2_GPR2, 0x04|0); /* drive MDCK low */ PutByte(XIRCREG2_GPR2, 0x04|0); /* drive MDCK low */
udelay(1); udelay(1);
...@@ -473,7 +473,7 @@ mii_idle(ioaddr_t ioaddr) ...@@ -473,7 +473,7 @@ mii_idle(ioaddr_t ioaddr)
* Write a bit to MDI/O * Write a bit to MDI/O
*/ */
static void static void
mii_putbit(ioaddr_t ioaddr, unsigned data) mii_putbit(kio_addr_t ioaddr, unsigned data)
{ {
#if 1 #if 1
if (data) { if (data) {
...@@ -506,7 +506,7 @@ mii_putbit(ioaddr_t ioaddr, unsigned data) ...@@ -506,7 +506,7 @@ mii_putbit(ioaddr_t ioaddr, unsigned data)
* Get a bit from MDI/O * Get a bit from MDI/O
*/ */
static int static int
mii_getbit(ioaddr_t ioaddr) mii_getbit(kio_addr_t ioaddr)
{ {
unsigned d; unsigned d;
...@@ -519,7 +519,7 @@ mii_getbit(ioaddr_t ioaddr) ...@@ -519,7 +519,7 @@ mii_getbit(ioaddr_t ioaddr)
} }
static void static void
mii_wbits(ioaddr_t ioaddr, unsigned data, int len) mii_wbits(kio_addr_t ioaddr, unsigned data, int len)
{ {
unsigned m = 1 << (len-1); unsigned m = 1 << (len-1);
for (; m; m >>= 1) for (; m; m >>= 1)
...@@ -527,7 +527,7 @@ mii_wbits(ioaddr_t ioaddr, unsigned data, int len) ...@@ -527,7 +527,7 @@ mii_wbits(ioaddr_t ioaddr, unsigned data, int len)
} }
static unsigned static unsigned
mii_rd(ioaddr_t ioaddr, u_char phyaddr, u_char phyreg) mii_rd(kio_addr_t ioaddr, u_char phyaddr, u_char phyreg)
{ {
int i; int i;
unsigned data=0, m; unsigned data=0, m;
...@@ -549,7 +549,7 @@ mii_rd(ioaddr_t ioaddr, u_char phyaddr, u_char phyreg) ...@@ -549,7 +549,7 @@ mii_rd(ioaddr_t ioaddr, u_char phyaddr, u_char phyreg)
} }
static void static void
mii_wr(ioaddr_t ioaddr, u_char phyaddr, u_char phyreg, unsigned data, int len) mii_wr(kio_addr_t ioaddr, u_char phyaddr, u_char phyreg, unsigned data, int len)
{ {
int i; int i;
...@@ -805,7 +805,7 @@ xirc2ps_config(dev_link_t * link) ...@@ -805,7 +805,7 @@ xirc2ps_config(dev_link_t * link)
local_info_t *local = netdev_priv(dev); local_info_t *local = netdev_priv(dev);
tuple_t tuple; tuple_t tuple;
cisparse_t parse; cisparse_t parse;
ioaddr_t ioaddr; kio_addr_t ioaddr;
int err, i; int err, i;
u_char buf[64]; u_char buf[64];
cistpl_lan_node_id_t *node_id = (cistpl_lan_node_id_t*)parse.funce.data; cistpl_lan_node_id_t *node_id = (cistpl_lan_node_id_t*)parse.funce.data;
...@@ -1240,7 +1240,7 @@ xirc2ps_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -1240,7 +1240,7 @@ xirc2ps_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{ {
struct net_device *dev = (struct net_device *)dev_id; struct net_device *dev = (struct net_device *)dev_id;
local_info_t *lp = netdev_priv(dev); local_info_t *lp = netdev_priv(dev);
ioaddr_t ioaddr; kio_addr_t ioaddr;
u_char saved_page; u_char saved_page;
unsigned bytes_rcvd; unsigned bytes_rcvd;
unsigned int_status, eth_status, rx_status, tx_status; unsigned int_status, eth_status, rx_status, tx_status;
...@@ -1345,7 +1345,7 @@ xirc2ps_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -1345,7 +1345,7 @@ xirc2ps_interrupt(int irq, void *dev_id, struct pt_regs *regs)
unsigned i; unsigned i;
u_long *p = skb_put(skb, pktlen); u_long *p = skb_put(skb, pktlen);
register u_long a; register u_long a;
ioaddr_t edpreg = ioaddr+XIRCREG_EDP-2; kio_addr_t edpreg = ioaddr+XIRCREG_EDP-2;
for (i=0; i < len ; i += 4, p++) { for (i=0; i < len ; i += 4, p++) {
a = inl(edpreg); a = inl(edpreg);
__asm__("rorl $16,%0\n\t" __asm__("rorl $16,%0\n\t"
...@@ -1474,7 +1474,7 @@ static int ...@@ -1474,7 +1474,7 @@ static int
do_start_xmit(struct sk_buff *skb, struct net_device *dev) do_start_xmit(struct sk_buff *skb, struct net_device *dev)
{ {
local_info_t *lp = netdev_priv(dev); local_info_t *lp = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
int okay; int okay;
unsigned freespace; unsigned freespace;
unsigned pktlen = skb? skb->len : 0; unsigned pktlen = skb? skb->len : 0;
...@@ -1544,7 +1544,7 @@ do_get_stats(struct net_device *dev) ...@@ -1544,7 +1544,7 @@ do_get_stats(struct net_device *dev)
static void static void
set_addresses(struct net_device *dev) set_addresses(struct net_device *dev)
{ {
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
local_info_t *lp = netdev_priv(dev); local_info_t *lp = netdev_priv(dev);
struct dev_mc_list *dmi = dev->mc_list; struct dev_mc_list *dmi = dev->mc_list;
char *addr; char *addr;
...@@ -1586,7 +1586,7 @@ set_addresses(struct net_device *dev) ...@@ -1586,7 +1586,7 @@ set_addresses(struct net_device *dev)
static void static void
set_multicast_list(struct net_device *dev) set_multicast_list(struct net_device *dev)
{ {
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
SelectPage(0x42); SelectPage(0x42);
if (dev->flags & IFF_PROMISC) { /* snoop */ if (dev->flags & IFF_PROMISC) { /* snoop */
...@@ -1670,7 +1670,7 @@ static int ...@@ -1670,7 +1670,7 @@ static int
do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{ {
local_info_t *local = netdev_priv(dev); local_info_t *local = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
u16 *data = (u16 *)&rq->ifr_ifru; u16 *data = (u16 *)&rq->ifr_ifru;
DEBUG(1, "%s: ioctl(%-.6s, %#04x) %04x %04x %04x %04x\n", DEBUG(1, "%s: ioctl(%-.6s, %#04x) %04x %04x %04x %04x\n",
...@@ -1702,7 +1702,7 @@ static void ...@@ -1702,7 +1702,7 @@ static void
hardreset(struct net_device *dev) hardreset(struct net_device *dev)
{ {
local_info_t *local = netdev_priv(dev); local_info_t *local = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
SelectPage(4); SelectPage(4);
udelay(1); udelay(1);
...@@ -1719,7 +1719,7 @@ static void ...@@ -1719,7 +1719,7 @@ static void
do_reset(struct net_device *dev, int full) do_reset(struct net_device *dev, int full)
{ {
local_info_t *local = netdev_priv(dev); local_info_t *local = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
unsigned value; unsigned value;
DEBUG(0, "%s: do_reset(%p,%d)\n", dev? dev->name:"eth?", dev, full); DEBUG(0, "%s: do_reset(%p,%d)\n", dev? dev->name:"eth?", dev, full);
...@@ -1880,7 +1880,7 @@ static int ...@@ -1880,7 +1880,7 @@ static int
init_mii(struct net_device *dev) init_mii(struct net_device *dev)
{ {
local_info_t *local = netdev_priv(dev); local_info_t *local = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
unsigned control, status, linkpartner; unsigned control, status, linkpartner;
int i; int i;
...@@ -1953,7 +1953,7 @@ static void ...@@ -1953,7 +1953,7 @@ static void
do_powerdown(struct net_device *dev) do_powerdown(struct net_device *dev)
{ {
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
DEBUG(0, "do_powerdown(%p)\n", dev); DEBUG(0, "do_powerdown(%p)\n", dev);
...@@ -1965,7 +1965,7 @@ do_powerdown(struct net_device *dev) ...@@ -1965,7 +1965,7 @@ do_powerdown(struct net_device *dev)
static int static int
do_stop(struct net_device *dev) do_stop(struct net_device *dev)
{ {
ioaddr_t ioaddr = dev->base_addr; kio_addr_t ioaddr = dev->base_addr;
local_info_t *lp = netdev_priv(dev); local_info_t *lp = netdev_priv(dev);
dev_link_t *link = &lp->link; dev_link_t *link = &lp->link;
......
...@@ -206,7 +206,7 @@ static dev_link_t *netwave_attach(void); /* Create instance */ ...@@ -206,7 +206,7 @@ static dev_link_t *netwave_attach(void); /* Create instance */
static void netwave_detach(dev_link_t *); /* Destroy instance */ static void netwave_detach(dev_link_t *); /* Destroy instance */
/* Hardware configuration */ /* Hardware configuration */
static void netwave_doreset(ioaddr_t iobase, u_char __iomem *ramBase); static void netwave_doreset(kio_addr_t iobase, u_char __iomem *ramBase);
static void netwave_reset(struct net_device *dev); static void netwave_reset(struct net_device *dev);
/* Misc device stuff */ /* Misc device stuff */
...@@ -356,7 +356,7 @@ static inline void wait_WOC(unsigned int iobase) ...@@ -356,7 +356,7 @@ static inline void wait_WOC(unsigned int iobase)
#ifdef WIRELESS_EXT #ifdef WIRELESS_EXT
static void netwave_snapshot(netwave_private *priv, u_char __iomem *ramBase, static void netwave_snapshot(netwave_private *priv, u_char __iomem *ramBase,
ioaddr_t iobase) { kio_addr_t iobase) {
u_short resultBuffer; u_short resultBuffer;
/* if time since last snapshot is > 1 sec. (100 jiffies?) then take /* if time since last snapshot is > 1 sec. (100 jiffies?) then take
...@@ -389,7 +389,7 @@ static void netwave_snapshot(netwave_private *priv, u_char __iomem *ramBase, ...@@ -389,7 +389,7 @@ static void netwave_snapshot(netwave_private *priv, u_char __iomem *ramBase,
static struct iw_statistics *netwave_get_wireless_stats(struct net_device *dev) static struct iw_statistics *netwave_get_wireless_stats(struct net_device *dev)
{ {
unsigned long flags; unsigned long flags;
ioaddr_t iobase = dev->base_addr; kio_addr_t iobase = dev->base_addr;
netwave_private *priv = netdev_priv(dev); netwave_private *priv = netdev_priv(dev);
u_char __iomem *ramBase = priv->ramBase; u_char __iomem *ramBase = priv->ramBase;
struct iw_statistics* wstats; struct iw_statistics* wstats;
...@@ -575,7 +575,7 @@ static int netwave_set_nwid(struct net_device *dev, ...@@ -575,7 +575,7 @@ static int netwave_set_nwid(struct net_device *dev,
char *extra) char *extra)
{ {
unsigned long flags; unsigned long flags;
ioaddr_t iobase = dev->base_addr; kio_addr_t iobase = dev->base_addr;
netwave_private *priv = netdev_priv(dev); netwave_private *priv = netdev_priv(dev);
u_char __iomem *ramBase = priv->ramBase; u_char __iomem *ramBase = priv->ramBase;
...@@ -633,7 +633,7 @@ static int netwave_set_scramble(struct net_device *dev, ...@@ -633,7 +633,7 @@ static int netwave_set_scramble(struct net_device *dev,
char *key) char *key)
{ {
unsigned long flags; unsigned long flags;
ioaddr_t iobase = dev->base_addr; kio_addr_t iobase = dev->base_addr;
netwave_private *priv = netdev_priv(dev); netwave_private *priv = netdev_priv(dev);
u_char __iomem *ramBase = priv->ramBase; u_char __iomem *ramBase = priv->ramBase;
...@@ -749,7 +749,7 @@ static int netwave_get_snap(struct net_device *dev, ...@@ -749,7 +749,7 @@ static int netwave_get_snap(struct net_device *dev,
char *extra) char *extra)
{ {
unsigned long flags; unsigned long flags;
ioaddr_t iobase = dev->base_addr; kio_addr_t iobase = dev->base_addr;
netwave_private *priv = netdev_priv(dev); netwave_private *priv = netdev_priv(dev);
u_char __iomem *ramBase = priv->ramBase; u_char __iomem *ramBase = priv->ramBase;
...@@ -1192,7 +1192,7 @@ static int netwave_event(event_t event, int priority, ...@@ -1192,7 +1192,7 @@ static int netwave_event(event_t event, int priority,
* *
* Proper hardware reset of the card. * Proper hardware reset of the card.
*/ */
static void netwave_doreset(ioaddr_t ioBase, u_char __iomem *ramBase) static void netwave_doreset(kio_addr_t ioBase, u_char __iomem *ramBase)
{ {
/* Reset card */ /* Reset card */
wait_WOC(ioBase); wait_WOC(ioBase);
...@@ -1210,7 +1210,7 @@ static void netwave_reset(struct net_device *dev) { ...@@ -1210,7 +1210,7 @@ static void netwave_reset(struct net_device *dev) {
/* u_char state; */ /* u_char state; */
netwave_private *priv = netdev_priv(dev); netwave_private *priv = netdev_priv(dev);
u_char __iomem *ramBase = priv->ramBase; u_char __iomem *ramBase = priv->ramBase;
ioaddr_t iobase = dev->base_addr; kio_addr_t iobase = dev->base_addr;
DEBUG(0, "netwave_reset: Done with hardware reset\n"); DEBUG(0, "netwave_reset: Done with hardware reset\n");
...@@ -1291,7 +1291,7 @@ static int netwave_hw_xmit(unsigned char* data, int len, ...@@ -1291,7 +1291,7 @@ static int netwave_hw_xmit(unsigned char* data, int len,
netwave_private *priv = netdev_priv(dev); netwave_private *priv = netdev_priv(dev);
u_char __iomem * ramBase = priv->ramBase; u_char __iomem * ramBase = priv->ramBase;
ioaddr_t iobase = dev->base_addr; kio_addr_t iobase = dev->base_addr;
/* Disable interrupts & save flags */ /* Disable interrupts & save flags */
spin_lock_irqsave(&priv->spinlock, flags); spin_lock_irqsave(&priv->spinlock, flags);
...@@ -1383,7 +1383,7 @@ static int netwave_start_xmit(struct sk_buff *skb, struct net_device *dev) { ...@@ -1383,7 +1383,7 @@ static int netwave_start_xmit(struct sk_buff *skb, struct net_device *dev) {
*/ */
static irqreturn_t netwave_interrupt(int irq, void* dev_id, struct pt_regs *regs) static irqreturn_t netwave_interrupt(int irq, void* dev_id, struct pt_regs *regs)
{ {
ioaddr_t iobase; kio_addr_t iobase;
u_char __iomem *ramBase; u_char __iomem *ramBase;
struct net_device *dev = (struct net_device *)dev_id; struct net_device *dev = (struct net_device *)dev_id;
struct netwave_private *priv = netdev_priv(dev); struct netwave_private *priv = netdev_priv(dev);
...@@ -1553,7 +1553,7 @@ static int netwave_rx(struct net_device *dev) ...@@ -1553,7 +1553,7 @@ static int netwave_rx(struct net_device *dev)
{ {
netwave_private *priv = netdev_priv(dev); netwave_private *priv = netdev_priv(dev);
u_char __iomem *ramBase = priv->ramBase; u_char __iomem *ramBase = priv->ramBase;
ioaddr_t iobase = dev->base_addr; kio_addr_t iobase = dev->base_addr;
u_char rxStatus; u_char rxStatus;
struct sk_buff *skb = NULL; struct sk_buff *skb = NULL;
unsigned int curBuffer, unsigned int curBuffer,
...@@ -1699,7 +1699,7 @@ module_exit(exit_netwave_cs); ...@@ -1699,7 +1699,7 @@ module_exit(exit_netwave_cs);
*/ */
static void set_multicast_list(struct net_device *dev) static void set_multicast_list(struct net_device *dev)
{ {
ioaddr_t iobase = dev->base_addr; kio_addr_t iobase = dev->base_addr;
netwave_private *priv = netdev_priv(dev); netwave_private *priv = netdev_priv(dev);
u_char __iomem * ramBase = priv->ramBase; u_char __iomem * ramBase = priv->ramBase;
u_char rcvMode = 0; u_char rcvMode = 0;
......
...@@ -164,7 +164,7 @@ psa_write(struct net_device * dev, ...@@ -164,7 +164,7 @@ psa_write(struct net_device * dev,
net_local *lp = netdev_priv(dev); net_local *lp = netdev_priv(dev);
u_char __iomem *ptr = lp->mem + PSA_ADDR + (o << 1); u_char __iomem *ptr = lp->mem + PSA_ADDR + (o << 1);
int count = 0; int count = 0;
ioaddr_t base = dev->base_addr; kio_addr_t base = dev->base_addr;
/* As there seem to have no flag PSA_BUSY as in the ISA model, we are /* As there seem to have no flag PSA_BUSY as in the ISA model, we are
* oblige to verify this address to know when the PSA is ready... */ * oblige to verify this address to know when the PSA is ready... */
volatile u_char __iomem *verify = lp->mem + PSA_ADDR + volatile u_char __iomem *verify = lp->mem + PSA_ADDR +
...@@ -725,7 +725,7 @@ void wl_update_history(wavepoint_history *wavepoint, unsigned char sigqual, unsi ...@@ -725,7 +725,7 @@ void wl_update_history(wavepoint_history *wavepoint, unsigned char sigqual, unsi
/* Perform a handover to a new WavePoint */ /* Perform a handover to a new WavePoint */
void wv_roam_handover(wavepoint_history *wavepoint, net_local *lp) void wv_roam_handover(wavepoint_history *wavepoint, net_local *lp)
{ {
ioaddr_t base = lp->dev->base_addr; kio_addr_t base = lp->dev->base_addr;
mm_t m; mm_t m;
unsigned long flags; unsigned long flags;
...@@ -838,7 +838,7 @@ wv_82593_cmd(struct net_device * dev, ...@@ -838,7 +838,7 @@ wv_82593_cmd(struct net_device * dev,
int cmd, int cmd,
int result) int result)
{ {
ioaddr_t base = dev->base_addr; kio_addr_t base = dev->base_addr;
int status; int status;
int wait_completed; int wait_completed;
long spin; long spin;
...@@ -970,7 +970,7 @@ read_ringbuf(struct net_device * dev, ...@@ -970,7 +970,7 @@ read_ringbuf(struct net_device * dev,
char * buf, char * buf,
int len) int len)
{ {
ioaddr_t base = dev->base_addr; kio_addr_t base = dev->base_addr;
int ring_ptr = addr; int ring_ptr = addr;
int chunk_len; int chunk_len;
char * buf_ptr = buf; char * buf_ptr = buf;
...@@ -1136,7 +1136,7 @@ wv_psa_show(psa_t * p) ...@@ -1136,7 +1136,7 @@ wv_psa_show(psa_t * p)
static void static void
wv_mmc_show(struct net_device * dev) wv_mmc_show(struct net_device * dev)
{ {
ioaddr_t base = dev->base_addr; kio_addr_t base = dev->base_addr;
net_local * lp = netdev_priv(dev); net_local * lp = netdev_priv(dev);
mmr_t m; mmr_t m;
...@@ -1316,7 +1316,7 @@ wv_packet_info(u_char * p, /* Packet to dump */ ...@@ -1316,7 +1316,7 @@ wv_packet_info(u_char * p, /* Packet to dump */
static inline void static inline void
wv_init_info(struct net_device * dev) wv_init_info(struct net_device * dev)
{ {
ioaddr_t base = dev->base_addr; kio_addr_t base = dev->base_addr;
psa_t psa; psa_t psa;
int i; int i;
...@@ -1335,7 +1335,7 @@ wv_init_info(struct net_device * dev) ...@@ -1335,7 +1335,7 @@ wv_init_info(struct net_device * dev)
#ifdef DEBUG_BASIC_SHOW #ifdef DEBUG_BASIC_SHOW
/* Now, let's go for the basic stuff */ /* Now, let's go for the basic stuff */
printk(KERN_NOTICE "%s: WaveLAN: port %#x, irq %d, hw_addr", printk(KERN_NOTICE "%s: WaveLAN: port %#lx, irq %d, hw_addr",
dev->name, base, dev->irq); dev->name, base, dev->irq);
for(i = 0; i < WAVELAN_ADDR_SIZE; i++) for(i = 0; i < WAVELAN_ADDR_SIZE; i++)
printk("%s%02X", (i == 0) ? " " : ":", dev->dev_addr[i]); printk("%s%02X", (i == 0) ? " " : ":", dev->dev_addr[i]);
...@@ -1870,7 +1870,7 @@ static int wavelan_set_nwid(struct net_device *dev, ...@@ -1870,7 +1870,7 @@ static int wavelan_set_nwid(struct net_device *dev,
union iwreq_data *wrqu, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
ioaddr_t base = dev->base_addr; kio_addr_t base = dev->base_addr;
net_local *lp = netdev_priv(dev); net_local *lp = netdev_priv(dev);
psa_t psa; psa_t psa;
mm_t m; mm_t m;
...@@ -1960,7 +1960,7 @@ static int wavelan_set_freq(struct net_device *dev, ...@@ -1960,7 +1960,7 @@ static int wavelan_set_freq(struct net_device *dev,
union iwreq_data *wrqu, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
ioaddr_t base = dev->base_addr; kio_addr_t base = dev->base_addr;
net_local *lp = netdev_priv(dev); net_local *lp = netdev_priv(dev);
unsigned long flags; unsigned long flags;
int ret; int ret;
...@@ -1990,7 +1990,7 @@ static int wavelan_get_freq(struct net_device *dev, ...@@ -1990,7 +1990,7 @@ static int wavelan_get_freq(struct net_device *dev,
union iwreq_data *wrqu, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
ioaddr_t base = dev->base_addr; kio_addr_t base = dev->base_addr;
net_local *lp = netdev_priv(dev); net_local *lp = netdev_priv(dev);
psa_t psa; psa_t psa;
unsigned long flags; unsigned long flags;
...@@ -2036,7 +2036,7 @@ static int wavelan_set_sens(struct net_device *dev, ...@@ -2036,7 +2036,7 @@ static int wavelan_set_sens(struct net_device *dev,
union iwreq_data *wrqu, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
ioaddr_t base = dev->base_addr; kio_addr_t base = dev->base_addr;
net_local *lp = netdev_priv(dev); net_local *lp = netdev_priv(dev);
psa_t psa; psa_t psa;
unsigned long flags; unsigned long flags;
...@@ -2102,7 +2102,7 @@ static int wavelan_set_encode(struct net_device *dev, ...@@ -2102,7 +2102,7 @@ static int wavelan_set_encode(struct net_device *dev,
union iwreq_data *wrqu, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
ioaddr_t base = dev->base_addr; kio_addr_t base = dev->base_addr;
net_local *lp = netdev_priv(dev); net_local *lp = netdev_priv(dev);
unsigned long flags; unsigned long flags;
psa_t psa; psa_t psa;
...@@ -2172,7 +2172,7 @@ static int wavelan_get_encode(struct net_device *dev, ...@@ -2172,7 +2172,7 @@ static int wavelan_get_encode(struct net_device *dev,
union iwreq_data *wrqu, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
ioaddr_t base = dev->base_addr; kio_addr_t base = dev->base_addr;
net_local *lp = netdev_priv(dev); net_local *lp = netdev_priv(dev);
psa_t psa; psa_t psa;
unsigned long flags; unsigned long flags;
...@@ -2391,7 +2391,7 @@ static int wavelan_get_range(struct net_device *dev, ...@@ -2391,7 +2391,7 @@ static int wavelan_get_range(struct net_device *dev,
union iwreq_data *wrqu, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
ioaddr_t base = dev->base_addr; kio_addr_t base = dev->base_addr;
net_local *lp = netdev_priv(dev); net_local *lp = netdev_priv(dev);
struct iw_range *range = (struct iw_range *) extra; struct iw_range *range = (struct iw_range *) extra;
unsigned long flags; unsigned long flags;
...@@ -2467,7 +2467,7 @@ static int wavelan_set_qthr(struct net_device *dev, ...@@ -2467,7 +2467,7 @@ static int wavelan_set_qthr(struct net_device *dev,
union iwreq_data *wrqu, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
ioaddr_t base = dev->base_addr; kio_addr_t base = dev->base_addr;
net_local *lp = netdev_priv(dev); net_local *lp = netdev_priv(dev);
psa_t psa; psa_t psa;
unsigned long flags; unsigned long flags;
...@@ -2743,7 +2743,7 @@ static const struct iw_handler_def wavelan_handler_def = ...@@ -2743,7 +2743,7 @@ static const struct iw_handler_def wavelan_handler_def =
static iw_stats * static iw_stats *
wavelan_get_wireless_stats(struct net_device * dev) wavelan_get_wireless_stats(struct net_device * dev)
{ {
ioaddr_t base = dev->base_addr; kio_addr_t base = dev->base_addr;
net_local * lp = netdev_priv(dev); net_local * lp = netdev_priv(dev);
mmr_t m; mmr_t m;
iw_stats * wstats; iw_stats * wstats;
...@@ -2807,7 +2807,7 @@ wv_start_of_frame(struct net_device * dev, ...@@ -2807,7 +2807,7 @@ wv_start_of_frame(struct net_device * dev,
int rfp, /* end of frame */ int rfp, /* end of frame */
int wrap) /* start of buffer */ int wrap) /* start of buffer */
{ {
ioaddr_t base = dev->base_addr; kio_addr_t base = dev->base_addr;
int rp; int rp;
int len; int len;
...@@ -2970,7 +2970,7 @@ wv_packet_read(struct net_device * dev, ...@@ -2970,7 +2970,7 @@ wv_packet_read(struct net_device * dev,
static inline void static inline void
wv_packet_rcv(struct net_device * dev) wv_packet_rcv(struct net_device * dev)
{ {
ioaddr_t base = dev->base_addr; kio_addr_t base = dev->base_addr;
net_local * lp = netdev_priv(dev); net_local * lp = netdev_priv(dev);
int newrfp; int newrfp;
int rp; int rp;
...@@ -3107,7 +3107,7 @@ wv_packet_write(struct net_device * dev, ...@@ -3107,7 +3107,7 @@ wv_packet_write(struct net_device * dev,
short length) short length)
{ {
net_local * lp = netdev_priv(dev); net_local * lp = netdev_priv(dev);
ioaddr_t base = dev->base_addr; kio_addr_t base = dev->base_addr;
unsigned long flags; unsigned long flags;
int clen = length; int clen = length;
register u_short xmtdata_base = TX_BASE; register u_short xmtdata_base = TX_BASE;
...@@ -3231,7 +3231,7 @@ wavelan_packet_xmit(struct sk_buff * skb, ...@@ -3231,7 +3231,7 @@ wavelan_packet_xmit(struct sk_buff * skb,
static inline int static inline int
wv_mmc_init(struct net_device * dev) wv_mmc_init(struct net_device * dev)
{ {
ioaddr_t base = dev->base_addr; kio_addr_t base = dev->base_addr;
psa_t psa; psa_t psa;
mmw_t m; mmw_t m;
int configured; int configured;
...@@ -3425,7 +3425,7 @@ wv_mmc_init(struct net_device * dev) ...@@ -3425,7 +3425,7 @@ wv_mmc_init(struct net_device * dev)
static int static int
wv_ru_stop(struct net_device * dev) wv_ru_stop(struct net_device * dev)
{ {
ioaddr_t base = dev->base_addr; kio_addr_t base = dev->base_addr;
net_local * lp = netdev_priv(dev); net_local * lp = netdev_priv(dev);
unsigned long flags; unsigned long flags;
int status; int status;
...@@ -3488,7 +3488,7 @@ wv_ru_stop(struct net_device * dev) ...@@ -3488,7 +3488,7 @@ wv_ru_stop(struct net_device * dev)
static int static int
wv_ru_start(struct net_device * dev) wv_ru_start(struct net_device * dev)
{ {
ioaddr_t base = dev->base_addr; kio_addr_t base = dev->base_addr;
net_local * lp = netdev_priv(dev); net_local * lp = netdev_priv(dev);
unsigned long flags; unsigned long flags;
...@@ -3576,7 +3576,7 @@ wv_ru_start(struct net_device * dev) ...@@ -3576,7 +3576,7 @@ wv_ru_start(struct net_device * dev)
static int static int
wv_82593_config(struct net_device * dev) wv_82593_config(struct net_device * dev)
{ {
ioaddr_t base = dev->base_addr; kio_addr_t base = dev->base_addr;
net_local * lp = netdev_priv(dev); net_local * lp = netdev_priv(dev);
struct i82593_conf_block cfblk; struct i82593_conf_block cfblk;
int ret = TRUE; int ret = TRUE;
...@@ -3813,7 +3813,7 @@ static int ...@@ -3813,7 +3813,7 @@ static int
wv_hw_config(struct net_device * dev) wv_hw_config(struct net_device * dev)
{ {
net_local * lp = netdev_priv(dev); net_local * lp = netdev_priv(dev);
ioaddr_t base = dev->base_addr; kio_addr_t base = dev->base_addr;
unsigned long flags; unsigned long flags;
int ret = FALSE; int ret = FALSE;
...@@ -4144,7 +4144,7 @@ wavelan_interrupt(int irq, ...@@ -4144,7 +4144,7 @@ wavelan_interrupt(int irq,
{ {
struct net_device * dev; struct net_device * dev;
net_local * lp; net_local * lp;
ioaddr_t base; kio_addr_t base;
int status0; int status0;
u_int tx_status; u_int tx_status;
...@@ -4412,7 +4412,7 @@ static void ...@@ -4412,7 +4412,7 @@ static void
wavelan_watchdog(struct net_device * dev) wavelan_watchdog(struct net_device * dev)
{ {
net_local * lp = netdev_priv(dev); net_local * lp = netdev_priv(dev);
ioaddr_t base = dev->base_addr; kio_addr_t base = dev->base_addr;
unsigned long flags; unsigned long flags;
int aborted = FALSE; int aborted = FALSE;
...@@ -4488,7 +4488,7 @@ wavelan_open(struct net_device * dev) ...@@ -4488,7 +4488,7 @@ wavelan_open(struct net_device * dev)
{ {
net_local * lp = netdev_priv(dev); net_local * lp = netdev_priv(dev);
dev_link_t * link = lp->link; dev_link_t * link = lp->link;
ioaddr_t base = dev->base_addr; kio_addr_t base = dev->base_addr;
#ifdef DEBUG_CALLBACK_TRACE #ifdef DEBUG_CALLBACK_TRACE
printk(KERN_DEBUG "%s: ->wavelan_open(dev=0x%x)\n", dev->name, printk(KERN_DEBUG "%s: ->wavelan_open(dev=0x%x)\n", dev->name,
...@@ -4542,7 +4542,7 @@ static int ...@@ -4542,7 +4542,7 @@ static int
wavelan_close(struct net_device * dev) wavelan_close(struct net_device * dev)
{ {
dev_link_t * link = ((net_local *)netdev_priv(dev))->link; dev_link_t * link = ((net_local *)netdev_priv(dev))->link;
ioaddr_t base = dev->base_addr; kio_addr_t base = dev->base_addr;
#ifdef DEBUG_CALLBACK_TRACE #ifdef DEBUG_CALLBACK_TRACE
printk(KERN_DEBUG "%s: ->wavelan_close(dev=0x%x)\n", dev->name, printk(KERN_DEBUG "%s: ->wavelan_close(dev=0x%x)\n", dev->name,
......
...@@ -196,13 +196,13 @@ static int __init au1000_pcmcia_driver_init(void) ...@@ -196,13 +196,13 @@ static int __init au1000_pcmcia_driver_init(void)
if (i == 0) { if (i == 0) {
pcmcia_socket[i].virt_io = pcmcia_socket[i].virt_io =
(u32)ioremap((ioaddr_t)0xF00000000, 0x1000); (u32)ioremap((kio_addr_t)0xF00000000, 0x1000);
pcmcia_socket[i].phys_attr = (memaddr_t)0xF40000000; pcmcia_socket[i].phys_attr = (memaddr_t)0xF40000000;
pcmcia_socket[i].phys_mem = (memaddr_t)0xF80000000; pcmcia_socket[i].phys_mem = (memaddr_t)0xF80000000;
} }
else { else {
pcmcia_socket[i].virt_io = pcmcia_socket[i].virt_io =
(u32)ioremap((ioaddr_t)0xF08000000, 0x1000); (u32)ioremap((kio_addr_t)0xF08000000, 0x1000);
pcmcia_socket[i].phys_attr = (memaddr_t)0xF48000000; pcmcia_socket[i].phys_attr = (memaddr_t)0xF48000000;
pcmcia_socket[i].phys_mem = (memaddr_t)0xF88000000; pcmcia_socket[i].phys_mem = (memaddr_t)0xF88000000;
} }
......
...@@ -741,19 +741,19 @@ static int alloc_io_space(struct pcmcia_socket *s, u_int attr, ioaddr_t *base, ...@@ -741,19 +741,19 @@ static int alloc_io_space(struct pcmcia_socket *s, u_int attr, ioaddr_t *base,
ioaddr_t num, u_int lines) ioaddr_t num, u_int lines)
{ {
int i; int i;
ioaddr_t try, align; kio_addr_t try, align;
align = (*base) ? (lines ? 1<<lines : 0) : 1; align = (*base) ? (lines ? 1<<lines : 0) : 1;
if (align && (align < num)) { if (align && (align < num)) {
if (*base) { if (*base) {
cs_dbg(s, 0, "odd IO request: num %04x align %04x\n", cs_dbg(s, 0, "odd IO request: num %#x align %#lx\n",
num, align); num, align);
align = 0; align = 0;
} else } else
while (align && (align < num)) align <<= 1; while (align && (align < num)) align <<= 1;
} }
if (*base & ~(align-1)) { if (*base & ~(align-1)) {
cs_dbg(s, 0, "odd IO request: base %04x align %04x\n", cs_dbg(s, 0, "odd IO request: base %#x align %#lx\n",
*base, align); *base, align);
align = 0; align = 0;
} }
......
...@@ -566,7 +566,7 @@ static int hs_set_io_map(struct pcmcia_socket *s, struct pccard_io_map *io) ...@@ -566,7 +566,7 @@ static int hs_set_io_map(struct pcmcia_socket *s, struct pccard_io_map *io)
struct pccard_io_map *sio; struct pccard_io_map *sio;
pgprot_t prot; pgprot_t prot;
DPRINTK("hs_set_io_map(sock=%d, map=%d, flags=0x%x, speed=%dns, start=0x%04x, stop=0x%04x)\n", DPRINTK("hs_set_io_map(sock=%d, map=%d, flags=0x%x, speed=%dns, start=%#lx, stop=%#lx)\n",
sock, map, io->flags, io->speed, io->start, io->stop); sock, map, io->flags, io->speed, io->start, io->stop);
if (map >= MAX_IO_WIN) if (map >= MAX_IO_WIN)
return -EINVAL; return -EINVAL;
......
...@@ -81,7 +81,7 @@ struct socket_info { ...@@ -81,7 +81,7 @@ struct socket_info {
1 = empty socket, 1 = empty socket,
2 = card but not initialized, 2 = card but not initialized,
3 = operational card */ 3 = operational card */
int io_base; /* base io address of the socket */ kio_addr_t io_base; /* base io address of the socket */
struct pcmcia_socket socket; struct pcmcia_socket socket;
struct pci_dev *dev; /* The PCI device for the socket */ struct pci_dev *dev; /* The PCI device for the socket */
......
...@@ -96,7 +96,7 @@ static inline int _check_irq(int irq, int flags) ...@@ -96,7 +96,7 @@ static inline int _check_irq(int irq, int flags)
/* Parameters that can be set with 'insmod' */ /* Parameters that can be set with 'insmod' */
/* Default base address for i82365sl and other ISA chips */ /* Default base address for i82365sl and other ISA chips */
static int i365_base = 0x3e0; static unsigned long i365_base = 0x3e0;
/* Should we probe at 0x3e2 for an extra ISA controller? */ /* Should we probe at 0x3e2 for an extra ISA controller? */
static int extra_sockets = 0; static int extra_sockets = 0;
/* Specify a socket number to ignore */ /* Specify a socket number to ignore */
...@@ -130,7 +130,7 @@ static int async_clock = -1; ...@@ -130,7 +130,7 @@ static int async_clock = -1;
static int cable_mode = -1; static int cable_mode = -1;
static int wakeup = 0; static int wakeup = 0;
module_param(i365_base, int, 0444); module_param(i365_base, ulong, 0444);
module_param(ignore, int, 0444); module_param(ignore, int, 0444);
module_param(extra_sockets, int, 0444); module_param(extra_sockets, int, 0444);
module_param(irq_mask, int, 0444); module_param(irq_mask, int, 0444);
...@@ -167,7 +167,7 @@ struct i82365_socket { ...@@ -167,7 +167,7 @@ struct i82365_socket {
u_short type, flags; u_short type, flags;
struct pcmcia_socket socket; struct pcmcia_socket socket;
unsigned int number; unsigned int number;
ioaddr_t ioaddr; kio_addr_t ioaddr;
u_short psock; u_short psock;
u_char cs_irq, intr; u_char cs_irq, intr;
union { union {
...@@ -240,7 +240,7 @@ static u_char i365_get(u_short sock, u_short reg) ...@@ -240,7 +240,7 @@ static u_char i365_get(u_short sock, u_short reg)
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&bus_lock,flags); spin_lock_irqsave(&bus_lock,flags);
{ {
ioaddr_t port = socket[sock].ioaddr; kio_addr_t port = socket[sock].ioaddr;
u_char val; u_char val;
reg = I365_REG(socket[sock].psock, reg); reg = I365_REG(socket[sock].psock, reg);
outb(reg, port); val = inb(port+1); outb(reg, port); val = inb(port+1);
...@@ -254,7 +254,7 @@ static void i365_set(u_short sock, u_short reg, u_char data) ...@@ -254,7 +254,7 @@ static void i365_set(u_short sock, u_short reg, u_char data)
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&bus_lock,flags); spin_lock_irqsave(&bus_lock,flags);
{ {
ioaddr_t port = socket[sock].ioaddr; kio_addr_t port = socket[sock].ioaddr;
u_char val = I365_REG(socket[sock].psock, reg); u_char val = I365_REG(socket[sock].psock, reg);
outb(val, port); outb(data, port+1); outb(val, port); outb(data, port+1);
spin_unlock_irqrestore(&bus_lock,flags); spin_unlock_irqrestore(&bus_lock,flags);
...@@ -589,7 +589,7 @@ static int to_cycles(int ns) ...@@ -589,7 +589,7 @@ static int to_cycles(int ns)
/*====================================================================*/ /*====================================================================*/
static int __init identify(u_short port, u_short sock) static int __init identify(kio_addr_t port, u_short sock)
{ {
u_char val; u_char val;
int type = -1; int type = -1;
...@@ -660,7 +660,7 @@ static int __init identify(u_short port, u_short sock) ...@@ -660,7 +660,7 @@ static int __init identify(u_short port, u_short sock)
static int __init is_alive(u_short sock) static int __init is_alive(u_short sock)
{ {
u_char stat; u_char stat;
u_short start, stop; kio_addr_t start, stop;
stat = i365_get(sock, I365_STATUS); stat = i365_get(sock, I365_STATUS);
start = i365_get_pair(sock, I365_IO(0)+I365_W_START); start = i365_get_pair(sock, I365_IO(0)+I365_W_START);
...@@ -677,7 +677,7 @@ static int __init is_alive(u_short sock) ...@@ -677,7 +677,7 @@ static int __init is_alive(u_short sock)
/*====================================================================*/ /*====================================================================*/
static void __init add_socket(u_short port, int psock, int type) static void __init add_socket(kio_addr_t port, int psock, int type)
{ {
socket[sockets].ioaddr = port; socket[sockets].ioaddr = port;
socket[sockets].psock = psock; socket[sockets].psock = psock;
...@@ -699,7 +699,7 @@ static void __init add_pcic(int ns, int type) ...@@ -699,7 +699,7 @@ static void __init add_pcic(int ns, int type)
if (base == 0) printk("\n"); if (base == 0) printk("\n");
printk(KERN_INFO " %s", pcic[type].name); printk(KERN_INFO " %s", pcic[type].name);
printk(" ISA-to-PCMCIA at port %#x ofs 0x%02x", printk(" ISA-to-PCMCIA at port %#lx ofs 0x%02x",
t->ioaddr, t->psock*0x40); t->ioaddr, t->psock*0x40);
printk(", %d socket%s\n", ns, ((ns > 1) ? "s" : "")); printk(", %d socket%s\n", ns, ((ns > 1) ? "s" : ""));
...@@ -773,7 +773,7 @@ static struct pnp_dev *i82365_pnpdev; ...@@ -773,7 +773,7 @@ static struct pnp_dev *i82365_pnpdev;
static void __init isa_probe(void) static void __init isa_probe(void)
{ {
int i, j, sock, k, ns, id; int i, j, sock, k, ns, id;
ioaddr_t port; kio_addr_t port;
#ifdef CONFIG_PNP #ifdef CONFIG_PNP
struct isapnp_device_id *devid; struct isapnp_device_id *devid;
struct pnp_dev *dev; struct pnp_dev *dev;
...@@ -804,7 +804,7 @@ static void __init isa_probe(void) ...@@ -804,7 +804,7 @@ static void __init isa_probe(void)
if (check_region(i365_base, 2) != 0) { if (check_region(i365_base, 2) != 0) {
if (sockets == 0) if (sockets == 0)
printk("port conflict at %#x\n", i365_base); printk("port conflict at %#lx\n", i365_base);
return; return;
} }
...@@ -1127,7 +1127,7 @@ static int i365_set_io_map(u_short sock, struct pccard_io_map *io) ...@@ -1127,7 +1127,7 @@ static int i365_set_io_map(u_short sock, struct pccard_io_map *io)
u_char map, ioctl; u_char map, ioctl;
debug(1, "SetIOMap(%d, %d, %#2.2x, %d ns, " debug(1, "SetIOMap(%d, %d, %#2.2x, %d ns, "
"%#4.4x-%#4.4x)\n", sock, io->map, io->flags, "%#lx-%#lx)\n", sock, io->map, io->flags,
io->speed, io->start, io->stop); io->speed, io->start, io->stop);
map = io->map; map = io->map;
if ((map > 1) || (io->start > 0xffff) || (io->stop > 0xffff) || if ((map > 1) || (io->start > 0xffff) || (io->stop > 0xffff) ||
...@@ -1156,8 +1156,8 @@ static int i365_set_mem_map(u_short sock, struct pccard_mem_map *mem) ...@@ -1156,8 +1156,8 @@ static int i365_set_mem_map(u_short sock, struct pccard_mem_map *mem)
u_short base, i; u_short base, i;
u_char map; u_char map;
debug(1, "SetMemMap(%d, %d, %#2.2x, %d ns, %#5.5lx-%#5.5" debug(1, "SetMemMap(%d, %d, %#2.2x, %d ns, %#lx-%#lx, "
"lx, %#5.5x)\n", sock, mem->map, mem->flags, mem->speed, "%#x)\n", sock, mem->map, mem->flags, mem->speed,
mem->res->start, mem->res->end, mem->card_start); mem->res->start, mem->res->end, mem->card_start);
map = mem->map; map = mem->map;
......
...@@ -61,7 +61,7 @@ typedef struct pcc_socket { ...@@ -61,7 +61,7 @@ typedef struct pcc_socket {
u_short type, flags; u_short type, flags;
struct pcmcia_socket socket; struct pcmcia_socket socket;
unsigned int number; unsigned int number;
ioaddr_t ioaddr; kio_addr_t ioaddr;
u_long mapaddr; u_long mapaddr;
u_long base; /* PCC register base */ u_long base; /* PCC register base */
u_char cs_irq1, cs_irq2, intr; u_char cs_irq1, cs_irq2, intr;
...@@ -300,7 +300,7 @@ static int __init is_alive(u_short sock) ...@@ -300,7 +300,7 @@ static int __init is_alive(u_short sock)
return 0; return 0;
} }
static void add_pcc_socket(ulong base, int irq, ulong mapaddr, ioaddr_t ioaddr) static void add_pcc_socket(ulong base, int irq, ulong mapaddr, kio_addr_t ioaddr)
{ {
pcc_socket_t *t = &socket[pcc_sockets]; pcc_socket_t *t = &socket[pcc_sockets];
...@@ -568,7 +568,7 @@ static int _pcc_set_io_map(u_short sock, struct pccard_io_map *io) ...@@ -568,7 +568,7 @@ static int _pcc_set_io_map(u_short sock, struct pccard_io_map *io)
u_char map; u_char map;
debug(3, "m32r_cfc: SetIOMap(%d, %d, %#2.2x, %d ns, " debug(3, "m32r_cfc: SetIOMap(%d, %d, %#2.2x, %d ns, "
"%#4.4x-%#4.4x)\n", sock, io->map, io->flags, "%#lx-%#lx)\n", sock, io->map, io->flags,
io->speed, io->start, io->stop); io->speed, io->start, io->stop);
map = io->map; map = io->map;
...@@ -585,7 +585,7 @@ static int _pcc_set_mem_map(u_short sock, struct pccard_mem_map *mem) ...@@ -585,7 +585,7 @@ static int _pcc_set_mem_map(u_short sock, struct pccard_mem_map *mem)
pcc_socket_t *t = &socket[sock]; pcc_socket_t *t = &socket[sock];
debug(3, "m32r_cfc: SetMemMap(%d, %d, %#2.2x, %d ns, " debug(3, "m32r_cfc: SetMemMap(%d, %d, %#2.2x, %d ns, "
"%#5.5lx, %#5.5x)\n", sock, map, mem->flags, "%#lx, %#x)\n", sock, map, mem->flags,
mem->speed, mem->static_start, mem->card_start); mem->speed, mem->static_start, mem->card_start);
/* /*
...@@ -807,7 +807,7 @@ static int __init init_m32r_pcc(void) ...@@ -807,7 +807,7 @@ static int __init init_m32r_pcc(void)
#else /* CONFIG_PLAT_USRV */ #else /* CONFIG_PLAT_USRV */
{ {
ulong base, mapaddr; ulong base, mapaddr;
ioaddr_t ioaddr; kio_addr_t ioaddr;
for (i = 0 ; i < M32R_MAX_PCC ; i++) { for (i = 0 ; i < M32R_MAX_PCC ; i++) {
base = (ulong)PLD_CFRSTCR; base = (ulong)PLD_CFRSTCR;
......
...@@ -68,7 +68,7 @@ typedef struct pcc_socket { ...@@ -68,7 +68,7 @@ typedef struct pcc_socket {
u_short type, flags; u_short type, flags;
struct pcmcia_socket socket; struct pcmcia_socket socket;
unsigned int number; unsigned int number;
ioaddr_t ioaddr; kio_addr_t ioaddr;
u_long mapaddr; u_long mapaddr;
u_long base; /* PCC register base */ u_long base; /* PCC register base */
u_char cs_irq, intr; u_char cs_irq, intr;
...@@ -312,7 +312,7 @@ static int __init is_alive(u_short sock) ...@@ -312,7 +312,7 @@ static int __init is_alive(u_short sock)
return 0; return 0;
} }
static void add_pcc_socket(ulong base, int irq, ulong mapaddr, ioaddr_t ioaddr) static void add_pcc_socket(ulong base, int irq, ulong mapaddr, kio_addr_t ioaddr)
{ {
pcc_socket_t *t = &socket[pcc_sockets]; pcc_socket_t *t = &socket[pcc_sockets];
...@@ -503,7 +503,7 @@ static int _pcc_set_io_map(u_short sock, struct pccard_io_map *io) ...@@ -503,7 +503,7 @@ static int _pcc_set_io_map(u_short sock, struct pccard_io_map *io)
u_char map; u_char map;
debug(3, "m32r-pcc: SetIOMap(%d, %d, %#2.2x, %d ns, " debug(3, "m32r-pcc: SetIOMap(%d, %d, %#2.2x, %d ns, "
"%#4.4x-%#4.4x)\n", sock, io->map, io->flags, "%#lx-%#lx)\n", sock, io->map, io->flags,
io->speed, io->start, io->stop); io->speed, io->start, io->stop);
map = io->map; map = io->map;
...@@ -526,7 +526,7 @@ static int _pcc_set_mem_map(u_short sock, struct pccard_mem_map *mem) ...@@ -526,7 +526,7 @@ static int _pcc_set_mem_map(u_short sock, struct pccard_mem_map *mem)
#endif #endif
debug(3, "m32r-pcc: SetMemMap(%d, %d, %#2.2x, %d ns, " debug(3, "m32r-pcc: SetMemMap(%d, %d, %#2.2x, %d ns, "
"%#5.5lx, %#5.5x)\n", sock, map, mem->flags, "%#lx, %#x)\n", sock, map, mem->flags,
mem->speed, mem->static_start, mem->card_start); mem->speed, mem->static_start, mem->card_start);
/* /*
......
...@@ -186,14 +186,15 @@ static int sub_interval(struct resource_map *map, u_long base, u_long num) ...@@ -186,14 +186,15 @@ static int sub_interval(struct resource_map *map, u_long base, u_long num)
======================================================================*/ ======================================================================*/
#ifdef CONFIG_PCMCIA_PROBE #ifdef CONFIG_PCMCIA_PROBE
static void do_io_probe(struct pcmcia_socket *s, ioaddr_t base, ioaddr_t num) static void do_io_probe(struct pcmcia_socket *s, kio_addr_t base, kio_addr_t num)
{ {
struct resource *res; struct resource *res;
struct socket_data *s_data = s->resource_data; struct socket_data *s_data = s->resource_data;
ioaddr_t i, j, bad, any; kio_addr_t i, j, bad;
int any;
u_char *b, hole, most; u_char *b, hole, most;
printk(KERN_INFO "cs: IO port probe 0x%04x-0x%04x:", printk(KERN_INFO "cs: IO port probe %#lx-%#lx:",
base, base+num-1); base, base+num-1);
/* First, what does a floating port look like? */ /* First, what does a floating port look like? */
...@@ -233,7 +234,7 @@ static void do_io_probe(struct pcmcia_socket *s, ioaddr_t base, ioaddr_t num) ...@@ -233,7 +234,7 @@ static void do_io_probe(struct pcmcia_socket *s, ioaddr_t base, ioaddr_t num)
} else { } else {
if (bad) { if (bad) {
sub_interval(&s_data->io_db, bad, i-bad); sub_interval(&s_data->io_db, bad, i-bad);
printk(" %#04x-%#04x", bad, i-1); printk(" %#lx-%#lx", bad, i-1);
bad = 0; bad = 0;
} }
} }
...@@ -244,7 +245,7 @@ static void do_io_probe(struct pcmcia_socket *s, ioaddr_t base, ioaddr_t num) ...@@ -244,7 +245,7 @@ static void do_io_probe(struct pcmcia_socket *s, ioaddr_t base, ioaddr_t num)
return; return;
} else { } else {
sub_interval(&s_data->io_db, bad, i-bad); sub_interval(&s_data->io_db, bad, i-bad);
printk(" %#04x-%#04x", bad, i-1); printk(" %#lx-%#lx", bad, i-1);
} }
} }
...@@ -725,7 +726,8 @@ static int adjust_memory(struct pcmcia_socket *s, adjust_t *adj) ...@@ -725,7 +726,8 @@ static int adjust_memory(struct pcmcia_socket *s, adjust_t *adj)
static int adjust_io(struct pcmcia_socket *s, adjust_t *adj) static int adjust_io(struct pcmcia_socket *s, adjust_t *adj)
{ {
struct socket_data *data = s->resource_data; struct socket_data *data = s->resource_data;
int base, num, ret = CS_SUCCESS; kio_addr_t base, num;
int ret = CS_SUCCESS;
base = adj->resource.io.BasePort; base = adj->resource.io.BasePort;
num = adj->resource.io.NumPorts; num = adj->resource.io.NumPorts;
......
...@@ -80,7 +80,7 @@ MODULE_LICENSE("Dual MPL/GPL"); ...@@ -80,7 +80,7 @@ MODULE_LICENSE("Dual MPL/GPL");
/* Parameters that can be set with 'insmod' */ /* Parameters that can be set with 'insmod' */
/* The base port address of the TCIC-2 chip */ /* The base port address of the TCIC-2 chip */
static int tcic_base = TCIC_BASE; static unsigned long tcic_base = TCIC_BASE;
/* Specify a socket number to ignore */ /* Specify a socket number to ignore */
static int ignore = -1; static int ignore = -1;
...@@ -105,7 +105,7 @@ static int poll_quick = HZ/20; ...@@ -105,7 +105,7 @@ static int poll_quick = HZ/20;
/* CCLK external clock time, in nanoseconds. 70 ns = 14.31818 MHz */ /* CCLK external clock time, in nanoseconds. 70 ns = 14.31818 MHz */
static int cycle_time = 70; static int cycle_time = 70;
module_param(tcic_base, int, 0444); module_param(tcic_base, ulong, 0444);
module_param(ignore, int, 0444); module_param(ignore, int, 0444);
module_param(do_scan, int, 0444); module_param(do_scan, int, 0444);
module_param(irq_mask, int, 0444); module_param(irq_mask, int, 0444);
...@@ -144,26 +144,26 @@ static struct tcic_socket socket_table[2]; ...@@ -144,26 +144,26 @@ static struct tcic_socket socket_table[2];
static u_char tcic_getb(u_char reg) static u_char tcic_getb(u_char reg)
{ {
u_char val = inb(tcic_base+reg); u_char val = inb(tcic_base+reg);
printk(KERN_DEBUG "tcic_getb(%#x) = %#x\n", tcic_base+reg, val); printk(KERN_DEBUG "tcic_getb(%#lx) = %#x\n", tcic_base+reg, val);
return val; return val;
} }
static u_short tcic_getw(u_char reg) static u_short tcic_getw(u_char reg)
{ {
u_short val = inw(tcic_base+reg); u_short val = inw(tcic_base+reg);
printk(KERN_DEBUG "tcic_getw(%#x) = %#x\n", tcic_base+reg, val); printk(KERN_DEBUG "tcic_getw(%#lx) = %#x\n", tcic_base+reg, val);
return val; return val;
} }
static void tcic_setb(u_char reg, u_char data) static void tcic_setb(u_char reg, u_char data)
{ {
printk(KERN_DEBUG "tcic_setb(%#x, %#x)\n", tcic_base+reg, data); printk(KERN_DEBUG "tcic_setb(%#lx, %#x)\n", tcic_base+reg, data);
outb(data, tcic_base+reg); outb(data, tcic_base+reg);
} }
static void tcic_setw(u_char reg, u_short data) static void tcic_setw(u_char reg, u_short data)
{ {
printk(KERN_DEBUG "tcic_setw(%#x, %#x)\n", tcic_base+reg, data); printk(KERN_DEBUG "tcic_setw(%#lx, %#x)\n", tcic_base+reg, data);
outw(data, tcic_base+reg); outw(data, tcic_base+reg);
} }
#else #else
...@@ -796,7 +796,7 @@ static int tcic_set_io_map(struct pcmcia_socket *sock, struct pccard_io_map *io) ...@@ -796,7 +796,7 @@ static int tcic_set_io_map(struct pcmcia_socket *sock, struct pccard_io_map *io)
u_short base, len, ioctl; u_short base, len, ioctl;
debug(1, "SetIOMap(%d, %d, %#2.2x, %d ns, " debug(1, "SetIOMap(%d, %d, %#2.2x, %d ns, "
"%#4.4x-%#4.4x)\n", psock, io->map, io->flags, "%#lx-%#lx)\n", psock, io->map, io->flags,
io->speed, io->start, io->stop); io->speed, io->start, io->stop);
if ((io->map > 1) || (io->start > 0xffff) || (io->stop > 0xffff) || if ((io->map > 1) || (io->start > 0xffff) || (io->stop > 0xffff) ||
(io->stop < io->start)) return -EINVAL; (io->stop < io->start)) return -EINVAL;
...@@ -833,7 +833,7 @@ static int tcic_set_mem_map(struct pcmcia_socket *sock, struct pccard_mem_map *m ...@@ -833,7 +833,7 @@ static int tcic_set_mem_map(struct pcmcia_socket *sock, struct pccard_mem_map *m
u_long base, len, mmap; u_long base, len, mmap;
debug(1, "SetMemMap(%d, %d, %#2.2x, %d ns, " debug(1, "SetMemMap(%d, %d, %#2.2x, %d ns, "
"%#5.5lx-%#5.5lx, %#5.5x)\n", psock, mem->map, mem->flags, "%#lx-%#lx, %#x)\n", psock, mem->map, mem->flags,
mem->speed, mem->res->start, mem->res->end, mem->card_start); mem->speed, mem->res->start, mem->res->end, mem->card_start);
if ((mem->map > 3) || (mem->card_start > 0x3ffffff) || if ((mem->map > 3) || (mem->card_start > 0x3ffffff) ||
(mem->res->start > 0xffffff) || (mem->res->end > 0xffffff) || (mem->res->start > 0xffffff) || (mem->res->end > 0xffffff) ||
......
...@@ -289,7 +289,7 @@ static void serial_detach(dev_link_t * link) ...@@ -289,7 +289,7 @@ static void serial_detach(dev_link_t * link)
/*====================================================================*/ /*====================================================================*/
static int setup_serial(struct serial_info * info, ioaddr_t iobase, int irq) static int setup_serial(struct serial_info * info, kio_addr_t iobase, int irq)
{ {
struct uart_port port; struct uart_port port;
int line; int line;
...@@ -351,7 +351,7 @@ next_tuple(client_handle_t handle, tuple_t * tuple, cisparse_t * parse) ...@@ -351,7 +351,7 @@ next_tuple(client_handle_t handle, tuple_t * tuple, cisparse_t * parse)
static int simple_config(dev_link_t *link) static int simple_config(dev_link_t *link)
{ {
static ioaddr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 }; static kio_addr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 };
static int size_table[2] = { 8, 16 }; static int size_table[2] = { 8, 16 };
client_handle_t handle = link->handle; client_handle_t handle = link->handle;
struct serial_info *info = link->priv; struct serial_info *info = link->priv;
...@@ -366,7 +366,7 @@ static int simple_config(dev_link_t *link) ...@@ -366,7 +366,7 @@ static int simple_config(dev_link_t *link)
/* If the card is already configured, look up the port and irq */ /* If the card is already configured, look up the port and irq */
i = pcmcia_get_configuration_info(handle, &config); i = pcmcia_get_configuration_info(handle, &config);
if ((i == CS_SUCCESS) && (config.Attributes & CONF_VALID_CLIENT)) { if ((i == CS_SUCCESS) && (config.Attributes & CONF_VALID_CLIENT)) {
ioaddr_t port = 0; kio_addr_t port = 0;
if ((config.BasePort2 != 0) && (config.NumPorts2 == 8)) { if ((config.BasePort2 != 0) && (config.NumPorts2 == 8)) {
port = config.BasePort2; port = config.BasePort2;
info->slave = 1; info->slave = 1;
......
...@@ -22,10 +22,12 @@ ...@@ -22,10 +22,12 @@
#endif #endif
#if defined(__arm__) || defined(__mips__) #if defined(__arm__) || defined(__mips__)
/* This (ioaddr_t) is exposed to userspace & hence cannot be changed. */
typedef u_int ioaddr_t; typedef u_int ioaddr_t;
#else #else
typedef u_short ioaddr_t; typedef u_short ioaddr_t;
#endif #endif
typedef unsigned long kio_addr_t;
typedef u_short socket_t; typedef u_short socket_t;
typedef u_int event_t; typedef u_int event_t;
......
...@@ -81,7 +81,7 @@ typedef struct pccard_io_map { ...@@ -81,7 +81,7 @@ typedef struct pccard_io_map {
u_char map; u_char map;
u_char flags; u_char flags;
u_short speed; u_short speed;
ioaddr_t start, stop; kio_addr_t start, stop;
} pccard_io_map; } pccard_io_map;
typedef struct pccard_mem_map { typedef struct pccard_mem_map {
...@@ -144,8 +144,8 @@ struct pcmcia_socket; ...@@ -144,8 +144,8 @@ struct pcmcia_socket;
typedef struct io_window_t { typedef struct io_window_t {
u_int Attributes; u_int Attributes;
ioaddr_t BasePort, NumPorts; kio_addr_t BasePort, NumPorts;
ioaddr_t InUse, Config; kio_addr_t InUse, Config;
struct resource *res; struct resource *res;
} io_window_t; } io_window_t;
...@@ -199,7 +199,7 @@ struct pcmcia_socket { ...@@ -199,7 +199,7 @@ struct pcmcia_socket {
u_int features; u_int features;
u_int irq_mask; u_int irq_mask;
u_int map_size; u_int map_size;
ioaddr_t io_offset; kio_addr_t io_offset;
u_char pci_irq; u_char pci_irq;
struct pci_dev * cb_dev; struct pci_dev * cb_dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment