Merge branch 'for_paulus' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc
authorPaul Mackerras <paulus@samba.org>
Wed, 28 Jun 2006 06:10:53 +0000 (16:10 +1000)
committerPaul Mackerras <paulus@samba.org>
Wed, 28 Jun 2006 06:10:53 +0000 (16:10 +1000)
1  2 
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
arch/powerpc/platforms/86xx/mpc86xx_smp.c
arch/powerpc/platforms/86xx/pci.c
include/asm-powerpc/mpc86xx.h

index a9a8539ec0a259c07006c64c5e01bbf826997cb1,ac7f41802e940ae2d2ba439bb76c6b560f506406..ebae73eb00630f460a926e9b56dfbf004cd1756d
@@@ -12,6 -12,7 +12,6 @@@
   * option) any later version.
   */
  
 -#include <linux/config.h>
  #include <linux/stddef.h>
  #include <linux/kernel.h>
  #include <linux/pci.h>
@@@ -35,6 -36,7 +35,7 @@@
  #include <sysdev/fsl_soc.h>
  
  #include "mpc86xx.h"
+ #include "mpc8641_hpcn.h"
  
  #ifndef CONFIG_PCI
  unsigned long isa_io_base = 0;
@@@ -185,17 -187,130 +186,130 @@@ mpc86xx_map_irq(struct pci_dev *dev, un
        return PCI_IRQ_TABLE_LOOKUP + I8259_OFFSET;
  }
  
+ static void __devinit quirk_ali1575(struct pci_dev *dev)
+ {
+       unsigned short temp;
  
- int
- mpc86xx_exclude_device(u_char bus, u_char devfn)
+       /*
+        * ALI1575 interrupts route table setup:
+        *
+        * IRQ pin   IRQ#
+        * PIRQA ---- 3
+        * PIRQB ---- 4
+        * PIRQC ---- 5
+        * PIRQD ---- 6
+        * PIRQE ---- 9
+        * PIRQF ---- 10
+        * PIRQG ---- 11
+        * PIRQH ---- 12
+        *
+        * interrupts for PCI slot0 -- PIRQA / PIRQB / PIRQC / PIRQD
+        *                PCI slot1 -- PIRQB / PIRQC / PIRQD / PIRQA
+        */
+       pci_write_config_dword(dev, 0x48, 0xb9317542);
+       /* USB 1.1 OHCI controller 1, interrupt: PIRQE */
+       pci_write_config_byte(dev, 0x86, 0x0c);
+       /* USB 1.1 OHCI controller 2, interrupt: PIRQF */
+       pci_write_config_byte(dev, 0x87, 0x0d);
+       /* USB 1.1 OHCI controller 3, interrupt: PIRQH */
+       pci_write_config_byte(dev, 0x88, 0x0f);
+       /* USB 2.0 controller, interrupt: PIRQ7 */
+       pci_write_config_byte(dev, 0x74, 0x06);
+       /* Audio controller, interrupt: PIRQE */
+       pci_write_config_byte(dev, 0x8a, 0x0c);
+       /* Modem controller, interrupt: PIRQF */
+       pci_write_config_byte(dev, 0x8b, 0x0d);
+       /* HD audio controller, interrupt: PIRQG */
+       pci_write_config_byte(dev, 0x8c, 0x0e);
+       /* Serial ATA interrupt: PIRQD */
+       pci_write_config_byte(dev, 0x8d, 0x0b);
+       /* SMB interrupt: PIRQH */
+       pci_write_config_byte(dev, 0x8e, 0x0f);
+       /* PMU ACPI SCI interrupt: PIRQH */
+       pci_write_config_byte(dev, 0x8f, 0x0f);
+       /* Primary PATA IDE IRQ: 14
+        * Secondary PATA IDE IRQ: 15
+        */
+       pci_write_config_byte(dev, 0x44, 0x3d);
+       pci_write_config_byte(dev, 0x75, 0x0f);
+       /* Set IRQ14 and IRQ15 to legacy IRQs */
+       pci_read_config_word(dev, 0x46, &temp);
+       temp |= 0xc000;
+       pci_write_config_word(dev, 0x46, temp);
+       /* Set i8259 interrupt trigger
+        * IRQ 3:  Level
+        * IRQ 4:  Level
+        * IRQ 5:  Level
+        * IRQ 6:  Level
+        * IRQ 7:  Level
+        * IRQ 9:  Level
+        * IRQ 10: Level
+        * IRQ 11: Level
+        * IRQ 12: Level
+        * IRQ 14: Edge
+        * IRQ 15: Edge
+        */
+       outb(0xfa, 0x4d0);
+       outb(0x1e, 0x4d1);
+ }
+ static void __devinit quirk_uli5288(struct pci_dev *dev)
  {
- #if !defined(CONFIG_PCI)
-       if (bus == 0 && PCI_SLOT(devfn) == 0)
-               return PCIBIOS_DEVICE_NOT_FOUND;
- #endif
+       unsigned char c;
+       pci_read_config_byte(dev,0x83,&c);
+       c |= 0x80;
+       pci_write_config_byte(dev, 0x83, c);
+       pci_write_config_byte(dev, 0x09, 0x01);
+       pci_write_config_byte(dev, 0x0a, 0x06);
+       pci_read_config_byte(dev,0x83,&c);
+       c &= 0x7f;
+       pci_write_config_byte(dev, 0x83, c);
  
-       return PCIBIOS_SUCCESSFUL;
+       pci_read_config_byte(dev,0x84,&c);
+       c |= 0x01;
+       pci_write_config_byte(dev, 0x84, c);
  }
