diff options
author | Becky Bruce <becky.bruce@freescale.com> | 2008-10-15 04:25:28 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-10-21 20:00:25 -0400 |
commit | f465df81a80df92dbde0029b277f31b5e787b5df (patch) | |
tree | 67839adda26126b4e95b11e5a79d9dfc57a81014 /arch/powerpc/platforms | |
parent | 934752d8a4aaae4bee7a1b46944f30a55178ec91 (diff) |
powerpc: Move memory size print into common show_cpuinfo for 32-bit
Most of the platforms were printing the size of the memory
in their show_cpuinfo implementations. This moves that to
the common show_cpuinfo, so that all 32-bit platforms will
now print the size of memory. I also update the code
to deal with the fact that total_memory is now a phys_addr_t.
Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/85xx/ksi8560.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_ads.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_cds.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/sbc8548.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/sbc8560.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/stx_gp3.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/tqm85xx.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/86xx/gef_sbc610.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/86xx/sbc8641d.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/embedded6xx/c2k.c | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/embedded6xx/prpmc2800.c | 3 |
12 files changed, 0 insertions, 40 deletions
diff --git a/arch/powerpc/platforms/85xx/ksi8560.c b/arch/powerpc/platforms/85xx/ksi8560.c index 8a3b117b6ce2..81cee7bbf2d2 100644 --- a/arch/powerpc/platforms/85xx/ksi8560.c +++ b/arch/powerpc/platforms/85xx/ksi8560.c | |||
@@ -193,7 +193,6 @@ static void __init ksi8560_setup_arch(void) | |||
193 | static void ksi8560_show_cpuinfo(struct seq_file *m) | 193 | static void ksi8560_show_cpuinfo(struct seq_file *m) |
194 | { | 194 | { |
195 | uint pvid, svid, phid1; | 195 | uint pvid, svid, phid1; |
196 | uint memsize = total_memory; | ||
197 | 196 | ||
198 | pvid = mfspr(SPRN_PVR); | 197 | pvid = mfspr(SPRN_PVR); |
199 | svid = mfspr(SPRN_SVR); | 198 | svid = mfspr(SPRN_SVR); |
@@ -215,9 +214,6 @@ static void ksi8560_show_cpuinfo(struct seq_file *m) | |||
215 | /* Display cpu Pll setting */ | 214 | /* Display cpu Pll setting */ |
216 | phid1 = mfspr(SPRN_HID1); | 215 | phid1 = mfspr(SPRN_HID1); |
217 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); | 216 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); |
218 | |||
219 | /* Display the amount of memory */ | ||
220 | seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024)); | ||
221 | } | 217 | } |
222 | 218 | ||
223 | static struct of_device_id __initdata of_bus_ids[] = { | 219 | static struct of_device_id __initdata of_bus_ids[] = { |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c index 0293e3d3580f..21f009023e26 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c | |||
@@ -207,7 +207,6 @@ static void __init mpc85xx_ads_setup_arch(void) | |||
207 | static void mpc85xx_ads_show_cpuinfo(struct seq_file *m) | 207 | static void mpc85xx_ads_show_cpuinfo(struct seq_file *m) |
208 | { | 208 | { |
209 | uint pvid, svid, phid1; | 209 | uint pvid, svid, phid1; |
210 | uint memsize = total_memory; | ||
211 | 210 | ||
212 | pvid = mfspr(SPRN_PVR); | 211 | pvid = mfspr(SPRN_PVR); |
213 | svid = mfspr(SPRN_SVR); | 212 | svid = mfspr(SPRN_SVR); |
@@ -219,9 +218,6 @@ static void mpc85xx_ads_show_cpuinfo(struct seq_file *m) | |||
219 | /* Display cpu Pll setting */ | 218 | /* Display cpu Pll setting */ |
220 | phid1 = mfspr(SPRN_HID1); | 219 | phid1 = mfspr(SPRN_HID1); |
221 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); | 220 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); |
222 | |||
223 | /* Display the amount of memory */ | ||
224 | seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024)); | ||
225 | } | 221 | } |
226 | 222 | ||
227 | static struct of_device_id __initdata of_bus_ids[] = { | 223 | static struct of_device_id __initdata of_bus_ids[] = { |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c index 50d7ea8f922b..aeb6a5bc5522 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c | |||
@@ -307,7 +307,6 @@ static void __init mpc85xx_cds_setup_arch(void) | |||
307 | static void mpc85xx_cds_show_cpuinfo(struct seq_file *m) | 307 | static void mpc85xx_cds_show_cpuinfo(struct seq_file *m) |
308 | { | 308 | { |
309 | uint pvid, svid, phid1; | 309 | uint pvid, svid, phid1; |
310 | uint memsize = total_memory; | ||
311 | 310 | ||
312 | pvid = mfspr(SPRN_PVR); | 311 | pvid = mfspr(SPRN_PVR); |
313 | svid = mfspr(SPRN_SVR); | 312 | svid = mfspr(SPRN_SVR); |
@@ -320,9 +319,6 @@ static void mpc85xx_cds_show_cpuinfo(struct seq_file *m) | |||
320 | /* Display cpu Pll setting */ | 319 | /* Display cpu Pll setting */ |
321 | phid1 = mfspr(SPRN_HID1); | 320 | phid1 = mfspr(SPRN_HID1); |
322 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); | 321 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); |
323 | |||
324 | /* Display the amount of memory */ | ||
325 | seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024)); | ||
326 | } | 322 | } |
327 | 323 | ||
328 | 324 | ||
diff --git a/arch/powerpc/platforms/85xx/sbc8548.c b/arch/powerpc/platforms/85xx/sbc8548.c index b9246ea0928a..7ec77ce12dad 100644 --- a/arch/powerpc/platforms/85xx/sbc8548.c +++ b/arch/powerpc/platforms/85xx/sbc8548.c | |||
@@ -136,7 +136,6 @@ static void __init sbc8548_setup_arch(void) | |||
136 | static void sbc8548_show_cpuinfo(struct seq_file *m) | 136 | static void sbc8548_show_cpuinfo(struct seq_file *m) |
137 | { | 137 | { |
138 | uint pvid, svid, phid1; | 138 | uint pvid, svid, phid1; |
139 | uint memsize = total_memory; | ||
140 | 139 | ||
141 | pvid = mfspr(SPRN_PVR); | 140 | pvid = mfspr(SPRN_PVR); |
142 | svid = mfspr(SPRN_SVR); | 141 | svid = mfspr(SPRN_SVR); |
@@ -149,9 +148,6 @@ static void sbc8548_show_cpuinfo(struct seq_file *m) | |||
149 | /* Display cpu Pll setting */ | 148 | /* Display cpu Pll setting */ |
150 | phid1 = mfspr(SPRN_HID1); | 149 | phid1 = mfspr(SPRN_HID1); |
151 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); | 150 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); |
152 | |||
153 | /* Display the amount of memory */ | ||
154 | seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024)); | ||
155 | } | 151 | } |
156 | 152 | ||
157 | static struct of_device_id __initdata of_bus_ids[] = { | 153 | static struct of_device_id __initdata of_bus_ids[] = { |
diff --git a/arch/powerpc/platforms/85xx/sbc8560.c b/arch/powerpc/platforms/85xx/sbc8560.c index 0c9a856f66b6..472f254a19d2 100644 --- a/arch/powerpc/platforms/85xx/sbc8560.c +++ b/arch/powerpc/platforms/85xx/sbc8560.c | |||
@@ -194,7 +194,6 @@ static void __init sbc8560_setup_arch(void) | |||
194 | static void sbc8560_show_cpuinfo(struct seq_file *m) | 194 | static void sbc8560_show_cpuinfo(struct seq_file *m) |
195 | { | 195 | { |
196 | uint pvid, svid, phid1; | 196 | uint pvid, svid, phid1; |
197 | uint memsize = total_memory; | ||
198 | 197 | ||
199 | pvid = mfspr(SPRN_PVR); | 198 | pvid = mfspr(SPRN_PVR); |
200 | svid = mfspr(SPRN_SVR); | 199 | svid = mfspr(SPRN_SVR); |
@@ -206,9 +205,6 @@ static void sbc8560_show_cpuinfo(struct seq_file *m) | |||
206 | /* Display cpu Pll setting */ | 205 | /* Display cpu Pll setting */ |
207 | phid1 = mfspr(SPRN_HID1); | 206 | phid1 = mfspr(SPRN_HID1); |
208 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); | 207 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); |
209 | |||
210 | /* Display the amount of memory */ | ||
211 | seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024)); | ||
212 | } | 208 | } |
213 | 209 | ||
214 | static struct of_device_id __initdata of_bus_ids[] = { | 210 | static struct of_device_id __initdata of_bus_ids[] = { |
diff --git a/arch/powerpc/platforms/85xx/stx_gp3.c b/arch/powerpc/platforms/85xx/stx_gp3.c index 18499d7c9d9e..0cca8f5cb272 100644 --- a/arch/powerpc/platforms/85xx/stx_gp3.c +++ b/arch/powerpc/platforms/85xx/stx_gp3.c | |||
@@ -130,7 +130,6 @@ static void __init stx_gp3_setup_arch(void) | |||
130 | static void stx_gp3_show_cpuinfo(struct seq_file *m) | 130 | static void stx_gp3_show_cpuinfo(struct seq_file *m) |
131 | { | 131 | { |
132 | uint pvid, svid, phid1; | 132 | uint pvid, svid, phid1; |
133 | uint memsize = total_memory; | ||
134 | 133 | ||
135 | pvid = mfspr(SPRN_PVR); | 134 | pvid = mfspr(SPRN_PVR); |
136 | svid = mfspr(SPRN_SVR); | 135 | svid = mfspr(SPRN_SVR); |
@@ -142,9 +141,6 @@ static void stx_gp3_show_cpuinfo(struct seq_file *m) | |||
142 | /* Display cpu Pll setting */ | 141 | /* Display cpu Pll setting */ |
143 | phid1 = mfspr(SPRN_HID1); | 142 | phid1 = mfspr(SPRN_HID1); |
144 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); | 143 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); |
145 | |||
146 | /* Display the amount of memory */ | ||
147 | seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024)); | ||
148 | } | 144 | } |
149 | 145 | ||
150 | static struct of_device_id __initdata of_bus_ids[] = { | 146 | static struct of_device_id __initdata of_bus_ids[] = { |
diff --git a/arch/powerpc/platforms/85xx/tqm85xx.c b/arch/powerpc/platforms/85xx/tqm85xx.c index d850880d6964..2933a8e827d9 100644 --- a/arch/powerpc/platforms/85xx/tqm85xx.c +++ b/arch/powerpc/platforms/85xx/tqm85xx.c | |||
@@ -138,7 +138,6 @@ static void __init tqm85xx_setup_arch(void) | |||
138 | static void tqm85xx_show_cpuinfo(struct seq_file *m) | 138 | static void tqm85xx_show_cpuinfo(struct seq_file *m) |
139 | { | 139 | { |
140 | uint pvid, svid, phid1; | 140 | uint pvid, svid, phid1; |
141 | uint memsize = total_memory; | ||
142 | 141 | ||
143 | pvid = mfspr(SPRN_PVR); | 142 | pvid = mfspr(SPRN_PVR); |
144 | svid = mfspr(SPRN_SVR); | 143 | svid = mfspr(SPRN_SVR); |
@@ -150,9 +149,6 @@ static void tqm85xx_show_cpuinfo(struct seq_file *m) | |||
150 | /* Display cpu Pll setting */ | 149 | /* Display cpu Pll setting */ |
151 | phid1 = mfspr(SPRN_HID1); | 150 | phid1 = mfspr(SPRN_HID1); |
152 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); | 151 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); |
153 | |||
154 | /* Display the amount of memory */ | ||
155 | seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024)); | ||
156 | } | 152 | } |
157 | 153 | ||
158 | static struct of_device_id __initdata of_bus_ids[] = { | 154 | static struct of_device_id __initdata of_bus_ids[] = { |
diff --git a/arch/powerpc/platforms/86xx/gef_sbc610.c b/arch/powerpc/platforms/86xx/gef_sbc610.c index 821c45fac18b..fb371f5ce132 100644 --- a/arch/powerpc/platforms/86xx/gef_sbc610.c +++ b/arch/powerpc/platforms/86xx/gef_sbc610.c | |||
@@ -127,7 +127,6 @@ static unsigned int gef_sbc610_get_fpga_rev(void) | |||
127 | 127 | ||
128 | static void gef_sbc610_show_cpuinfo(struct seq_file *m) | 128 | static void gef_sbc610_show_cpuinfo(struct seq_file *m) |
129 | { | 129 | { |
130 | uint memsize = total_memory; | ||
131 | uint svid = mfspr(SPRN_SVR); | 130 | uint svid = mfspr(SPRN_SVR); |
132 | 131 | ||
133 | seq_printf(m, "Vendor\t\t: GE Fanuc Intelligent Platforms\n"); | 132 | seq_printf(m, "Vendor\t\t: GE Fanuc Intelligent Platforms\n"); |
@@ -137,7 +136,6 @@ static void gef_sbc610_show_cpuinfo(struct seq_file *m) | |||
137 | seq_printf(m, "FPGA Revision\t: %u\n", gef_sbc610_get_fpga_rev()); | 136 | seq_printf(m, "FPGA Revision\t: %u\n", gef_sbc610_get_fpga_rev()); |
138 | 137 | ||
139 | seq_printf(m, "SVR\t\t: 0x%x\n", svid); | 138 | seq_printf(m, "SVR\t\t: 0x%x\n", svid); |
140 | seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024)); | ||
141 | } | 139 | } |
142 | 140 | ||
143 | static void __init gef_sbc610_nec_fixup(struct pci_dev *pdev) | 141 | static void __init gef_sbc610_nec_fixup(struct pci_dev *pdev) |
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c index 2672829a71dc..27e0e682d8e1 100644 --- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | |||
@@ -101,13 +101,11 @@ mpc86xx_hpcn_setup_arch(void) | |||
101 | static void | 101 | static void |
102 | mpc86xx_hpcn_show_cpuinfo(struct seq_file *m) | 102 | mpc86xx_hpcn_show_cpuinfo(struct seq_file *m) |
103 | { | 103 | { |
104 | uint memsize = total_memory; | ||
105 | uint svid = mfspr(SPRN_SVR); | 104 | uint svid = mfspr(SPRN_SVR); |
106 | 105 | ||
107 | seq_printf(m, "Vendor\t\t: Freescale Semiconductor\n"); | 106 | seq_printf(m, "Vendor\t\t: Freescale Semiconductor\n"); |
108 | 107 | ||
109 | seq_printf(m, "SVR\t\t: 0x%x\n", svid); | 108 | seq_printf(m, "SVR\t\t: 0x%x\n", svid); |
110 | seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024)); | ||
111 | } | 109 | } |
112 | 110 | ||
113 | 111 | ||
diff --git a/arch/powerpc/platforms/86xx/sbc8641d.c b/arch/powerpc/platforms/86xx/sbc8641d.c index da677a74e2d1..5fd7ed40986f 100644 --- a/arch/powerpc/platforms/86xx/sbc8641d.c +++ b/arch/powerpc/platforms/86xx/sbc8641d.c | |||
@@ -63,13 +63,11 @@ sbc8641_setup_arch(void) | |||
63 | static void | 63 | static void |
64 | sbc8641_show_cpuinfo(struct seq_file *m) | 64 | sbc8641_show_cpuinfo(struct seq_file *m) |
65 | { | 65 | { |
66 | uint memsize = total_memory; | ||
67 | uint svid = mfspr(SPRN_SVR); | 66 | uint svid = mfspr(SPRN_SVR); |
68 | 67 | ||
69 | seq_printf(m, "Vendor\t\t: Wind River Systems\n"); | 68 | seq_printf(m, "Vendor\t\t: Wind River Systems\n"); |
70 | 69 | ||
71 | seq_printf(m, "SVR\t\t: 0x%x\n", svid); | 70 | seq_printf(m, "SVR\t\t: 0x%x\n", svid); |
72 | seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024)); | ||
73 | } | 71 | } |
74 | 72 | ||
75 | 73 | ||
diff --git a/arch/powerpc/platforms/embedded6xx/c2k.c b/arch/powerpc/platforms/embedded6xx/c2k.c index d0b25b8c39d1..32ba0fa0ad03 100644 --- a/arch/powerpc/platforms/embedded6xx/c2k.c +++ b/arch/powerpc/platforms/embedded6xx/c2k.c | |||
@@ -116,10 +116,7 @@ static void c2k_restart(char *cmd) | |||
116 | 116 | ||
117 | void c2k_show_cpuinfo(struct seq_file *m) | 117 | void c2k_show_cpuinfo(struct seq_file *m) |
118 | { | 118 | { |
119 | uint memsize = total_memory; | ||
120 | |||
121 | seq_printf(m, "Vendor\t\t: GEFanuc\n"); | 119 | seq_printf(m, "Vendor\t\t: GEFanuc\n"); |
122 | seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024)); | ||
123 | seq_printf(m, "coherency\t: %s\n", COHERENCY_SETTING); | 120 | seq_printf(m, "coherency\t: %s\n", COHERENCY_SETTING); |
124 | } | 121 | } |
125 | 122 | ||
diff --git a/arch/powerpc/platforms/embedded6xx/prpmc2800.c b/arch/powerpc/platforms/embedded6xx/prpmc2800.c index 5a19b9a1457c..4c485e984236 100644 --- a/arch/powerpc/platforms/embedded6xx/prpmc2800.c +++ b/arch/powerpc/platforms/embedded6xx/prpmc2800.c | |||
@@ -119,10 +119,7 @@ static void prpmc2800_restart(char *cmd) | |||
119 | 119 | ||
120 | void prpmc2800_show_cpuinfo(struct seq_file *m) | 120 | void prpmc2800_show_cpuinfo(struct seq_file *m) |
121 | { | 121 | { |
122 | uint memsize = total_memory; | ||
123 | |||
124 | seq_printf(m, "Vendor\t\t: Motorola\n"); | 122 | seq_printf(m, "Vendor\t\t: Motorola\n"); |
125 | seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024)); | ||
126 | seq_printf(m, "coherency\t: %s\n", PPRPM2800_COHERENCY_SETTING); | 123 | seq_printf(m, "coherency\t: %s\n", PPRPM2800_COHERENCY_SETTING); |
127 | } | 124 | } |
128 | 125 | ||