Commit 5f432304 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] teles{0,pci} iomem annotations

Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ba2dfe24
......@@ -580,7 +580,7 @@ struct teles3_hw {
struct teles0_hw {
unsigned int cfg_reg;
unsigned long membase;
void __iomem *membase;
unsigned long phymem;
};
......
......@@ -30,65 +30,65 @@ const char *teles0_revision = "$Revision: 2.15.2.4 $";
#define bytein(addr) inb(addr)
static inline u_char
readisac(unsigned long adr, u_char off)
readisac(void __iomem *adr, u_char off)
{
return readb(adr + ((off & 1) ? 0x2ff : 0x100) + off);
}
static inline void
writeisac(unsigned long adr, u_char off, u_char data)
writeisac(void __iomem *adr, u_char off, u_char data)
{
writeb(data, adr + ((off & 1) ? 0x2ff : 0x100) + off); mb();
}
static inline u_char
readhscx(unsigned long adr, int hscx, u_char off)
readhscx(void __iomem *adr, int hscx, u_char off)
{
return readb(adr + (hscx ? 0x1c0 : 0x180) +
((off & 1) ? 0x1ff : 0) + off);
}
static inline void
writehscx(unsigned long adr, int hscx, u_char off, u_char data)
writehscx(void __iomem *adr, int hscx, u_char off, u_char data)
{
writeb(data, adr + (hscx ? 0x1c0 : 0x180) +
((off & 1) ? 0x1ff : 0) + off); mb();
}
static inline void
read_fifo_isac(unsigned long adr, u_char * data, int size)
read_fifo_isac(void __iomem *adr, u_char * data, int size)
{
register int i;
register u_char *ad = (u_char *)adr + 0x100;
register u_char __iomem *ad = adr + 0x100;
for (i = 0; i < size; i++)
data[i] = readb(ad);
}
static inline void
write_fifo_isac(unsigned long adr, u_char * data, int size)
write_fifo_isac(void __iomem *adr, u_char * data, int size)
{
register int i;
register u_char *ad = (u_char *)adr + 0x100;
register u_char __iomem *ad = adr + 0x100;
for (i = 0; i < size; i++) {
writeb(data[i], ad); mb();
}
}
static inline void
read_fifo_hscx(unsigned long adr, int hscx, u_char * data, int size)
read_fifo_hscx(void __iomem *adr, int hscx, u_char * data, int size)
{
register int i;
register u_char *ad = (u_char *) (adr + (hscx ? 0x1c0 : 0x180));
register u_char __iomem *ad = adr + (hscx ? 0x1c0 : 0x180);
for (i = 0; i < size; i++)
data[i] = readb(ad);
}
static inline void
write_fifo_hscx(unsigned long adr, int hscx, u_char * data, int size)
write_fifo_hscx(void __iomem *adr, int hscx, u_char * data, int size)
{
int i;
register u_char *ad = (u_char *) (adr + (hscx ? 0x1c0 : 0x180));
register u_char __iomem *ad = adr + (hscx ? 0x1c0 : 0x180);
for (i = 0; i < size; i++) {
writeb(data[i], ad); mb();
}
......@@ -188,7 +188,7 @@ release_io_teles0(struct IsdnCardState *cs)
{
if (cs->hw.teles0.cfg_reg)
release_region(cs->hw.teles0.cfg_reg, 8);
iounmap((unsigned char *)cs->hw.teles0.membase);
iounmap(cs->hw.teles0.membase);
release_mem_region(cs->hw.teles0.phymem, TELES_IOMEM_SIZE);
}
......@@ -336,10 +336,9 @@ setup_teles0(struct IsdnCard *card)
release_region(cs->hw.teles0.cfg_reg, 8);
return (0);
}
cs->hw.teles0.membase =
(unsigned long) ioremap(cs->hw.teles0.phymem, TELES_IOMEM_SIZE);
cs->hw.teles0.membase = ioremap(cs->hw.teles0.phymem, TELES_IOMEM_SIZE);
printk(KERN_INFO
"HiSax: %s config irq:%d mem:0x%lX cfg:0x%X\n",
"HiSax: %s config irq:%d mem:%p cfg:0x%X\n",
CardType[cs->typ], cs->irq,
cs->hw.teles0.membase, cs->hw.teles0.cfg_reg);
if (reset_teles0(cs)) {
......
......@@ -43,7 +43,7 @@ const char *telespci_revision = "$Revision: 2.23.2.3 $";
} while (portdata & ZORAN_PO_RQ_PEN)
static inline u_char
readisac(unsigned long adr, u_char off)
readisac(void __iomem *adr, u_char off)
{
register unsigned int portdata;
......@@ -60,7 +60,7 @@ readisac(unsigned long adr, u_char off)
}
static inline void
writeisac(unsigned long adr, u_char off, u_char data)
writeisac(void __iomem *adr, u_char off, u_char data)
{
register unsigned int portdata;
......@@ -76,7 +76,7 @@ writeisac(unsigned long adr, u_char off, u_char data)
}
static inline u_char
readhscx(unsigned long adr, int hscx, u_char off)
readhscx(void __iomem *adr, int hscx, u_char off)
{
register unsigned int portdata;
......@@ -92,7 +92,7 @@ readhscx(unsigned long adr, int hscx, u_char off)
}
static inline void
writehscx(unsigned long adr, int hscx, u_char off, u_char data)
writehscx(void __iomem *adr, int hscx, u_char off, u_char data)
{
register unsigned int portdata;
......@@ -107,7 +107,7 @@ writehscx(unsigned long adr, int hscx, u_char off, u_char data)
}
static inline void
read_fifo_isac(unsigned long adr, u_char * data, int size)
read_fifo_isac(void __iomem *adr, u_char * data, int size)
{
register unsigned int portdata;
register int i;
......@@ -125,7 +125,7 @@ read_fifo_isac(unsigned long adr, u_char * data, int size)
}
static void
write_fifo_isac(unsigned long adr, u_char * data, int size)
write_fifo_isac(void __iomem *adr, u_char * data, int size)
{
register unsigned int portdata;
register int i;
......@@ -142,7 +142,7 @@ write_fifo_isac(unsigned long adr, u_char * data, int size)
}
static inline void
read_fifo_hscx(unsigned long adr, int hscx, u_char * data, int size)
read_fifo_hscx(void __iomem *adr, int hscx, u_char * data, int size)
{
register unsigned int portdata;
register int i;
......@@ -160,7 +160,7 @@ read_fifo_hscx(unsigned long adr, int hscx, u_char * data, int size)
}
static inline void
write_fifo_hscx(unsigned long adr, int hscx, u_char * data, int size)
write_fifo_hscx(void __iomem *adr, int hscx, u_char * data, int size)
{
unsigned int portdata;
register int i;
......@@ -260,7 +260,7 @@ telespci_interrupt(int intno, void *dev_id, struct pt_regs *regs)
void
release_io_telespci(struct IsdnCardState *cs)
{
iounmap((void *)cs->hw.teles0.membase);
iounmap(cs->hw.teles0.membase);
}
static int
......@@ -309,7 +309,7 @@ setup_telespci(struct IsdnCard *card)
printk(KERN_WARNING "Teles: No IRQ for PCI card found\n");
return(0);
}
cs->hw.teles0.membase = (u_long) ioremap(pci_resource_start(dev_tel, 0),
cs->hw.teles0.membase = ioremap(pci_resource_start(dev_tel, 0),
PAGE_SIZE);
printk(KERN_INFO "Found: Zoran, base-address: 0x%lx, irq: 0x%x\n",
pci_resource_start(dev_tel, 0), dev_tel->irq);
......@@ -333,7 +333,7 @@ setup_telespci(struct IsdnCard *card)
/* writel(0x00800000, cs->hw.teles0.membase + 0x200); */
printk(KERN_INFO
"HiSax: %s config irq:%d mem:%lx\n",
"HiSax: %s config irq:%d mem:%p\n",
CardType[cs->typ], cs->irq,
cs->hw.teles0.membase);
......
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