diff options
| author | Nipun Gupta <nipun.gupta@nxp.com> | 2018-04-27 22:51:58 -0400 |
|---|---|---|
| committer | Christoph Hellwig <hch@lst.de> | 2018-05-03 10:22:18 -0400 |
| commit | 07397df29e57cde5799af16e8f148ae10ed75285 (patch) | |
| tree | 7f4e2606ec8d6a26a5433cb4dac32338178092fd /include/linux/device.h | |
| parent | 892a0be43edd63e1cd228af3453a064e9e94f08e (diff) | |
dma-mapping: move dma configuration to bus infrastructure
ACPI/OF support for configuration of DMA is a bus specific aspect, and
thus should be configured by the bus. Introduces a 'dma_configure' bus
method so that busses can control their DMA capabilities.
Also update the PCI, Platform, ACPI and host1x buses to use the new
method.
Suggested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com> # PCI parts
Acked-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[hch: simplified host1x_dma_configure based on a comment from Thierry,
rewrote changelog]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'include/linux/device.h')
| -rw-r--r-- | include/linux/device.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 477956990f5e..63aa672bd394 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -88,6 +88,8 @@ extern void bus_remove_file(struct bus_type *, struct bus_attribute *); | |||
| 88 | * @resume: Called to bring a device on this bus out of sleep mode. | 88 | * @resume: Called to bring a device on this bus out of sleep mode. |
| 89 | * @num_vf: Called to find out how many virtual functions a device on this | 89 | * @num_vf: Called to find out how many virtual functions a device on this |
| 90 | * bus supports. | 90 | * bus supports. |
| 91 | * @dma_configure: Called to setup DMA configuration on a device on | ||
| 92 | this bus. | ||
| 91 | * @pm: Power management operations of this bus, callback the specific | 93 | * @pm: Power management operations of this bus, callback the specific |
| 92 | * device driver's pm-ops. | 94 | * device driver's pm-ops. |
| 93 | * @iommu_ops: IOMMU specific operations for this bus, used to attach IOMMU | 95 | * @iommu_ops: IOMMU specific operations for this bus, used to attach IOMMU |
| @@ -130,6 +132,8 @@ struct bus_type { | |||
| 130 | 132 | ||
| 131 | int (*num_vf)(struct device *dev); | 133 | int (*num_vf)(struct device *dev); |
| 132 | 134 | ||
| 135 | int (*dma_configure)(struct device *dev); | ||
| 136 | |||
| 133 | const struct dev_pm_ops *pm; | 137 | const struct dev_pm_ops *pm; |
| 134 | 138 | ||
| 135 | const struct iommu_ops *iommu_ops; | 139 | const struct iommu_ops *iommu_ops; |
