LSI SCSI qdev conversion

Signed-off-by: Paul Brook <paul@codesourcery.com>
This commit is contained in:
Paul Brook 2009-05-14 22:35:07 +01:00
parent 86394e969d
commit 9be5dafe48
6 changed files with 26 additions and 52 deletions

View file

@ -32,7 +32,6 @@ static void realview_init(ram_addr_t ram_size,
CPUState *env;
ram_addr_t ram_offset;
qemu_irq *pic;
void *scsi_hba;
PCIBus *pci_bus;
NICInfo *nd;
int n;
@ -111,16 +110,10 @@ static void realview_init(ram_addr_t ram_size,
if (usb_enabled) {
usb_ohci_init_pci(pci_bus, 3, -1);
}
if (drive_get_max_bus(IF_SCSI) > 0) {
fprintf(stderr, "qemu: too many SCSI bus\n");
exit(1);
}
scsi_hba = lsi_scsi_init(pci_bus, -1);
for (n = 0; n < LSI_MAX_DEVS; n++) {
index = drive_get_index(IF_SCSI, 0, n);
if (index == -1)
continue;
lsi_scsi_attach(scsi_hba, drives_table[index].bdrv, n);
n = drive_get_max_bus(IF_SCSI);
while (n >= 0) {
pci_create_simple(pci_bus, -1, "lsi53c895a");
n--;
}
for(n = 0; n < nb_nics; n++) {
nd = &nd_table[n];