Merge ../linux-2.6
[safe/jmp/linux-2.6] / arch / ppc / platforms / prep_setup.c
index 8bc734f..e86f615 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/platforms/setup.c
- *
  *  Copyright (C) 1995  Linus Torvalds
  *  Adapted from 'alpha' version by Gary Thomas
  *  Modified by Cort Dougan (cort@cs.nmt.edu)
 #include <asm/pci-bridge.h>
 #include <asm/todc.h>
 
+/* prep registers for L2 */
+#define CACHECRBA       0x80000823      /* Cache configuration register address */
+#define L2CACHE_MASK   0x03    /* Mask for 2 L2 Cache bits */
+#define L2CACHE_512KB  0x00    /* 512KB */
+#define L2CACHE_256KB  0x01    /* 256KB */
+#define L2CACHE_1MB    0x02    /* 1MB */
+#define L2CACHE_NONE   0x03    /* NONE */
+#define L2CACHE_PARITY  0x08    /* Mask for L2 Cache Parity Protected bit */
+
 TODC_ALLOC();
 
-unsigned char ucSystemType;
 unsigned char ucBoardRev;
 unsigned char ucBoardRevMaj, ucBoardRevMin;
 
@@ -730,7 +736,7 @@ ibm_statusled_progress(char *s, unsigned short hex)
                hex = 0xfff;
                if (!notifier_installed) {
                        ++notifier_installed;
-                       notifier_chain_register(&panic_notifier_list,
+                       atomic_notifier_chain_register(&panic_notifier_list,
                                                &ibm_statusled_block);
                }
        }
@@ -942,23 +948,9 @@ prep_calibrate_decr(void)
                todc_calibrate_decr();
 }
 
-static unsigned int
-prep_irq_canonicalize(u_int irq)
-{
-       if (irq == 2)
-       {
-               return 9;
-       }
-       else
-       {
-               return irq;
-       }
-}
-
 static void __init
 prep_init_IRQ(void)
 {
-       int i;
        unsigned int pci_viddid, pci_did;
 
        if (OpenPIC_Addr != NULL) {
@@ -967,11 +959,9 @@ prep_init_IRQ(void)
                openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade",
                                       i8259_irq);
        }
-       for ( i = 0 ; i < NUM_8259_INTERRUPTS ; i++ )
-               irq_desc[i].handler = &i8259_pic;
 
        if (have_residual_data) {
-               i8259_init(residual_isapic_addr());
+               i8259_init(residual_isapic_addr(), 0);
                return;
        }
 
@@ -982,11 +972,11 @@ prep_init_IRQ(void)
        if (((pci_viddid & 0xffff) == PCI_VENDOR_ID_MOTOROLA)
                        && ((pci_did == PCI_DEVICE_ID_MOTOROLA_RAVEN)
                                || (pci_did == PCI_DEVICE_ID_MOTOROLA_HAWK)))
-               i8259_init(0);
+               i8259_init(0, 0);
        else
                /* PCI interrupt ack address given in section 6.1.8 of the
                 * PReP specification. */
-               i8259_init(MPC10X_MAPA_PCI_INTACK_ADDR);
+               i8259_init(MPC10X_MAPA_PCI_INTACK_ADDR, 0);
 }
 
 #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
@@ -1077,15 +1067,13 @@ prep_map_io(void)
 static int __init
 prep_request_io(void)
 {
-       if (_machine == _MACH_prep) {
 #ifdef CONFIG_NVRAM
-               request_region(PREP_NVRAM_AS0, 0x8, "nvram");
+       request_region(PREP_NVRAM_AS0, 0x8, "nvram");
 #endif
-               request_region(0x00,0x20,"dma1");
-               request_region(0x40,0x20,"timer");
-               request_region(0x80,0x10,"dma page reg");
-               request_region(0xc0,0x20,"dma2");
-       }
+       request_region(0x00,0x20,"dma1");
+       request_region(0x40,0x20,"timer");
+       request_region(0x80,0x10,"dma page reg");
+       request_region(0xc0,0x20,"dma2");
 
        return 0;
 }
@@ -1110,6 +1098,7 @@ prep_init(unsigned long r3, unsigned long r4, unsigned long r5,
        ISA_DMA_THRESHOLD = 0x00ffffff;
        DMA_MODE_READ = 0x44;
        DMA_MODE_WRITE = 0x48;
+       ppc_do_canonicalize_irqs = 1;
 
        /* figure out what kind of prep workstation we are */
        if (have_residual_data) {
@@ -1136,7 +1125,6 @@ prep_init(unsigned long r3, unsigned long r4, unsigned long r5,
        ppc_md.setup_arch     = prep_setup_arch;
        ppc_md.show_percpuinfo = prep_show_percpuinfo;
        ppc_md.show_cpuinfo   = NULL; /* set in prep_setup_arch() */
-       ppc_md.irq_canonicalize = prep_irq_canonicalize;
        ppc_md.init_IRQ       = prep_init_IRQ;
        /* this gets changed later on if we have an OpenPIC -- Cort */
        ppc_md.get_irq        = i8259_irq;
@@ -1173,6 +1161,6 @@ prep_init(unsigned long r3, unsigned long r4, unsigned long r5,
 #endif
 
 #ifdef CONFIG_SMP
-       ppc_md.smp_ops           = &prep_smp_ops;
+       smp_ops                  = &prep_smp_ops;
 #endif /* CONFIG_SMP */
 }