Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d6ce86e authored by Christoph Hellwig's avatar Christoph Hellwig
Browse files

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: default avatarNipun Gupta <nipun.gupta@nxp.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>  # PCI parts
Reviewed-by: default avatarRob Herring <robh@kernel.org>
[hch: tweaked the changelog a bit]
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 07397df2
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -204,7 +204,6 @@ struct bus_type amba_bustype = {
	.uevent		= amba_uevent,
	.dma_configure	= platform_dma_configure,
	.pm		= &amba_pm,
	.force_dma	= true,
};

static int __init amba_init(void)
+1 −2
Original line number Diff line number Diff line
@@ -1136,7 +1136,7 @@ int platform_dma_configure(struct device *dev)
	int ret = 0;

	if (dev->of_node) {
		ret = of_dma_configure(dev, dev->of_node);
		ret = of_dma_configure(dev, dev->of_node, true);
	} else if (has_acpi_companion(dev)) {
		attr = acpi_get_dma_attr(to_acpi_device_node(dev->fwnode));
		if (attr != DEV_DMA_NOT_SUPPORTED)
@@ -1159,7 +1159,6 @@ struct bus_type platform_bus_type = {
	.uevent		= platform_uevent,
	.dma_configure	= platform_dma_configure,
	.pm		= &platform_dev_pm_ops,
	.force_dma	= true,
};
EXPORT_SYMBOL_GPL(platform_bus_type);

+1 −1
Original line number Diff line number Diff line
@@ -207,7 +207,7 @@ static void bcma_of_fill_device(struct device *parent,

	core->irq = bcma_of_get_irq(parent, core, 0);

	of_dma_configure(&core->dev, node);
	of_dma_configure(&core->dev, node, false);
}

unsigned int bcma_core_irq(struct bcma_device *core, int num)
+1 −1
Original line number Diff line number Diff line
@@ -398,7 +398,7 @@ static int __init hidma_mgmt_of_populate_channels(struct device_node *np)
		}
		of_node_get(child);
		new_pdev->dev.of_node = child;
		of_dma_configure(&new_pdev->dev, child);
		of_dma_configure(&new_pdev->dev, child, true);
		/*
		 * It is assumed that calling of_msi_configure is safe on
		 * platforms with or without MSI support.
+2 −3
Original line number Diff line number Diff line
@@ -316,7 +316,7 @@ static int host1x_device_match(struct device *dev, struct device_driver *drv)

static int host1x_dma_configure(struct device *dev)
{
	return of_dma_configure(dev, dev->of_node);
	return of_dma_configure(dev, dev->of_node, true);
}

static const struct dev_pm_ops host1x_device_pm_ops = {
@@ -333,7 +333,6 @@ struct bus_type host1x_bus_type = {
	.match = host1x_device_match,
	.dma_configure	= host1x_dma_configure,
	.pm = &host1x_device_pm_ops,
	.force_dma = true,
};

static void __host1x_device_del(struct host1x_device *device)
@@ -422,7 +421,7 @@ static int host1x_device_add(struct host1x *host1x,
	device->dev.bus = &host1x_bus_type;
	device->dev.parent = host1x->dev;

	of_dma_configure(&device->dev, host1x->dev->of_node);
	of_dma_configure(&device->dev, host1x->dev->of_node, true);

	err = host1x_device_parse_dt(device, driver);
	if (err < 0) {
Loading