ide/ahci: Use universal DMA helper functions
authorDavid Gibson <david@gibson.dropbear.id.au>
Wed, 27 Jun 2012 04:50:41 +0000 (14:50 +1000)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 27 Jun 2012 21:33:25 +0000 (16:33 -0500)
commit10ca2943aab6646839769d78f80b0d5499efcbe9
treea5b6dccc0b5aafb5d3d9ddef3532f8ca53c2bc5b
parentc65bcef30659442a45ed0842de80d246d0162fd7
ide/ahci: Use universal DMA helper functions

The AHCI device can provide both PCI and SysBus AHCI device
emulations.  For this reason, it wasn't previously converted to use
the pci_dma_*() helper functions.  Now that we have universal DMA
helper functions, this converts AHCI to use them.

The DMAContext is obtained from pci_dma_context() in the PCI case and
set to NULL in the SysBus case (i.e. we assume for now that a SysBus
AHCI has no IOMMU translation).

Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/ide/ahci.c
hw/ide/ahci.h
hw/ide/ich.c