Skip to contentSkip to conversation

RFC: [MIPS] BCM1480HT set mips_io_port_base

PATCH Bjorn Helgaas 2 participants 2 messages Feb 24, 2010 MIPS

lore
Share & tools
lore
#0 lore raw

I don't see anywhere that BCM1480HT sets mips_io_port_base (but maybe I missed it). We *do* set bcm1480ht_controller.io_map_base, so pci_iomap() should work, but without mips_io_port_base, I don't think inb() et al. will work.

arch/mips/pci/pci-bcm1480ht.c +1 -0
index 0fd0222..021e959 100644
@@ -205,6 +205,7 @@ static int __init bcm1480ht_pcibios_init(void)
 			4 * 1024 * 1024);
 	bcm1480ht_controller.io_map_base = (unsigned long)
 		ioremap(A_BCM1480_PHYS_HT_IO_MATCH_BYTES, 65536);
+	set_io_port_base(bcm1480ht_controller.io_map_base);
 
 	register_pci_controller(&bcm1480ht_controller);
 
#1 lore raw
Quoted 4 lines · Bjorn Helgaas

I don't see anywhere that BCM1480HT sets mips_io_port_base (but maybe I missed it). We *do* set bcm1480ht_controller.io_map_base, so pci_iomap() should work, but without mips_io_port_base, I don't think inb() et al. will work.

there are two hoses on the BCM1480 one is a via the PCI host controller the other one via the hypertransport. set_io_port_base() is an old hack to get inX/outX drivers working. Drivers using in/out will only work for devices on the PCI host controller and will be broken for devies on the HT side. Your change will make the devices on the HT side working, but break the one on the PCI bus. Either way isn't too nice, but at least nobody had a problem with the current behaviour. So it might be better to not apply your patch.

Thomas.

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessary a
good idea.                                                [ RFC1925, 2.3 ]