+ static void __devinit quirk_uli5229(struct pci_dev *dev)
+ {
+       unsigned short temp;
+       pci_write_config_word(dev, 0x04, 0x0405);
+       pci_read_config_word(dev, 0x4a, &temp);
+       temp |= 0x1000;
+       pci_write_config_word(dev, 0x4a, temp);
+ }
+ static void __devinit early_uli5249(struct pci_dev *dev)
+ {
+       unsigned char temp;
+       pci_write_config_word(dev, 0x04, 0x0007);
+       pci_read_config_byte(dev, 0x7c, &temp);
+       pci_write_config_byte(dev, 0x7c, 0x80);
+       pci_write_config_byte(dev, 0x09, 0x01);
+       pci_write_config_byte(dev, 0x7c, temp);
+       dev->class |= 0x1;
+ }
+ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575, quirk_ali1575);
+ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5288, quirk_uli5288);
+ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5229, quirk_uli5229);
+ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AL, 0x5249, early_uli5249);
  #endif /* CONFIG_PCI */
  
  
index 167f0401a1c57f1144b8419cdfd669f48b6d58ab,9cca3d1a67f2f31d7142b4d9f0d9bbe25c23c6ae..bb7fb41933ad8abe557ae857ceaaf5b8d3f22d53
@@@ -10,6 -10,7 +10,6 @@@
   * option) any later version.
   */
  
 -#include <linux/config.h>
  #include <linux/stddef.h>
  #include <linux/kernel.h>
  #include <linux/init.h>
@@@ -33,8 -34,8 +33,8 @@@ extern unsigned long __secondary_hold_a
  static void __init
  smp_86xx_release_core(int nr)
  {
-       void *mcm_vaddr;
-       unsigned long vaddr, pcr;
+       __be32 __iomem *mcm_vaddr;
+       unsigned long pcr;
  
        if (nr < 0 || nr >= NR_CPUS)
                return;
         */
        mcm_vaddr = ioremap(get_immrbase() + MPC86xx_MCM_OFFSET,
                            MPC86xx_MCM_SIZE);
-       vaddr = (unsigned long)mcm_vaddr +  MCM_PORT_CONFIG_OFFSET;
-       pcr = in_be32((volatile unsigned *)vaddr);
+       pcr = in_be32(mcm_vaddr + (MCM_PORT_CONFIG_OFFSET >> 2));
        pcr |= 1 << (nr + 24);
-       out_be32((volatile unsigned *)vaddr, pcr);
+       out_be32(mcm_vaddr + (MCM_PORT_CONFIG_OFFSET >> 2), pcr);
  }
  
  
index 6dfdcb8758782910165547685b4cbf15cb2c8c47,0d8b34089b9679fb81bff358082accc1b7e4be45..bc5139043112e934f340b2691dabddadad355abc
@@@ -12,6 -12,7 +12,6 @@@
   * option) any later version.
   */
  
 -#include <linux/config.h>
  #include <linux/types.h>
  #include <linux/module.h>
  #include <linux/init.h>
