Commit 72426954 authored by Mark A. Greer's avatar Mark A. Greer Committed by Linus Torvalds

[PATCH] ppc32: add setup_indirect_pci_nomap() routine

This patch adds a routine that sets up indirect pci config space access but
doesn't ioremap the config space addr/data registers.
Signed-off-by: default avatarMark Greer <mgreer@mvista.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c62ba94c
......@@ -111,6 +111,15 @@ static struct pci_ops indirect_pci_ops =
indirect_write_config
};
void __init
setup_indirect_pci_nomap(struct pci_controller* hose, u32 cfg_addr,
u32 cfg_data)
{
hose->cfg_addr = (unsigned int *)cfg_addr;
hose->cfg_data = (unsigned char *)cfg_data;
hose->ops = &indirect_pci_ops;
}
void __init
setup_indirect_pci(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data)
{
......@@ -118,9 +127,9 @@ setup_indirect_pci(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data)
char *mbase;
mbase = ioremap(base, PAGE_SIZE);
hose->cfg_addr = (unsigned int *)(mbase + (cfg_addr & ~PAGE_MASK));
cfg_addr = (u32)(mbase + (cfg_addr & ~PAGE_MASK));
if ((cfg_data & PAGE_MASK) != base)
mbase = ioremap(cfg_data & PAGE_MASK, PAGE_SIZE);
hose->cfg_data = (unsigned char *)(mbase + (cfg_data & ~PAGE_MASK));
hose->ops = &indirect_pci_ops;
cfg_data = (u32)(mbase + (cfg_data & ~PAGE_MASK));
setup_indirect_pci_nomap(hose, cfg_addr, cfg_data);
}
......@@ -94,6 +94,8 @@ int early_write_config_word(struct pci_controller *hose, int bus, int dev_fn,
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);
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