aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/powermac/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/powermac/setup.c')
-rw-r--r--arch/powerpc/platforms/powermac/setup.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index 31a9da769fa2..824a618396ab 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -116,7 +116,7 @@ extern struct smp_ops_t core99_smp_ops;
116static void pmac_show_cpuinfo(struct seq_file *m) 116static void pmac_show_cpuinfo(struct seq_file *m)
117{ 117{
118 struct device_node *np; 118 struct device_node *np;
119 char *pp; 119 const char *pp;
120 int plen; 120 int plen;
121 int mbmodel; 121 int mbmodel;
122 unsigned int mbflags; 122 unsigned int mbflags;
@@ -134,12 +134,12 @@ static void pmac_show_cpuinfo(struct seq_file *m)
134 seq_printf(m, "machine\t\t: "); 134 seq_printf(m, "machine\t\t: ");
135 np = of_find_node_by_path("/"); 135 np = of_find_node_by_path("/");
136 if (np != NULL) { 136 if (np != NULL) {
137 pp = (char *) get_property(np, "model", NULL); 137 pp = get_property(np, "model", NULL);
138 if (pp != NULL) 138 if (pp != NULL)
139 seq_printf(m, "%s\n", pp); 139 seq_printf(m, "%s\n", pp);
140 else 140 else
141 seq_printf(m, "PowerMac\n"); 141 seq_printf(m, "PowerMac\n");
142 pp = (char *) get_property(np, "compatible", &plen); 142 pp = get_property(np, "compatible", &plen);
143 if (pp != NULL) { 143 if (pp != NULL) {
144 seq_printf(m, "motherboard\t:"); 144 seq_printf(m, "motherboard\t:");
145 while (plen > 0) { 145 while (plen > 0) {
@@ -163,10 +163,8 @@ static void pmac_show_cpuinfo(struct seq_file *m)
163 if (np == NULL) 163 if (np == NULL)
164 np = of_find_node_by_type(NULL, "cache"); 164 np = of_find_node_by_type(NULL, "cache");
165 if (np != NULL) { 165 if (np != NULL) {
166 unsigned int *ic = (unsigned int *) 166 const unsigned int *ic = get_property(np, "i-cache-size", NULL);
167 get_property(np, "i-cache-size", NULL); 167 const unsigned int *dc = get_property(np, "d-cache-size", NULL);
168 unsigned int *dc = (unsigned int *)
169 get_property(np, "d-cache-size", NULL);
170 seq_printf(m, "L2 cache\t:"); 168 seq_printf(m, "L2 cache\t:");
171 has_l2cache = 1; 169 has_l2cache = 1;
172 if (get_property(np, "cache-unified", NULL) != 0 && dc) { 170 if (get_property(np, "cache-unified", NULL) != 0 && dc) {
@@ -254,7 +252,7 @@ static void __init l2cr_init(void)
254 if (np == 0) 252 if (np == 0)
255 np = find_type_devices("cpu"); 253 np = find_type_devices("cpu");
256 if (np != 0) { 254 if (np != 0) {
257 unsigned int *l2cr = (unsigned int *) 255 const unsigned int *l2cr =
258 get_property(np, "l2cr-value", NULL); 256 get_property(np, "l2cr-value", NULL);
259 if (l2cr != 0) { 257 if (l2cr != 0) {
260 ppc_override_l2cr = 1; 258 ppc_override_l2cr = 1;
@@ -277,7 +275,7 @@ static void __init l2cr_init(void)
277static void __init pmac_setup_arch(void) 275static void __init pmac_setup_arch(void)
278{ 276{
279 struct device_node *cpu, *ic; 277 struct device_node *cpu, *ic;
280 int *fp; 278 const int *fp;
281 unsigned long pvr; 279 unsigned long pvr;
282 280
283 pvr = PVR_VER(mfspr(SPRN_PVR)); 281 pvr = PVR_VER(mfspr(SPRN_PVR));
@@ -287,7 +285,7 @@ static void __init pmac_setup_arch(void)
287 loops_per_jiffy = 50000000 / HZ; 285 loops_per_jiffy = 50000000 / HZ;
288 cpu = of_find_node_by_type(NULL, "cpu"); 286 cpu = of_find_node_by_type(NULL, "cpu");
289 if (cpu != NULL) { 287 if (cpu != NULL) {
290 fp = (int *) get_property(cpu, "clock-frequency", NULL); 288 fp = get_property(cpu, "clock-frequency", NULL);
291 if (fp != NULL) { 289 if (fp != NULL) {
292 if (pvr >= 0x30 && pvr < 0x80) 290 if (pvr >= 0x30 && pvr < 0x80)
293 /* PPC970 etc. */ 291 /* PPC970 etc. */