mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
ESP SCSI qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
This commit is contained in:
parent
418dcf5b7d
commit
cfb9de9ce4
4 changed files with 61 additions and 70 deletions
47
hw/sun4m.c
47
hw/sun4m.c
|
@ -391,7 +391,7 @@ static void sun4m_hw_init(const struct sun4m_hwdef *hwdef, ram_addr_t RAM_size,
|
|||
{
|
||||
CPUState *env, *envs[MAX_CPUS];
|
||||
unsigned int i;
|
||||
void *iommu, *espdma, *ledma, *main_esp, *nvram;
|
||||
void *iommu, *espdma, *ledma, *nvram;
|
||||
qemu_irq *cpu_irqs[MAX_CPUS], *slavio_irq, *slavio_cpu_irq,
|
||||
*espdma_irq, *ledma_irq;
|
||||
qemu_irq *esp_reset, *le_reset;
|
||||
|
@ -533,16 +533,9 @@ static void sun4m_hw_init(const struct sun4m_hwdef *hwdef, ram_addr_t RAM_size,
|
|||
exit(1);
|
||||
}
|
||||
|
||||
main_esp = esp_init(hwdef->esp_base, 2,
|
||||
espdma_memory_read, espdma_memory_write,
|
||||
espdma, *espdma_irq, esp_reset);
|
||||
|
||||
for (i = 0; i < ESP_MAX_DEVS; i++) {
|
||||
drive_index = drive_get_index(IF_SCSI, 0, i);
|
||||
if (drive_index == -1)
|
||||
continue;
|
||||
esp_scsi_attach(main_esp, drives_table[drive_index].bdrv, i);
|
||||
}
|
||||
esp_init(hwdef->esp_base, 2,
|
||||
espdma_memory_read, espdma_memory_write,
|
||||
espdma, *espdma_irq, esp_reset);
|
||||
|
||||
if (hwdef->cs_base)
|
||||
cs_init(hwdef->cs_base, hwdef->cs_irq, slavio_intctl);
|
||||
|
@ -1184,7 +1177,7 @@ static void sun4d_hw_init(const struct sun4d_hwdef *hwdef, ram_addr_t RAM_size,
|
|||
{
|
||||
CPUState *env, *envs[MAX_CPUS];
|
||||
unsigned int i;
|
||||
void *iounits[MAX_IOUNITS], *espdma, *ledma, *main_esp, *nvram, *sbi;
|
||||
void *iounits[MAX_IOUNITS], *espdma, *ledma, *nvram, *sbi;
|
||||
qemu_irq *cpu_irqs[MAX_CPUS], *sbi_irq, *sbi_cpu_irq,
|
||||
*espdma_irq, *ledma_irq;
|
||||
qemu_irq *esp_reset, *le_reset;
|
||||
|
@ -1192,7 +1185,6 @@ static void sun4d_hw_init(const struct sun4d_hwdef *hwdef, ram_addr_t RAM_size,
|
|||
unsigned long kernel_size;
|
||||
int ret;
|
||||
char buf[1024];
|
||||
int drive_index;
|
||||
void *fw_cfg;
|
||||
|
||||
/* init CPUs */
|
||||
|
@ -1292,16 +1284,9 @@ static void sun4d_hw_init(const struct sun4d_hwdef *hwdef, ram_addr_t RAM_size,
|
|||
exit(1);
|
||||
}
|
||||
|
||||
main_esp = esp_init(hwdef->esp_base, 2,
|
||||
espdma_memory_read, espdma_memory_write,
|
||||
espdma, *espdma_irq, esp_reset);
|
||||
|
||||
for (i = 0; i < ESP_MAX_DEVS; i++) {
|
||||
drive_index = drive_get_index(IF_SCSI, 0, i);
|
||||
if (drive_index == -1)
|
||||
continue;
|
||||
esp_scsi_attach(main_esp, drives_table[drive_index].bdrv, i);
|
||||
}
|
||||
esp_init(hwdef->esp_base, 2,
|
||||
espdma_memory_read, espdma_memory_write,
|
||||
espdma, *espdma_irq, esp_reset);
|
||||
|
||||
kernel_size = sun4m_load_kernel(kernel_filename, initrd_filename,
|
||||
RAM_size);
|
||||
|
@ -1406,8 +1391,7 @@ static void sun4c_hw_init(const struct sun4c_hwdef *hwdef, ram_addr_t RAM_size,
|
|||
const char *initrd_filename, const char *cpu_model)
|
||||
{
|
||||
CPUState *env;
|
||||
unsigned int i;
|
||||
void *iommu, *espdma, *ledma, *main_esp, *nvram;
|
||||
void *iommu, *espdma, *ledma, *nvram;
|
||||
qemu_irq *cpu_irqs, *slavio_irq, *espdma_irq, *ledma_irq;
|
||||
qemu_irq *esp_reset, *le_reset;
|
||||
qemu_irq *fdc_tc;
|
||||
|
@ -1518,16 +1502,9 @@ static void sun4c_hw_init(const struct sun4c_hwdef *hwdef, ram_addr_t RAM_size,
|
|||
exit(1);
|
||||
}
|
||||
|
||||
main_esp = esp_init(hwdef->esp_base, 2,
|
||||
espdma_memory_read, espdma_memory_write,
|
||||
espdma, *espdma_irq, esp_reset);
|
||||
|
||||
for (i = 0; i < ESP_MAX_DEVS; i++) {
|
||||
drive_index = drive_get_index(IF_SCSI, 0, i);
|
||||
if (drive_index == -1)
|
||||
continue;
|
||||
esp_scsi_attach(main_esp, drives_table[drive_index].bdrv, i);
|
||||
}
|
||||
esp_init(hwdef->esp_base, 2,
|
||||
espdma_memory_read, espdma_memory_write,
|
||||
espdma, *espdma_irq, esp_reset);
|
||||
|
||||
kernel_size = sun4m_load_kernel(kernel_filename, initrd_filename,
|
||||
RAM_size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue