[coreboot] [RFC] kill unwanted_vpci, use "hidden" property instead

Stefan Reinauer stepan at coresystems.de
Thu May 8 16:04:19 CEST 2008


Carl-Daniel Hailfinger wrote:
> Hi,
>
> since the Geode/CS553x platform emulates PCI headers for
> chipset/processor devices, we have the ability to switch off that
> emulation and hide those virtual PCI headers. Right now we do this in a
> fairly uncoordinated fashion: I counted at least three different
> open-coded code sequences with the same effect.
>
> My current plan is:
> - encapsulate all those code sequences into calls of one or two functions
> - switch all calls from hide_vpci(some_value_calculated_by_hand) to
> hide_vpci_dev(struct device *)
> - replace the central array of hand-calculated values with a
> per-PCI-device "hidden" property.
>
> This should result in an overall improvement of code readability and a
> reduction of code size. As a nice side benefit the dts is a lot easier
> to manipulate.
>   
I like this idea a lot.

Maybe we could use the already existing "enabled" property for that?
Usually if a device is not "enabled", coreboot would not assign
resources to it. Instead, if the device driver knows how to disable the
device, it could completely disable it. I think the i82801xx driver in
v2 attempts a similar thing.

Stefan






More information about the coreboot mailing list