aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/prom_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/prom_init.c')
-rw-r--r--arch/powerpc/kernel/prom_init.c59
1 files changed, 0 insertions, 59 deletions
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
1407static 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
1463static int __init prom_set_color(ihandle ih, int i, int r, int g, int b) 1407static 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