aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/powermac
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-10-23 17:23:21 +1000
committerPaul Mackerras <paulus@samba.org>2005-10-23 17:23:21 +1000
commita575b807172ca7d8850e6e979c8e83d4258e8c43 (patch)
tree83c3a6be6f16e4e1d325ecb9b43d26bb4d3d1ab7 /arch/powerpc/platforms/powermac
parent96c44507601d64f29b8ccc867637292e326c7019 (diff)
powerpc: Run on old powermacs.
Old powermacs have a number of differences from current machines: - there is no interrupt tree in the device tree, just interrupt or AAPL,interrupt properties - the chosen node in the device tree is called /chosen@0 - the OF claim method doesn't map the memory, so we have to do an explicit map call as well - there is no /chosen/cpu property on SMP machines - the NVRAM isn't structured as a set of partitions. This adapts the merged powermac support code to cope with these issues. Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/powermac')
-rw-r--r--arch/powerpc/platforms/powermac/setup.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index 50f5dd78790..908e4921bac 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -225,7 +225,7 @@ int find_via_pmu(void)
return 0;
printk("WARNING ! Your machine is PMU-based but your kernel\n");
printk(" wasn't compiled with CONFIG_ADB_PMU option !\n");
- return;
+ return 0;
}
#endif
@@ -293,7 +293,7 @@ static void __init l2cr_init(void)
void __init pmac_setup_arch(void)
{
- struct device_node *cpu;
+ struct device_node *cpu, *ic;
int *fp;
unsigned long pvr;
@@ -319,6 +319,12 @@ void __init pmac_setup_arch(void)
of_node_put(cpu);
}
+ /* See if newworld or oldworld */
+ ic = of_find_node_by_name(NULL, "interrupt-controller");
+ pmac_newworld = (ic != NULL);
+ if (ic)
+ of_node_put(ic);
+
/* Lookup PCI hosts */
pmac_pci_init();