Index: linux-2.6/arch/powerpc/kernel/rtas_pci.c =================================================================== --- linux-2.6.orig/arch/powerpc/kernel/rtas_pci.c +++ linux-2.6/arch/powerpc/kernel/rtas_pci.c @@ -38,6 +38,7 @@ #include #include #include +#include /* RTAS tokens */ static int read_pci_config; @@ -231,25 +232,17 @@ 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; + const unsigned int *reg; unsigned int len; - unsigned long buid; - if (ibm_read_pci_config == -1) return 0; + if (ibm_read_pci_config == -1) + return 0; - buid_vals = get_property(phb, "reg", &len); - if (buid_vals == NULL) + reg = get_property(phb, "reg", &len); + if (!reg) 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 of_translate_address(phb, reg); } static int phb_set_bus_ranges(struct device_node *dev,