aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/pci/pci-bcm1480.c
diff options
context:
space:
mode:
authorAndrew Isaacson <adi@broadcom.com>2005-10-20 02:59:11 -0400
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 14:32:49 -0400
commit8a1417de9e11f9f577499cd4fe89fa35f4bf54fa (patch)
tree73194ecc1c84772aaf0296df7852a9e36a13cab6 /arch/mips/pci/pci-bcm1480.c
parentdc41f94f770904f1fd63488ce4d30722ea514aad (diff)
BCM1480 HT support
PCI support code for PLX 7250 PCI-X tunnel on BCM91480B BigSur board. Signed-Off-By: Andy Isaacson <adi@broadcom.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/pci/pci-bcm1480.c')
-rw-r--r--arch/mips/pci/pci-bcm1480.c21
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 @@
56static void *cfg_space; 56static 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
62static int bcm1480_bus_status = 0; 61static 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 */
96static int bcm1480_pci_can_access(struct pci_bus *bus, int devfn) 94static 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
176static struct resource bcm1480_mem_resource = { 177static 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
183static struct resource bcm1480_io_resource = { 184static 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