Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 42211
b: refs/heads/master
c: f90bb15
h: refs/heads/master
i:
  42209: e81e448
  42207: b4da6dc
v: v3
  • Loading branch information
Benjamin Herrenschmidt authored and Paul Mackerras committed Dec 4, 2006
1 parent 507a455 commit 14ee60b
Show file tree
Hide file tree
Showing 28 changed files with 60 additions and 185 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: 34ba8a5cd0b0d57f7775023e6e3fec473a7291cc
refs/heads/master: f90bb153b1493719d18b4529a46ebfe43220ea6c
10 changes: 10 additions & 0 deletions trunk/arch/powerpc/kernel/pci_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <linux/errno.h>
#include <linux/bootmem.h>
#include <linux/irq.h>
#include <linux/list.h>

#include <asm/processor.h>
#include <asm/io.h>
Expand Down Expand Up @@ -1338,6 +1339,7 @@ void __init pcibios_fixup_bus(struct pci_bus *bus)
struct pci_controller *hose = (struct pci_controller *) bus->sysdata;
unsigned long io_offset;
struct resource *res;
struct pci_dev *dev;
int i;

io_offset = (unsigned long)hose->io_base_virt - isa_io_base;
Expand Down Expand Up @@ -1390,8 +1392,16 @@ void __init pcibios_fixup_bus(struct pci_bus *bus)
}
}

/* Platform specific bus fixups */
if (ppc_md.pcibios_fixup_bus)
ppc_md.pcibios_fixup_bus(bus);

/* Read default IRQs and fixup if necessary */
list_for_each_entry(dev, &bus->devices, bus_list) {
pci_read_irq_line(dev);
if (ppc_md.pci_irq_fixup)
ppc_md.pci_irq_fixup(dev);
}
}

char __init *pcibios_setup(char *str)
Expand Down
8 changes: 6 additions & 2 deletions trunk/arch/powerpc/kernel/pci_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -1215,8 +1215,12 @@ static void __devinit do_bus_setup(struct pci_bus *bus)
list_for_each_entry(dev, &bus->devices, bus_list)
ppc_md.iommu_dev_setup(dev);

if (ppc_md.irq_bus_setup)
ppc_md.irq_bus_setup(bus);
/* Read default IRQs and fixup if necessary */
list_for_each_entry(dev, &bus->devices, bus_list) {
pci_read_irq_line(dev);
if (ppc_md.pci_irq_fixup)
ppc_md.pci_irq_fixup(dev);
}
}

void __devinit pcibios_fixup_bus(struct pci_bus *bus)
Expand Down
13 changes: 0 additions & 13 deletions trunk/arch/powerpc/platforms/82xx/mpc82xx_ads.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,16 +515,6 @@ static int m82xx_pci_exclude_device(u_char bus, u_char devfn)
return PCIBIOS_SUCCESSFUL;
}

static void
__init mpc82xx_pcibios_fixup(void)
{
struct pci_dev *dev = NULL;

for_each_pci_dev(dev) {
pci_read_irq_line(dev);
}
}

void __init add_bridge(struct device_node *np)
{
int len;
Expand Down Expand Up @@ -597,9 +587,6 @@ static void __init mpc82xx_ads_setup_arch(void)
add_bridge(np);

of_node_put(np);
ppc_md.pci_map_irq = NULL;
ppc_md.pcibios_fixup = mpc82xx_pcibios_fixup;
ppc_md.pcibios_fixup_bus = NULL;
#endif

#ifdef CONFIG_ROOT_NFS
Expand Down
3 changes: 0 additions & 3 deletions trunk/arch/powerpc/platforms/83xx/mpc834x_itx.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,4 @@ define_machine(mpc834x_itx) {
.time_init = mpc83xx_time_init,
.calibrate_decr = generic_calibrate_decr,
.progress = udbg_progress,
#ifdef CONFIG_PCI
.pcibios_fixup = mpc83xx_pcibios_fixup,
#endif
};
3 changes: 0 additions & 3 deletions trunk/arch/powerpc/platforms/83xx/mpc834x_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,4 @@ define_machine(mpc834x_sys) {
.time_init = mpc83xx_time_init,
.calibrate_decr = generic_calibrate_decr,
.progress = udbg_progress,
#ifdef CONFIG_PCI
.pcibios_fixup = mpc83xx_pcibios_fixup,
#endif
};
1 change: 0 additions & 1 deletion trunk/arch/powerpc/platforms/83xx/mpc83xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

extern int add_bridge(struct device_node *dev);
extern int mpc83xx_exclude_device(u_char bus, u_char devfn);
extern void mpc83xx_pcibios_fixup(void);
extern void mpc83xx_restart(char *cmd);
extern long mpc83xx_time_init(void);

Expand Down
9 changes: 0 additions & 9 deletions trunk/arch/powerpc/platforms/83xx/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,6 @@ int mpc83xx_exclude_device(u_char bus, u_char devfn)
return PCIBIOS_SUCCESSFUL;
}

