Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 60628
b: refs/heads/master
c: dbf8471
h: refs/heads/master
v: v3
  • Loading branch information
Kumar Gala committed Jun 29, 2007
1 parent b9932c6 commit d3cc33d
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 36 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: 5516b540e98de6f7474a4e7149470ad6a0bbc54a
refs/heads/master: dbf8471f5294b27ba9b6232ffc177dcd4e0a2fa5
3 changes: 2 additions & 1 deletion trunk/arch/powerpc/kernel/pci_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ pcibios_enable_resources(struct pci_dev *dev, int mask)
static int next_controller_index;

struct pci_controller * __init
pcibios_alloc_controller(void)
pcibios_alloc_controller(struct device_node *dev)
{
struct pci_controller *hose;

Expand All @@ -621,6 +621,7 @@ pcibios_alloc_controller(void)
hose_tail = &hose->next;

hose->global_number = next_controller_index++;
hose->arch_data = dev;

return hose;
}
Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/powerpc/platforms/52xx/efika.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,14 @@ void __init efika_pcisetup(void)
printk(" controlled by %s\n", pcictrl->full_name);
printk("\n");

hose = pcibios_alloc_controller();
hose = pcibios_alloc_controller(of_node_get(pcictrl));
if (!hose) {
printk(KERN_WARNING EFIKA_PLATFORM_NAME
": Can't allocate PCI controller structure for %s\n",
pcictrl->full_name);
return;
}

hose->arch_data = of_node_get(pcictrl);
hose->first_busno = bus_range[0];
hose->last_busno = bus_range[1];
hose->ops = &rtas_pci_ops;
Expand Down
4 changes: 1 addition & 3 deletions trunk/arch/powerpc/platforms/52xx/mpc52xx_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,12 +385,10 @@ mpc52xx_add_bridge(struct device_node *node)
* tree are needed to configure the 52xx PCI controller. Rather
* than parse the tree here, let pci_process_bridge_OF_ranges()
* do it for us and extract the values after the fact */
hose = pcibios_alloc_controller();
hose = pcibios_alloc_controller(node);
if (!hose)
return -ENOMEM;

hose->arch_data = node;

hose->first_busno = bus_range ? bus_range[0] : 0;
hose->last_busno = bus_range ? bus_range[1] : 0xff;

Expand Down
4 changes: 1 addition & 3 deletions trunk/arch/powerpc/platforms/82xx/mpc82xx_ads.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,13 +543,11 @@ static void __init mpc82xx_add_bridge(struct device_node *np)

pci_assign_all_buses = 1;

hose = pcibios_alloc_controller();
hose = pcibios_alloc_controller(np);

if (!hose)
return;

hose->arch_data = np;

hose->first_busno = bus_range ? bus_range[0] : 0;
hose->last_busno = bus_range ? bus_range[1] : 0xff;

Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/powerpc/platforms/83xx/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,9 @@ int __init mpc83xx_add_bridge(struct device_node *dev)
}

pci_assign_all_buses = 1;
hose = pcibios_alloc_controller();
hose = pcibios_alloc_controller(dev);
if (!hose)
return -ENOMEM;
hose->arch_data = dev;

hose->first_busno = bus_range ? bus_range[0] : 0;
hose->last_busno = bus_range ? bus_range[1] : 0xff;
Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/powerpc/platforms/85xx/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,9 @@ int __init mpc85xx_add_bridge(struct device_node *dev)
}

pci_assign_all_buses = 1;
hose = pcibios_alloc_controller();
hose = pcibios_alloc_controller(dev);
if (!hose)
return -ENOMEM;
hose->arch_data = dev;

hose->first_busno = bus_range ? bus_range[0] : 0;
hose->last_busno = bus_range ? bus_range[1] : 0xff;
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/powerpc/platforms/86xx/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,10 @@ int __init mpc86xx_add_bridge(struct device_node *dev)
" bus 0\n", dev->full_name);

pci_assign_all_buses = 1;
hose = pcibios_alloc_controller();
hose = pcibios_alloc_controller(dev);
if (!hose)
return -ENOMEM;
hose->arch_data = dev;

