Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 60614
b: refs/heads/master
c: 5ab65ec
h: refs/heads/master
v: v3
  • Loading branch information
Kumar Gala committed Jun 29, 2007
1 parent 3418a28 commit b6be4b9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2a5ccbc5bb471c10b58ea85ac463e70faead1c8a
refs/heads/master: 5ab65ecdaffd85753e7ad957622afcd709a39deb
12 changes: 10 additions & 2 deletions trunk/arch/powerpc/sysdev/indirect_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ indirect_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
struct pci_controller *hose = bus->sysdata;
volatile void __iomem *cfg_data;
u8 cfg_type = 0;
u32 bus_no;

if (ppc_md.pci_exclude_device)
if (ppc_md.pci_exclude_device(hose, bus->number, devfn))
Expand All @@ -42,8 +43,11 @@ indirect_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
if (bus->number != hose->first_busno)
cfg_type = 1;

bus_no = (bus->number == hose->first_busno) ?
hose->self_busno : bus->number - hose->bus_offset;

PCI_CFG_OUT(hose->cfg_addr,
(0x80000000 | ((bus->number - hose->bus_offset) << 16)
(0x80000000 | (bus_no << 16)
| (devfn << 8) | ((offset & 0xfc) | cfg_type)));

/*
Expand Down Expand Up @@ -72,6 +76,7 @@ indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
struct pci_controller *hose = bus->sysdata;
volatile void __iomem *cfg_data;
u8 cfg_type = 0;
u32 bus_no;

if (ppc_md.pci_exclude_device)
if (ppc_md.pci_exclude_device(hose, bus->number, devfn))
Expand All @@ -81,8 +86,11 @@ indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
if (bus->number != hose->first_busno)
cfg_type = 1;

bus_no = (bus->number == hose->first_busno) ?
hose->self_busno : bus->number - hose->bus_offset;

PCI_CFG_OUT(hose->cfg_addr,
(0x80000000 | ((bus->number - hose->bus_offset) << 16)
(0x80000000 | (bus_no << 16)
| (devfn << 8) | ((offset & 0xfc) | cfg_type)));

/*
Expand Down
1 change: 1 addition & 0 deletions trunk/include/asm-ppc/pci-bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ struct pci_controller {

int first_busno;
int last_busno;
int self_busno;
int bus_offset;

void __iomem *io_base_virt;
Expand Down

0 comments on commit b6be4b9

Please sign in to comment.