diff options
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/head_32.S | 28 | ||||
-rw-r--r-- | arch/powerpc/kernel/prom_init.c | 59 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup_32.c | 16 | ||||
-rw-r--r-- | arch/powerpc/mm/init_32.c | 7 |
4 files changed, 4 insertions, 106 deletions
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S index d9b063f567e0..7ef9a3e3002b 100644 --- a/arch/powerpc/kernel/head_32.S +++ b/arch/powerpc/kernel/head_32.S | |||
@@ -153,9 +153,6 @@ __after_mmu_off: | |||
153 | bl flush_tlbs | 153 | bl flush_tlbs |
154 | 154 | ||
155 | bl initial_bats | 155 | bl initial_bats |
156 | #if !defined(CONFIG_APUS) && defined(CONFIG_BOOTX_TEXT) | ||
157 | bl setup_disp_bat | ||
158 | #endif | ||
159 | 156 | ||
160 | /* | 157 | /* |
161 | * Call setup_cpu for CPU 0 and initialize 6xx Idle | 158 | * Call setup_cpu for CPU 0 and initialize 6xx Idle |
@@ -1297,31 +1294,6 @@ initial_bats: | |||
1297 | isync | 1294 | isync |
1298 | blr | 1295 | blr |
1299 | 1296 | ||
1300 | #if !defined(CONFIG_APUS) && defined(CONFIG_BOOTX_TEXT) | ||
1301 | setup_disp_bat: | ||
1302 | /* | ||
1303 | * setup the display bat prepared for us in prom.c | ||
1304 | */ | ||
1305 | mflr r8 | ||
1306 | bl reloc_offset | ||
1307 | mtlr r8 | ||
1308 | addis r8,r3,disp_BAT@ha | ||
1309 | addi r8,r8,disp_BAT@l | ||
1310 | lwz r11,0(r8) | ||
1311 | lwz r8,4(r8) | ||
1312 | mfspr r9,SPRN_PVR | ||
1313 | rlwinm r9,r9,16,16,31 /* r9 = 1 for 601, 4 for 604 */ | ||
1314 | cmpwi 0,r9,1 | ||
1315 | beq 1f | ||
1316 | mtspr SPRN_DBAT3L,r8 | ||
1317 | mtspr SPRN_DBAT3U,r11 | ||
1318 | blr | ||
1319 | 1: mtspr SPRN_IBAT3L,r8 | ||
1320 | mtspr SPRN_IBAT3U,r11 | ||
1321 | blr | ||
1322 | |||
1323 | #endif /* !defined(CONFIG_APUS) && defined(CONFIG_BOOTX_TEXT) */ | ||
1324 | |||
1325 | 1297 | ||
1326 | #ifdef CONFIG_8260 | 1298 | #ifdef CONFIG_8260 |
1327 | /* Jump into the system reset for the rom. | 1299 | /* Jump into the system reset for the rom. |
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 911a803f27da..d9130c839039 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -1404,62 +1404,6 @@ static int __init prom_find_machine_type(void) | |||
1404 | #endif | 1404 | #endif |
1405 | } | 1405 | } |
1406 | 1406 | ||
1407 | static int __init setup_disp(phandle dp) | ||
1408 | { | ||
1409 | #if defined(CONFIG_BOOTX_TEXT) && defined(CONFIG_PPC32) | ||
1410 | int width = 640, height = 480, depth = 8, pitch; | ||
1411 | unsigned address; | ||
1412 | u32 addrs[8][5]; | ||
1413 | int i, naddrs; | ||
1414 | char name[32]; | ||
1415 | char *getprop = "getprop"; | ||
1416 | |||
1417 | prom_printf("Initializing screen: "); | ||
1418 | |||
1419 | memset(name, 0, sizeof(name)); | ||
1420 | call_prom(getprop, 4, 1, dp, "name", name, sizeof(name)); | ||
1421 | name[sizeof(name)-1] = 0; | ||
1422 | prom_print(name); | ||
1423 | prom_print("\n"); | ||
1424 | call_prom(getprop, 4, 1, dp, "width", &width, sizeof(width)); | ||
1425 | call_prom(getprop, 4, 1, dp, "height", &height, sizeof(height)); | ||
1426 | call_prom(getprop, 4, 1, dp, "depth", &depth, sizeof(depth)); | ||
1427 | pitch = width * ((depth + 7) / 8); | ||
1428 | call_prom(getprop, 4, 1, dp, "linebytes", | ||
1429 | &pitch, sizeof(pitch)); | ||
1430 | if (pitch == 1) | ||
1431 | pitch = 0x1000; /* for strange IBM display */ | ||
1432 | address = 0; | ||
1433 | call_prom(getprop, 4, 1, dp, "address", &address, sizeof(address)); | ||
1434 | if (address == 0) { | ||
1435 | /* look for an assigned address with a size of >= 1MB */ | ||
1436 | naddrs = call_prom(getprop, 4, 1, dp, "assigned-addresses", | ||
1437 | addrs, sizeof(addrs)); | ||
1438 | naddrs /= 20; | ||
1439 | for (i = 0; i < naddrs; ++i) { | ||
1440 | if (addrs[i][4] >= (1 << 20)) { | ||
1441 | address = addrs[i][2]; | ||
1442 | /* use the BE aperture if possible */ | ||
1443 | if (addrs[i][4] >= (16 << 20)) | ||
1444 | address += (8 << 20); | ||
1445 | break; | ||
1446 | } | ||
1447 | } | ||
1448 | if (address == 0) { | ||
1449 | prom_print("Failed to get address\n"); | ||
1450 | return 0; | ||
1451 | } | ||
1452 | } | ||
1453 | /* kludge for valkyrie */ | ||
1454 | if (strcmp(name, "valkyrie") == 0) | ||
1455 | address += 0x1000; | ||
1456 | |||
1457 | prom_printf("\n\n\n\naddress = %x\n", address); | ||
1458 | btext_setup_display(width, height, depth, pitch, address); | ||
1459 | #endif /* CONFIG_BOOTX_TEXT && CONFIG_PPC32 */ | ||
1460 | return 1; | ||
1461 | } | ||
1462 | |||
1463 | static int __init prom_set_color(ihandle ih, int i, int r, int g, int b) | 1407 | static int __init prom_set_color(ihandle ih, int i, int r, int g, int b) |
1464 | { | 1408 | { |
1465 | return call_prom("call-method", 6, 1, ADDR("color!"), ih, i, b, g, r); | 1409 | return call_prom("call-method", 6, 1, ADDR("color!"), ih, i, b, g, r); |
@@ -1479,7 +1423,6 @@ static void __init prom_check_displays(void) | |||
1479 | phandle node; | 1423 | phandle node; |
1480 | ihandle ih; | 1424 | ihandle ih; |
1481 | int i; | 1425 | int i; |
1482 | int got_display = 0; | ||
1483 | 1426 | ||
1484 | static unsigned char default_colors[] = { | 1427 | static unsigned char default_colors[] = { |
1485 | 0x00, 0x00, 0x00, | 1428 | 0x00, 0x00, 0x00, |
@@ -1546,8 +1489,6 @@ static void __init prom_check_displays(void) | |||
1546 | clut[2]) != 0) | 1489 | clut[2]) != 0) |
1547 | break; | 1490 | break; |
1548 | #endif /* CONFIG_LOGO_LINUX_CLUT224 */ | 1491 | #endif /* CONFIG_LOGO_LINUX_CLUT224 */ |
1549 | if (!got_display) | ||
1550 | got_display = setup_disp(node); | ||
1551 | } | 1492 | } |
1552 | } | 1493 | } |
1553 | 1494 | ||
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index bfa155c00ea5..e68f848f24bf 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
@@ -294,8 +294,6 @@ unsigned long __init early_init(unsigned long dt_ptr) | |||
294 | { | 294 | { |
295 | unsigned long offset = reloc_offset(); | 295 | unsigned long offset = reloc_offset(); |
296 | 296 | ||
297 | reloc_got2(offset); | ||
298 | |||
299 | /* | 297 | /* |
300 | * Identify the CPU type and fix up code sections | 298 | * Identify the CPU type and fix up code sections |
301 | * that depend on which cpu we have. | 299 | * that depend on which cpu we have. |
@@ -303,12 +301,6 @@ unsigned long __init early_init(unsigned long dt_ptr) | |||
303 | identify_cpu(offset, 0); | 301 | identify_cpu(offset, 0); |
304 | do_cpu_ftr_fixups(offset); | 302 | do_cpu_ftr_fixups(offset); |
305 | 303 | ||
306 | #ifdef CONFIG_BOOTX_TEXT | ||
307 | btext_prepare_BAT(); | ||
308 | #endif | ||
309 | |||
310 | reloc_got2(-offset); | ||
311 | |||
312 | return KERNELBASE + offset; | 304 | return KERNELBASE + offset; |
313 | } | 305 | } |
314 | 306 | ||
@@ -578,13 +570,13 @@ void __init setup_arch(char **cmdline_p) | |||
578 | /* so udelay does something sensible, assume <= 1000 bogomips */ | 570 | /* so udelay does something sensible, assume <= 1000 bogomips */ |
579 | loops_per_jiffy = 500000000 / HZ; | 571 | loops_per_jiffy = 500000000 / HZ; |
580 | 572 | ||
581 | #ifdef CONFIG_BOOTX_TEXT | ||
582 | map_boot_text(); | ||
583 | #endif | ||
584 | |||
585 | unflatten_device_tree(); | 573 | unflatten_device_tree(); |
586 | finish_device_tree(); | 574 | finish_device_tree(); |
587 | 575 | ||
576 | #ifdef CONFIG_BOOTX_TEXT | ||
577 | init_boot_display(); | ||
578 | #endif | ||
579 | |||
588 | #ifdef CONFIG_PPC_MULTIPLATFORM | 580 | #ifdef CONFIG_PPC_MULTIPLATFORM |
589 | /* This could be called "early setup arch", it must be done | 581 | /* This could be called "early setup arch", it must be done |
590 | * now because xmon need it | 582 | * now because xmon need it |
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c index bf13c14e66b3..caeb02ee72c5 100644 --- a/arch/powerpc/mm/init_32.c +++ b/arch/powerpc/mm/init_32.c | |||
@@ -188,13 +188,6 @@ void __init MMU_init(void) | |||
188 | 188 | ||
189 | if (ppc_md.progress) | 189 | if (ppc_md.progress) |
190 | ppc_md.progress("MMU:exit", 0x211); | 190 | ppc_md.progress("MMU:exit", 0x211); |
191 | |||
192 | #ifdef CONFIG_BOOTX_TEXT | ||
193 | /* By default, we are no longer mapped */ | ||
194 | boot_text_mapped = 0; | ||
195 | /* Must be done last, or ppc_md.progress will die. */ | ||
196 | map_boot_text(); | ||
197 | #endif | ||
198 | } | 191 | } |
199 | 192 | ||
200 | /* This is only called until mem_init is done. */ | 193 | /* This is only called until mem_init is done. */ |