sysbus: rename sysbus_init_mmio_region() to sysbus_init_mmio()

Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
Avi Kivity 2011-11-27 11:38:10 +02:00
parent 3f7f1c8067
commit 750ecd444f
111 changed files with 174 additions and 174 deletions

View File

@ -410,18 +410,18 @@ static int pci_pbm_init_device(SysBusDevice *dev)
memory_region_init_io(&s->apb_config, &apb_config_ops, s, "apb-config",
0x10000);
/* at region 0 */
sysbus_init_mmio_region(dev, &s->apb_config);
sysbus_init_mmio(dev, &s->apb_config);
memory_region_init_io(&s->pci_config, &pci_config_ops, s, "apb-pci-config",
0x1000000);
/* at region 1 */
sysbus_init_mmio_region(dev, &s->pci_config);
sysbus_init_mmio(dev, &s->pci_config);
/* pci_ioport */
memory_region_init_io(&s->pci_ioport, &pci_ioport_ops, s,
"apb-pci-ioport", 0x10000);
/* at region 2 */
sysbus_init_mmio_region(dev, &s->pci_ioport);
sysbus_init_mmio(dev, &s->pci_ioport);
return 0;
}

View File

@ -998,7 +998,7 @@ static int apic_init1(SysBusDevice *dev)
}
memory_region_init_io(&s->io_memory, &apic_io_ops, s, "apic",
MSI_ADDR_SIZE);
sysbus_init_mmio_region(dev, &s->io_memory);
sysbus_init_mmio(dev, &s->io_memory);
s->timer = qemu_new_timer_ns(vm_clock, apic_timer, s);
s->idx = last_apic_idx++;

View File

@ -73,7 +73,7 @@ static int realview_mpcore_init(SysBusDevice *dev)
}
}
qdev_init_gpio_in(&dev->qdev, mpcore_rirq_set_irq, 64);
sysbus_init_mmio_region(dev, sysbus_mmio_get_region(s->priv, 0));
sysbus_init_mmio(dev, sysbus_mmio_get_region(s->priv, 0));
return 0;
}

View File

@ -383,7 +383,7 @@ static int arm_sysctl_init1(SysBusDevice *dev)
arm_sysctl_state *s = FROM_SYSBUS(arm_sysctl_state, dev);
memory_region_init_io(&s->iomem, &arm_sysctl_ops, s, "arm-sysctl", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
qdev_init_gpio_in(&s->busdev.qdev, arm_sysctl_gpio_set, 2);
qdev_init_gpio_out(&s->busdev.qdev, &s->pl110_mux_ctrl, 1);
return 0;

View File

@ -247,7 +247,7 @@ static int sp804_init(SysBusDevice *dev)
s->timer[0]->irq = qi[0];
s->timer[1]->irq = qi[1];
memory_region_init_io(&s->iomem, &sp804_ops, s, "sp804", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
vmstate_register(&dev->qdev, -1, &vmstate_sp804, s);
return 0;
}
@ -311,7 +311,7 @@ static int icp_pit_init(SysBusDevice *dev)
sysbus_init_irq(dev, &s->timer[2]->irq);
memory_region_init_io(&s->iomem, &icp_pit_ops, s, "icp_pit", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
/* This device has no state to save/restore. The component timers will
save themselves. */
return 0;

View File

@ -126,7 +126,7 @@ static int bitband_init(SysBusDevice *dev)
memory_region_init_io(&s->iomem, &bitband_ops, &s->base, "bitband",
0x02000000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
return 0;
}

View File

@ -207,7 +207,7 @@ static int gpio_i2c_init(SysBusDevice *dev)
i2c_bus *bus;
memory_region_init(&s->dummy_iomem, "gpio_i2c", 0);
sysbus_init_mmio_region(dev, &s->dummy_iomem);
sysbus_init_mmio(dev, &s->dummy_iomem);
bus = i2c_init_bus(&dev->qdev, "i2c");
s->bitbang = bitbang_i2c_init(bus);

View File

@ -684,29 +684,29 @@ static int bonito_initfn(PCIDevice *dev)
/* set the north bridge register mapping */
memory_region_init_io(&s->iomem, &bonito_ops, s,
"north-bridge-register", BONITO_INTERNAL_REG_SIZE);
sysbus_init_mmio_region(sysbus, &s->iomem);
sysbus_init_mmio(sysbus, &s->iomem);
sysbus_mmio_map(sysbus, 0, BONITO_INTERNAL_REG_BASE);
/* set the north bridge pci configure mapping */
memory_region_init_io(&s->pcihost->conf_mem, &bonito_pciconf_ops, s,
"north-bridge-pci-config", BONITO_PCICONFIG_SIZE);
sysbus_init_mmio_region(sysbus, &s->pcihost->conf_mem);
sysbus_init_mmio(sysbus, &s->pcihost->conf_mem);
sysbus_mmio_map(sysbus, 1, BONITO_PCICONFIG_BASE);
/* set the south bridge pci configure mapping */
memory_region_init_io(&s->pcihost->data_mem, &bonito_spciconf_ops, s,
"south-bridge-pci-config", BONITO_SPCICONFIG_SIZE);
sysbus_init_mmio_region(sysbus, &s->pcihost->data_mem);
sysbus_init_mmio(sysbus, &s->pcihost->data_mem);
sysbus_mmio_map(sysbus, 2, BONITO_SPCICONFIG_BASE);
memory_region_init_io(&s->iomem_ldma, &bonito_ldma_ops, s,
"ldma", 0x100);
sysbus_init_mmio_region(sysbus, &s->iomem_ldma);
sysbus_init_mmio(sysbus, &s->iomem_ldma);
sysbus_mmio_map(sysbus, 3, 0xbfe00200);
memory_region_init_io(&s->iomem_cop, &bonito_cop_ops, s,
"cop", 0x100);
sysbus_init_mmio_region(sysbus, &s->iomem_cop);
sysbus_init_mmio(sysbus, &s->iomem_cop);
sysbus_mmio_map(sysbus, 4, 0xbfe00300);
/* Map PCI IO Space 0x1fd0 0000 - 0x1fd1 0000 */

View File

@ -145,7 +145,7 @@ static int cs4231_init1(SysBusDevice *dev)
CSState *s = FROM_SYSBUS(CSState, dev);
memory_region_init_io(&s->iomem, &cs_mem_ops, s, "cs4321", CS_SIZE);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
sysbus_init_irq(dev, &s->irq);
return 0;

View File

@ -87,8 +87,8 @@ static int pci_dec_21154_init_device(SysBusDevice *dev)
&s->host_state, "pci-conf-idx", 0x1000);
memory_region_init_io(&s->host_state.data_mem, &pci_host_data_le_ops,
&s->host_state, "pci-data-idx", 0x1000);
sysbus_init_mmio_region(dev, &s->host_state.conf_mem);
sysbus_init_mmio_region(dev, &s->host_state.data_mem);
sysbus_init_mmio(dev, &s->host_state.conf_mem);
sysbus_init_mmio(dev, &s->host_state.data_mem);
return 0;
}

View File

@ -118,7 +118,7 @@ static int nvram_sysbus_initfn(SysBusDevice *dev)
s->contents = g_malloc0(s->chip_size);
memory_region_init_io(&s->iomem, &nvram_ops, s, "nvram", s->chip_size);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
/* Read current file */
file = fopen(s->filename, "rb");

