bl      flush_tlbs
 
        bl      initial_bats
-#if !defined(CONFIG_APUS) && defined(CONFIG_BOOTX_TEXT)
-       bl      setup_disp_bat
-#endif
 
 /*
  * Call setup_cpu for CPU 0 and initialize 6xx Idle
        isync
        blr
 
-#if !defined(CONFIG_APUS) && defined(CONFIG_BOOTX_TEXT)
-setup_disp_bat:
-       /*
-        * setup the display bat prepared for us in prom.c
-        */
-       mflr    r8
-       bl      reloc_offset
-       mtlr    r8
-       addis   r8,r3,disp_BAT@ha
-       addi    r8,r8,disp_BAT@l
-       lwz     r11,0(r8)
-       lwz     r8,4(r8)
-       mfspr   r9,SPRN_PVR
-       rlwinm  r9,r9,16,16,31          /* r9 = 1 for 601, 4 for 604 */
-       cmpwi   0,r9,1
-       beq     1f
-       mtspr   SPRN_DBAT3L,r8
-       mtspr   SPRN_DBAT3U,r11
-       blr
-1:     mtspr   SPRN_IBAT3L,r8
-       mtspr   SPRN_IBAT3U,r11
-       blr
-
-#endif /* !defined(CONFIG_APUS) && defined(CONFIG_BOOTX_TEXT) */
-
 
 #ifdef CONFIG_8260
 /* Jump into the system reset for the rom.
 
 #endif
 }
 
-static int __init setup_disp(phandle dp)
-{
-#if defined(CONFIG_BOOTX_TEXT) && defined(CONFIG_PPC32)
-       int width = 640, height = 480, depth = 8, pitch;
-       unsigned address;
-       u32 addrs[8][5];
-       int i, naddrs;
-       char name[32];
-       char *getprop = "getprop";
-
-       prom_printf("Initializing screen: ");
-
-       memset(name, 0, sizeof(name));
-       call_prom(getprop, 4, 1, dp, "name", name, sizeof(name));
-       name[sizeof(name)-1] = 0;
-       prom_print(name);
-       prom_print("\n");
-       call_prom(getprop, 4, 1, dp, "width", &width, sizeof(width));
-       call_prom(getprop, 4, 1, dp, "height", &height, sizeof(height));
-       call_prom(getprop, 4, 1, dp, "depth", &depth, sizeof(depth));
-       pitch = width * ((depth + 7) / 8);
-       call_prom(getprop, 4, 1, dp, "linebytes",
-                 &pitch, sizeof(pitch));
-       if (pitch == 1)
-               pitch = 0x1000;         /* for strange IBM display */
-       address = 0;
-       call_prom(getprop, 4, 1, dp, "address", &address, sizeof(address));
-       if (address == 0) {
-               /* look for an assigned address with a size of >= 1MB */
-               naddrs = call_prom(getprop, 4, 1, dp, "assigned-addresses",
-                                  addrs, sizeof(addrs));
-               naddrs /= 20;
-               for (i = 0; i < naddrs; ++i) {
-                       if (addrs[i][4] >= (1 << 20)) {
-                               address = addrs[i][2];
-                               /* use the BE aperture if possible */
-                               if (addrs[i][4] >= (16 << 20))
-                                       address += (8 << 20);
-                               break;
-                       }
-               }
-               if (address == 0) {
-                       prom_print("Failed to get address\n");
-                       return 0;
-               }
-       }
-       /* kludge for valkyrie */
-       if (strcmp(name, "valkyrie") == 0)
-               address += 0x1000;
-
-       prom_printf("\n\n\n\naddress = %x\n", address);
-       btext_setup_display(width, height, depth, pitch, address);
-#endif /* CONFIG_BOOTX_TEXT && CONFIG_PPC32 */
-       return 1;
-}
-
 static int __init prom_set_color(ihandle ih, int i, int r, int g, int b)
 {
        return call_prom("call-method", 6, 1, ADDR("color!"), ih, i, b, g, r);
        phandle node;
        ihandle ih;
        int i;
-       int got_display = 0;
 
        static unsigned char default_colors[] = {
                0x00, 0x00, 0x00,
                                           clut[2]) != 0)
                                break;
 #endif /* CONFIG_LOGO_LINUX_CLUT224 */
-               if (!got_display)
-                       got_display = setup_disp(node);
        }
 }
 
 
 {
        unsigned long offset = reloc_offset();
 
-       reloc_got2(offset);
-
        /*
         * Identify the CPU type and fix up code sections
         * that depend on which cpu we have.
        identify_cpu(offset, 0);
        do_cpu_ftr_fixups(offset);
 
-#ifdef CONFIG_BOOTX_TEXT
-       btext_prepare_BAT();
-#endif
-
-       reloc_got2(-offset);
-
        return KERNELBASE + offset;
 }
 
        /* so udelay does something sensible, assume <= 1000 bogomips */
        loops_per_jiffy = 500000000 / HZ;
 
-#ifdef CONFIG_BOOTX_TEXT
-       map_boot_text();
-#endif
-
        unflatten_device_tree();
        finish_device_tree();
 
+#ifdef CONFIG_BOOTX_TEXT
+       init_boot_display();
+#endif
+
 #ifdef CONFIG_PPC_MULTIPLATFORM
        /* This could be called "early setup arch", it must be done
         * now because xmon need it