mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 17:24:17 +08:00
powerpc/pasemi: Add Nemo board IRQ initroutine
Add a IRQ init routine for the Nemo board which inits and attatches the i8259 found in the SB600, and a cascade routine to dispatch the interrupts. Signed-off-by: Darren Stevens <darren@stevens-zone.net> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
656fdf3ad8
commit
51f4cc2047
@ -27,6 +27,7 @@
|
||||
#include <linux/pci.h>
|
||||
|
||||
#include <asm/pci-bridge.h>
|
||||
#include <asm/isa-bridge.h>
|
||||
#include <asm/machdep.h>
|
||||
|
||||
#include <asm/ppc-pci.h>
|
||||
@ -181,6 +182,8 @@ static int pa_pxp_read_config(struct pci_bus *bus, unsigned int devfn,
|
||||
|
||||
addr = pa_pxp_cfg_addr(hose, bus->number, devfn, offset);
|
||||
|
||||
sb600_set_flag(bus->number);
|
||||
|
||||
/*
|
||||
* Note: the caller has already checked that offset is
|
||||
* suitably aligned and that len is 1, 2 or 4.
|
||||
@ -215,6 +218,8 @@ static int pa_pxp_write_config(struct pci_bus *bus, unsigned int devfn,
|
||||
|
||||
addr = pa_pxp_cfg_addr(hose, bus->number, devfn, offset);
|
||||
|
||||
sb600_set_flag(bus->number);
|
||||
|
||||
/*
|
||||
* Note: the caller has already checked that offset is
|
||||
* suitably aligned and that len is 1, 2 or 4.
|
||||
@ -265,6 +270,12 @@ static int __init pas_add_bridge(struct device_node *dev)
|
||||
/* Interpret the "ranges" property */
|
||||
pci_process_bridge_OF_ranges(hose, dev, 1);
|
||||
|
||||
/*
|
||||
* Scan for an isa bridge. This is needed to find the SB600 on the nemo
|
||||
* and does nothing on machines without one.
|
||||
*/
|
||||
isa_bridge_find_early(hose);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -314,6 +314,8 @@ static __init void pas_init_IRQ(void)
|
||||
mpic_unmask_irq(irq_get_irq_data(nmi_virq));
|
||||
}
|
||||
|
||||
nemo_init_IRQ(mpic);
|
||||
|
||||
of_node_put(mpic_node);
|
||||
of_node_put(root);
|
||||
}
|
||||
@ -475,6 +477,8 @@ static int __init pasemi_publish_devices(void)
|
||||
/* Publish OF platform devices for SDC and other non-PCI devices */
|
||||
of_platform_bus_probe(NULL, pasemi_bus_ids, NULL);
|
||||
|
||||
nemo_init_rtc();
|
||||
|
||||
return 0;
|
||||
}
|
||||
machine_device_initcall(pasemi, pasemi_publish_devices);
|
||||
@ -489,6 +493,17 @@ static int __init pas_probe(void)
|
||||
!of_machine_is_compatible("pasemi,pwrficient"))
|
||||
return 0;
|
||||
|
||||
#ifdef CONFIG_PPC_PASEMI_NEMO
|
||||
/*
|
||||
* Check for the Nemo motherboard here, if we are running on one
|
||||
* change the machine definition to fit
|
||||
*/
|
||||
if (of_machine_is_compatible("pasemi,nemo")) {
|
||||
pm_power_off = pas_shutdown;
|
||||
ppc_md.name = "A-EON Amigaone X1000";
|
||||
}
|
||||
#endif
|
||||
|
||||
iommu_init_early_pasemi();
|
||||
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user