View File

@ -297,12 +297,12 @@ static int ecc_init1(SysBusDevice *dev)
sysbus_init_irq(dev, &s->irq);
s->regs[0] = s->version;
memory_region_init_io(&s->iomem, &ecc_mem_ops, s, "ecc", ECC_SIZE);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
if (s->version == ECC_MCC) { // SS-600MP only
memory_region_init_io(&s->iomem_diag, &ecc_diag_mem_ops, s,
"ecc.diag", ECC_DIAG_SIZE);
sysbus_init_mmio_region(dev, &s->iomem_diag);
sysbus_init_mmio(dev, &s->iomem_diag);
}
return 0;

View File

@ -72,7 +72,7 @@ static int empty_slot_init1(SysBusDevice *dev)
memory_region_init_io(&s->iomem, &empty_slot_ops, s,
"empty-slot", s->size);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
return 0;
}

View File

@ -888,7 +888,7 @@ static int escc_init1(SysBusDevice *dev)
memory_region_init_io(&s->mmio, &escc_mem_ops, s, "escc",
ESCC_SIZE << s->it_shift);
sysbus_init_mmio_region(dev, &s->mmio);
sysbus_init_mmio(dev, &s->mmio);
if (s->chn[0].type == mouse) {
qemu_add_mouse_event_handler(sunmouse_event, &s->chn[0], 0,

View File

@ -745,7 +745,7 @@ static int esp_init1(SysBusDevice *dev)
memory_region_init_io(&s->iomem, &esp_mem_ops, s,
"esp", ESP_REGS << s->it_shift);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
qdev_init_gpio_in(&dev->qdev, esp_gpio_demux, 2);

View File

@ -604,7 +604,7 @@ static int fs_eth_init(SysBusDevice *dev)
s->dma_in->client.pull = NULL;
memory_region_init_io(&s->mmio, &eth_ops, s, "etraxfs-eth", 0x5c);
sysbus_init_mmio_region(dev, &s->mmio);
sysbus_init_mmio(dev, &s->mmio);
qemu_macaddr_default_if_unset(&s->conf.macaddr);
s->nic = qemu_new_nic(&net_etraxfs_info, &s->conf,

View File

@ -147,7 +147,7 @@ static int etraxfs_pic_init(SysBusDevice *dev)
sysbus_init_irq(dev, &s->parent_nmi);
memory_region_init_io(&s->mmio, &pic_ops, s, "etraxfs-pic", R_MAX * 4);
sysbus_init_mmio_region(dev, &s->mmio);
sysbus_init_mmio(dev, &s->mmio);
return 0;
}

View File

@ -214,7 +214,7 @@ static int etraxfs_ser_init(SysBusDevice *dev)
sysbus_init_irq(dev, &s->irq);
memory_region_init_io(&s->mmio, &ser_ops, s, "etraxfs-serial", R_MAX * 4);
sysbus_init_mmio_region(dev, &s->mmio);
sysbus_init_mmio(dev, &s->mmio);
s->chr = qdev_init_chardev(&dev->qdev);
if (s->chr)

View File

@ -323,7 +323,7 @@ static int etraxfs_timer_init(SysBusDevice *dev)
sysbus_init_irq(dev, &t->nmi);
memory_region_init_io(&t->mmio, &timer_ops, t, "etraxfs-timer", 0x5c);
sysbus_init_mmio_region(dev, &t->mmio);
sysbus_init_mmio(dev, &t->mmio);
qemu_register_reset(etraxfs_timer_reset, t);
return 0;
}

View File

@ -1911,7 +1911,7 @@ static int sysbus_fdc_init1(SysBusDevice *dev)
int ret;
memory_region_init_io(&fdctrl->iomem, &fdctrl_mem_ops, fdctrl, "fdc", 0x08);
sysbus_init_mmio_region(dev, &fdctrl->iomem);
sysbus_init_mmio(dev, &fdctrl->iomem);
sysbus_init_irq(dev, &fdctrl->irq);
qdev_init_gpio_in(&dev->qdev, fdctrl_handle_tc, 1);
fdctrl->dma_chann = -1;
@ -1928,7 +1928,7 @@ static int sun4m_fdc_init1(SysBusDevice *dev)
memory_region_init_io(&fdctrl->iomem, &fdctrl_mem_strict_ops, fdctrl,
"fdctrl", 0x08);
sysbus_init_mmio_region(dev, &fdctrl->iomem);
sysbus_init_mmio(dev, &fdctrl->iomem);
sysbus_init_irq(dev, &fdctrl->irq);
qdev_init_gpio_in(&dev->qdev, fdctrl_handle_tc, 1);

View File

@ -510,10 +510,10 @@ static int fw_cfg_init1(SysBusDevice *dev)
memory_region_init_io(&s->ctl_iomem, &fw_cfg_ctl_mem_ops, s,
"fwcfg.ctl", FW_CFG_SIZE);
sysbus_init_mmio_region(dev, &s->ctl_iomem);
sysbus_init_mmio(dev, &s->ctl_iomem);
memory_region_init_io(&s->data_iomem, &fw_cfg_data_mem_ops, s,
"fwcfg.data", FW_CFG_DATA_SIZE);
sysbus_init_mmio_region(dev, &s->data_iomem);
sysbus_init_mmio(dev, &s->data_iomem);
/* In case ctl and data overlap: */
memory_region_init_io(&s->comb_iomem, &fw_cfg_comb_mem_ops, s,
"fwcfg", FW_CFG_SIZE);

View File

@ -540,8 +540,8 @@ static int g364fb_sysbus_init(SysBusDevice *dev)
g364fb_init(&dev->qdev, s);
sysbus_init_irq(dev, &s->irq);
sysbus_init_mmio_region(dev, &s->mem_ctrl);
sysbus_init_mmio_region(dev, &s->mem_vram);
sysbus_init_mmio(dev, &s->mem_ctrl);
sysbus_init_mmio(dev, &s->mem_vram);
return 0;
}

View File

@ -108,8 +108,8 @@ static int pci_grackle_init_device(SysBusDevice *dev)
&s->host_state, "pci-conf-idx", 0x1000);
memory_region_init_io(&s->host_state.data_mem, &pci_host_data_le_ops,
&s->host_state, "pci-data-idx", 0x1000);
sysbus_init_mmio_region(dev, &s->host_state.conf_mem);
sysbus_init_mmio_region(dev, &s->host_state.data_mem);
sysbus_init_mmio(dev, &s->host_state.conf_mem);
sysbus_init_mmio(dev, &s->host_state.data_mem);
qemu_register_reset(pci_grackle_reset, &s->host_state);
return 0;

View File

@ -164,7 +164,7 @@ static int grlib_apbuart_init(SysBusDevice *dev)
memory_region_init_io(&uart->iomem, &grlib_apbuart_ops, uart,
"uart", UART_REG_SIZE);
sysbus_init_mmio_region(dev, &uart->iomem);
sysbus_init_mmio(dev, &uart->iomem);
return 0;
}

View File

