On Wed, Mar 31, 2010 at 05:18:21PM -0600, Bjorn Helgaas wrote: > On Wednesday 31 March 2010 04:56:53 pm Ira W. Snyder wrote: > > > Ok, dev_info() sounds fine. Here is the current output I produce, taking > > your comments into account. Does this look ok, or are there other tweaks > > I can do before resubmitting? > > > > [ 0.336026] pci 0000:00:00.0: host bridge window [bus 00] > > Maybe something like this (copying the ACPI output)? I would guess > that the 00.1 bridge actually passes a range of bus numbers, to allow > for plug-in cards with bridges on them. > > pci 0000:00:00.0 CNB20LE PCI Host Bridge (domain 0000 [bus 00]) > pci 0000:00:00.1 CNB20LE PCI Host Bridge (domain 0000 [bus 01-ff]) > > This is way beyond nit-picking even, but I like it when drivers produce > one-line "I found this device and here's what it is" output that's > distinguishable from the extra debug-type info like the memory & I/O > windows. > > > [ 0.340009] pci 0000:00:00.0: host bridge window [io 0x01f0-0x01f7] > > [ 0.344008] pci 0000:00:00.0: host bridge window [io 0x03f6] > > [ 0.348008] pci 0000:00:00.0: host bridge window [io 0x0170-0x0177] > > [ 0.352008] pci 0000:00:00.0: host bridge window [io 0x0376] > > Seems surprising that these are the only ports in the 0x0-0xcfff range > that are routed anywhere. I would naively expect them to be at least > subtractively decoded by one of the bridges, so all the legacy builtin > hardware (APICs, serial ports, etc) would still work, but the unused > stuff would be available for PCI. > I believe that the legacy IDE ports have a fixed address. See the drivers/ide/ide-legacy.c ide_legacy_init_one() function. The driver uses hardcoded fixed addresses. I don't really care about these devices on my board (I don't use them), nor would I expect anyone to try and hotplug an IDE controller which is soldered on the board. I tried to leave the possibility open, however I cannot verify that it even works. However, if I do not include the reservation of the legacy IDE IO ports, I get messages like this during kernel boot, and the IDE controller is disabled: [ 0.500137] pci 0000:00:0f.1: no compatible bridge window for [io 0x01f0-0x01f7] [ 0.504009] pci 0000:00:0f.1: no compatible bridge window for [io 0x03f6] [ 0.508009] pci 0000:00:0f.1: no compatible bridge window for [io 0x0170-0x0177] [ 0.512008] pci 0000:00:0f.1: no compatible bridge window for [io 0x0376] [ 0.516009] pci 0000:00:0f.1: no compatible bridge window for [io 0xffa0-0xffaf] > > [ 0.356008] pci 0000:00:00.0: host bridge window [io 0xffa0-0xffaf] > > [ 0.360008] pci 0000:00:00.0: host bridge window [mem 0xfc000000-0xfe8fffff] > > [ 0.364009] pci 0000:00:00.0: host bridge window [mem 0xfba00000-0xfbafffff pref] > > [ 0.368008] pci 0000:00:00.0: host bridge window [io 0xd000-0xdffc] > > [ 0.396022] pci 0000:00:00.1: host bridge window [bus 01] > > [ 0.400009] pci 0000:00:00.1: host bridge window [mem 0xfe900000-0xfebfffff] > > [ 0.404009] pci 0000:00:00.1: host bridge window [mem 0xfbb00000-0xfbffffff pref] > > [ 0.408008] pci 0000:00:00.1: host bridge window [io 0xe000-0xeffc] > > > > There are two host bridges. Bus 0 has the legacy IDE ports, plus the > > onboard PCI devices. Bus 1 has the PCI devices that come from external > > slots. > > > > > And I think this whole file probably should go under a config option, > > > since it's really pretty specialized and only of interest to a few > > > boards that use this chipset but don't have ACPI. > > > > Ok, I can easily add that. FYI, both of the SBC's that I own using this > > chipset do not have ACPI support. > > Thanks for doing this, by the way. I'm trying hard to make the ACPI > host bridge driver work well, but it's obviously not applicable for > every machine. Eventually, I think it'd be nice to factor out some > kind of generic "struct pci_host_bridge", which we'd create using > information from ACPI, OpenFirmware, native drivers like yours, etc. > Having another example like yours will help figure out how to abstract > this. > Not a problem. I look forward to the day when this is easier. I am aware that this board's BIOS sucks, but I have lots of them, and would prefer to keep using them until they die. Replacements are expensive. I have asked the manufacturer for a BIOS enhancement to the PXE boot process. I may get very lucky and get a BIOS with proper ACPI support, but I cannot count on that. It is hard to convince them to do work on boards which were end-of-lifed 5+ years ago. :) Another patch will be posted shortly. Thanks, Ira -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html