|
@@ -76,6 +76,8 @@ int of_device_add(struct platform_device *ofdev)
|
|
* of_dma_configure - Setup DMA configuration
|
|
* of_dma_configure - Setup DMA configuration
|
|
* @dev: Device to apply DMA configuration
|
|
* @dev: Device to apply DMA configuration
|
|
* @np: Pointer to OF node having DMA configuration
|
|
* @np: Pointer to OF node having DMA configuration
|
|
|
|
+ * @force_dma: Whether device is to be set up by of_dma_configure() even if
|
|
|
|
+ * DMA capability is not explicitly described by firmware.
|
|
*
|
|
*
|
|
* Try to get devices's DMA configuration from DT and update it
|
|
* Try to get devices's DMA configuration from DT and update it
|
|
* accordingly.
|
|
* accordingly.
|
|
@@ -84,7 +86,7 @@ int of_device_add(struct platform_device *ofdev)
|
|
* can use a platform bus notifier and handle BUS_NOTIFY_ADD_DEVICE events
|
|
* can use a platform bus notifier and handle BUS_NOTIFY_ADD_DEVICE events
|
|
* to fix up DMA configuration.
|
|
* to fix up DMA configuration.
|
|
*/
|
|
*/
|
|
-int of_dma_configure(struct device *dev, struct device_node *np)
|
|
|
|
|
|
+int of_dma_configure(struct device *dev, struct device_node *np, bool force_dma)
|
|
{
|
|
{
|
|
u64 dma_addr, paddr, size = 0;
|
|
u64 dma_addr, paddr, size = 0;
|
|
int ret;
|
|
int ret;
|
|
@@ -100,7 +102,7 @@ int of_dma_configure(struct device *dev, struct device_node *np)
|
|
* DMA configuration regardless of whether "dma-ranges" is
|
|
* DMA configuration regardless of whether "dma-ranges" is
|
|
* correctly specified or not.
|
|
* correctly specified or not.
|
|
*/
|
|
*/
|
|
- if (!dev->bus->force_dma)
|
|
|
|
|
|
+ if (!force_dma)
|
|
return ret == -ENODEV ? 0 : ret;
|
|
return ret == -ENODEV ? 0 : ret;
|
|
|
|
|
|
dma_addr = offset = 0;
|
|
dma_addr = offset = 0;
|