Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
[pandora-kernel.git] / arch / mips / au1000 / common / pci.c
index 6c25e6c..ce77148 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * BRIEF MODULE DESCRIPTION
- *     Alchemy/AMD Au1x00 pci support.
+ *     Alchemy/AMD Au1x00 PCI support.
  *
- * Copyright 2001,2002,2003 MontaVista Software Inc.
+ * Copyright 2001-2003, 2007 MontaVista Software Inc.
  * Author: MontaVista Software, Inc.
  *             ppopov@mvista.com or source@mvista.com
  *
 
 /* TBD */
 static struct resource pci_io_resource = {
-       .start  = (resource_size_t)PCI_IO_START,
-       .end    = (resource_size_t)PCI_IO_END,
+       .start  = PCI_IO_START,
+       .end    = PCI_IO_END,
        .name   = "PCI IO space",
        .flags  = IORESOURCE_IO
 };
 
 static struct resource pci_mem_resource = {
-       .start  = (resource_size_t)PCI_MEM_START,
-       .end    = (resource_size_t)PCI_MEM_END,
+       .start  = PCI_MEM_START,
+       .end    = PCI_MEM_END,
        .name   = "PCI memory space",
        .flags  = IORESOURCE_MEM
 };
@@ -66,6 +66,8 @@ static unsigned long virt_io_addr;
 
 static int __init au1x_pci_setup(void)
 {
+       extern void au1x_pci_cfg_init(void);
+
 #if defined(CONFIG_SOC_AU1500) || defined(CONFIG_SOC_AU1550)
        virt_io_addr = (unsigned long)ioremap(Au1500_PCI_IO_START,
                        Au1500_PCI_IO_END - Au1500_PCI_IO_START + 1);
@@ -74,6 +76,7 @@ static int __init au1x_pci_setup(void)
                printk(KERN_ERR "Unable to ioremap pci space\n");
                return 1;
        }
+       au1x_controller.io_map_base = virt_io_addr;
 
 #ifdef CONFIG_DMA_NONCOHERENT
        {
@@ -93,6 +96,8 @@ static int __init au1x_pci_setup(void)
        set_io_port_base(virt_io_addr);
 #endif
 
+       au1x_pci_cfg_init();
+
        register_pci_controller(&au1x_controller);
        return 0;
 }