Merge branches 'release' and 'ppc-workaround' into release
[sfrench/cifs-2.6.git] / arch / arm / mach-ixp4xx / common-pci.c
index 6e3462ed53062ecfc5e032f6c22d9ae6975c0f1e..bf04121d1a31748ac99b93f4b2982f5b4675103e 100644 (file)
@@ -374,7 +374,7 @@ void __init ixp4xx_pci_preinit(void)
         * Determine which PCI read method to use.
         * Rev 0 IXP425 requires workaround.
         */
-       if (!(processor_id & 0xf) && !cpu_is_ixp46x()) {
+       if (!(processor_id & 0xf) && cpu_is_ixp42x()) {
                printk("PCI: IXP42x A0 silicon detected - "
                        "PCI Non-Prefetch Workaround Enabled\n");
                ixp4xx_pci_read = ixp4xx_pci_read_errata;
@@ -463,7 +463,7 @@ int ixp4xx_setup(int nr, struct pci_sys_data *sys)
        if (nr >= 1)
                return 0;
 
-       res = kmalloc(sizeof(*res) * 2, GFP_KERNEL);
+       res = kzalloc(sizeof(*res) * 2, GFP_KERNEL);
        if (res == NULL) {
                /* 
                 * If we're out of memory this early, something is wrong,
@@ -471,7 +471,6 @@ int ixp4xx_setup(int nr, struct pci_sys_data *sys)
                 */
                panic("PCI: unable to allocate resources?\n");
        }
-       memset(res, 0, sizeof(*res) * 2);
 
        local_write_config(PCI_COMMAND, 2, PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY);
 
@@ -481,7 +480,7 @@ int ixp4xx_setup(int nr, struct pci_sys_data *sys)
        res[0].flags = IORESOURCE_IO;
 
        res[1].name = "PCI Memory Space";
-       res[1].start = 0x48000000;
+       res[1].start = PCIBIOS_MIN_MEM;
 #ifndef CONFIG_IXP4XX_INDIRECT_PCI
        res[1].end = 0x4bffffff;
 #else
@@ -533,8 +532,6 @@ pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
        return -EIO;
 }
 
-EXPORT_SYMBOL(pci_set_dma_mask);
-EXPORT_SYMBOL(pci_set_consistent_dma_mask);
 EXPORT_SYMBOL(ixp4xx_pci_read);
 EXPORT_SYMBOL(ixp4xx_pci_write);