diff options
author | Paul Mackerras <paulus@samba.org> | 2005-11-09 20:00:55 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-11-09 20:00:55 -0500 |
commit | a23414beb6607dfd40d3245f7df9dd97a4e2c82b (patch) | |
tree | 7fb2e368a462fab4ce4cc275281ecd22e284653a /arch/powerpc/kernel/prom.c | |
parent | 8b553f32db3bf5d0ec0819c595932eb21cd45945 (diff) |
ppc/powerpc: workarounds for old Open Firmware versions
This adds code to work around some problems with old versions of
Open Firmware, such as on the early powermacs (7500 etc.) and the
"Longtrail" CHRP machine. On these machines we have to claim
the physical and virtual address ranges explicitly when claiming
memory and then set up a V->P mapping.
The Longtrail has more problems: setprop doesn't work, and we have
to set an "allow-reclaim" variable to 0 in order to get claim on
physical memory ranges to fail if the memory is already claimed.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/prom.c')
-rw-r--r-- | arch/powerpc/kernel/prom.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index f645adb57534..5af39f866735 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -1264,7 +1264,14 @@ static int __init early_init_dt_scan_memory(unsigned long node, | |||
1264 | unsigned long l; | 1264 | unsigned long l; |
1265 | 1265 | ||
1266 | /* We are scanning "memory" nodes only */ | 1266 | /* We are scanning "memory" nodes only */ |
1267 | if (type == NULL || strcmp(type, "memory") != 0) | 1267 | if (type == NULL) { |
1268 | /* | ||
1269 | * The longtrail doesn't have a device_type on the | ||
1270 | * /memory node, so look for the node called /memory@0. | ||
1271 | */ | ||
1272 | if (depth != 1 || strcmp(uname, "memory@0") != 0) | ||
1273 | return 0; | ||
1274 | } else if (strcmp(type, "memory") != 0) | ||
1268 | return 0; | 1275 | return 0; |
1269 | 1276 | ||
1270 | reg = (cell_t *)of_get_flat_dt_prop(node, "reg", &l); | 1277 | reg = (cell_t *)of_get_flat_dt_prop(node, "reg", &l); |