void __init mpc83xx_pcibios_fixup(void)
{
struct pci_dev *dev = NULL;

/* map all the PCI irqs */
for_each_pci_dev(dev)
pci_read_irq_line(dev);
}

int __init add_bridge(struct device_node *dev)
{
int len;
Expand Down
11 changes: 0 additions & 11 deletions trunk/arch/powerpc/platforms/85xx/mpc85xx_ads.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,6 @@ mpc85xx_exclude_device(u_char bus, u_char devfn)
else
return PCIBIOS_SUCCESSFUL;
}

void __init
mpc85xx_pcibios_fixup(void)
{
struct pci_dev *dev = NULL;

for_each_pci_dev(dev)
pci_read_irq_line(dev);
}
#endif /* CONFIG_PCI */

#ifdef CONFIG_CPM2
Expand Down Expand Up @@ -253,8 +244,6 @@ static void __init mpc85xx_ads_setup_arch(void)
#ifdef CONFIG_PCI
for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
add_bridge(np);

ppc_md.pcibios_fixup = mpc85xx_pcibios_fixup;
ppc_md.pci_exclude_device = mpc85xx_exclude_device;
#endif

Expand Down
10 changes: 0 additions & 10 deletions trunk/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,15 +398,6 @@ mpc86xx_hpcn_show_cpuinfo(struct seq_file *m)
}


void __init mpc86xx_hpcn_pcibios_fixup(void)
{
struct pci_dev *dev = NULL;

for_each_pci_dev(dev)
pci_read_irq_line(dev);
}


/*
* Called very early, device-tree isn't unflattened
*/
Expand Down Expand Up @@ -461,7 +452,6 @@ define_machine(mpc86xx_hpcn) {
.setup_arch = mpc86xx_hpcn_setup_arch,
.init_IRQ = mpc86xx_hpcn_init_irq,
.show_cpuinfo = mpc86xx_hpcn_show_cpuinfo,
.pcibios_fixup = mpc86xx_hpcn_pcibios_fixup,
.get_irq = mpic_get_irq,
.restart = mpc86xx_restart,
.time_init = mpc86xx_time_init,
Expand Down
9 changes: 0 additions & 9 deletions trunk/arch/powerpc/platforms/cell/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,6 @@ static void cell_progress(char *s, unsigned short hex)
printk("*** %04x : %s\n", hex, s ? s : "");
}

static void __init cell_pcibios_fixup(void)
{
struct pci_dev *dev = NULL;

for_each_pci_dev(dev)
pci_read_irq_line(dev);
}