hose->indirect_type = PPC_INDIRECT_TYPE_EXT_REG |
PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS;

Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/powerpc/platforms/chrp/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,12 @@ chrp_find_bridges(void)
printk(" at %llx", (unsigned long long)r.start);
printk("\n");

hose = pcibios_alloc_controller();
hose = pcibios_alloc_controller(dev);
if (!hose) {
printk("Can't allocate PCI controller structure for %s\n",
dev->full_name);
continue;
}
hose->arch_data = dev;
hose->first_busno = bus_range[0];
hose->last_busno = bus_range[1];

Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/powerpc/platforms/embedded6xx/linkstation.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,11 @@ static int __init linkstation_add_bridge(struct device_node *dev)
printk(KERN_WARNING "Can't get bus-range for %s, assume"
" bus 0\n", dev->full_name);

hose = pcibios_alloc_controller();
hose = pcibios_alloc_controller(dev);
if (hose == NULL)
return -ENOMEM;
hose->first_busno = bus_range ? bus_range[0] : 0;
hose->last_busno = bus_range ? bus_range[1] : 0xff;
hose->arch_data = dev;
setup_indirect_pci(hose, 0xfec00000, 0xfee00000);

/* Interpret the "ranges" property */
Expand Down
6 changes: 0 additions & 6 deletions trunk/arch/powerpc/platforms/powermac/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -916,15 +916,9 @@ static int __init pmac_add_bridge(struct device_node *dev)
" bus 0\n", dev->full_name);
}

/* XXX Different prototypes, to be merged */
#ifdef CONFIG_PPC64
hose = pcibios_alloc_controller(dev);
#else
hose = pcibios_alloc_controller();
#endif
if (!hose)
return -ENOMEM;
hose->arch_data = dev;
hose->first_busno = bus_range ? bus_range[0] : 0;
hose->last_busno = bus_range ? bus_range[1] : 0xff;

Expand Down
4 changes: 1 addition & 3 deletions trunk/arch/powerpc/sysdev/mv64x60_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,10 @@ static int __init mv64x60_add_bridge(struct device_node *dev)
printk(KERN_WARNING "Can't get bus-range for %s, assume"
" bus 0\n", dev->full_name);

hose = pcibios_alloc_controller();
hose = pcibios_alloc_controller(dev);
if (!hose)
return -ENOMEM;

hose->arch_data = dev;

hose->first_busno = bus_range ? bus_range[0] : 0;
hose->last_busno = bus_range ? bus_range[1] : 0xff;

Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/powerpc/sysdev/tsi108_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,12 @@ int __init tsi108_setup_pci(struct device_node *dev, u32 cfg_phys, int primary)
" bus 0\n", dev->full_name);
}

hose = pcibios_alloc_controller();
hose = pcibios_alloc_controller(dev);

if (!hose) {
printk("PCI Host bridge init failed\n");
return -ENOMEM;
}
hose->arch_data = dev;

hose->first_busno = bus_range ? bus_range[0] : 0;
hose->last_busno = bus_range ? bus_range[1] : 0xff;
Expand Down
8 changes: 3 additions & 5 deletions trunk/include/asm-powerpc/pci-bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
struct device_node;
struct pci_controller;

/* Allocate a new PCI host bridge structure */
extern struct pci_controller* pcibios_alloc_controller(void);

/* Get the PCI host controller for a bus */
extern struct pci_controller* pci_bus_to_hose(int bus);

Expand Down Expand Up @@ -232,8 +229,6 @@ static inline struct pci_controller *pci_bus_to_host(struct pci_bus *bus)
return PCI_DN(busdn)->phb;
}

extern struct pci_controller *
pcibios_alloc_controller(struct device_node *dev);
extern void pcibios_free_controller(struct pci_controller *phb);

extern void isa_bridge_find_early(struct pci_controller *hose);
Expand Down Expand Up @@ -263,6 +258,9 @@ extern void
pci_process_bridge_OF_ranges(struct pci_controller *hose,
struct device_node *dev, int primary);

/* Allocate a new PCI host bridge structure */
extern struct pci_controller *
pcibios_alloc_controller(struct device_node *dev);
#ifdef CONFIG_PCI
extern unsigned long pci_address_to_pio(phys_addr_t address);
#else
Expand Down

0 comments on commit d3cc33d

Please sign in to comment.