aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-05-03 10:25:08 -0400
committerChristoph Hellwig <hch@lst.de>2018-05-03 10:25:08 -0400
commit3d6ce86ee79465e1b1b6e287f8ea26b553fc768e (patch)
tree5305a5ffefc514d485ae634e9d53b3e601fafbd3 /include/linux
parent07397df29e57cde5799af16e8f148ae10ed75285 (diff)
drivers: remove force dma flag from buses
With each bus implementing its own DMA configuration callback, there is no need for bus to explicitly set the force_dma flag. Modify the of_dma_configure function to accept an input parameter which specifies if implicit DMA configuration is required when it is not described by the firmware. Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> # PCI parts Reviewed-by: Rob Herring <robh@kernel.org> [hch: tweaked the changelog a bit] Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/device.h4
-rw-r--r--include/linux/of_device.h8
2 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 63aa672bd394..563077d1cdc1 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -98,8 +98,6 @@ extern void bus_remove_file(struct bus_type *, struct bus_attribute *);
98 * @p: The private data of the driver core, only the driver core can 98 * @p: The private data of the driver core, only the driver core can
99 * touch this. 99 * touch this.
100 * @lock_key: Lock class key for use by the lock validator 100 * @lock_key: Lock class key for use by the lock validator
101 * @force_dma: Assume devices on this bus should be set up by dma_configure()
102 * even if DMA capability is not explicitly described by firmware.
103 * 101 *
104 * A bus is a channel between the processor and one or more devices. For the 102 * A bus is a channel between the processor and one or more devices. For the
105 * purposes of the device model, all devices are connected via a bus, even if 103 * purposes of the device model, all devices are connected via a bus, even if
@@ -140,8 +138,6 @@ struct bus_type {
140 138
141 struct subsys_private *p; 139 struct subsys_private *p;
142 struct lock_class_key lock_key; 140 struct lock_class_key lock_key;
143
144 bool force_dma;
145}; 141};
146 142
147extern int __must_check bus_register(struct bus_type *bus); 143extern int __must_check bus_register(struct bus_type *bus);
diff --git a/include/linux/of_device.h b/include/linux/of_device.h
index 8da5a1b31ece..165fd302b442 100644
--- a/include/linux/of_device.h
+++ b/include/linux/of_device.h
@@ -55,7 +55,9 @@ static inline struct device_node *of_cpu_device_node_get(int cpu)
55 return of_node_get(cpu_dev->of_node); 55 return of_node_get(cpu_dev->of_node);
56} 56}
57 57
58int of_dma_configure(struct device *dev, struct device_node *np); 58int of_dma_configure(struct device *dev,
59 struct device_node *np,
60 bool force_dma);
59void of_dma_deconfigure(struct device *dev); 61void of_dma_deconfigure(struct device *dev);
60#else /* CONFIG_OF */ 62#else /* CONFIG_OF */
61 63
@@ -105,7 +107,9 @@ static inline struct device_node *of_cpu_device_node_get(int cpu)
105 return NULL; 107 return NULL;
106} 108}
107 109
108static inline int of_dma_configure(struct device *dev, struct device_node *np) 110static inline int of_dma_configure(struct device *dev,
111 struct device_node *np,
112 bool force_dma)
109{ 113{
110 return 0; 114 return 0;
111} 115}