Commit ab13913f authored by Alexander Viro's avatar Alexander Viro Committed by Jeff Garzik

[PATCH] wavelan_cs iomem annotations

Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.theplanet.co.uk>
parent be11ba10
...@@ -136,7 +136,8 @@ psa_read(struct net_device * dev, ...@@ -136,7 +136,8 @@ psa_read(struct net_device * dev,
u_char * b, /* buffer to fill */ u_char * b, /* buffer to fill */
int n) /* size to read */ int n) /* size to read */
{ {
u_char * ptr = ((u_char *)dev->mem_start) + PSA_ADDR + (o << 1); net_local *lp = netdev_priv(dev);
u_char __iomem *ptr = lp->mem + PSA_ADDR + (o << 1);
while(n-- > 0) while(n-- > 0)
{ {
...@@ -160,12 +161,13 @@ psa_write(struct net_device * dev, ...@@ -160,12 +161,13 @@ psa_write(struct net_device * dev,
u_char * b, /* Buffer in memory */ u_char * b, /* Buffer in memory */
int n) /* Length of buffer */ int n) /* Length of buffer */
{ {
u_char * ptr = ((u_char *) dev->mem_start) + PSA_ADDR + (o << 1); net_local *lp = netdev_priv(dev);
u_char __iomem *ptr = lp->mem + PSA_ADDR + (o << 1);
int count = 0; int count = 0;
ioaddr_t base = dev->base_addr; ioaddr_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 * verify = ((u_char *) dev->mem_start) + PSA_ADDR + volatile u_char __iomem *verify = lp->mem + PSA_ADDR +
(psaoff(0, psa_comp_number) << 1); (psaoff(0, psa_comp_number) << 1);
/* Authorize writting to PSA */ /* Authorize writting to PSA */
...@@ -3948,17 +3950,16 @@ wv_hw_reset(struct net_device * dev) ...@@ -3948,17 +3950,16 @@ wv_hw_reset(struct net_device * dev)
static inline int static inline int
wv_pcmcia_config(dev_link_t * link) wv_pcmcia_config(dev_link_t * link)
{ {
client_handle_t handle; client_handle_t handle = link->handle;
tuple_t tuple; tuple_t tuple;
cisparse_t parse; cisparse_t parse;
struct net_device * dev; struct net_device * dev = (struct net_device *) link->priv;
int i; int i;
u_char buf[64]; u_char buf[64];
win_req_t req; win_req_t req;
memreq_t mem; memreq_t mem;
net_local * lp = netdev_priv(dev);
handle = link->handle;
dev = (struct net_device *) link->priv;
#ifdef DEBUG_CONFIG_TRACE #ifdef DEBUG_CONFIG_TRACE
printk(KERN_DEBUG "->wv_pcmcia_config(0x%p)\n", link); printk(KERN_DEBUG "->wv_pcmcia_config(0x%p)\n", link);
...@@ -4045,7 +4046,8 @@ wv_pcmcia_config(dev_link_t * link) ...@@ -4045,7 +4046,8 @@ wv_pcmcia_config(dev_link_t * link)
break; break;
} }
dev->mem_start = (u_long)ioremap(req.Base, req.Size); lp->mem = ioremap(req.Base, req.Size);
dev->mem_start = (u_long)lp->mem;
dev->mem_end = dev->mem_start + req.Size; dev->mem_end = dev->mem_start + req.Size;
mem.CardOffset = 0; mem.Page = 0; mem.CardOffset = 0; mem.Page = 0;
...@@ -4062,8 +4064,8 @@ wv_pcmcia_config(dev_link_t * link) ...@@ -4062,8 +4064,8 @@ wv_pcmcia_config(dev_link_t * link)
netif_start_queue(dev); netif_start_queue(dev);
#ifdef DEBUG_CONFIG_INFO #ifdef DEBUG_CONFIG_INFO
printk(KERN_DEBUG "wv_pcmcia_config: MEMSTART 0x%x IRQ %d IOPORT 0x%x\n", printk(KERN_DEBUG "wv_pcmcia_config: MEMSTART %p IRQ %d IOPORT 0x%x\n",
(u_int) dev->mem_start, dev->irq, (u_int) dev->base_addr); lp->mem, dev->irq, (u_int) dev->base_addr);
#endif #endif
i = register_netdev(dev); i = register_netdev(dev);
...@@ -4104,13 +4106,14 @@ static void ...@@ -4104,13 +4106,14 @@ static void
wv_pcmcia_release(dev_link_t *link) wv_pcmcia_release(dev_link_t *link)
{ {
struct net_device * dev = (struct net_device *) link->priv; struct net_device * dev = (struct net_device *) link->priv;
net_local * lp = netdev_priv(dev);
#ifdef DEBUG_CONFIG_TRACE #ifdef DEBUG_CONFIG_TRACE
printk(KERN_DEBUG "%s: -> wv_pcmcia_release(0x%p)\n", dev->name, link); printk(KERN_DEBUG "%s: -> wv_pcmcia_release(0x%p)\n", dev->name, link);
#endif #endif
/* Don't bother checking to see if these succeed or not */ /* Don't bother checking to see if these succeed or not */
iounmap((u_char *)dev->mem_start); iounmap(lp->mem);
pcmcia_release_window(link->win); pcmcia_release_window(link->win);
pcmcia_release_configuration(link->handle); pcmcia_release_configuration(link->handle);
pcmcia_release_io(link->handle, &link->io); pcmcia_release_io(link->handle, &link->io);
......
...@@ -645,6 +645,7 @@ struct net_local ...@@ -645,6 +645,7 @@ struct net_local
int cell_search; /* Searching for new cell? */ int cell_search; /* Searching for new cell? */
struct timer_list cell_timer; /* Garbage collection */ struct timer_list cell_timer; /* Garbage collection */
#endif /* WAVELAN_ROAMING */ #endif /* WAVELAN_ROAMING */
void __iomem *mem;
}; };
/**************************** PROTOTYPES ****************************/ /**************************** PROTOTYPES ****************************/
......
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