static void __init cell_init_irq(void)
{
iic_init_IRQ();
Expand Down Expand Up @@ -180,7 +172,6 @@ define_machine(cell) {
.check_legacy_ioport = cell_check_legacy_ioport,
.progress = cell_progress,
.init_IRQ = cell_init_irq,
.pcibios_fixup = cell_pcibios_fixup,
#ifdef CONFIG_KEXEC
.machine_kexec = default_machine_kexec,
.machine_kexec_prepare = default_machine_kexec_prepare,
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/powerpc/platforms/chrp/chrp.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ extern long chrp_time_init(void);

extern void chrp_find_bridges(void);
extern void chrp_event_scan(unsigned long);
extern void chrp_pcibios_fixup(void);
9 changes: 0 additions & 9 deletions trunk/arch/powerpc/platforms/chrp/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,6 @@ hydra_init(void)
return 1;
}

void __init
chrp_pcibios_fixup(void)
{
struct pci_dev *dev = NULL;

for_each_pci_dev(dev)
pci_read_irq_line(dev);
}

#define PRG_CL_RESET_VALID 0x00010000

static void __init
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/powerpc/platforms/chrp/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,6 @@ define_machine(chrp) {
.init = chrp_init2,
.show_cpuinfo = chrp_show_cpuinfo,
.init_IRQ = chrp_init_IRQ,
.pcibios_fixup = chrp_pcibios_fixup,
.restart = rtas_restart,
.power_off = rtas_power_off,
.halt = rtas_halt,
Expand Down
16 changes: 5 additions & 11 deletions trunk/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ u8 find_slot_by_devfn(unsigned int *interrupt_map, unsigned int devfn)
/*
* Scans the interrupt map for pci device
*/
void mpc7448_hpc2_fixup_irq(struct pci_dev *dev)
void __devinit mpc7448_hpc2_fixup_irq(struct pci_dev *dev)
{
struct pci_controller *hose;
struct device_node *node;
Expand Down Expand Up @@ -117,19 +117,13 @@ void mpc7448_hpc2_fixup_irq(struct pci_dev *dev)
pin = 1;
pin--;
dev->irq = interrupt[slot*4*7 + pin*7 + 5];

pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);

DBG("TSI_PCI: dev->irq = 0x%x\n", dev->irq);
}
/* temporary pci irq map fixup*/

void __init mpc7448_hpc2_pcibios_fixup(void)
{
struct pci_dev *dev = NULL;
for_each_pci_dev(dev) {
mpc7448_hpc2_fixup_irq(dev);
pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
}
}

static void __init mpc7448_hpc2_setup_arch(void)
{
struct device_node *cpu;
Expand Down Expand Up @@ -300,7 +294,7 @@ define_machine(mpc7448_hpc2){
.init_IRQ = mpc7448_hpc2_init_IRQ,
.show_cpuinfo = mpc7448_hpc2_show_cpuinfo,
.get_irq = mpic_get_irq,
.pcibios_fixup = mpc7448_hpc2_pcibios_fixup,
.pci_irq_fixup = mpc7448_hpc2_fixup_irq,
.restart = mpc7448_hpc2_restart,
.calibrate_decr = generic_calibrate_decr,
.machine_check_exception= mpc7448_machine_check_exception,
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/platforms/maple/maple.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ extern void maple_get_rtc_time(struct rtc_time *tm);
extern unsigned long maple_get_boot_time(void);
extern void maple_calibrate_decr(void);
extern void maple_pci_init(void);
extern void maple_pcibios_fixup(void);
extern void maple_pci_irq_fixup(struct pci_dev *dev);
extern int maple_pci_get_legacy_ide_irq(struct pci_dev *dev, int channel);
47 changes: 19 additions & 28 deletions trunk/arch/powerpc/platforms/maple/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,38 +502,29 @@ static int __init add_bridge(struct device_node *dev)
}


void __init maple_pcibios_fixup(void)
void __devinit maple_pci_irq_fixup(struct pci_dev *dev)
{
struct pci_dev *dev = NULL;

DBG(" -> maple_pcibios_fixup\n");

for_each_pci_dev(dev) {
/* Fixup IRQ for PCIe host */
if (u4_pcie != NULL && dev->bus->number == 0 &&
pci_bus_to_host(dev->bus) == u4_pcie) {
printk(KERN_DEBUG "Fixup U4 PCIe IRQ\n");
dev->irq = irq_create_mapping(NULL, 1);
if (dev->irq != NO_IRQ)
set_irq_type(dev->irq, IRQ_TYPE_LEVEL_LOW);
continue;
}

/* Hide AMD8111 IDE interrupt when in legacy mode so
* the driver calls pci_get_legacy_ide_irq()
*/
if (dev->vendor == PCI_VENDOR_ID_AMD &&
dev->device == PCI_DEVICE_ID_AMD_8111_IDE &&
(dev->class & 5) != 5) {
dev->irq = NO_IRQ;
continue;
}
DBG(" -> maple_pci_irq_fixup\n");

/* Fixup IRQ for PCIe host */
if (u4_pcie != NULL && dev->bus->number == 0 &&
pci_bus_to_host(dev->bus) == u4_pcie) {
printk(KERN_DEBUG "Fixup U4 PCIe IRQ\n");
dev->irq = irq_create_mapping(NULL, 1);
if (dev->irq != NO_IRQ)
set_irq_type(dev->irq, IRQ_TYPE_LEVEL_LOW);
}

/* For all others, map the interrupt from the device-tree */
pci_read_irq_line(dev);
/* Hide AMD8111 IDE interrupt when in legacy mode so
* the driver calls pci_get_legacy_ide_irq()
*/
if (dev->vendor == PCI_VENDOR_ID_AMD &&
dev->device == PCI_DEVICE_ID_AMD_8111_IDE &&
(dev->class & 5) != 5) {
dev->irq = NO_IRQ;
}

DBG(" <- maple_pcibios_fixup\n");
DBG(" <- maple_pci_irq_fixup\n");
}

static void __init maple_fixup_phb_resources(void)
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/platforms/maple/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ define_machine(maple_md) {
.setup_arch = maple_setup_arch,
.init_early = maple_init_early,
.init_IRQ = maple_init_IRQ,
.pcibios_fixup = maple_pcibios_fixup,
.pci_irq_fixup = maple_pci_irq_fixup,
.pci_get_legacy_ide_irq = maple_pci_get_legacy_ide_irq,
.restart = maple_restart,
.power_off = maple_power_off,
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/powerpc/platforms/pasemi/pasemi.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@

extern unsigned long pas_get_boot_time(void);
extern void pas_pci_init(void);
extern void pas_pcibios_fixup(void);

#endif /* _PASEMI_PASEMI_H */
8 changes: 0 additions & 8 deletions trunk/arch/powerpc/platforms/pasemi/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,6 @@ static int __init add_bridge(struct device_node *dev)
}


void __init pas_pcibios_fixup(void)
{
struct pci_dev *dev = NULL;

for_each_pci_dev(dev)
pci_read_irq_line(dev);
}

static void __init pas_fixup_phb_resources(void)
{
struct pci_controller *hose, *tmp;
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/powerpc/platforms/pasemi/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ define_machine(pas) {
.init_early = pas_init_early,
.init_IRQ = pas_init_IRQ,
.get_irq = mpic_get_irq,
.pcibios_fixup = pas_pcibios_fixup,
.restart = pas_restart,
.power_off = pas_power_off,
.halt = pas_halt,
Expand Down
Loading

0 comments on commit 14ee60b

Please sign in to comment.