Commit 5929a03f authored by William Lee Irwin III's avatar William Lee Irwin III Committed by Linus Torvalds

[PATCH] sparc32: arch/sparc/kernel/pcic.c iomem annotations

arch/sparc/kernel/pcic.c trips numerous warnings due to iomem
annotations. This patch adds various needed iomem annotations.
Signed-off-by: default avatarWilliam Irwin <wli@holomorphy.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 427c1506
......@@ -161,7 +161,7 @@ static struct pcic_sn2list pcic_known_sysnames[] = {
static int pcic0_up;
static struct linux_pcic pcic0;
unsigned int pcic_regs;
void * __iomem pcic_regs;
volatile int pcic_speculative;
volatile int pcic_trapped;
......@@ -313,8 +313,7 @@ int __init pcic_probe(void)
pcic0_up = 1;
pcic->pcic_res_regs.name = "pcic_registers";
pcic->pcic_regs = (unsigned long)
ioremap(regs[0].phys_addr, regs[0].reg_size);
pcic->pcic_regs = ioremap(regs[0].phys_addr, regs[0].reg_size);
if (!pcic->pcic_regs) {
prom_printf("PCIC: Error, cannot map PCIC registers.\n");
prom_halt();
......@@ -328,7 +327,7 @@ int __init pcic_probe(void)
}
pcic->pcic_res_cfg_addr.name = "pcic_cfg_addr";
if ((pcic->pcic_config_space_addr = (unsigned long)
if ((pcic->pcic_config_space_addr =
ioremap(regs[2].phys_addr, regs[2].reg_size * 2)) == 0) {
prom_printf("PCIC: Error, cannot map"
"PCI Configuration Space Address.\n");
......@@ -340,7 +339,7 @@ int __init pcic_probe(void)
* must be the same. Thus, we need adjust size of data.
*/
pcic->pcic_res_cfg_data.name = "pcic_cfg_data";
if ((pcic->pcic_config_space_data = (unsigned long)
if ((pcic->pcic_config_space_data =
ioremap(regs[3].phys_addr, regs[3].reg_size * 2)) == 0) {
prom_printf("PCIC: Error, cannot map"
"PCI Configuration Space Data.\n");
......@@ -976,7 +975,7 @@ int pcibios_assign_resource(struct pci_dev *pdev, int resource)
* We do not use horroble macroses here because we want to
* advance pointer by sizeof(size).
*/
void outsb(unsigned long addr, const void *src, unsigned long count) {
void outsb(void * __iomem addr, const void *src, unsigned long count) {
while (count) {
count -= 1;
writeb(*(const char *)src, addr);
......@@ -985,7 +984,7 @@ void outsb(unsigned long addr, const void *src, unsigned long count) {
}
}
void outsw(unsigned long addr, const void *src, unsigned long count) {
void outsw(void * __iomem addr, const void *src, unsigned long count) {
while (count) {
count -= 2;
writew(*(const short *)src, addr);
......@@ -994,7 +993,7 @@ void outsw(unsigned long addr, const void *src, unsigned long count) {
}
}
void outsl(unsigned long addr, const void *src, unsigned long count) {
void outsl(void * __iomem addr, const void *src, unsigned long count) {
while (count) {
count -= 4;
writel(*(const long *)src, addr);
......@@ -1003,7 +1002,7 @@ void outsl(unsigned long addr, const void *src, unsigned long count) {
}
}
void insb(unsigned long addr, void *dst, unsigned long count) {
void insb(void * __iomem addr, void *dst, unsigned long count) {
while (count) {
count -= 1;
*(unsigned char *)dst = readb(addr);
......@@ -1012,7 +1011,7 @@ void insb(unsigned long addr, void *dst, unsigned long count) {
}
}
void insw(unsigned long addr, void *dst, unsigned long count) {
void insw(void * __iomem addr, void *dst, unsigned long count) {
while (count) {
count -= 2;
*(unsigned short *)dst = readw(addr);
......@@ -1021,7 +1020,7 @@ void insw(unsigned long addr, void *dst, unsigned long count) {
}
}
void insl(unsigned long addr, void *dst, unsigned long count) {
void insl(void * __iomem addr, void *dst, unsigned long count) {
while (count) {
count -= 4;
/*
......
......@@ -134,12 +134,12 @@ static inline void __writel(u32 l, volatile void __iomem *addr)
#define inl_p(__addr) inl(__addr)
#define outl_p(__l, __addr) outl(__l, __addr)
extern void outsb(unsigned long addr, const void *src, unsigned long cnt);
extern void outsw(unsigned long addr, const void *src, unsigned long cnt);
extern void outsl(unsigned long addr, const void *src, unsigned long cnt);
extern void insb(unsigned long addr, void *dst, unsigned long count);
extern void insw(unsigned long addr, void *dst, unsigned long count);
extern void insl(unsigned long addr, void *dst, unsigned long count);
void outsb(void * __iomem addr, const void *src, unsigned long cnt);
void outsw(void * __iomem addr, const void *src, unsigned long cnt);
void outsl(void * __iomem addr, const void *src, unsigned long cnt);
void insb(void * __iomem addr, void *dst, unsigned long count);
void insw(void * __iomem addr, void *dst, unsigned long count);
void insl(void * __iomem addr, void *dst, unsigned long count);
#define IO_SPACE_LIMIT 0xffffffff
......
......@@ -16,10 +16,10 @@
#include <asm/pbm.h>
struct linux_pcic {
unsigned long pcic_regs;
void * __iomem pcic_regs;
unsigned long pcic_io;
unsigned long pcic_config_space_addr;
unsigned long pcic_config_space_data;
void * __iomem pcic_config_space_addr;
void * __iomem pcic_config_space_data;
struct resource pcic_res_regs;
struct resource pcic_res_io;
struct resource pcic_res_cfg_addr;
......
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