]> err.no Git - linux-2.6/blobdiff - arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
[POWERPC] Reworked interrupt numbers for OpenPIC based Freescale chips
[linux-2.6] / arch / powerpc / platforms / 86xx / mpc86xx_hpcn.c
index f42f801cf84ed6af33e7ed21b3110a8a93d0629f..5b01ec7c13dc518f83efb7fadd40f38273d36f99 100644 (file)
 #define DBG(fmt...) do { } while(0)
 #endif
 
-#ifndef CONFIG_PCI
-unsigned long isa_io_base = 0;
-unsigned long isa_mem_base = 0;
-unsigned long pci_dram_offset = 0;
-#endif
-
-
 #ifdef CONFIG_PCI
 static void mpc86xx_8259_cascade(unsigned int irq, struct irq_desc *desc)
 {
@@ -81,28 +74,15 @@ mpc86xx_hpcn_init_irq(void)
        /* Alloc mpic structure and per isu has 16 INT entries. */
        mpic1 = mpic_alloc(np, res.start,
                        MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
-                       16, NR_IRQS - 4,
-                       " MPIC     ");
+                       0, 256, " MPIC     ");
        BUG_ON(mpic1 == NULL);
 
-       mpic_assign_isu(mpic1, 0, res.start + 0x10000);
-
-       /* 48 Internal Interrupts */
-       mpic_assign_isu(mpic1, 1, res.start + 0x10200);
-       mpic_assign_isu(mpic1, 2, res.start + 0x10400);
-       mpic_assign_isu(mpic1, 3, res.start + 0x10600);
-
-       /* 16 External interrupts
-        * Moving them from [0 - 15] to [64 - 79]
-        */
-       mpic_assign_isu(mpic1, 4, res.start + 0x10000);
-
        mpic_init(mpic1);
 
 #ifdef CONFIG_PCI
        /* Initialize i8259 controller */
        for_each_node_by_type(np, "interrupt-controller")
-               if (device_is_compatible(np, "chrp,iic")) {
+               if (of_device_is_compatible(np, "chrp,iic")) {
                        cascade_node = np;
                        break;
                }
@@ -168,7 +148,7 @@ static void __devinit quirk_uli1575(struct pci_dev *dev)
 {
        unsigned short temp;
        struct pci_controller *hose = pci_bus_to_host(dev->bus);
-       unsigned char irq2pin[16];
+       unsigned char irq2pin[16], c;
        unsigned long pirq_map_word = 0;
        u32 irq;
        int i;
@@ -288,6 +268,11 @@ static void __devinit quirk_uli1575(struct pci_dev *dev)
        outb(0x1e, 0x4d1);
 
 #undef ULI1575_SET_DEV_IRQ
+
+       /* Disable the HD interface and enable the AC97 interface. */
+       pci_read_config_byte(dev, 0xb8, &c);
+       c &= 0x7f;
+       pci_write_config_byte(dev, 0xb8, c);
 }
 
 static void __devinit quirk_uli5288(struct pci_dev *dev)
@@ -314,6 +299,7 @@ static void __devinit quirk_uli5229(struct pci_dev *dev)
 {
        unsigned short temp;
        pci_write_config_word(dev, 0x04, 0x0405);
+       dev->class &= ~0x5;
        pci_read_config_word(dev, 0x4a, &temp);
        temp |= 0x1000;
        pci_write_config_word(dev, 0x4a, temp);
@@ -349,7 +335,7 @@ mpc86xx_hpcn_setup_arch(void)
        if (np != 0) {
                const unsigned int *fp;
 
-               fp = get_property(np, "clock-frequency", NULL);
+               fp = of_get_property(np, "clock-frequency", NULL);
                if (fp != 0)
                        loops_per_jiffy = *fp / HZ;
                else
@@ -359,9 +345,7 @@ mpc86xx_hpcn_setup_arch(void)
 
 #ifdef CONFIG_PCI
        for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-               add_bridge(np);
-
-       ppc_md.pci_exclude_device = mpc86xx_exclude_device;
+               mpc86xx_add_bridge(np);
 #endif
 
        printk("MPC86xx HPCN board from Freescale Semiconductor\n");
@@ -384,7 +368,7 @@ mpc86xx_hpcn_show_cpuinfo(struct seq_file *m)
 
        root = of_find_node_by_path("/");
        if (root)
-               model = get_property(root, "model", NULL);
+               model = of_get_property(root, "model", NULL);
        seq_printf(m, "Machine\t\t: %s\n", model);
        of_node_put(root);