diff options
author | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2017-08-07 11:29:48 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-08-07 14:28:51 +0200 |
commit | c04ac679c6b86e4e36fbb675c6c061b4091f5810 (patch) | |
tree | 52a0da44e4652e433d94f198a6f4e96547cf88d6 /include/linux/acpi.h | |
parent | 4f0450af530e62b0217522cab4803b5a65dccc46 (diff) | |
download | talos-op-linux-c04ac679c6b86e4e36fbb675c6c061b4091f5810.tar.gz talos-op-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/linux/acpi.h')
-rw-r--r-- | include/linux/acpi.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index c749eef1daa1..a5eaff9f2c6d 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -427,6 +427,8 @@ void acpi_dev_free_resource_list(struct list_head *list); int acpi_dev_get_resources(struct acpi_device *adev, struct list_head *list, int (*preproc)(struct acpi_resource *, void *), void *preproc_data); +int acpi_dev_get_dma_resources(struct acpi_device *adev, + struct list_head *list); int acpi_dev_filter_resource_type(struct acpi_resource *ares, unsigned long types); @@ -774,6 +776,12 @@ static inline enum dev_dma_attr acpi_get_dma_attr(struct acpi_device *adev) return DEV_DMA_NOT_SUPPORTED; } +static inline int acpi_dma_get_range(struct device *dev, u64 *dma_addr, + u64 *offset, u64 *size) +{ + return -ENODEV; +} + static inline int acpi_dma_configure(struct device *dev, enum dev_dma_attr attr) { |