@ -367,7 +367,7 @@ static int grlib_gptimer_init(SysBusDevice *dev)
memory_region_init_io(&unit->iomem, &grlib_gptimer_ops, unit, "gptimer",
UNIT_REG_SIZE + GPTIMER_REG_SIZE * unit->nr_timers);
sysbus_init_mmio_region(dev, &unit->iomem);
sysbus_init_mmio(dev, &unit->iomem);
return 0;
}

View File

@ -349,7 +349,7 @@ static int grlib_irqmp_init(SysBusDevice *dev)
irqmp->state = g_malloc0(sizeof *irqmp->state);
sysbus_init_mmio_region(dev, &irqmp->iomem);
sysbus_init_mmio(dev, &irqmp->iomem);
return 0;
}

View File

@ -691,7 +691,7 @@ static int hpet_init(SysBusDevice *dev)
/* HPET Area */
memory_region_init_io(&s->iomem, &hpet_ram_ops, s, "hpet", 0x400);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
return 0;
}

View File

@ -266,7 +266,7 @@ static int integratorcm_init(SysBusDevice *dev)
memory_region_init_io(&s->iomem, &integratorcm_ops, s,
"integratorcm", 0x00800000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
integratorcm_do_remap(s, 1);
/* ??? Save/restore. */
@ -387,7 +387,7 @@ static int icp_pic_init(SysBusDevice *dev)
sysbus_init_irq(dev, &s->parent_irq);
sysbus_init_irq(dev, &s->parent_fiq);
memory_region_init_io(&s->iomem, &icp_pic_ops, s, "icp-pic", 0x00800000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
return 0;
}

View File

@ -334,7 +334,7 @@ static int ioapic_init1(SysBusDevice *dev)
}
memory_region_init_io(&s->io_memory, &ioapic_io_ops, s, "ioapic", 0x1000);
sysbus_init_mmio_region(dev, &s->io_memory);
sysbus_init_mmio(dev, &s->io_memory);
qdev_init_gpio_in(&dev->qdev, ioapic_set_irq, IOAPIC_NUM_PINS);

View File

@ -1132,7 +1132,7 @@ static int lan9118_init1(SysBusDevice *dev)
int i;
memory_region_init_io(&s->mmio, &lan9118_mem_ops, s, "lan9118-mmio", 0x100);
sysbus_init_mmio_region(dev, &s->mmio);
sysbus_init_mmio(dev, &s->mmio);
sysbus_init_irq(dev, &s->irq);
qemu_macaddr_default_if_unset(&s->conf.macaddr);

View File

@ -121,7 +121,7 @@ static int lance_init(SysBusDevice *dev)
qdev_init_gpio_in(&dev->qdev, parent_lance_reset, 1);
sysbus_init_mmio_region(dev, &s->mmio);
sysbus_init_mmio(dev, &s->mmio);
sysbus_init_irq(dev, &s->irq);

View File

@ -119,7 +119,7 @@ static int lm32_sys_init(SysBusDevice *dev)
LM32SysState *s = FROM_SYSBUS(typeof(*s), dev);
memory_region_init_io(&s->iomem, &sys_ops , s, "sys", R_MAX * 4);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
/* Note: This device is not created in the board initialization,
* instead it has to be added with the -device parameter. Therefore,

View File

@ -180,7 +180,7 @@ static int lm32_timer_init(SysBusDevice *dev)
ptimer_set_freq(s->ptimer, s->freq_hz);
memory_region_init_io(&s->iomem, &timer_ops, s, "timer", R_MAX * 4);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
return 0;
}

View File

@ -250,7 +250,7 @@ static int lm32_uart_init(SysBusDevice *dev)
sysbus_init_irq(dev, &s->irq);
memory_region_init_io(&s->iomem, &uart_ops, s, "uart", R_MAX * 4);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
s->chr = qdev_init_chardev(&dev->qdev);
if (s->chr) {

View File

@ -713,7 +713,7 @@ static int m48t59_init1(SysBusDevice *dev)
sysbus_init_irq(dev, &s->IRQ);
memory_region_init_io(&s->iomem, &nvram_ops, s, "m48t59.nvram", s->size);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
m48t59_init_common(s);
return 0;

View File

@ -245,7 +245,7 @@ static int mv88w8618_audio_init(SysBusDevice *dev)
memory_region_init_io(&s->iomem, &mv88w8618_audio_ops, s,
"audio", MP_AUDIO_SIZE);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
return 0;
}

View File

@ -302,7 +302,7 @@ static int milkymist_ac97_init(SysBusDevice *dev)
memory_region_init_io(&s->regs_region, &ac97_mmio_ops, s,
"milkymist-ac97", R_MAX * 4);
sysbus_init_mmio_region(dev, &s->regs_region);
sysbus_init_mmio(dev, &s->regs_region);
return 0;
}

View File

@ -129,7 +129,7 @@ static int milkymist_hpdmc_init(SysBusDevice *dev)
memory_region_init_io(&s->regs_region, &hpdmc_mmio_ops, s,
"milkymist-hpdmc", R_MAX * 4);
sysbus_init_mmio_region(dev, &s->regs_region);
sysbus_init_mmio(dev, &s->regs_region);
return 0;
}

View File

@ -255,7 +255,7 @@ static int milkymist_memcard_init(SysBusDevice *dev)
memory_region_init_io(&s->regs_region, &memcard_mmio_ops, s,
"milkymist-memcard", R_MAX * 4);
sysbus_init_mmio_region(dev, &s->regs_region);
sysbus_init_mmio(dev, &s->regs_region);
return 0;
}

View File

@ -465,7 +465,7 @@ static int milkymist_minimac2_init(SysBusDevice *dev)
memory_region_init_io(&s->regs_region, &minimac2_ops, s,
"milkymist-minimac2", R_MAX * 4);
sysbus_init_mmio_region(dev, &s->regs_region);
sysbus_init_mmio(dev, &s->regs_region);
/* register buffers memory */
memory_region_init_ram(&s->buffers, NULL, "milkymist-minimac2.buffers",

View File

@ -499,7 +499,7 @@ static int milkymist_pfpu_init(SysBusDevice *dev)
memory_region_init_io(&s->regs_region, &pfpu_mmio_ops, s,
"milkymist-pfpu", MICROCODE_END * 4);
sysbus_init_mmio_region(dev, &s->regs_region);
sysbus_init_mmio(dev, &s->regs_region);
return 0;
}

View File

@ -264,7 +264,7 @@ static int milkymist_softusb_init(SysBusDevice *dev)
memory_region_init_io(&s->regs_region, &softusb_mmio_ops, s,
"milkymist-softusb", R_MAX * 4);
sysbus_init_mmio_region(dev, &s->regs_region);
sysbus_init_mmio(dev, &s->regs_region);
/* register pmem and dmem */
memory_region_init_ram(&s->pmem, NULL, "milkymist-softusb.pmem",

View File

@ -273,7 +273,7 @@ static int milkymist_sysctl_init(SysBusDevice *dev)
memory_region_init_io(&s->regs_region, &sysctl_mmio_ops, s,
"milkymist-sysctl", R_MAX * 4);
sysbus_init_mmio_region(dev, &s->regs_region);
sysbus_init_mmio(dev, &s->regs_region);
return 0;
}

View File

@ -449,7 +449,7 @@ static int milkymist_tmu2_init(SysBusDevice *dev)
memory_region_init_io(&s->regs_region, &tmu2_mmio_ops, s,
"milkymist-tmu2", R_MAX * 4);
sysbus_init_mmio_region(dev, &s->regs_region);
sysbus_init_mmio(dev, &s->regs_region);
return 0;
}