@@@ -121,15 -122,12 +121,12 @@@ static void __init setup_pcie_atmu(stru
  static void __init
  mpc86xx_setup_pcie(struct pci_controller *hose, u32 pcie_offset, u32 pcie_size)
  {
-       volatile struct ccsr_pex *pcie;
        u16 cmd;
        unsigned int temps;
  
        DBG("PCIE host controller register offset 0x%08x, size 0x%08x.\n",
                        pcie_offset, pcie_size);
  
-       pcie = ioremap(pcie_offset, pcie_size);
        early_read_config_word(hose, 0, 0, PCI_COMMAND, &cmd);
        cmd |= PCI_COMMAND_SERR | PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY
            | PCI_COMMAND_IO;
        early_write_config_dword(hose, 0, 0, PCI_PRIMARY_BUS, temps);
  }
  
+ int mpc86xx_exclude_device(u_char bus, u_char devfn)
+ {
+       if (bus == 0 && PCI_SLOT(devfn) == 0)
+               return PCIBIOS_DEVICE_NOT_FOUND;
+       return PCIBIOS_SUCCESSFUL;
+ }
  int __init add_bridge(struct device_node *dev)
  {
        int len;
  
        return 0;
  }
- static void __devinit quirk_ali1575(struct pci_dev *dev)
- {
-       unsigned short temp;
-       /*
-        * ALI1575 interrupts route table setup:
-        *
-        * IRQ pin   IRQ#
-        * PIRQA ---- 3
-        * PIRQB ---- 4
-        * PIRQC ---- 5
-        * PIRQD ---- 6
-        * PIRQE ---- 9
-        * PIRQF ---- 10
-        * PIRQG ---- 11
-        * PIRQH ---- 12
-        *
-        * interrupts for PCI slot0 -- PIRQA / PIRQB / PIRQC / PIRQD
-        *                PCI slot1 -- PIRQB / PIRQC / PIRQD / PIRQA
-        */
-       pci_write_config_dword(dev, 0x48, 0xb9317542);
-       /* USB 1.1 OHCI controller 1, interrupt: PIRQE */
-       pci_write_config_byte(dev, 0x86, 0x0c);
-       /* USB 1.1 OHCI controller 2, interrupt: PIRQF */
-       pci_write_config_byte(dev, 0x87, 0x0d);
-       /* USB 1.1 OHCI controller 3, interrupt: PIRQH */
-       pci_write_config_byte(dev, 0x88, 0x0f);
-       /* USB 2.0 controller, interrupt: PIRQ7 */
-       pci_write_config_byte(dev, 0x74, 0x06);
-       /* Audio controller, interrupt: PIRQE */
-       pci_write_config_byte(dev, 0x8a, 0x0c);
-       /* Modem controller, interrupt: PIRQF */
-       pci_write_config_byte(dev, 0x8b, 0x0d);
-       /* HD audio controller, interrupt: PIRQG */
-       pci_write_config_byte(dev, 0x8c, 0x0e);
-       /* Serial ATA interrupt: PIRQD */
-       pci_write_config_byte(dev, 0x8d, 0x0b);
-       /* SMB interrupt: PIRQH */
-       pci_write_config_byte(dev, 0x8e, 0x0f);
-       /* PMU ACPI SCI interrupt: PIRQH */
-       pci_write_config_byte(dev, 0x8f, 0x0f);
-       /* Primary PATA IDE IRQ: 14
-        * Secondary PATA IDE IRQ: 15
-        */
-       pci_write_config_byte(dev, 0x44, 0x3d);
-       pci_write_config_byte(dev, 0x75, 0x0f);
-       /* Set IRQ14 and IRQ15 to legacy IRQs */
-       pci_read_config_word(dev, 0x46, &temp);
-       temp |= 0xc000;
-       pci_write_config_word(dev, 0x46, temp);
-       /* Set i8259 interrupt trigger
-        * IRQ 3:  Level
-        * IRQ 4:  Level
-        * IRQ 5:  Level
-        * IRQ 6:  Level
-        * IRQ 7:  Level
-        * IRQ 9:  Level
-        * IRQ 10: Level
-        * IRQ 11: Level
-        * IRQ 12: Level
-        * IRQ 14: Edge
-        * IRQ 15: Edge
-        */
-       outb(0xfa, 0x4d0);
-       outb(0x1e, 0x4d1);
- }
- static void __devinit quirk_uli5288(struct pci_dev *dev)
- {
-       unsigned char c;
-       pci_read_config_byte(dev,0x83,&c);
-       c |= 0x80;
-       pci_write_config_byte(dev, 0x83, c);
-       pci_write_config_byte(dev, 0x09, 0x01);
-       pci_write_config_byte(dev, 0x0a, 0x06);
-       pci_read_config_byte(dev,0x83,&c);
-       c &= 0x7f;
-       pci_write_config_byte(dev, 0x83, c);
-       pci_read_config_byte(dev,0x84,&c);
-       c |= 0x01;
-       pci_write_config_byte(dev, 0x84, c);
- }
- static void __devinit quirk_uli5229(struct pci_dev *dev)
- {
-       unsigned short temp;
-       pci_write_config_word(dev, 0x04, 0x0405);
-       pci_read_config_word(dev, 0x4a, &temp);
-       temp |= 0x1000;
-       pci_write_config_word(dev, 0x4a, temp);
- }
- static void __devinit early_uli5249(struct pci_dev *dev)
- {
-       unsigned char temp;
-       pci_write_config_word(dev, 0x04, 0x0007);
-       pci_read_config_byte(dev, 0x7c, &temp);
-       pci_write_config_byte(dev, 0x7c, 0x80);
-       pci_write_config_byte(dev, 0x09, 0x01);
-       pci_write_config_byte(dev, 0x7c, temp);
-       dev->class |= 0x1;
- }
- DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575, quirk_ali1575);
- DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5288, quirk_uli5288);
- DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5229, quirk_uli5229);
- DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AL, 0x5249, early_uli5249);
index 1ed72f6b12102b6ab8f66da231120e22dadacbb2,00d72a7284e994bc692df6cd067739b3958113a6..f260382739faa81018e2f63c066432da9ece11a7
  #ifndef __ASM_POWERPC_MPC86xx_H__
  #define __ASM_POWERPC_MPC86xx_H__
  
 -#include <linux/config.h>
  #include <asm/mmu.h>
  
  #ifdef CONFIG_PPC_86xx
  
- #ifdef CONFIG_MPC8641_HPCN
- #include <platforms/86xx/mpc8641_hpcn.h>
- #endif
  #define _IO_BASE        isa_io_base
  #define _ISA_MEM_BASE   isa_mem_base
  #ifdef CONFIG_PCI