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
setup_bandit(struct pci_controller* hose, struct reg_property* addr)
{
hose->ops = &macrisc_pci_ops;
hose->cfg_addr = (volatile unsigned int *)
ioremap(addr->address + 0x800000, 0x1000);
hose->cfg_addr = ioremap(addr->address + 0x800000, 0x1000);
hose->cfg_data = ioremap(addr->address + 0xc00000, 0x1000);
init_bandit(hose);
}
......@@ -670,8 +669,7 @@ setup_chaos(struct pci_controller* hose, struct reg_property* addr)
{
/* assume a `chaos' bridge */
hose->ops = &chaos_pci_ops;
hose->cfg_addr = (volatile unsigned int *)
ioremap(addr->address + 0x800000, 0x1000);
hose->cfg_addr = ioremap(addr->address + 0x800000, 0x1000);
hose->cfg_data = ioremap(addr->address + 0xc00000, 0x1000);
}
......
......@@ -112,11 +112,11 @@ static struct pci_ops indirect_pci_ops =
};
void __init
setup_indirect_pci_nomap(struct pci_controller* hose, u32 cfg_addr,
u32 cfg_data)
setup_indirect_pci_nomap(struct pci_controller* hose, void __iomem * cfg_addr,
void __iomem * cfg_data)
{
hose->cfg_addr = (unsigned int *)cfg_addr;
hose->cfg_data = (void __iomem *)cfg_data;
hose->cfg_addr = cfg_addr;
hose->cfg_data = cfg_data;
hose->ops = &indirect_pci_ops;
}
......@@ -124,12 +124,12 @@ void __init
setup_indirect_pci(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data)
{
unsigned long base = cfg_addr & PAGE_MASK;
char *mbase;
void __iomem *mbase, *addr, *data;
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)
mbase = ioremap(cfg_data & PAGE_MASK, PAGE_SIZE);
cfg_data = (u32)(mbase + (cfg_data & ~PAGE_MASK));
setup_indirect_pci_nomap(hose, cfg_addr, cfg_data);
data = mbase + (cfg_data & ~PAGE_MASK);
setup_indirect_pci_nomap(hose, addr, data);
}
......@@ -57,7 +57,7 @@ struct pci_controller {
unsigned long pci_mem_offset;
struct pci_ops *ops;
volatile unsigned int *cfg_addr;
volatile unsigned int __iomem *cfg_addr;
volatile void __iomem *cfg_data;
/*
* 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,
int where, u32 val);
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,
u32 cfg_addr, u32 cfg_data);
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