View File

@ -197,7 +197,7 @@ static int milkymist_uart_init(SysBusDevice *dev)
memory_region_init_io(&s->regs_region, &uart_mmio_ops, s,
"milkymist-uart", R_MAX * 4);
sysbus_init_mmio_region(dev, &s->regs_region);
sysbus_init_mmio(dev, &s->regs_region);
s->chr = qdev_init_chardev(&dev->qdev);
if (s->chr) {

View File

@ -272,7 +272,7 @@ static int milkymist_vgafb_init(SysBusDevice *dev)
memory_region_init_io(&s->regs_region, &vgafb_mmio_ops, s,
"milkymist-vgafb", R_MAX * 4);
sysbus_init_mmio_region(dev, &s->regs_region);
sysbus_init_mmio(dev, &s->regs_region);
s->ds = graphic_console_init(vgafb_update_display,
vgafb_invalidate_display,

View File

@ -236,7 +236,7 @@ static int mipsnet_sysbus_init(SysBusDevice *dev)
MIPSnetState *s = DO_UPCAST(MIPSnetState, busdev, dev);
memory_region_init_io(&s->io, &mipsnet_ioport_ops, s, "mipsnet-io", 36);
sysbus_init_mmio_region(dev, &s->io);
sysbus_init_mmio(dev, &s->io);
sysbus_init_irq(dev, &s->irq);
s->nic = qemu_new_nic(&net_mipsnet_info, &s->conf,

View File

@ -116,7 +116,7 @@ static int mpc8544_guts_initfn(SysBusDevice *dev)
memory_region_init_io(&s->iomem, &mpc8544_guts_ops, s,
"mpc6544.guts", MPC8544_GUTS_MMIO_SIZE);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
return 0;
}

View File

@ -275,7 +275,7 @@ static int mpcore_priv_init(SysBusDevice *dev)
gic_init(&s->gic, s->num_cpu);
mpcore_priv_map_setup(s);
sysbus_init_mmio_region(dev, &s->container);
sysbus_init_mmio(dev, &s->container);
for (i = 0; i < s->num_cpu * 2; i++) {
mpcore_timer_init(s, &s->timer[i], i);
}

View File

@ -207,7 +207,7 @@ static int mst_fpga_init(SysBusDevice *dev)
memory_region_init_io(&s->iomem, &mst_fpga_ops, s,
"fpga", 0x00100000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
return 0;
}

View File

@ -386,7 +386,7 @@ static int mv88w8618_eth_init(SysBusDevice *dev)
dev->qdev.info->name, dev->qdev.id, s);
memory_region_init_io(&s->iomem, &mv88w8618_eth_ops, s, "mv88w8618-eth",
MP_ETH_SIZE);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
return 0;
}
@ -593,7 +593,7 @@ static int musicpal_lcd_init(SysBusDevice *dev)
memory_region_init_io(&s->iomem, &musicpal_lcd_ops, s,
"musicpal-lcd", MP_LCD_SIZE);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
s->ds = graphic_console_init(lcd_refresh, lcd_invalidate,
NULL, NULL, s);
@ -713,7 +713,7 @@ static int mv88w8618_pic_init(SysBusDevice *dev)
sysbus_init_irq(dev, &s->parent_irq);
memory_region_init_io(&s->iomem, &mv88w8618_pic_ops, s,
"musicpal-pic", MP_PIC_SIZE);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
return 0;
}
@ -869,7 +869,7 @@ static int mv88w8618_pit_init(SysBusDevice *dev)
memory_region_init_io(&s->iomem, &mv88w8618_pit_ops, s,
"musicpal-pit", MP_PIT_SIZE);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
return 0;
}
@ -954,7 +954,7 @@ static int mv88w8618_flashcfg_init(SysBusDevice *dev)
s->cfgr0 = 0xfffe4285; /* Default as set by U-Boot for 8 MB flash */
memory_region_init_io(&s->iomem, &mv88w8618_flashcfg_ops, s,
"musicpal-flashcfg", MP_FLASHCFG_SIZE);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
return 0;
}
@ -1050,7 +1050,7 @@ static int mv88w8618_wlan_init(SysBusDevice *dev)
memory_region_init_io(iomem, &mv88w8618_wlan_ops, NULL,
"musicpal-wlan", MP_WLAN_SIZE);
sysbus_init_mmio_region(dev, iomem);
sysbus_init_mmio(dev, iomem);
return 0;
}
@ -1256,7 +1256,7 @@ static int musicpal_gpio_init(SysBusDevice *dev)
memory_region_init_io(&s->iomem, &musicpal_gpio_ops, s,
"musicpal-gpio", MP_GPIO_SIZE);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
qdev_init_gpio_out(&dev->qdev, s->out, ARRAY_SIZE(s->out));
@ -1403,7 +1403,7 @@ static int musicpal_key_init(SysBusDevice *dev)
musicpal_key_state *s = FROM_SYSBUS(musicpal_key_state, dev);
memory_region_init(&s->iomem, "dummy", 0);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
s->kbd_extended = 0;
s->pressed_keys = 0;

View File

@ -679,7 +679,7 @@ static int omap_gpio_init(SysBusDevice *dev)
sysbus_init_irq(dev, &s->omap1.irq);
memory_region_init_io(&s->iomem, &omap_gpio_ops, &s->omap1,
"omap.gpio", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
return 0;
}
@ -694,7 +694,7 @@ static int omap2_gpio_init(SysBusDevice *dev)
s->modulecount = (s->mpu_model < omap2430) ? 4 : 5;
memory_region_init_io(&s->iomem, &omap2_gpif_top_ops, s,
"omap2.gpio", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
} else {
s->modulecount = 6;
}
@ -714,7 +714,7 @@ static int omap2_gpio_init(SysBusDevice *dev)
sysbus_init_irq(dev, &m->wkup);
memory_region_init_io(&m->iomem, &omap2_gpio_module_ops, m,
"omap.gpio-module", 0x1000);
sysbus_init_mmio_region(dev, &m->iomem);
sysbus_init_mmio(dev, &m->iomem);
}
return 0;
}

View File

@ -369,7 +369,7 @@ static int omap_intc_init(SysBusDevice *dev)
qdev_init_gpio_in(&dev->qdev, omap_set_intr, s->nbanks * 32);
memory_region_init_io(&s->mmio, &omap_inth_mem_ops, s,
"omap-intc", s->size);
sysbus_init_mmio_region(dev, &s->mmio);
sysbus_init_mmio(dev, &s->mmio);
return 0;
}
@ -600,7 +600,7 @@ static int omap2_intc_init(SysBusDevice *dev)
qdev_init_gpio_in(&dev->qdev, omap_set_intr_noedge, s->nbanks * 32);
memory_region_init_io(&s->mmio, &omap2_inth_mem_ops, s,
"omap2-intc", 0x1000);
sysbus_init_mmio_region(dev, &s->mmio);
sysbus_init_mmio(dev, &s->mmio);
return 0;
}

View File

