Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 149649
b: refs/heads/master
c: 58513dc
h: refs/heads/master
i:
  149647: e0f416e
v: v3
  • Loading branch information
Kumar Gala authored and Benjamin Herrenschmidt committed May 21, 2009
1 parent ae8e499 commit 2129397
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 30 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: 2f52297665d2ebfaa24406003cf9e5a7b635f47d
refs/heads/master: 58513dc40d8e01f0c0ccea4cdcbc32e9dcee62fd
10 changes: 2 additions & 8 deletions trunk/arch/powerpc/platforms/cell/celleb_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,17 +162,14 @@ static int celleb_fake_pci_read_config(struct pci_bus *bus,
unsigned int devfn, int where, int size, u32 *val)
{
char *config;
struct device_node *node;
struct pci_controller *hose;
struct pci_controller *hose = pci_bus_to_host(bus);
unsigned int devno = devfn >> 3;
unsigned int fn = devfn & 0x7;

/* allignment check */
BUG_ON(where % size);

pr_debug(" fake read: bus=0x%x, ", bus->number);
node = (struct device_node *)bus->sysdata;
hose = pci_find_hose_for_OF_device(node);
config = get_fake_config_start(hose, devno, fn);

pr_debug("devno=0x%x, where=0x%x, size=0x%x, ", devno, where, size);
Expand All @@ -192,17 +189,14 @@ static int celleb_fake_pci_write_config(struct pci_bus *bus,
unsigned int devfn, int where, int size, u32 val)
{
char *config;
struct device_node *node;
struct pci_controller *hose;
struct pci_controller *hose = pci_bus_to_host(bus);
struct celleb_pci_resource *res;
unsigned int devno = devfn >> 3;
unsigned int fn = devfn & 0x7;

/* allignment check */
BUG_ON(where % size);

node = (struct device_node *)bus->sysdata;
hose = pci_find_hose_for_OF_device(node);
config = get_fake_config_start(hose, devno, fn);

if (!config)
Expand Down
13 changes: 2 additions & 11 deletions trunk/arch/powerpc/platforms/cell/celleb_scc_epci.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,11 @@ static int celleb_epci_read_config(struct pci_bus *bus,
{
PCI_IO_ADDR epci_base;
PCI_IO_ADDR addr;
struct device_node *node;
struct pci_controller *hose;
struct pci_controller *hose = pci_bus_to_host(bus);

/* allignment check */
BUG_ON(where % size);

node = (struct device_node *)bus->sysdata;
hose = pci_find_hose_for_OF_device(node);

if (!celleb_epci_get_epci_cfg(hose))
return PCIBIOS_DEVICE_NOT_FOUND;

Expand Down Expand Up @@ -198,16 +194,11 @@ static int celleb_epci_write_config(struct pci_bus *bus,
{
PCI_IO_ADDR epci_base;
PCI_IO_ADDR addr;
struct device_node *node;
struct pci_controller *hose;
struct pci_controller *hose = pci_bus_to_host(bus);

/* allignment check */
BUG_ON(where % size);

node = (struct device_node *)bus->sysdata;
hose = pci_find_hose_for_OF_device(node);


if (!celleb_epci_get_epci_cfg(hose))
return PCIBIOS_DEVICE_NOT_FOUND;

Expand Down
12 changes: 2 additions & 10 deletions trunk/arch/powerpc/platforms/cell/celleb_scc_pciex.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,11 +366,7 @@ static void config_write_pciex_rc(unsigned int __iomem *base, uint32_t where,
static int scc_pciex_read_config(struct pci_bus *bus, unsigned int devfn,
int where, int size, unsigned int *val)
{
struct device_node *dn;
struct pci_controller *phb;

dn = bus->sysdata;
phb = pci_find_hose_for_OF_device(dn);
struct pci_controller *phb = pci_bus_to_host(bus);

if (bus->number == phb->first_busno && PCI_SLOT(devfn) != 1) {
*val = ~0;
Expand All @@ -389,11 +385,7 @@ static int scc_pciex_read_config(struct pci_bus *bus, unsigned int devfn,
static int scc_pciex_write_config(struct pci_bus *bus, unsigned int devfn,
int where, int size, unsigned int val)
{
struct device_node *dn;
struct pci_controller *phb;

dn = bus->sysdata;
phb = pci_find_hose_for_OF_device(dn);
struct pci_controller *phb = pci_bus_to_host(bus);

if (bus->number == phb->first_busno && PCI_SLOT(devfn) != 1)
return PCIBIOS_DEVICE_NOT_FOUND;
Expand Down

0 comments on commit 2129397

Please sign in to comment.