mirror of https://github.com/proxmox/mirror_qemu
ich/ahci: convert to pci_register_bar_simple()
Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>master
parent
f32dd06ba6
commit
667bb59d23
|
@ -1129,15 +1129,6 @@ void ahci_uninit(AHCIState *s)
|
|||
qemu_free(s->dev);
|
||||
}
|
||||
|
||||
void ahci_pci_map(PCIDevice *pci_dev, int region_num,
|
||||
pcibus_t addr, pcibus_t size, int type)
|
||||
{
|
||||
struct AHCIPCIState *d = (struct AHCIPCIState *)pci_dev;
|
||||
AHCIState *s = &d->ahci;
|
||||
|
||||
cpu_register_physical_memory(addr, size, s->mem);
|
||||
}
|
||||
|
||||
void ahci_reset(void *opaque)
|
||||
{
|
||||
struct AHCIPCIState *d = opaque;
|
||||
|
|
|
@ -325,9 +325,6 @@ typedef struct NCQFrame {
|
|||
void ahci_init(AHCIState *s, DeviceState *qdev, int ports);
|
||||
void ahci_uninit(AHCIState *s);
|
||||
|
||||
void ahci_pci_map(PCIDevice *pci_dev, int region_num,
|
||||
pcibus_t addr, pcibus_t size, int type);
|
||||
|
||||
void ahci_reset(void *opaque);
|
||||
|
||||
#endif /* HW_IDE_AHCI_H */
|
||||
|
|
|
@ -95,8 +95,7 @@ static int pci_ich9_ahci_init(PCIDevice *dev)
|
|||
qemu_register_reset(ahci_reset, d);
|
||||
|
||||
/* XXX BAR size should be 1k, but that breaks, so bump it to 4k for now */
|
||||
pci_register_bar(&d->card, 5, 0x1000, PCI_BASE_ADDRESS_SPACE_MEMORY,
|
||||
ahci_pci_map);
|
||||
pci_register_bar_simple(&d->card, 5, 0x1000, 0, d->ahci.mem);
|
||||
|
||||
msi_init(dev, 0x50, 1, true, false);
|
||||
|
||||
|
|
Loading…
Reference in New Issue