summaryrefslogtreecommitdiffstats
path: root/include/acpi/acpi_bus.h
diff options
context:
space:
mode:
authorLorenzo Pieralisi <lorenzo.pieralisi@arm.com>2017-08-07 12:29:48 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-08-07 14:28:51 +0200
commitc04ac679c6b86e4e36fbb675c6c061b4091f5810 (patch)
tree52a0da44e4652e433d94f198a6f4e96547cf88d6 /include/acpi/acpi_bus.h
parentACPI: Make acpi_dev_get_resources() method agnostic (diff)
downloadlinux-c04ac679c6b86e4e36fbb675c6c061b4091f5810.tar.xz
linux-c04ac679c6b86e4e36fbb675c6c061b4091f5810.zip
ACPI: Introduce DMA ranges parsing
Some devices have limited addressing capabilities and cannot reference the whole memory address space while carrying out DMA operations (eg some devices with bus address bits range smaller than system bus - which prevents them from using bus addresses that are otherwise valid for the system). The ACPI _DMA object allows bus devices to define the DMA window that is actually addressable by devices that sit upstream the bus, therefore providing a means to parse and initialize the devices DMA masks and addressable DMA range size. By relying on the generic ACPI kernel layer to retrieve and parse resources, introduce ACPI core code to parse the _DMA object. Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Tested-by: Nate Watterson <nwatters@codeaurora.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/acpi/acpi_bus.h')
-rw-r--r--include/acpi/acpi_bus.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 68bc6be447fd..07eb963b5026 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -578,6 +578,8 @@ struct acpi_pci_root {
bool acpi_dma_supported(struct acpi_device *adev);
enum dev_dma_attr acpi_get_dma_attr(struct acpi_device *adev);
+int acpi_dma_get_range(struct device *dev, u64 *dma_addr, u64 *offset,
+ u64 *size);
int acpi_dma_configure(struct device *dev, enum dev_dma_attr attr);
void acpi_dma_deconfigure(struct device *dev);