On Wed, Jun 16, 2010 at 02:19:44PM +0300, Michael S. Tsirkin wrote: > > > > Apb host bridge specifies PCI_HEADER_TYPE_BRIDGE in PCIDeviceInfo, > > > > on the other hand pbc_pci_host_init() sets the register > > > > to PCI_HEADER_TYPE_NORMAL. > > > > To be honest I don't know why it does so, but that is what Blue wants. > > > > > > BTW I think it would be prettier to have is_bridge instead of header_type > > > as a qdev property. Agree? > > > > The spec version 3.0 defines three header types. > > 0:normal device, 1:pci-to-pci bridge, 2:card bus bridge > > So I'd like the name a bit more generic than is_bridge. > > Any suggestion? > > Could we just have functions that set up header for > each type, such as > pci_init_normal_header() > pci_init_p2p_bridge_header() > pci_init_cardbus_header()
I see. You mean device specific initialization function should call one of them. Then header_type property will be dropped. I'll split pci p2p bridge related functions into a file at first. Then introduce helper functions. -- yamahata