vserver 2.0 rc7
[linux-2.6.git] / arch / ppc / platforms / 85xx / stx_gp3.c
index 8b637e6..bc95836 100644 (file)
 #include <linux/root_dev.h>
 #include <linux/seq_file.h>
 #include <linux/serial.h>
+#include <linux/initrd.h>
 #include <linux/module.h>
 #include <linux/fsl_devices.h>
+#include <linux/interrupt.h>
 
 #include <asm/system.h>
 #include <asm/pgtable.h>
@@ -199,7 +201,6 @@ static void __init
 gp3_init_IRQ(void)
 {
        int i;
-       volatile cpm2_map_t *immap = cpm2_immr;
        bd_t *binfo = (bd_t *) __res;
 
        /*
@@ -225,24 +226,8 @@ gp3_init_IRQ(void)
         */
        openpic_init(MPC85xx_OPENPIC_IRQ_OFFSET);
 
-       /*
-        * Setup CPM2 PIC
-        */
-
-       /* disable all CPM interupts */
-       immap->im_intctl.ic_simrh = 0x0;
-       immap->im_intctl.ic_simrl = 0x0;
-
-       for (i = CPM_IRQ_OFFSET; i < (NR_CPM_INTS + CPM_IRQ_OFFSET); i++)
-               irq_desc[i].handler = &cpm2_pic;
-
-       /*
-        * Initialize the default interrupt mapping priorities,
-        * in case the boot rom changed something on us.
-        */
-       immap->im_intctl.ic_sicr = 0;
-       immap->im_intctl.ic_scprrh = 0x05309770;
-       immap->im_intctl.ic_scprrl = 0x05309770;
+       /* Setup CPM2 PIC */
+        cpm2_init_IRQ();
 
        setup_irq(MPC85xx_IRQ_CPM, &cpm2_irqaction);
 
@@ -261,31 +246,20 @@ gp3_show_cpuinfo(struct seq_file *m)
        /* get the core frequency */
        freq = binfo->bi_intfreq;
 
-       pvid = mfspr(PVR);
-       svid = mfspr(SVR);
+       pvid = mfspr(SPRN_PVR);
+       svid = mfspr(SPRN_SVR);
 
        memsize = total_memory;
 
        seq_printf(m, "Vendor\t\t: RPC Electronics STx \n");
-
-       switch (svid & 0xffff0000) {
-       case SVR_8540:
-               seq_printf(m, "Machine\t\t: GP3 - MPC8540\n");
-               break;
-       case SVR_8560:
-               seq_printf(m, "Machine\t\t: GP3 - MPC8560\n");
-               break;
-       default:
-               seq_printf(m, "Machine\t\t: unknown\n");
-               break;
-       }
+       seq_printf(m, "Machine\t\t: GP3 - MPC%s\n", cur_ppc_sys_spec->ppc_sys_name);
        seq_printf(m, "bus freq\t: %u.%.6u MHz\n", freq / 1000000,
                   freq % 1000000);
        seq_printf(m, "PVR\t\t: 0x%x\n", pvid);
        seq_printf(m, "SVR\t\t: 0x%x\n", svid);
 
        /* Display cpu Pll setting */
-       phid1 = mfspr(HID1);
+       phid1 = mfspr(SPRN_HID1);
        seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
 
        /* Display the amount of memory */
@@ -357,7 +331,7 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
                strcpy(cmd_line, (char *) (r6 + KERNELBASE));
        }
 
-       identify_ppc_sys_by_id(mfspr(SVR));
+       identify_ppc_sys_by_id(mfspr(SPRN_SVR));
 
        /* setup the PowerPC module struct */
        ppc_md.setup_arch = gp3_setup_arch;