diff options
author | Paul Mackerras <paulus@samba.org> | 2005-11-09 21:37:51 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-11-09 21:37:51 -0500 |
commit | 799d6046d3fb557006e6d7c9767fdb96479b0e0a (patch) | |
tree | fff321e3c0c0e6d1192f453aab23ad204f350851 /arch/powerpc/platforms/iseries | |
parent | 3ddfbcf19b15ccd25a0b4b2dc2e38000e08de739 (diff) |
[PATCH] powerpc: merge code values for identifying platforms
This patch merges platform codes. systemcfg->platform is no longer used,
systemcfg use in general is deprecated as much as possible (and renamed
_systemcfg before it gets completely moved elsewhere in a future patch),
_machine is now used on ppc64 along as ppc32. Platform codes aren't gone
yet but we are getting a step closer. A bunch of asm code in head[_64].S
is also turned into C code.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/iseries')
-rw-r--r-- | arch/powerpc/platforms/iseries/setup.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c index 7f8f0cda6a74..623c39aa0436 100644 --- a/arch/powerpc/platforms/iseries/setup.c +++ b/arch/powerpc/platforms/iseries/setup.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <asm/sections.h> | 39 | #include <asm/sections.h> |
40 | #include <asm/iommu.h> | 40 | #include <asm/iommu.h> |
41 | #include <asm/firmware.h> | 41 | #include <asm/firmware.h> |
42 | #include <asm/systemcfg.h> | ||
42 | 43 | ||
43 | #include <asm/time.h> | 44 | #include <asm/time.h> |
44 | #include <asm/paca.h> | 45 | #include <asm/paca.h> |
@@ -71,7 +72,7 @@ extern void hvlog(char *fmt, ...); | |||
71 | #endif | 72 | #endif |
72 | 73 | ||
73 | /* Function Prototypes */ | 74 | /* Function Prototypes */ |
74 | static void build_iSeries_Memory_Map(void); | 75 | static unsigned long build_iSeries_Memory_Map(void); |
75 | static void iseries_shared_idle(void); | 76 | static void iseries_shared_idle(void); |
76 | static void iseries_dedicated_idle(void); | 77 | static void iseries_dedicated_idle(void); |
77 | #ifdef CONFIG_PCI | 78 | #ifdef CONFIG_PCI |
@@ -403,9 +404,11 @@ void mschunks_alloc(unsigned long num_chunks) | |||
403 | * a table used to translate Linux's physical addresses to these | 404 | * a table used to translate Linux's physical addresses to these |
404 | * absolute addresses. Absolute addresses are needed when | 405 | * absolute addresses. Absolute addresses are needed when |
405 | * communicating with the hypervisor (e.g. to build HPT entries) | 406 | * communicating with the hypervisor (e.g. to build HPT entries) |
407 | * | ||
408 | * Returns the physical memory size | ||
406 | */ | 409 | */ |
407 | 410 | ||
408 | static void __init build_iSeries_Memory_Map(void) | 411 | static unsigned long __init build_iSeries_Memory_Map(void) |
409 | { | 412 | { |
410 | u32 loadAreaFirstChunk, loadAreaLastChunk, loadAreaSize; | 413 | u32 loadAreaFirstChunk, loadAreaLastChunk, loadAreaSize; |
411 | u32 nextPhysChunk; | 414 | u32 nextPhysChunk; |
@@ -538,7 +541,7 @@ static void __init build_iSeries_Memory_Map(void) | |||
538 | * which should be equal to | 541 | * which should be equal to |
539 | * nextPhysChunk | 542 | * nextPhysChunk |
540 | */ | 543 | */ |
541 | systemcfg->physicalMemorySize = chunk_to_addr(nextPhysChunk); | 544 | return chunk_to_addr(nextPhysChunk); |
542 | } | 545 | } |
543 | 546 | ||
544 | /* | 547 | /* |
@@ -564,8 +567,8 @@ static void __init iSeries_setup_arch(void) | |||
564 | printk("Max physical processors = %d\n", | 567 | printk("Max physical processors = %d\n", |
565 | itVpdAreas.xSlicMaxPhysicalProcs); | 568 | itVpdAreas.xSlicMaxPhysicalProcs); |
566 | 569 | ||
567 | systemcfg->processor = xIoHriProcessorVpd[procIx].xPVR; | 570 | _systemcfg->processor = xIoHriProcessorVpd[procIx].xPVR; |
568 | printk("Processor version = %x\n", systemcfg->processor); | 571 | printk("Processor version = %x\n", _systemcfg->processor); |
569 | } | 572 | } |
570 | 573 | ||
571 | static void iSeries_show_cpuinfo(struct seq_file *m) | 574 | static void iSeries_show_cpuinfo(struct seq_file *m) |
@@ -929,7 +932,7 @@ void dt_cpus(struct iseries_flat_dt *dt) | |||
929 | dt_end_node(dt); | 932 | dt_end_node(dt); |
930 | } | 933 | } |
931 | 934 | ||
932 | void build_flat_dt(struct iseries_flat_dt *dt) | 935 | void build_flat_dt(struct iseries_flat_dt *dt, unsigned long phys_mem_size) |
933 | { | 936 | { |
934 | u64 tmp[2]; | 937 | u64 tmp[2]; |
935 | 938 | ||
@@ -945,7 +948,7 @@ void build_flat_dt(struct iseries_flat_dt *dt) | |||
945 | dt_prop_str(dt, "name", "memory"); | 948 | dt_prop_str(dt, "name", "memory"); |
946 | dt_prop_str(dt, "device_type", "memory"); | 949 | dt_prop_str(dt, "device_type", "memory"); |
947 | tmp[0] = 0; | 950 | tmp[0] = 0; |
948 | tmp[1] = systemcfg->physicalMemorySize; | 951 | tmp[1] = phys_mem_size; |
949 | dt_prop_u64_list(dt, "reg", tmp, 2); | 952 | dt_prop_u64_list(dt, "reg", tmp, 2); |
950 | dt_end_node(dt); | 953 | dt_end_node(dt); |
951 | 954 | ||
@@ -965,13 +968,15 @@ void build_flat_dt(struct iseries_flat_dt *dt) | |||
965 | 968 | ||
966 | void * __init iSeries_early_setup(void) | 969 | void * __init iSeries_early_setup(void) |
967 | { | 970 | { |
971 | unsigned long phys_mem_size; | ||
972 | |||
968 | iSeries_fixup_klimit(); | 973 | iSeries_fixup_klimit(); |
969 | 974 | ||
970 | /* | 975 | /* |
971 | * Initialize the table which translate Linux physical addresses to | 976 | * Initialize the table which translate Linux physical addresses to |
972 | * AS/400 absolute addresses | 977 | * AS/400 absolute addresses |
973 | */ | 978 | */ |
974 | build_iSeries_Memory_Map(); | 979 | phys_mem_size = build_iSeries_Memory_Map(); |
975 | 980 | ||
976 | iSeries_get_cmdline(); | 981 | iSeries_get_cmdline(); |
977 | 982 | ||
@@ -981,7 +986,7 @@ void * __init iSeries_early_setup(void) | |||
981 | /* Parse early parameters, in particular mem=x */ | 986 | /* Parse early parameters, in particular mem=x */ |
982 | parse_early_param(); | 987 | parse_early_param(); |
983 | 988 | ||
984 | build_flat_dt(&iseries_dt); | 989 | build_flat_dt(&iseries_dt, phys_mem_size); |
985 | 990 | ||
986 | return (void *) __pa(&iseries_dt); | 991 | return (void *) __pa(&iseries_dt); |
987 | } | 992 | } |