Commit f4f9e3fd authored by Chas Williams's avatar Chas Williams Committed by David S. Miller

[ATM]: [drivers] fix warnings related to readl/writel changes

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7bae86e3
......@@ -1667,7 +1667,7 @@ static int __devinit fs_init (struct fs_dev *dev)
dev->hw_base = pci_resource_start(pci_dev, 0);
dev->base = (ulong) ioremap(dev->hw_base, 0x1000);
dev->base = ioremap(dev->hw_base, 0x1000);
reset_chip (dev);
......
......@@ -477,7 +477,7 @@ struct fs_dev {
struct timer_list timer;
unsigned long hw_base; /* mem base address */
unsigned long base; /* Mapping of base address */
void *base; /* Mapping of base address */
int channo;
unsigned long channel_mask;
......
......@@ -1007,6 +1007,7 @@ he_start(struct atm_dev *dev)
{
struct he_dev *he_dev;
struct pci_dev *pci_dev;
unsigned long membase;
u16 command;
u32 gen_cntl_0, host_cntl, lb_swap;
......@@ -1019,8 +1020,8 @@ he_start(struct atm_dev *dev)
he_dev = HE_DEV(dev);
pci_dev = he_dev->pci_dev;
he_dev->membase = pci_dev->resource[0].start;
HPRINTK("membase = 0x%lx irq = %d.\n", he_dev->membase, pci_dev->irq);
membase = pci_resource_start(pci_dev, 0);
HPRINTK("membase = 0x%lx irq = %d.\n", membase, pci_dev->irq);
/*
* pci bus controller initialization
......@@ -1080,7 +1081,7 @@ he_start(struct atm_dev *dev)
hprintk("can't set latency timer to %d\n", timer);
}
if (!(he_dev->membase = (unsigned long) ioremap(he_dev->membase, HE_REGMAP_SIZE))) {
if (!(he_dev->membase = ioremap(membase, HE_REGMAP_SIZE))) {
hprintk("can't set up page mapping\n");
return -EINVAL;
}
......
......@@ -265,7 +265,7 @@ struct he_cs_stper
struct he_dev {
unsigned int number;
unsigned int irq;
unsigned long membase;
void *membase;
char prod_id[30];
char mac_addr[6];
......
......@@ -3164,7 +3164,7 @@ deinit_card(struct idt77252_dev *card)
for (i = 0; i < 4; i++) {
if (card->fbq[i])
iounmap((void *) card->fbq[i]);
iounmap(card->fbq[i]);
}
if (card->membase)
......@@ -3722,7 +3722,7 @@ idt77252_init_one(struct pci_dev *pcidev, const struct pci_device_id *id)
card->tst_timer.function = tst_timer;
/* Do the I/O remapping... */
card->membase = (unsigned long) ioremap(membase, 1024);
card->membase = ioremap(membase, 1024);
if (!card->membase) {
printk("%s: can't ioremap() membase\n", card->name);
err = -EIO;
......@@ -3756,8 +3756,7 @@ idt77252_init_one(struct pci_dev *pcidev, const struct pci_device_id *id)
card->sramsize = probe_sram(card);
for (i = 0; i < 4; i++) {
card->fbq[i] = (unsigned long)
ioremap(srambase | 0x200000 | (i << 18), 4);
card->fbq[i] = ioremap(srambase | 0x200000 | (i << 18), 4);
if (!card->fbq[i]) {
printk("%s: can't ioremap() FBQ%d\n", card->name, i);
err = -EIO;
......
......@@ -355,9 +355,9 @@ struct idt77252_dev
struct pci_dev *pcidev; /* PCI handle (desriptor) */
struct atm_dev *atmdev; /* ATM device desriptor */
unsigned long membase; /* SAR's memory base address */
void *membase; /* SAR's memory base address */
unsigned long srambase; /* SAR's sram base address */
unsigned long fbq[4]; /* FBQ fill addresses */
void *fbq[4]; /* FBQ fill addresses */
struct semaphore mutex;
spinlock_t cmd_lock; /* for r/w utility/sram */
......
......@@ -191,7 +191,7 @@
#define LANAI_EEPROM_SIZE (128)
typedef int vci_t;
typedef unsigned long bus_addr_t;
typedef void *bus_addr_t;
/* DMA buffer in host memory for TX, RX, or service list. */
struct lanai_buffer {
......@@ -471,7 +471,7 @@ enum lanai_register {
static inline bus_addr_t reg_addr(const struct lanai_dev *lanai,
enum lanai_register reg)
{
return lanai->base + (bus_addr_t) reg;
return lanai->base + reg;
}
static inline u32 reg_read(const struct lanai_dev *lanai,
......@@ -651,7 +651,7 @@ static inline u32 cardvcc_read(const struct lanai_vcc *lvcc,
{
u32 val;
APRINTK(lvcc->vbase != 0, "cardvcc_read: unbound vcc!\n");
val= readl(lvcc->vbase + (bus_addr_t) offset);
val= readl(lvcc->vbase + offset);
RWDEBUG("VR vci=%04d 0x%02X = 0x%08X\n",
lvcc->vci, (int) offset, val);
return val;
......@@ -666,7 +666,7 @@ static inline void cardvcc_write(const struct lanai_vcc *lvcc,
(unsigned int) val, lvcc->vci, (unsigned int) offset);
RWDEBUG("VW vci=%04d 0x%02X > 0x%08X\n",
lvcc->vci, (unsigned int) offset, (unsigned int) val);
writel(val, lvcc->vbase + (bus_addr_t) offset);
writel(val, lvcc->vbase + offset);
}
/* -------------------- COMPUTE SIZE OF AN AAL5 PDU: */
......@@ -2177,7 +2177,7 @@ static int __init lanai_dev_open(struct atm_dev *atmdev)
/* 3.2: PCI initialization */
if ((result = lanai_pci_start(lanai)) != 0)
goto error;
raw_base = (bus_addr_t) lanai->pci->resource[0].start;
raw_base = lanai->pci->resource[0].start;
lanai->base = (bus_addr_t) ioremap(raw_base, LANAI_MAPPING_SIZE);
if (lanai->base == 0) {
printk(KERN_ERR DEV_LABEL ": couldn't remap I/O space\n");
......
......@@ -467,6 +467,7 @@ static int __devinit ns_init_card(int i, struct pci_dev *pcidev)
u32 u32d[4];
u32 ns_cfg_rctsize;
int bcount;
unsigned long membase;
error = 0;
......@@ -494,8 +495,8 @@ static int __devinit ns_init_card(int i, struct pci_dev *pcidev)
card->index = i;
card->atmdev = NULL;
card->pcidev = pcidev;
card->membase = pci_resource_start(pcidev, 1);
card->membase = (unsigned long) ioremap(card->membase, NS_IOREMAP_SIZE);
membase = pci_resource_start(pcidev, 1);
card->membase = ioremap(membase, NS_IOREMAP_SIZE);
if (card->membase == 0)
{
printk("nicstar%d: can't ioremap() membase.\n",i);
......
......@@ -763,7 +763,7 @@ typedef struct ns_dev
{
int index; /* Card ID to the device driver */
int sram_size; /* In k x 32bit words. 32 or 128 */
unsigned long membase; /* Card's memory base address */
void *membase; /* Card's memory base address */
unsigned long max_pcr;
int rct_size; /* Number of entries */
int vpibits;
......
......@@ -162,7 +162,7 @@ nicstar_read_eprom_status( virt_addr_t base )
*/
static u_int8_t
read_eprom_byte(u_int32_t base, u_int8_t offset)
read_eprom_byte(virt_addr_t base, u_int8_t offset)
{
u_int32_t val = 0;
int i,j=0;
......
......@@ -7,7 +7,7 @@
******************************************************************************/
typedef unsigned int virt_addr_t;
typedef void * virt_addr_t;
u_int32_t nicstar_read_eprom_status( virt_addr_t base );
void nicstar_init_eprom( virt_addr_t base );
......
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