diff options
Diffstat (limited to 'arch/mips/pci/pci-bcm1480.c')
-rw-r--r-- | arch/mips/pci/pci-bcm1480.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/arch/mips/pci/pci-bcm1480.c b/arch/mips/pci/pci-bcm1480.c index 12bb74454137..4905d8593d6d 100644 --- a/arch/mips/pci/pci-bcm1480.c +++ b/arch/mips/pci/pci-bcm1480.c | |||
@@ -56,13 +56,11 @@ | |||
56 | static void *cfg_space; | 56 | static void *cfg_space; |
57 | 57 | ||
58 | #define PCI_BUS_ENABLED 1 | 58 | #define PCI_BUS_ENABLED 1 |
59 | #define LDT_BUS_ENABLED 2 | 59 | #define PCI_DEVICE_MODE 2 |
60 | #define PCI_DEVICE_MODE 4 | ||
61 | 60 | ||
62 | static int bcm1480_bus_status = 0; | 61 | static int bcm1480_bus_status = 0; |
63 | 62 | ||
64 | #define PCI_BRIDGE_DEVICE 0 | 63 | #define PCI_BRIDGE_DEVICE 0 |
65 | #define LDT_BRIDGE_DEVICE 1 | ||
66 | 64 | ||
67 | /* | 65 | /* |
68 | * Read/write 32-bit values in config space. | 66 | * Read/write 32-bit values in config space. |
@@ -95,10 +93,13 @@ int pcibios_plat_dev_init(struct pci_dev *dev) | |||
95 | */ | 93 | */ |
96 | static int bcm1480_pci_can_access(struct pci_bus *bus, int devfn) | 94 | static int bcm1480_pci_can_access(struct pci_bus *bus, int devfn) |
97 | { | 95 | { |
96 | u32 devno; | ||
97 | |||
98 | if (!(bcm1480_bus_status & (PCI_BUS_ENABLED | PCI_DEVICE_MODE))) | 98 | if (!(bcm1480_bus_status & (PCI_BUS_ENABLED | PCI_DEVICE_MODE))) |
99 | return 0; | 99 | return 0; |
100 | 100 | ||
101 | if (bus->number == 0) { | 101 | if (bus->number == 0) { |
102 | devno = PCI_SLOT(devfn); | ||
102 | if (bcm1480_bus_status & PCI_DEVICE_MODE) | 103 | if (bcm1480_bus_status & PCI_DEVICE_MODE) |
103 | return 0; | 104 | return 0; |
104 | else | 105 | else |
@@ -175,15 +176,15 @@ struct pci_ops bcm1480_pci_ops = { | |||
175 | 176 | ||
176 | static struct resource bcm1480_mem_resource = { | 177 | static struct resource bcm1480_mem_resource = { |
177 | .name = "BCM1480 PCI MEM", | 178 | .name = "BCM1480 PCI MEM", |
178 | .start = 0x40000000UL, | 179 | .start = 0x30000000UL, |
179 | .end = 0x5fffffffUL, | 180 | .end = 0x3fffffffUL, |
180 | .flags = IORESOURCE_MEM, | 181 | .flags = IORESOURCE_MEM, |
181 | }; | 182 | }; |
182 | 183 | ||
183 | static struct resource bcm1480_io_resource = { | 184 | static struct resource bcm1480_io_resource = { |
184 | .name = "BCM1480 PCI I/O", | 185 | .name = "BCM1480 PCI I/O", |
185 | .start = 0x00000000UL, | 186 | .start = 0x2c000000UL, |
186 | .end = 0x01ffffffUL, | 187 | .end = 0x2dffffffUL, |
187 | .flags = IORESOURCE_IO, | 188 | .flags = IORESOURCE_IO, |
188 | }; | 189 | }; |
189 | 190 | ||
@@ -207,9 +208,9 @@ static int __init bcm1480_pcibios_init(void) | |||
207 | PCIBIOS_MIN_IO = 0x00008000UL; | 208 | PCIBIOS_MIN_IO = 0x00008000UL; |
208 | PCIBIOS_MIN_MEM = 0x01000000UL; | 209 | PCIBIOS_MIN_MEM = 0x01000000UL; |
209 | 210 | ||
210 | /* Set I/O resource limits. */ | 211 | /* Set I/O resource limits. - unlimited for now to accomodate HT */ |
211 | ioport_resource.end = 0x01ffffffUL; /* 32MB accessible by bcm1480 */ | 212 | ioport_resource.end = 0xffffffffUL; |
212 | iomem_resource.end = 0xffffffffUL; /* no HT support yet */ | 213 | iomem_resource.end = 0xffffffffUL; |
213 | 214 | ||
214 | cfg_space = ioremap(A_BCM1480_PHYS_PCI_CFG_MATCH_BITS, 16*1024*1024); | 215 | cfg_space = ioremap(A_BCM1480_PHYS_PCI_CFG_MATCH_BITS, 16*1024*1024); |
215 | 216 | ||