@ -791,7 +791,7 @@ static int onenand_initfn(SysBusDevice *dev)
s->data[1][1] = ram + ((0x8010 + (1 << (PAGE_SHIFT - 6))) << s->shift);
onenand_mem_setup(s);
sysbus_init_irq(dev, &s->intr);
sysbus_init_mmio_region(dev, &s->container);
sysbus_init_mmio(dev, &s->container);
vmstate_register(&dev->qdev,
((s->shift & 0x7f) << 24)
| ((s->id.man & 0xff) << 16)

View File

@ -708,11 +708,11 @@ static int sysbus_open_eth_init(SysBusDevice *dev)
memory_region_init_io(&s->reg_io, &open_eth_reg_ops, s,
"open_eth.regs", 0x54);
sysbus_init_mmio_region(dev, &s->reg_io);
sysbus_init_mmio(dev, &s->reg_io);
memory_region_init_io(&s->desc_io, &open_eth_desc_ops, s,
"open_eth.desc", 0x400);
sysbus_init_mmio_region(dev, &s->desc_io);
sysbus_init_mmio(dev, &s->desc_io);
sysbus_init_irq(dev, &s->irq);

View File

@ -261,7 +261,7 @@ static int pl011_init(SysBusDevice *dev, const unsigned char *id)
pl011_state *s = FROM_SYSBUS(pl011_state, dev);
memory_region_init_io(&s->iomem, &pl011_ops, s, "pl011", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
sysbus_init_irq(dev, &s->irq);
s->id = id;
s->chr = qdev_init_chardev(&dev->qdev);

View File

@ -277,7 +277,7 @@ static int pl022_init(SysBusDevice *dev)
pl022_state *s = FROM_SYSBUS(pl022_state, dev);
memory_region_init_io(&s->iomem, &pl022_ops, s, "pl022", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
sysbus_init_irq(dev, &s->irq);
s->ssi = ssi_create_bus(&dev->qdev, "ssi");
pl022_reset(s);

View File

@ -200,7 +200,7 @@ static int pl031_init(SysBusDevice *dev)
struct tm tm;
memory_region_init_io(&s->iomem, &pl031_ops, s, "pl031", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
sysbus_init_irq(dev, &s->irq);
/* ??? We assume vm_clock is zero at this point. */

View File

@ -543,7 +543,7 @@ static int pl041_init(SysBusDevice *dev)
/* Connect the device to the sysbus */
memory_region_init_io(&s->iomem, &pl041_ops, s, "pl041", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
sysbus_init_irq(dev, &s->irq);
/* Init the codec */

View File

@ -137,7 +137,7 @@ static int pl050_init(SysBusDevice *dev, int is_mouse)
pl050_state *s = FROM_SYSBUS(pl050_state, dev);
memory_region_init_io(&s->iomem, &pl050_ops, s, "pl050", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
sysbus_init_irq(dev, &s->irq);
s->is_mouse = is_mouse;
if (s->is_mouse)

View File

@ -275,7 +275,7 @@ static int pl061_init(SysBusDevice *dev, const unsigned char *id)
pl061_state *s = FROM_SYSBUS(pl061_state, dev);
s->id = id;
memory_region_init_io(&s->iomem, &pl061_ops, s, "pl061", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
sysbus_init_irq(dev, &s->irq);
qdev_init_gpio_in(&dev->qdev, pl061_set_irq, 8);
qdev_init_gpio_out(&dev->qdev, s->out, 8);

View File

@ -357,7 +357,7 @@ static int pl08x_init(SysBusDevice *dev, int nchannels)
pl080_state *s = FROM_SYSBUS(pl080_state, dev);
memory_region_init_io(&s->iomem, &pl080_ops, s, "pl080", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
sysbus_init_irq(dev, &s->irq);
s->nchannels = nchannels;
return 0;

View File

@ -435,7 +435,7 @@ static int pl110_init(SysBusDevice *dev)
pl110_state *s = FROM_SYSBUS(pl110_state, dev);
memory_region_init_io(&s->iomem, &pl110_ops, s, "pl110", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
sysbus_init_irq(dev, &s->irq);
qdev_init_gpio_in(&s->busdev.qdev, pl110_mux_ctrl_set, 1);
s->ds = graphic_console_init(pl110_update_display,

View File

@ -453,7 +453,7 @@ static int pl181_init(SysBusDevice *dev)
DriveInfo *dinfo;
memory_region_init_io(&s->iomem, &pl181_ops, s, "pl181", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
sysbus_init_irq(dev, &s->irq[0]);
sysbus_init_irq(dev, &s->irq[1]);
qdev_init_gpio_out(&s->busdev.qdev, s->cardstatus, 2);

View File

@ -229,7 +229,7 @@ static int pl190_init(SysBusDevice *dev)
pl190_state *s = FROM_SYSBUS(pl190_state, dev);
memory_region_init_io(&s->iomem, &pl190_ops, s, "pl190", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
qdev_init_gpio_in(&dev->qdev, pl190_set_irq, 32);
sysbus_init_irq(dev, &s->irq);
sysbus_init_irq(dev, &s->fiq);

View File

@ -195,7 +195,7 @@ static int ppce500_spin_initfn(SysBusDevice *dev)
memory_region_init_io(&s->iomem, &spin_rw_ops, s, "e500 spin pv device",
sizeof(SpinInfo) * MAX_CPUS);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
qemu_register_reset(spin_reset, s);

View File

@ -813,7 +813,7 @@ static int pxa2xx_ssp_init(SysBusDevice *dev)
sysbus_init_irq(dev, &s->irq);
memory_region_init_io(&s->iomem, &pxa2xx_ssp_ops, s, "pxa2xx-ssp", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
register_savevm(&dev->qdev, "pxa2xx_ssp", -1, 0,
pxa2xx_ssp_save, pxa2xx_ssp_load, s);
@ -1180,7 +1180,7 @@ static int pxa2xx_rtc_init(SysBusDevice *dev)
sysbus_init_irq(dev, &s->rtc_irq);
memory_region_init_io(&s->iomem, &pxa2xx_rtc_ops, s, "pxa2xx-rtc", 0x10000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
return 0;
}
@ -1515,7 +1515,7 @@ static int pxa2xx_i2c_initfn(SysBusDevice *dev)
memory_region_init_io(&s->iomem, &pxa2xx_i2c_ops, s,
"pxa2xx-i2x", s->region_size);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
sysbus_init_irq(dev, &s->irq);
return 0;

View File

@ -467,7 +467,7 @@ static int pxa2xx_dma_init(SysBusDevice *dev)
memory_region_init_io(&s->iomem, &pxa2xx_dma_ops, s,
"pxa2xx.dma", 0x00010000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
sysbus_init_irq(dev, &s->irq);
return 0;

View File

@ -281,7 +281,7 @@ static int pxa2xx_gpio_initfn(SysBusDevice *dev)
qdev_init_gpio_out(&dev->qdev, s->handler, s->lines);
memory_region_init_io(&s->iomem, &pxa_gpio_ops, s, "pxa2xx-gpio", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
sysbus_init_irq(dev, &s->irq0);
sysbus_init_irq(dev, &s->irq1);
sysbus_init_irq(dev, &s->irqX);

View File

@ -266,7 +266,7 @@ DeviceState *pxa2xx_pic_init(target_phys_addr_t base, CPUState *env)
/* Enable IC memory-mapped registers access. */
memory_region_init_io(&s->iomem, &pxa2xx_pic_ops, s,
"pxa2xx-pic", 0x00100000);
sysbus_init_mmio_region(sysbus_from_qdev(dev), &s->iomem);
sysbus_init_mmio(sysbus_from_qdev(dev), &s->iomem);
sysbus_mmio_map(sysbus_from_qdev(dev), 0, base);
/* Enable IC coprocessor access. */

View File

@ -416,7 +416,7 @@ static int pxa2xx_timer_init(SysBusDevice *dev)
memory_region_init_io(&s->iomem, &pxa2xx_timer_ops, s,
"pxa2xx-timer", 0x00001000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
return 0;
}

View File

@ -77,7 +77,7 @@ static int realview_i2c_init(SysBusDevice *dev)
s->bitbang = bitbang_i2c_init(bus);
memory_region_init_io(&s->iomem, &realview_i2c_ops, s,
"realview-i2c", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
return 0;
}

View File

@ -62,7 +62,7 @@ static int realview_gic_init(SysBusDevice *dev)
gic_init(&s->gic);
realview_gic_map_setup(s);
sysbus_init_mmio_region(dev, &s->container);
sysbus_init_mmio(dev, &s->container);
return 0;
}

View File

@ -126,7 +126,7 @@ static int sbi_init1(SysBusDevice *dev)
}
memory_region_init_io(&s->iomem, &sbi_mem_ops, s, "sbi", SBI_SIZE);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
return 0;
}

View File

@ -154,8 +154,8 @@ static int sh_pci_init_device(SysBusDevice *dev)
0, 0x224);
isa_mmio_setup(&s->isa, 0x40000);
sysbus_init_mmio_cb2(dev, sh_pci_map, sh_pci_unmap);
sysbus_init_mmio_region(dev, &s->memconfig_a7);
sysbus_init_mmio_region(dev, &s->isa);
sysbus_init_mmio(dev, &s->memconfig_a7);
sysbus_init_mmio(dev, &s->isa);
s->dev = pci_create_simple(s->bus, PCI_DEVFN(0, 0), "sh_pci_host");
return 0;
}

View File

@ -428,7 +428,7 @@ static int slavio_intctl_init1(SysBusDevice *dev)
qdev_init_gpio_in(&dev->qdev, slavio_set_irq_all, 32 + MAX_CPUS);
memory_region_init_io(&s->iomem, &slavio_intctlm_mem_ops, s,
"master-interrupt-controller", INTCTLM_SIZE);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
for (i = 0; i < MAX_CPUS; i++) {
snprintf(slave_name, sizeof(slave_name),
@ -438,7 +438,7 @@ static int slavio_intctl_init1(SysBusDevice *dev)
}
memory_region_init_io(&s->slaves[i].iomem, &slavio_intctl_mem_ops,
&s->slaves[i], slave_name, INTCTL_SIZE);
sysbus_init_mmio_region(dev, &s->slaves[i].iomem);
sysbus_init_mmio(dev, &s->slaves[i].iomem);
s->slaves[i].cpu = i;
s->slaves[i].master = s;
}

View File

@ -414,7 +414,7 @@ static int apc_init1(SysBusDevice *dev)
/* Power management (APC) XXX: not a Slavio device */
memory_region_init_io(&s->iomem, &apc_mem_ops, s,
"apc", MISC_SIZE);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
return 0;
}
@ -429,39 +429,39 @@ static int slavio_misc_init1(SysBusDevice *dev)
/* Slavio control */
memory_region_init_io(&s->cfg_iomem, &slavio_cfg_mem_ops, s,
"configuration", MISC_SIZE);
sysbus_init_mmio_region(dev, &s->cfg_iomem);
sysbus_init_mmio(dev, &s->cfg_iomem);
/* Diagnostics */
memory_region_init_io(&s->diag_iomem, &slavio_diag_mem_ops, s,
"diagnostic", MISC_SIZE);
sysbus_init_mmio_region(dev, &s->diag_iomem);
sysbus_init_mmio(dev, &s->diag_iomem);
/* Modem control */
memory_region_init_io(&s->mdm_iomem, &slavio_mdm_mem_ops, s,
"modem", MISC_SIZE);
sysbus_init_mmio_region(dev, &s->mdm_iomem);
sysbus_init_mmio(dev, &s->mdm_iomem);
/* 16 bit registers */
/* ss600mp diag LEDs */
memory_region_init_io(&s->led_iomem, &slavio_led_mem_ops, s,
"leds", MISC_SIZE);
sysbus_init_mmio_region(dev, &s->led_iomem);
sysbus_init_mmio(dev, &s->led_iomem);
/* 32 bit registers */
/* System control */
memory_region_init_io(&s->sysctrl_iomem, &slavio_sysctrl_mem_ops, s,
"system-control", MISC_SIZE);
sysbus_init_mmio_region(dev, &s->sysctrl_iomem);
sysbus_init_mmio(dev, &s->sysctrl_iomem);
/* AUX 1 (Misc System Functions) */
memory_region_init_io(&s->aux1_iomem, &slavio_aux1_mem_ops, s,
"misc-system-functions", MISC_SIZE);
sysbus_init_mmio_region(dev, &s->aux1_iomem);
sysbus_init_mmio(dev, &s->aux1_iomem);
/* AUX 2 (Software Powerdown Control) */
memory_region_init_io(&s->aux2_iomem, &slavio_aux2_mem_ops, s,
"software-powerdown-control", MISC_SIZE);
sysbus_init_mmio_region(dev, &s->aux2_iomem);
sysbus_init_mmio(dev, &s->aux2_iomem);
qdev_init_gpio_in(&dev->qdev, slavio_set_power_fail, 1);

View File

@ -395,7 +395,7 @@ static int slavio_timer_init1(SysBusDevice *dev)
snprintf(timer_name, sizeof(timer_name), "timer-%i", i);
memory_region_init_io(&tc->iomem, &slavio_timer_mem_ops, tc,
timer_name, size);
sysbus_init_mmio_region(dev, &tc->iomem);
sysbus_init_mmio(dev, &tc->iomem);
sysbus_init_irq(dev, &s->cputimer[i].irq);
}

View File

@ -748,7 +748,7 @@ static int smc91c111_init1(SysBusDevice *dev)
smc91c111_state *s = FROM_SYSBUS(smc91c111_state, dev);
memory_region_init_io(&s->mmio, &smc91c111_mem_ops, s,
"smc91c111-mmio", 16);
sysbus_init_mmio_region(dev, &s->mmio);
sysbus_init_mmio(dev, &s->mmio);
sysbus_init_irq(dev, &s->irq);
qemu_macaddr_default_if_unset(&s->conf.macaddr);
s->nic = qemu_new_nic(&net_smc91c111_info, &s->conf,

View File

@ -275,7 +275,7 @@ static int sparc32_dma_init1(SysBusDevice *dev)
reg_size = s->is_ledma ? DMA_ETH_SIZE : DMA_SIZE;
memory_region_init_io(&s->iomem, &dma_mem_ops, s, "dma", reg_size);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
qdev_init_gpio_in(&dev->qdev, dma_set_irq, 1);
qdev_init_gpio_out(&dev->qdev, s->gpio, 2);

View File

@ -167,7 +167,7 @@ static int sl_nand_init(SysBusDevice *dev) {
s->nand = nand_init(nand ? nand->bdrv : NULL, s->manf_id, s->chip_id);
memory_region_init_io(&s->iomem, &sl_ops, s, "sl", 0x40);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
return 0;
}

View File

@ -309,7 +309,7 @@ static int stellaris_gptm_init(SysBusDevice *dev)
memory_region_init_io(&s->iomem, &gptm_ops, s,
"gptm", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
s->opaque[0] = s->opaque[1] = s;
s->timer[0] = qemu_new_timer_ns(vm_clock, gptm_tick, &s->opaque[0]);
@ -863,7 +863,7 @@ static int stellaris_i2c_init(SysBusDevice * dev)
memory_region_init_io(&s->iomem, &stellaris_i2c_ops, s,
"i2c", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
/* ??? For now we only implement the master interface. */
stellaris_i2c_reset(s);
vmstate_register(&dev->qdev, -1, &vmstate_stellaris_i2c, s);
@ -1146,7 +1146,7 @@ static int stellaris_adc_init(SysBusDevice *dev)
memory_region_init_io(&s->iomem, &stellaris_adc_ops, s,
"adc", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
stellaris_adc_reset(s);
qdev_init_gpio_in(&dev->qdev, stellaris_adc_trigger, 1);
vmstate_register(&dev->qdev, -1, &vmstate_stellaris_adc, s);

View File

@ -406,7 +406,7 @@ static int stellaris_enet_init(SysBusDevice *dev)
memory_region_init_io(&s->mmio, &stellaris_enet_ops, s, "stellaris_enet",
0x1000);
sysbus_init_mmio_region(dev, &s->mmio);
sysbus_init_mmio(dev, &s->mmio);
sysbus_init_irq(dev, &s->irq);
qemu_macaddr_default_if_unset(&s->conf.macaddr);

View File

@ -170,7 +170,7 @@ static int strongarm_pic_initfn(SysBusDevice *dev)
qdev_init_gpio_in(&dev->qdev, strongarm_pic_set_irq, SA_PIC_SRCS);
memory_region_init_io(&s->iomem, &strongarm_pic_ops, s, "pic", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
sysbus_init_irq(dev, &s->irq);
sysbus_init_irq(dev, &s->fiq);
@ -371,7 +371,7 @@ static int strongarm_rtc_init(SysBusDevice *dev)
sysbus_init_irq(dev, &s->rtc_hz_irq);
memory_region_init_io(&s->iomem, &strongarm_rtc_ops, s, "rtc", 0x10000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
return 0;
}
@ -617,7 +617,7 @@ static int strongarm_gpio_initfn(SysBusDevice *dev)
memory_region_init_io(&s->iomem, &strongarm_gpio_ops, s, "gpio", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
for (i = 0; i < 11; i++) {
sysbus_init_irq(dev, &s->irqs[i]);
}
@ -779,7 +779,7 @@ static int strongarm_ppc_init(SysBusDevice *dev)
memory_region_init_io(&s->iomem, &strongarm_ppc_ops, s, "ppc", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
return 0;
}
@ -1165,7 +1165,7 @@ static int strongarm_uart_init(SysBusDevice *dev)
StrongARMUARTState *s = FROM_SYSBUS(StrongARMUARTState, dev);
memory_region_init_io(&s->iomem, &strongarm_uart_ops, s, "uart", 0x10000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
sysbus_init_irq(dev, &s->irq);
s->rx_timeout_timer = qemu_new_timer_ns(vm_clock, strongarm_uart_rx_to, s);
@ -1446,7 +1446,7 @@ static int strongarm_ssp_init(SysBusDevice *dev)
sysbus_init_irq(dev, &s->irq);
memory_region_init_io(&s->iomem, &strongarm_ssp_ops, s, "ssp", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
s->bus = ssi_create_bus(&dev->qdev, "ssi");
return 0;

View File

@ -196,7 +196,7 @@ static int sun4c_intctl_init1(SysBusDevice *dev)
memory_region_init_io(&s->iomem, &sun4c_intctl_mem_ops, s,
"intctl", INTCTL_SIZE);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
qdev_init_gpio_in(&dev->qdev, sun4c_set_irq, 8);
for (i = 0; i < MAX_PILS; i++) {

View File

@ -604,7 +604,7 @@ static int idreg_init1(SysBusDevice *dev)
memory_region_init_ram(&s->mem, NULL, "sun4m.idreg", sizeof(idreg_data));
memory_region_set_readonly(&s->mem, true);
sysbus_init_mmio_region(dev, &s->mem);
sysbus_init_mmio(dev, &s->mem);
return 0;
}
@ -644,7 +644,7 @@ static int afx_init1(SysBusDevice *dev)
AFXState *s = FROM_SYSBUS(AFXState, dev);
memory_region_init_ram(&s->mem, NULL, "sun4m.afx", 4);
sysbus_init_mmio_region(dev, &s->mem);
sysbus_init_mmio(dev, &s->mem);
return 0;
}
@ -713,7 +713,7 @@ static int prom_init1(SysBusDevice *dev)
memory_region_init_ram(&s->prom, NULL, "sun4m.prom", PROM_SIZE_MAX);
memory_region_set_readonly(&s->prom, true);
sysbus_init_mmio_region(dev, &s->prom);
sysbus_init_mmio(dev, &s->prom);
return 0;
}
@ -746,7 +746,7 @@ static int ram_init1(SysBusDevice *dev)
RamDevice *d = FROM_SYSBUS(RamDevice, dev);
memory_region_init_ram(&d->ram, NULL, "sun4m.ram", d->size);
sysbus_init_mmio_region(dev, &d->ram);
sysbus_init_mmio(dev, &d->ram);
return 0;
}

View File

@ -352,7 +352,7 @@ static int iommu_init1(SysBusDevice *dev)
memory_region_init_io(&s->iomem, &iommu_mem_ops, s, "iommu",
IOMMU_NREGS * sizeof(uint32_t));
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
return 0;
}

View File

@ -626,7 +626,7 @@ static int prom_init1(SysBusDevice *dev)
memory_region_init_ram(&s->prom, NULL, "sun4u.prom", PROM_SIZE_MAX);
memory_region_set_readonly(&s->prom, true);
sysbus_init_mmio_region(dev, &s->prom);
sysbus_init_mmio(dev, &s->prom);
return 0;
}
@ -660,7 +660,7 @@ static int ram_init1(SysBusDevice *dev)
RamDevice *d = FROM_SYSBUS(RamDevice, dev);
memory_region_init_ram(&d->ram, NULL, "sun4u.ram", d->size);
sysbus_init_mmio_region(dev, &d->ram);
sysbus_init_mmio(dev, &d->ram);
return 0;
}

View File

@ -515,7 +515,7 @@ static int syborg_fb_init(SysBusDevice *dev)
sysbus_init_irq(dev, &s->irq);
memory_region_init_io(&s->iomem, &syborg_fb_ops, s,
"framebuffer", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
s->ds = graphic_console_init(syborg_fb_update_display,
syborg_fb_invalidate_display,

View File

@ -207,7 +207,7 @@ static int syborg_int_init(SysBusDevice *dev)
qdev_init_gpio_in(&dev->qdev, syborg_int_set_irq, s->num_irqs);
memory_region_init_io(&s->iomem, &syborg_int_ops, s,
"interrupt", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
s->flags = g_malloc0(s->num_irqs * sizeof(syborg_int_flags));
register_savevm(&dev->qdev, "syborg_int", -1, 1, syborg_int_save,

View File

@ -184,7 +184,7 @@ static int syborg_keyboard_init(SysBusDevice *dev)
sysbus_init_irq(dev, &s->irq);
memory_region_init_io(&s->iomem, &syborg_keyboard_ops, s,
"keyboard", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
if (s->fifo_size <= 0) {
fprintf(stderr, "syborg_keyboard: fifo too small\n");
s->fifo_size = 16;

View File

@ -186,7 +186,7 @@ static int syborg_pointer_init(SysBusDevice *dev)
sysbus_init_irq(dev, &s->irq);
memory_region_init_io(&s->iomem, &syborg_pointer_ops, s,
"pointer", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
if (s->fifo_size <= 0) {
fprintf(stderr, "syborg_pointer: fifo too small\n");

View File

@ -117,7 +117,7 @@ static int syborg_rtc_init(SysBusDevice *dev)
struct tm tm;
memory_region_init_io(&s->iomem, &syborg_rtc_ops, s, "rtc", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
qemu_get_timedate(&tm, 0);
s->offset = (uint64_t)mktime(&tm) * 1000000000;

View File

@ -295,7 +295,7 @@ static int syborg_serial_init(SysBusDevice *dev)
sysbus_init_irq(dev, &s->irq);
memory_region_init_io(&s->iomem, &syborg_serial_ops, s,
"serial", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
s->chr = qdev_init_chardev(&dev->qdev);
if (s->chr) {
qemu_chr_add_handlers(s->chr, syborg_serial_can_receive,

View File

@ -197,7 +197,7 @@ static int syborg_timer_init(SysBusDevice *dev)
}
sysbus_init_irq(dev, &s->irq);
memory_region_init_io(&s->iomem, &syborg_timer_ops, s, "timer", 0x1000);
sysbus_init_mmio_region(dev, &s->iomem);
sysbus_init_mmio(dev, &s->iomem);
bh = qemu_bh_new(syborg_timer_tick, s);
s->timer = ptimer_init(bh);

View File

@ -262,7 +262,7 @@ static int syborg_virtio_init(SyborgVirtIOProxy *proxy, VirtIODevice *vdev)
sysbus_init_irq(&proxy->busdev, &proxy->irq);
memory_region_init_io(&proxy->iomem, &syborg_virtio_ops, proxy,
"virtio", 0x1000);
sysbus_init_mmio_region(&proxy->busdev, &proxy->iomem);
sysbus_init_mmio(&proxy->busdev, &proxy->iomem);
proxy->id = ((uint32_t)0x1af4 << 16) | vdev->device_id;

View File

@ -101,7 +101,7 @@ void sysbus_init_mmio_cb2(SysBusDevice *dev,
dev->mmio[n].unmap = unmap;
}
void sysbus_init_mmio_region(SysBusDevice *dev, MemoryRegion *memory)
void sysbus_init_mmio(SysBusDevice *dev, MemoryRegion *memory)
{
int n;

View File

@ -45,7 +45,7 @@ void sysbus_register_withprop(SysBusDeviceInfo *info);
void *sysbus_new(void);
void sysbus_init_mmio_cb2(SysBusDevice *dev,
mmio_mapfunc cb, mmio_mapfunc unmap);
void sysbus_init_mmio_region(SysBusDevice *dev, MemoryRegion *memory);
void sysbus_init_mmio(SysBusDevice *dev, MemoryRegion *memory);
MemoryRegion *sysbus_mmio_get_region(SysBusDevice *dev, int n);
void sysbus_init_irq(SysBusDevice *dev, qemu_irq *p);
void sysbus_pass_irq(SysBusDevice *dev, SysBusDevice *target);

View File

@ -529,21 +529,21 @@ static int tcx_init1(SysBusDevice *dev)
size = s->vram_size;
memory_region_init_alias(&s->vram_8bit, "tcx.vram.8bit",
&s->vram_mem, vram_offset, size);
sysbus_init_mmio_region(dev, &s->vram_8bit);
sysbus_init_mmio(dev, &s->vram_8bit);
vram_offset += size;
vram_base += size;
/* DAC */
memory_region_init_io(&s->dac, &tcx_dac_ops, s, "tcx.dac", TCX_DAC_NREGS);
sysbus_init_mmio_region(dev, &s->dac);
sysbus_init_mmio(dev, &s->dac);
/* TEC (dummy) */
memory_region_init_io(&s->tec, &dummy_ops, s, "tcx.tec", TCX_TEC_NREGS);
sysbus_init_mmio_region(dev, &s->tec);
sysbus_init_mmio(dev, &s->tec);
/* THC: NetBSD writes here even with 8-bit display: dummy */
memory_region_init_io(&s->thc24, &dummy_ops, s, "tcx.thc24",
TCX_THC_NREGS_24);
sysbus_init_mmio_region(dev, &s->thc24);
sysbus_init_mmio(dev, &s->thc24);
if (s->depth == 24) {
/* 24-bit plane */
@ -552,7 +552,7 @@ static int tcx_init1(SysBusDevice *dev)
s->vram24_offset = vram_offset;
memory_region_init_alias(&s->vram_24bit, "tcx.vram.24bit",
&s->vram_mem, vram_offset, size);
sysbus_init_mmio_region(dev, &s->vram_24bit);
sysbus_init_mmio(dev, &s->vram_24bit);
vram_offset += size;
vram_base += size;
@ -562,7 +562,7 @@ static int tcx_init1(SysBusDevice *dev)
s->cplane_offset = vram_offset;
memory_region_init_alias(&s->vram_cplane, "tcx.vram.cplane",
&s->vram_mem, vram_offset, size);
sysbus_init_mmio_region(dev, &s->vram_cplane);
sysbus_init_mmio(dev, &s->vram_cplane);
s->ds = graphic_console_init(tcx24_update_display,
tcx24_invalidate_display,
@ -571,7 +571,7 @@ static int tcx_init1(SysBusDevice *dev)
/* THC 8 bit (dummy) */
memory_region_init_io(&s->thc8, &dummy_ops, s, "tcx.thc8",
TCX_THC_NREGS_8);
sysbus_init_mmio_region(dev, &s->thc8);
sysbus_init_mmio(dev, &s->thc8);
s->ds = graphic_console_init(tcx_update_display,
tcx_invalidate_display,

View File

@ -781,8 +781,8 @@ static int tusb6010_init(SysBusDevice *dev)
s->pwr_timer = qemu_new_timer_ns(vm_clock, tusb_power_tick, s);
memory_region_init_io(&s->iomem[1], &tusb_async_ops, s, "tusb-async",
UINT32_MAX);
sysbus_init_mmio_region(dev, &s->iomem[0]);
sysbus_init_mmio_region(dev, &s->iomem[1]);
sysbus_init_mmio(dev, &s->iomem[0]);
sysbus_init_mmio(dev, &s->iomem[1]);
sysbus_init_irq(dev, &s->irq);
qdev_init_gpio_in(&dev->qdev, tusb6010_irq, musb_irq_max + 1);
s->musb = musb_init(&dev->qdev, 1);

Some files were not shown because too many files have changed in this diff Show More