Commit 92f0a71f authored by Alexander Viro's avatar Alexander Viro Committed by Jeff Garzik

[PATCH] bunch of trivial iomem annotations in drivers/net

Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.theplanet.co.uk>
parent a7cba89b
......@@ -798,7 +798,7 @@ struct vortex_private {
/* PCI configuration space information. */
struct device *gendev;
char *cb_fn_base; /* CardBus function status addr space. */
char __iomem *cb_fn_base; /* CardBus function status addr space. */
/* Some values here only for performance evaluation and path-coverage */
int rx_nocopy, rx_copy, queued_packet, rx_csumhits;
......
......@@ -335,7 +335,7 @@ struct cp_extra_stats {
};
struct cp_private {
void *regs;
void __iomem *regs;
struct net_device *dev;
spinlock_t lock;
u32 msg_enable;
......@@ -1580,11 +1580,11 @@ static int cp_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
#define EE_READ_CMD (6)
#define EE_ERASE_CMD (7)
static int read_eeprom (void *ioaddr, int location, int addr_len)
static int read_eeprom (void __iomem *ioaddr, int location, int addr_len)
{
int i;
unsigned retval = 0;
void *ee_addr = ioaddr + Cfg9346;
void __iomem *ee_addr = ioaddr + Cfg9346;
int read_cmd = location | (EE_READ_CMD << addr_len);
writeb (EE_ENB & ~EE_CS, ee_addr);
......@@ -1631,7 +1631,7 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
struct net_device *dev;
struct cp_private *cp;
int rc;
void *regs;
void __iomem *regs;
long pciaddr;
unsigned int addr_len, i, pci_using_dac;
u8 pci_rev;
......
......@@ -513,7 +513,7 @@ struct nic {
spinlock_t cb_lock ____cacheline_aligned;
spinlock_t cmd_lock;
struct csr *csr;
struct csr __iomem *csr;
enum scb_cmd_lo cuc_cmd;
unsigned int cbs_avail;
struct cb *cbs;
......
......@@ -970,7 +970,7 @@ struct e1000_hw_stats {
/* Structure containing variables used by the shared code (e1000_hw.c) */
struct e1000_hw {
uint8_t *hw_addr;
uint8_t __iomem *hw_addr;
e1000_mac_type mac_type;
e1000_phy_type phy_type;
uint32_t phy_init_script;
......
......@@ -683,7 +683,7 @@ struct ixgb_bus {
};
struct ixgb_hw {
uint8_t *hw_addr; /* Base Address of the hardware */
uint8_t __iomem *hw_addr;/* Base Address of the hardware */
void *back; /* Pointer to OS-dependent struct */
struct ixgb_fc fc; /* Flow control parameters */
struct ixgb_bus bus; /* Bus parameters */
......
......@@ -428,7 +428,7 @@ struct rx_info {
struct ns83820 {
struct net_device_stats stats;
u8 *base;
u8 __iomem *base;
struct pci_dev *pci_dev;
......@@ -1164,7 +1164,7 @@ static int ns83820_hard_start_xmit(struct sk_buff *skb, struct net_device *ndev)
static void ns83820_update_stats(struct ns83820 *dev)
{
u8 *base = dev->base;
u8 __iomem *base = dev->base;
/* the DP83820 will freeze counters, so we need to read all of them */
dev->stats.rx_errors += readl(base + 0x60) & 0xffff;
......@@ -1512,7 +1512,7 @@ static int ns83820_change_mtu(struct net_device *ndev, int new_mtu)
static void ns83820_set_multicast(struct net_device *ndev)
{
struct ns83820 *dev = PRIV(ndev);
u8 *rfcr = dev->base + RFCR;
u8 __iomem *rfcr = dev->base + RFCR;
u32 and_mask = 0xffffffff;
u32 or_mask = 0;
u32 val;
......@@ -1816,7 +1816,7 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
dev->IMR_cache = 0;
setup_ee_mem_bitbanger(&dev->ee, (long)dev->base + MEAR, 3, 2, 1, 0,
setup_ee_mem_bitbanger(&dev->ee, dev->base + MEAR, 3, 2, 1, 0,
0);
err = request_irq(pci_dev->irq, ns83820_irq, SA_SHIRQ,
......
......@@ -109,7 +109,7 @@ typedef struct s_AC SK_AC;
#define SK_MAX_MACS 2
#define SK_MAX_NETS 2
#define SK_IOC char*
#define SK_IOC char __iomem *
typedef struct s_DrvRlmtMbuf SK_MBUF;
......
......@@ -285,7 +285,7 @@ struct s_TxPort {
TXD *pTxdRingPrev; /* descriptor sent previously */
int TxdRingFree; /* # of free entrys */
spinlock_t TxDesRingLock; /* serialize descriptor accesses */
caddr_t HwAddr; /* bmu registers address */
SK_IOC HwAddr; /* bmu registers address */
int PortIndex; /* index number of port (0 or 1) */
};
......@@ -301,7 +301,7 @@ struct s_RxPort {
int RxdRingFree; /* # of free entrys */
spinlock_t RxDesRingLock; /* serialize descriptor accesses */
int RxFillLimit; /* limit for buffers in ring */
caddr_t HwAddr; /* bmu registers address */
SK_IOC HwAddr; /* bmu registers address */
int PortIndex; /* index number of port (0 or 1) */
};
......
......@@ -303,7 +303,7 @@ int SkGeInitPCI(SK_AC *pAC)
/*
* Remap the regs into kernel space.
*/
pAC->IoBase = (char*)ioremap_nocache(dev->mem_start, 0x4000);
pAC->IoBase = ioremap_nocache(dev->mem_start, 0x4000);
if (!pAC->IoBase){
retval = 3;
......
......@@ -2683,12 +2683,12 @@ static int gem_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
#if (!defined(__sparc__) && !defined(CONFIG_PPC))
/* Fetch MAC address from vital product data of PCI ROM. */
static void find_eth_addr_in_vpd(void *rom_base, int len, unsigned char *dev_addr)
static void find_eth_addr_in_vpd(void __iomem *rom_base, int len, unsigned char *dev_addr)
{
int this_offset;
for (this_offset = 0x20; this_offset < len; this_offset++) {
void *p = rom_base + this_offset;
void __iomem *p = rom_base + this_offset;
int i;
if (readb(p + 0) != 0x90 ||
......
......@@ -2948,12 +2948,12 @@ static int is_quattro_p(struct pci_dev *pdev)
}
/* Fetch MAC address from vital product data of PCI ROM. */
static void find_eth_addr_in_vpd(void *rom_base, int len, int index, unsigned char *dev_addr)
static void find_eth_addr_in_vpd(void __iomem *rom_base, int len, int index, unsigned char *dev_addr)
{
int this_offset;
for (this_offset = 0x20; this_offset < len; this_offset++) {
void *p = rom_base + this_offset;
void __iomem *p = rom_base + this_offset;
if (readb(p + 0) != 0x90 ||
readb(p + 1) != 0x00 ||
......@@ -2980,7 +2980,7 @@ static void find_eth_addr_in_vpd(void *rom_base, int len, int index, unsigned ch
static void get_hme_mac_nonsparc(struct pci_dev *pdev, unsigned char *dev_addr)
{
u32 rom_reg_orig;
void *p;
void __iomem *p;
int index;
index = 0;
......@@ -3257,7 +3257,7 @@ static int __init happy_meal_pci_init(struct pci_dev *pdev)
return 0;
err_out_iounmap:
iounmap((void *)hp->gregs);
iounmap(hp->gregs);
err_out_free_res:
pci_release_regions(pdev);
......@@ -3390,7 +3390,7 @@ static void __exit happy_meal_cleanup_module(void)
PAGE_SIZE,
hp->happy_block,
hp->hblock_dvma);
iounmap((void *)hp->gregs);
iounmap(hp->gregs);
pci_release_regions(hp->happy_dev);
}
#endif
......
......@@ -287,7 +287,7 @@ struct de_private {
unsigned tx_tail;
unsigned rx_tail;
void *regs;
void __iomem *regs;
struct net_device *dev;
spinlock_t lock;
......@@ -1735,11 +1735,11 @@ static void __init de21040_get_media_info(struct de_private *de)
}
/* Note: this routine returns extra data bits for size detection. */
static unsigned __init tulip_read_eeprom(void *regs, int location, int addr_len)
static unsigned __init tulip_read_eeprom(void __iomem *regs, int location, int addr_len)
{
int i;
unsigned retval = 0;
void *ee_addr = regs + ROMCmd;
void __iomem *ee_addr = regs + ROMCmd;
int read_cmd = location | (EE_READ_CMD << addr_len);
writel(EE_ENB & ~EE_CS, ee_addr);
......@@ -1932,7 +1932,7 @@ static int __devinit de_init_one (struct pci_dev *pdev,
struct net_device *dev;
struct de_private *de;
int rc;
void *regs;
void __iomem *regs;
long pciaddr;
static int board_idx = -1;
......
......@@ -411,7 +411,7 @@ struct buf_window {
};
/* Calculate offset of a buffer object within the shared memory window */
#define BUF_OFFSET(X) ((unsigned int)&(((struct buf_window *)BFM_BASE)->X))
#define BUF_OFFSET(X) (BFM_BASE + offsetof(struct buf_window, X))
#pragma pack()
......@@ -443,8 +443,8 @@ struct fst_port_info {
/* Per card information
*/
struct fst_card_info {
char *mem; /* Card memory mapped to kernel space */
char *ctlmem; /* Control memory for PCI cards */
char __iomem *mem; /* Card memory mapped to kernel space */
char __iomem *ctlmem; /* Control memory for PCI cards */
unsigned int phys_mem; /* Physical memory window address */
unsigned int phys_ctlmem; /* Physical control memory address */
unsigned int irq; /* Interrupt request line number */
......
......@@ -71,7 +71,7 @@ typedef struct card_t {
int n_ports; /* 1, 2 or 4 ports */
u8 irq;
u8 *plx; /* PLX PCI9060 virtual base address */
u8 __iomem *plx; /* PLX PCI9060 virtual base address */
struct pci_dev *pdev; /* for pdev->slot_name */
int rx_in;
struct sk_buff *rx_skbs[RX_QUEUE_LENGTH];
......@@ -399,7 +399,7 @@ static int wanxl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
static int wanxl_open(struct net_device *dev)
{
port_t *port = dev_to_port(dev);
u8 *dbr = port->card->plx + PLX_DOORBELL_TO_CARD;
u8 __iomem *dbr = port->card->plx + PLX_DOORBELL_TO_CARD;
unsigned long timeout;
int i;
......@@ -562,7 +562,7 @@ static int __devinit wanxl_pci_init_one(struct pci_dev *pdev,
unsigned long timeout;
u32 plx_phy; /* PLX PCI base address */
u32 mem_phy; /* memory PCI base addr */
u8 *mem; /* memory virtual base addr */
u8 __iomem *mem; /* memory virtual base addr */
int i, ports, alloc_size;
#ifndef MODULE
......
......@@ -15,7 +15,7 @@ struct eeprom {
void *dev;
struct eeprom_ops *ops;
long addr;
void __iomem * addr;
unsigned ee_addr_bits;
......@@ -43,7 +43,7 @@ enum EEPROM_Cmds {
EE_WriteCmd=(5 << 6), EE_ReadCmd=(6 << 6), EE_EraseCmd=(7 << 6),
};
void setup_ee_mem_bitbanger(struct eeprom *ee, long memaddr, int eesel_bit, int eeclk_bit, int eedo_bit, int eedi_bit, unsigned polarity)
void setup_ee_mem_bitbanger(struct eeprom *ee, void __iomem *memaddr, int eesel_bit, int eeclk_bit, int eedo_bit, int eedi_bit, unsigned polarity)
{
ee->addr = memaddr;
ee->eesel = 1 << eesel_bit;
......
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