[PATCH] backport: bcma: restore old behaviour for kernels lacking of_dma_configure()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The function of_dma_configure() was recently added to bcma by
commit defb893fffef ("bcma: use of_dma_configure() to set initial dma
mask") which is available since v4.1 kernel. Providing a full backport
of that function is tricky so patching bcma to get behaviour as before
the mentioned commit.

Signed-off-by: Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx>
---
 .../backport-adjustments/bcma_of_dma_configure.patch | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 patches/backport-adjustments/bcma_of_dma_configure.patch

diff --git a/patches/backport-adjustments/bcma_of_dma_configure.patch b/patches/backport-adjustments/bcma_of_dma_configure.patch
new file mode 100644
index 0000000..e1da42f
--- /dev/null
+++ b/patches/backport-adjustments/bcma_of_dma_configure.patch
@@ -0,0 +1,19 @@
+diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
+index 2c1798e..6060a57 100644
+--- a/drivers/bcma/main.c
++++ b/drivers/bcma/main.c
+@@ -209,8 +209,11 @@ static void bcma_of_fill_device(struct platform_device *parent,
+		core->dev.of_node = node;
+
+	core->irq = bcma_of_get_irq(parent, core, 0);
+-
++#if LINUX_VERSION_CODE > KERNEL_VERSION(4,0,0)
+	of_dma_configure(&core->dev, node);
++#else
++	core->dev.dma_mask = &core->dev.coherent_dma_mask;
++#endif
+ }
+
+ unsigned int bcma_core_irq(struct bcma_device *core, int num)
+--
+1.9.1
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe backports" in



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux