diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2005-09-23 00:59:04 -0400 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2005-09-23 00:59:04 -0400 |
commit | 4762713a93fa8706c31b0897c1340e7dc282d8fb (patch) | |
tree | 12c28b1b91fa691c17e9d33dcc7a391e7445a473 /arch | |
parent | c0a59491daca7db11d49edad1a1cefaaa7120a9e (diff) |
ppc64 iSeries: Call early_setup() on iSeries
Misc steps to incorporate the flat device tree on iSeries.
- define iseries_probe()
- call build_iSeries_Memory_Map() earlier
- return __pa() of the flat device tree from iSeries_early_setup()
- actually call early_setup() for iSeries
- add iseries_md to machdep_calls
- build prom.o for iSeries
- enable /proc/device-tree for iSeries
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ppc64/Kconfig | 1 | ||||
-rw-r--r-- | arch/ppc64/kernel/Makefile | 4 | ||||
-rw-r--r-- | arch/ppc64/kernel/head.S | 1 | ||||
-rw-r--r-- | arch/ppc64/kernel/iSeries_setup.c | 22 | ||||
-rw-r--r-- | arch/ppc64/kernel/setup.c | 9 |
5 files changed, 22 insertions, 15 deletions
diff --git a/arch/ppc64/Kconfig b/arch/ppc64/Kconfig index 32951bfc7f65..246212115a48 100644 --- a/arch/ppc64/Kconfig +++ b/arch/ppc64/Kconfig | |||
@@ -357,7 +357,6 @@ config HOTPLUG_CPU | |||
357 | 357 | ||
358 | config PROC_DEVICETREE | 358 | config PROC_DEVICETREE |
359 | bool "Support for Open Firmware device tree in /proc" | 359 | bool "Support for Open Firmware device tree in /proc" |
360 | depends on !PPC_ISERIES | ||
361 | help | 360 | help |
362 | This option adds a device-tree directory under /proc which contains | 361 | This option adds a device-tree directory under /proc which contains |
363 | an image of the device tree that the kernel copies from Open | 362 | an image of the device tree that the kernel copies from Open |
diff --git a/arch/ppc64/kernel/Makefile b/arch/ppc64/kernel/Makefile index 813718df4f82..afadb6e4a6dc 100644 --- a/arch/ppc64/kernel/Makefile +++ b/arch/ppc64/kernel/Makefile | |||
@@ -11,7 +11,7 @@ obj-y := setup.o entry.o traps.o irq.o idle.o dma.o \ | |||
11 | udbg.o binfmt_elf32.o sys_ppc32.o ioctl32.o \ | 11 | udbg.o binfmt_elf32.o sys_ppc32.o ioctl32.o \ |
12 | ptrace32.o signal32.o rtc.o init_task.o \ | 12 | ptrace32.o signal32.o rtc.o init_task.o \ |
13 | lmb.o cputable.o cpu_setup_power4.o idle_power4.o \ | 13 | lmb.o cputable.o cpu_setup_power4.o idle_power4.o \ |
14 | iommu.o sysfs.o vdso.o pmc.o firmware.o | 14 | iommu.o sysfs.o vdso.o pmc.o firmware.o prom.o |
15 | obj-y += vdso32/ vdso64/ | 15 | obj-y += vdso32/ vdso64/ |
16 | 16 | ||
17 | obj-$(CONFIG_PPC_OF) += of_device.o | 17 | obj-$(CONFIG_PPC_OF) += of_device.o |
@@ -27,7 +27,7 @@ obj-$(CONFIG_PPC_ISERIES) += HvCall.o HvLpConfig.o LparData.o \ | |||
27 | mf.o HvLpEvent.o iSeries_proc.o iSeries_htab.o \ | 27 | mf.o HvLpEvent.o iSeries_proc.o iSeries_htab.o \ |
28 | iSeries_iommu.o | 28 | iSeries_iommu.o |
29 | 29 | ||
30 | obj-$(CONFIG_PPC_MULTIPLATFORM) += nvram.o i8259.o prom_init.o prom.o | 30 | obj-$(CONFIG_PPC_MULTIPLATFORM) += nvram.o i8259.o prom_init.o |
31 | 31 | ||
32 | obj-$(CONFIG_PPC_PSERIES) += pSeries_pci.o pSeries_lpar.o pSeries_hvCall.o \ | 32 | obj-$(CONFIG_PPC_PSERIES) += pSeries_pci.o pSeries_lpar.o pSeries_hvCall.o \ |
33 | pSeries_nvram.o rtasd.o ras.o pSeries_reconfig.o \ | 33 | pSeries_nvram.o rtasd.o ras.o pSeries_reconfig.o \ |
diff --git a/arch/ppc64/kernel/head.S b/arch/ppc64/kernel/head.S index b1d0edff0c04..eb526c480b6c 100644 --- a/arch/ppc64/kernel/head.S +++ b/arch/ppc64/kernel/head.S | |||
@@ -1364,6 +1364,7 @@ _STATIC(__start_initialization_iSeries) | |||
1364 | addi r2,r2,0x4000 | 1364 | addi r2,r2,0x4000 |
1365 | 1365 | ||
1366 | bl .iSeries_early_setup | 1366 | bl .iSeries_early_setup |
1367 | bl .early_setup | ||
1367 | 1368 | ||
1368 | /* relocation is on at this point */ | 1369 | /* relocation is on at this point */ |
1369 | 1370 | ||
diff --git a/arch/ppc64/kernel/iSeries_setup.c b/arch/ppc64/kernel/iSeries_setup.c index 99e4307affd6..27faf4f0967a 100644 --- a/arch/ppc64/kernel/iSeries_setup.c +++ b/arch/ppc64/kernel/iSeries_setup.c | |||
@@ -359,12 +359,6 @@ static void __init iSeries_init_early(void) | |||
359 | */ | 359 | */ |
360 | iommu_init_early_iSeries(); | 360 | iommu_init_early_iSeries(); |
361 | 361 | ||
362 | /* | ||
363 | * Initialize the table which translate Linux physical addresses to | ||
364 | * AS/400 absolute addresses | ||
365 | */ | ||
366 | build_iSeries_Memory_Map(); | ||
367 | |||
368 | iSeries_get_cmdline(); | 362 | iSeries_get_cmdline(); |
369 | 363 | ||
370 | /* Save unparsed command line copy for /proc/cmdline */ | 364 | /* Save unparsed command line copy for /proc/cmdline */ |
@@ -894,6 +888,11 @@ static int iseries_dedicated_idle(void) | |||
894 | void __init iSeries_init_IRQ(void) { } | 888 | void __init iSeries_init_IRQ(void) { } |
895 | #endif | 889 | #endif |
896 | 890 | ||
891 | static int __init iseries_probe(int platform) | ||
892 | { | ||
893 | return PLATFORM_ISERIES_LPAR == platform; | ||
894 | } | ||
895 | |||
897 | struct machdep_calls __initdata iseries_md = { | 896 | struct machdep_calls __initdata iseries_md = { |
898 | .setup_arch = iSeries_setup_arch, | 897 | .setup_arch = iSeries_setup_arch, |
899 | .get_cpuinfo = iSeries_get_cpuinfo, | 898 | .get_cpuinfo = iSeries_get_cpuinfo, |
@@ -909,6 +908,7 @@ struct machdep_calls __initdata iseries_md = { | |||
909 | .get_rtc_time = iSeries_get_rtc_time, | 908 | .get_rtc_time = iSeries_get_rtc_time, |
910 | .calibrate_decr = iSeries_calibrate_decr, | 909 | .calibrate_decr = iSeries_calibrate_decr, |
911 | .progress = iSeries_progress, | 910 | .progress = iSeries_progress, |
911 | .probe = iseries_probe, | ||
912 | /* XXX Implement enable_pmcs for iSeries */ | 912 | /* XXX Implement enable_pmcs for iSeries */ |
913 | }; | 913 | }; |
914 | 914 | ||
@@ -1047,9 +1047,17 @@ void build_flat_dt(struct iseries_flat_dt *dt) | |||
1047 | dt_push_u32(dt, OF_DT_END); | 1047 | dt_push_u32(dt, OF_DT_END); |
1048 | } | 1048 | } |
1049 | 1049 | ||
1050 | void __init iSeries_early_setup(void) | 1050 | void * __init iSeries_early_setup(void) |
1051 | { | 1051 | { |
1052 | iSeries_fixup_klimit(); | 1052 | iSeries_fixup_klimit(); |
1053 | 1053 | ||
1054 | /* | ||
1055 | * Initialize the table which translate Linux physical addresses to | ||
1056 | * AS/400 absolute addresses | ||
1057 | */ | ||
1058 | build_iSeries_Memory_Map(); | ||
1059 | |||
1054 | build_flat_dt(&iseries_dt); | 1060 | build_flat_dt(&iseries_dt); |
1061 | |||
1062 | return (void *) __pa(&iseries_dt); | ||
1055 | } | 1063 | } |
diff --git a/arch/ppc64/kernel/setup.c b/arch/ppc64/kernel/setup.c index acf826043e39..6c1cd3bab28e 100644 --- a/arch/ppc64/kernel/setup.c +++ b/arch/ppc64/kernel/setup.c | |||
@@ -309,13 +309,11 @@ static void __init setup_cpu_maps(void) | |||
309 | } | 309 | } |
310 | #endif /* CONFIG_SMP */ | 310 | #endif /* CONFIG_SMP */ |
311 | 311 | ||
312 | |||
313 | #ifdef CONFIG_PPC_MULTIPLATFORM | ||
314 | |||
315 | extern struct machdep_calls pSeries_md; | 312 | extern struct machdep_calls pSeries_md; |
316 | extern struct machdep_calls pmac_md; | 313 | extern struct machdep_calls pmac_md; |
317 | extern struct machdep_calls maple_md; | 314 | extern struct machdep_calls maple_md; |
318 | extern struct machdep_calls bpa_md; | 315 | extern struct machdep_calls bpa_md; |
316 | extern struct machdep_calls iseries_md; | ||
319 | 317 | ||
320 | /* Ultimately, stuff them in an elf section like initcalls... */ | 318 | /* Ultimately, stuff them in an elf section like initcalls... */ |
321 | static struct machdep_calls __initdata *machines[] = { | 319 | static struct machdep_calls __initdata *machines[] = { |
@@ -331,6 +329,9 @@ static struct machdep_calls __initdata *machines[] = { | |||
331 | #ifdef CONFIG_PPC_BPA | 329 | #ifdef CONFIG_PPC_BPA |
332 | &bpa_md, | 330 | &bpa_md, |
333 | #endif | 331 | #endif |
332 | #ifdef CONFIG_PPC_ISERIES | ||
333 | &iseries_md, | ||
334 | #endif | ||
334 | NULL | 335 | NULL |
335 | }; | 336 | }; |
336 | 337 | ||
@@ -534,8 +535,6 @@ static void __init check_for_initrd(void) | |||
534 | #endif /* CONFIG_BLK_DEV_INITRD */ | 535 | #endif /* CONFIG_BLK_DEV_INITRD */ |
535 | } | 536 | } |
536 | 537 | ||
537 | #endif /* CONFIG_PPC_MULTIPLATFORM */ | ||
538 | |||
539 | /* | 538 | /* |
540 | * Do some initial setup of the system. The parameters are those which | 539 | * Do some initial setup of the system. The parameters are those which |
541 | * were passed in from the bootloader. | 540 | * were passed in from the bootloader. |