Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 87977
b: refs/heads/master
c: cf7b7e0
h: refs/heads/master
i:
  87975: 1b3608e
v: v3
  • Loading branch information
Thomas Bogendoerfer authored and Ralf Baechle committed Apr 1, 2008
1 parent 833d67e commit b2dca1c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 447cdf2628b59aa513a42785450b348dced26d8a
refs/heads/master: cf7b7e0b3718418b38e1c20f5236534402e5a6c0
6 changes: 4 additions & 2 deletions trunk/arch/mips/pci/pci-bcm1480.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,16 @@ static struct resource bcm1480_mem_resource = {

static struct resource bcm1480_io_resource = {
.name = "BCM1480 PCI I/O",
.start = 0x2c000000UL,
.end = 0x2dffffffUL,
.start = A_BCM1480_PHYS_PCI_IO_MATCH_BYTES,
.end = A_BCM1480_PHYS_PCI_IO_MATCH_BYTES + 0x1ffffffUL,
.flags = IORESOURCE_IO,
};

struct pci_controller bcm1480_controller = {
.pci_ops = &bcm1480_pci_ops,
.mem_resource = &bcm1480_mem_resource,
.io_resource = &bcm1480_io_resource,
.io_offset = A_BCM1480_PHYS_PCI_IO_MATCH_BYTES,
};


Expand Down Expand Up @@ -251,6 +252,7 @@ static int __init bcm1480_pcibios_init(void)

bcm1480_controller.io_map_base = (unsigned long)
ioremap(A_BCM1480_PHYS_PCI_IO_MATCH_BYTES, 65536);
bcm1480_controller.io_map_base -= bcm1480_controller.io_offset;
set_io_port_base(bcm1480_controller.io_map_base);
isa_slot_offset = (unsigned long)
ioremap(A_BCM1480_PHYS_PCI_MEM_MATCH_BYTES, 1024*1024);
Expand Down
21 changes: 7 additions & 14 deletions trunk/arch/mips/pci/pci-bcm1480ht.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ static struct resource bcm1480ht_mem_resource = {

static struct resource bcm1480ht_io_resource = {
.name = "BCM1480 HT I/O",
.start = 0x00000000UL,
.end = 0x01ffffffUL,
.start = A_BCM1480_PHYS_HT_IO_MATCH_BYTES,
.end = A_BCM1480_PHYS_HT_IO_MATCH_BYTES + 0x01ffffffUL,
.flags = IORESOURCE_IO,
};

Expand All @@ -191,29 +191,22 @@ struct pci_controller bcm1480ht_controller = {
.io_resource = &bcm1480ht_io_resource,
.index = 1,
.get_busno = bcm1480ht_pcibios_get_busno,
.io_offset = A_BCM1480_PHYS_HT_IO_MATCH_BYTES,
};

static int __init bcm1480ht_pcibios_init(void)
{
uint32_t cmdreg;

ht_cfg_space = ioremap(A_BCM1480_PHYS_HT_CFG_MATCH_BITS, 16*1024*1024);

/*
* See if the PCI bus has been configured by the firmware.
*/
cmdreg = READCFG32(CFGOFFSET(0, PCI_DEVFN(PCI_BRIDGE_DEVICE, 0),
PCI_COMMAND));
if (!(cmdreg & PCI_COMMAND_MASTER)) {
printk("HT: Skipping HT probe. Bus is not initialized.\n");
iounmap(ht_cfg_space);
return 1; /* XXX */
}
/* CFE doesn't always init all HT paths, so we always scan */
bcm1480ht_bus_status |= PCI_BUS_ENABLED;

ht_eoi_space = (unsigned long)
ioremap(A_BCM1480_PHYS_HT_SPECIAL_MATCH_BYTES,
4 * 1024 * 1024);
bcm1480ht_controller.io_map_base = (unsigned long)
ioremap(A_BCM1480_PHYS_HT_IO_MATCH_BYTES, 65536);
bcm1480ht_controller.io_map_base -= bcm1480ht_controller.io_offset;

register_pci_controller(&bcm1480ht_controller);

Expand Down

0 comments on commit b2dca1c

Please sign in to comment.