Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 42224
b: refs/heads/master
c: 6506e71
h: refs/heads/master
v: v3
  • Loading branch information
Benjamin Herrenschmidt authored and Paul Mackerras committed Dec 4, 2006
1 parent aaacb50 commit 9dd3b89
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 24 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: e557a1c96c82f4d1a91b5c2e2e0275b5999c297d
refs/heads/master: 6506e7102fd57b138979f131d751014462181202
27 changes: 4 additions & 23 deletions trunk/arch/powerpc/kernel/rtas_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,32 +231,13 @@ void __init init_pci_config_tokens (void)

unsigned long __devinit get_phb_buid (struct device_node *phb)
{
int addr_cells;
const unsigned int *buid_vals;
unsigned int len;
unsigned long buid;

if (ibm_read_pci_config == -1) return 0;
struct resource r;

/* PHB's will always be children of the root node,
* or so it is promised by the current firmware. */
if (phb->parent == NULL)
if (ibm_read_pci_config == -1)
return 0;
if (phb->parent->parent)
return 0;

buid_vals = get_property(phb, "reg", &len);
if (buid_vals == NULL)
if (of_address_to_resource(phb, 0, &r))
return 0;

addr_cells = prom_n_addr_cells(phb);
if (addr_cells == 1) {
buid = (unsigned long) buid_vals[0];
} else {
buid = (((unsigned long)buid_vals[0]) << 32UL) |
(((unsigned long)buid_vals[1]) & 0xffffffff);
}
return buid;
return r.start;
}

static int phb_set_bus_ranges(struct device_node *dev,
Expand Down

0 comments on commit 9dd3b89

Please sign in to comment.