Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

amba: Stop sharing platform_dma_configure()

Stop sharing platform_dma_configure() helper as they are about to have
their own bus dma_configure callbacks.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20220418005000.897664-4-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>

authored by

Lu Baolu and committed by
Joerg Roedel
4a6d9dd5 25f3bcfc

+19 -5
+18 -1
drivers/amba/bus.c
··· 20 20 #include <linux/platform_device.h> 21 21 #include <linux/reset.h> 22 22 #include <linux/of_irq.h> 23 + #include <linux/of_device.h> 24 + #include <linux/acpi.h> 23 25 24 26 #define to_amba_driver(d) container_of(d, struct amba_driver, drv) 25 27 ··· 275 273 drv->shutdown(to_amba_device(dev)); 276 274 } 277 275 276 + static int amba_dma_configure(struct device *dev) 277 + { 278 + enum dev_dma_attr attr; 279 + int ret = 0; 280 + 281 + if (dev->of_node) { 282 + ret = of_dma_configure(dev, dev->of_node, true); 283 + } else if (has_acpi_companion(dev)) { 284 + attr = acpi_get_dma_attr(to_acpi_device_node(dev->fwnode)); 285 + ret = acpi_dma_configure(dev, attr); 286 + } 287 + 288 + return ret; 289 + } 290 + 278 291 #ifdef CONFIG_PM 279 292 /* 280 293 * Hooks to provide runtime PM of the pclk (bus clock). It is safe to ··· 358 341 .probe = amba_probe, 359 342 .remove = amba_remove, 360 343 .shutdown = amba_shutdown, 361 - .dma_configure = platform_dma_configure, 344 + .dma_configure = amba_dma_configure, 362 345 .pm = &amba_pm, 363 346 }; 364 347 EXPORT_SYMBOL_GPL(amba_bustype);
+1 -2
drivers/base/platform.c
··· 1454 1454 drv->shutdown(dev); 1455 1455 } 1456 1456 1457 - 1458 - int platform_dma_configure(struct device *dev) 1457 + static int platform_dma_configure(struct device *dev) 1459 1458 { 1460 1459 enum dev_dma_attr attr; 1461 1460 int ret = 0;
-2
include/linux/platform_device.h
··· 328 328 #define platform_pm_restore NULL 329 329 #endif 330 330 331 - extern int platform_dma_configure(struct device *dev); 332 - 333 331 #ifdef CONFIG_PM_SLEEP 334 332 #define USE_PLATFORM_PM_SLEEP_OPS \ 335 333 .suspend = platform_pm_suspend, \