On Fri, Apr 08, 2011 at 09:52:59PM +0900, Isaku Yamahata wrote: > vender id/device id... in configuration space are read-only registers > which are commonly defined for all pci devices. > So initialize them in common code and it simplifies the initialization a bit. > I converted some of them. > > If this is the right direction, I'll convert the remaining devices.
So I agree about device vendor id and revision but not header type: devices ideally should supply device type (bridge or not) and we will fill it in correctly. > Isaku Yamahata (7): > pci: move ids of config space into PCIDeviceInfo > usb-uhci: convert to PCIDEviceInfo to initialize ids > eepro100: convert to PCIDeviceInfo to initialize ids > dec_pci: convert to PCIDeviceInfo to initialize ids > apb_pci: convert to PCIDeviceInfo to initialize ids > ide/piix: convert to PCIDeviceInfo to initialize ids > vmware_vga.c: convert to PCIDeviceInfo to initialize ids > > hw/apb_pci.c | 13 +++++------ > hw/dec_pci.c | 27 +++++++----------------- > hw/eepro100.c | 60 ++++++++++++++++++++++++------------------------------ > hw/ide/piix.c | 29 +++++++------------------- > hw/pci.c | 46 +++++++++++++++++++++++++++++------------ > hw/pci.h | 9 ++++++++ > hw/usb-uhci.c | 38 ++++++++++------------------------ > hw/vmware_vga.c | 13 +++++------ > 8 files changed, 107 insertions(+), 128 deletions(-)