Merge from Linus' tree
authorPaul Mackerras <paulus@samba.org>
Wed, 12 Oct 2005 04:43:32 +0000 (14:43 +1000)
committerPaul Mackerras <paulus@samba.org>
Wed, 12 Oct 2005 04:43:32 +0000 (14:43 +1000)
22 files changed:
1  2 
arch/powerpc/platforms/pseries/pci.c
arch/ppc/platforms/4xx/ebony.c
arch/ppc/platforms/chestnut.c
arch/ppc/platforms/chrp_setup.c
arch/ppc/platforms/gemini_setup.c
arch/ppc/platforms/pmac_cpufreq.c
arch/ppc/platforms/pmac_feature.c
arch/ppc/platforms/pmac_setup.c
arch/ppc/platforms/pmac_time.c
arch/ppc/platforms/pplus.c
arch/ppc/platforms/radstone_ppc7d.c
arch/ppc/platforms/sandpoint.c
arch/ppc/syslib/open_pic.c
arch/ppc/syslib/open_pic2.c
arch/ppc/syslib/ppc4xx_setup.c
arch/ppc64/kernel/bpa_iommu.c
arch/ppc64/kernel/kprobes.c
arch/ppc64/kernel/pci_direct_iommu.c
arch/ppc64/kernel/pci_iommu.c
drivers/macintosh/smu.c
include/asm-ppc/io.h
include/asm-ppc64/iommu.h

index 2dd477e,0000000..c198656
mode 100644,000000..100644
--- /dev/null
@@@ -1,142 -1,0 +1,142 @@@
- static int __initdata s7a_workaround = -1;
 +/*
 + * arch/ppc64/kernel/pSeries_pci.c
 + *
 + * Copyright (C) 2001 Dave Engebretsen, IBM Corporation
 + * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM
 + *
 + * pSeries specific routines for PCI.
 + * 
 + * This program is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
 + * the Free Software Foundation; either version 2 of the License, or
 + * (at your option) any later version.
 + *    
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU General Public License for more details.
 + * 
 + * You should have received a copy of the GNU General Public License
 + * along with this program; if not, write to the Free Software
 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 + */
 +
 +#include <linux/init.h>
 +#include <linux/ioport.h>
 +#include <linux/kernel.h>
 +#include <linux/pci.h>
 +#include <linux/string.h>
 +
 +#include <asm/pci-bridge.h>
 +#include <asm/prom.h>
 +#include <asm/ppc-pci.h>
 +
- static void __init check_s7a(void)
++static int __devinitdata s7a_workaround = -1;
 +
 +#if 0
 +void pcibios_name_device(struct pci_dev *dev)
 +{
 +      struct device_node *dn;
 +
 +      /*
 +       * Add IBM loc code (slot) as a prefix to the device names for service
 +       */
 +      dn = pci_device_to_OF_node(dev);
 +      if (dn) {
 +              char *loc_code = get_property(dn, "ibm,loc-code", 0);
 +              if (loc_code) {
 +                      int loc_len = strlen(loc_code);
 +                      if (loc_len < sizeof(dev->dev.name)) {
 +                              memmove(dev->dev.name+loc_len+1, dev->dev.name,
 +                                      sizeof(dev->dev.name)-loc_len-1);
 +                              memcpy(dev->dev.name, loc_code, loc_len);
 +                              dev->dev.name[loc_len] = ' ';
 +                              dev->dev.name[sizeof(dev->dev.name)-1] = '\0';
 +                      }
 +              }
 +      }
 +}   
 +DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pcibios_name_device);
 +#endif
 +
++static void __devinit check_s7a(void)
 +{
 +      struct device_node *root;
 +      char *model;
 +
 +      s7a_workaround = 0;
 +      root = of_find_node_by_path("/");
 +      if (root) {
 +              model = get_property(root, "model", NULL);
 +              if (model && !strcmp(model, "IBM,7013-S7A"))
 +                      s7a_workaround = 1;
 +              of_node_put(root);
 +      }
 +}
 +
 +void __devinit pSeries_irq_bus_setup(struct pci_bus *bus)
 +{
 +      struct pci_dev *dev;
 +
 +      if (s7a_workaround < 0)
 +              check_s7a();
 +      list_for_each_entry(dev, &bus->devices, bus_list) {
 +              pci_read_irq_line(dev);
 +              if (s7a_workaround) {
 +                      if (dev->irq > 16) {
 +                              dev->irq -= 3;
 +                              pci_write_config_byte(dev, PCI_INTERRUPT_LINE,
 +                                      dev->irq);
 +                      }
 +              }
 +      }
 +}
 +
 +static void __init pSeries_request_regions(void)
 +{
 +      if (!isa_io_base)
 +              return;
 +
 +      request_region(0x20,0x20,"pic1");
 +      request_region(0xa0,0x20,"pic2");
 +      request_region(0x00,0x20,"dma1");
 +      request_region(0x40,0x20,"timer");
 +      request_region(0x80,0x10,"dma page reg");
 +      request_region(0xc0,0x20,"dma2");
 +}
 +
 +void __init pSeries_final_fixup(void)
 +{
 +      phbs_remap_io();
 +      pSeries_request_regions();
 +
 +      pci_addr_cache_build();
 +}
 +
 +/*
 + * Assume the winbond 82c105 is the IDE controller on a
 + * p610.  We should probably be more careful in case
 + * someone tries to plug in a similar adapter.
 + */
 +static void fixup_winbond_82c105(struct pci_dev* dev)
 +{
 +      int i;
 +      unsigned int reg;
 +
 +      if (!(systemcfg->platform & PLATFORM_PSERIES))
 +              return;
 +
 +      printk("Using INTC for W82c105 IDE controller.\n");
 +      pci_read_config_dword(dev, 0x40, &reg);
 +      /* Enable LEGIRQ to use INTC instead of ISA interrupts */
 +      pci_write_config_dword(dev, 0x40, reg | (1<<11));
 +
 +      for (i = 0; i < DEVICE_COUNT_RESOURCE; ++i) {
 +              /* zap the 2nd function of the winbond chip */
 +              if (dev->resource[i].flags & IORESOURCE_IO
 +                  && dev->bus->number == 0 && dev->devfn == 0x81)
 +                      dev->resource[i].flags &= ~IORESOURCE_IO;
 +      }
 +}
 +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105,
 +                       fixup_winbond_82c105);
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
  #include <asm/machdep.h>
  #include <asm/pmac_feature.h>
  #include <asm/abs_addr.h>
 -
 -#include "pci.h"
 +#include <asm/ppc-pci.h>
  
  static void *pci_direct_alloc_coherent(struct device *hwdev, size_t size,
-                                  dma_addr_t *dma_handle, unsigned int __nocast flag)
+                                  dma_addr_t *dma_handle, gfp_t flag)
  {
        void *ret;
  
Simple merge
Simple merge
Simple merge
Simple merge