2021-01-21 11:08:03

by Lubomir Rintel

[permalink] [raw]
Subject: [PATCH 0/3] dmaengine: Allow building MMP DMA drivers as modules

Hi,

please consider attaching the patches chained to this message.

The last two are straighforward Kconfig changes that allow building mmp_tdma
and mmp_pdma as modules so that distros that will choose to enable the drivers
will not add bloat to their kernels for other platforms.

The first one gets rid of a symbol that would be exported by mmp_pdma,
because it is entirely unnecessary.

Thanks,
Lubo



2021-01-21 11:09:25

by Lubomir Rintel

[permalink] [raw]
Subject: [PATCH 1/3] dmaengine: mmp_pdma: Remove mmp_pdma_filter_fn()

It's not used anywhere -- drop it.

Signed-off-by: Lubomir Rintel <[email protected]>
---
drivers/dma/mmp_pdma.c | 14 --------------
include/linux/dma/mmp-pdma.h | 16 ----------------
2 files changed, 30 deletions(-)
delete mode 100644 include/linux/dma/mmp-pdma.h

diff --git a/drivers/dma/mmp_pdma.c b/drivers/dma/mmp_pdma.c
index b84303be8edf5..89f1814ff27a0 100644
--- a/drivers/dma/mmp_pdma.c
+++ b/drivers/dma/mmp_pdma.c
@@ -18,7 +18,6 @@
#include <linux/of_device.h>
#include <linux/of_dma.h>
#include <linux/of.h>
-#include <linux/dma/mmp-pdma.h>

#include "dmaengine.h"

@@ -1148,19 +1147,6 @@ static struct platform_driver mmp_pdma_driver = {
.remove = mmp_pdma_remove,
};

-bool mmp_pdma_filter_fn(struct dma_chan *chan, void *param)
-{
- struct mmp_pdma_chan *c = to_mmp_pdma_chan(chan);
-
- if (chan->device->dev->driver != &mmp_pdma_driver.driver)
- return false;
-
- c->drcmr = *(unsigned int *)param;
-
- return true;
-}
-EXPORT_SYMBOL_GPL(mmp_pdma_filter_fn);
-
module_platform_driver(mmp_pdma_driver);

MODULE_DESCRIPTION("MARVELL MMP Peripheral DMA Driver");
diff --git a/include/linux/dma/mmp-pdma.h b/include/linux/dma/mmp-pdma.h
deleted file mode 100644
index 25cab62a28c45..0000000000000
--- a/include/linux/dma/mmp-pdma.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _MMP_PDMA_H_
-#define _MMP_PDMA_H_
-
-struct dma_chan;
-
-#ifdef CONFIG_MMP_PDMA
-bool mmp_pdma_filter_fn(struct dma_chan *chan, void *param);
-#else
-static inline bool mmp_pdma_filter_fn(struct dma_chan *chan, void *param)
-{
- return false;
-}
-#endif
-
-#endif /* _MMP_PDMA_H_ */
--
2.29.2

2021-01-21 11:09:30

by Lubomir Rintel

[permalink] [raw]
Subject: [PATCH 3/3] dmaengine: mmp_tdma: Allow building as a module

There is no reason the Marvell MMP two-channel audio DMA driver would have
to be built-in.

Signed-off-by: Lubomir Rintel <[email protected]>
---
drivers/dma/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index 04effa065527b..978b2f526c5df 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -385,7 +385,7 @@ config MMP_PDMA
Support the MMP PDMA engine for PXA and MMP platform.

config MMP_TDMA
- bool "MMP Two-Channel DMA support"
+ tristate "MMP Two-Channel DMA support"
depends on ARCH_MMP || COMPILE_TEST
select DMA_ENGINE
select GENERIC_ALLOCATOR
--
2.29.2

2021-01-21 11:09:42

by Lubomir Rintel

[permalink] [raw]
Subject: [PATCH 2/3] dmaengine: mmp_pdma: Allow building as a module

There is no reason the Marvell MMP peripheral DMA driver would have
to be built-in.

Signed-off-by: Lubomir Rintel <[email protected]>
---
drivers/dma/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index d242c76326217..04effa065527b 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -378,7 +378,7 @@ config MILBEAUT_XDMAC
XDMAC device.

config MMP_PDMA
- bool "MMP PDMA support"
+ tristate "MMP PDMA support"
depends on ARCH_MMP || ARCH_PXA || COMPILE_TEST
select DMA_ENGINE
help
--
2.29.2

2021-01-27 00:43:32

by Vinod Koul

[permalink] [raw]
Subject: Re: [PATCH 0/3] dmaengine: Allow building MMP DMA drivers as modules

On 21-01-21, 12:03, Lubomir Rintel wrote:
> Hi,
>
> please consider attaching the patches chained to this message.
>
> The last two are straighforward Kconfig changes that allow building mmp_tdma
> and mmp_pdma as modules so that distros that will choose to enable the drivers
> will not add bloat to their kernels for other platforms.
>
> The first one gets rid of a symbol that would be exported by mmp_pdma,
> because it is entirely unnecessary.

Applied, thanks

--
~Vinod