Commit d70e7563 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] ppc __iomem annotations - ->cfg_addr

->cfg_addr is an iomem pointer; annotated as such, setup_indirect_pci()
cleaned up. 
Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 11a39304
...@@ -659,8 +659,7 @@ static void __init ...@@ -659,8 +659,7 @@ static void __init
setup_bandit(struct pci_controller* hose, struct reg_property* addr) setup_bandit(struct pci_controller* hose, struct reg_property* addr)
{ {
hose->ops = &macrisc_pci_ops; hose->ops = &macrisc_pci_ops;
hose->cfg_addr = (volatile unsigned int *) hose->cfg_addr = ioremap(addr->address + 0x800000, 0x1000);
ioremap(addr->address + 0x800000, 0x1000);
hose->cfg_data = ioremap(addr->address + 0xc00000, 0x1000); hose->cfg_data = ioremap(addr->address + 0xc00000, 0x1000);
init_bandit(hose); init_bandit(hose);
} }
...@@ -670,8 +669,7 @@ setup_chaos(struct pci_controller* hose, struct reg_property* addr) ...@@ -670,8 +669,7 @@ setup_chaos(struct pci_controller* hose, struct reg_property* addr)
{ {
/* assume a `chaos' bridge */ /* assume a `chaos' bridge */
hose->ops = &chaos_pci_ops; hose->ops = &chaos_pci_ops;
hose->cfg_addr = (volatile unsigned int *) hose->cfg_addr = ioremap(addr->address + 0x800000, 0x1000);
ioremap(addr->address + 0x800000, 0x1000);
hose->cfg_data = ioremap(addr->address + 0xc00000, 0x1000); hose->cfg_data = ioremap(addr->address + 0xc00000, 0x1000);
} }
......
...@@ -112,11 +112,11 @@ static struct pci_ops indirect_pci_ops = ...@@ -112,11 +112,11 @@ static struct pci_ops indirect_pci_ops =
}; };
void __init void __init
setup_indirect_pci_nomap(struct pci_controller* hose, u32 cfg_addr, setup_indirect_pci_nomap(struct pci_controller* hose, void __iomem * cfg_addr,
u32 cfg_data) void __iomem * cfg_data)
{ {
hose->cfg_addr = (unsigned int *)cfg_addr; hose->cfg_addr = cfg_addr;
hose->cfg_data = (void __iomem *)cfg_data; hose->cfg_data = cfg_data;
hose->ops = &indirect_pci_ops; hose->ops = &indirect_pci_ops;
} }
...@@ -124,12 +124,12 @@ void __init ...@@ -124,12 +124,12 @@ void __init
setup_indirect_pci(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data) setup_indirect_pci(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data)
{ {
unsigned long base = cfg_addr & PAGE_MASK; unsigned long base = cfg_addr & PAGE_MASK;
char *mbase; void __iomem *mbase, *addr, *data;
mbase = ioremap(base, PAGE_SIZE); mbase = ioremap(base, PAGE_SIZE);
cfg_addr = (u32)(mbase + (cfg_addr & ~PAGE_MASK)); addr = mbase + (cfg_addr & ~PAGE_MASK);
if ((cfg_data & PAGE_MASK) != base) if ((cfg_data & PAGE_MASK) != base)
mbase = ioremap(cfg_data & PAGE_MASK, PAGE_SIZE); mbase = ioremap(cfg_data & PAGE_MASK, PAGE_SIZE);
cfg_data = (u32)(mbase + (cfg_data & ~PAGE_MASK)); data = mbase + (cfg_data & ~PAGE_MASK);
setup_indirect_pci_nomap(hose, cfg_addr, cfg_data); setup_indirect_pci_nomap(hose, addr, data);
} }
...@@ -57,7 +57,7 @@ struct pci_controller { ...@@ -57,7 +57,7 @@ struct pci_controller {
unsigned long pci_mem_offset; unsigned long pci_mem_offset;
struct pci_ops *ops; struct pci_ops *ops;
volatile unsigned int *cfg_addr; volatile unsigned int __iomem *cfg_addr;
volatile void __iomem *cfg_data; volatile void __iomem *cfg_data;
/* /*
* If set, indirect method will set the cfg_type bit as * If set, indirect method will set the cfg_type bit as
...@@ -95,7 +95,7 @@ int early_write_config_dword(struct pci_controller *hose, int bus, int dev_fn, ...@@ -95,7 +95,7 @@ int early_write_config_dword(struct pci_controller *hose, int bus, int dev_fn,
int where, u32 val); int where, u32 val);
extern void setup_indirect_pci_nomap(struct pci_controller* hose, extern void setup_indirect_pci_nomap(struct pci_controller* hose,
u32 cfg_addr, u32 cfg_data); void __iomem *cfg_addr, void __iomem *cfg_data);
extern void setup_indirect_pci(struct pci_controller* hose, extern void setup_indirect_pci(struct pci_controller* hose,
u32 cfg_addr, u32 cfg_data); u32 cfg_addr, u32 cfg_data);
extern void setup_grackle(struct pci_controller *hose); extern void setup_grackle(struct pci_controller *hose);
......
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