2018-03-16 13:51:47

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH v2 14/21] mtd: Remove depends on HAS_DMA in case of platform dependency

Remove dependencies on HAS_DMA where a Kconfig symbol depends on another
symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST".
In most cases this other symbol is an architecture or platform specific
symbol, or PCI.

Generic symbols and drivers without platform dependencies keep their
dependencies on HAS_DMA, to prevent compiling subsystems or drivers that
cannot work anyway.

This simplifies the dependencies, and allows to improve compile-testing.

Signed-off-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Mark Brown <[email protected]>
Acked-by: Robin Murphy <[email protected]>
---
v2:
- Add Reviewed-by, Acked-by,
- Drop RFC state,
- Drop new dependency of MTD_NAND_MARVELL on HAS_DMA,
- Split per subsystem.
---
drivers/mtd/nand/Kconfig | 8 ++------
drivers/mtd/spi-nor/Kconfig | 2 +-
2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 736ac887303c88ba..55a2f8a2fa90cd87 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -46,7 +46,7 @@ config MTD_NAND_DENALI
config MTD_NAND_DENALI_PCI
tristate "Support Denali NAND controller on Intel Moorestown"
select MTD_NAND_DENALI
- depends on HAS_DMA && PCI
+ depends on PCI
help
Enable the driver for NAND flash on Intel Moorestown, using the
Denali NAND controller core.
@@ -184,7 +184,6 @@ config MTD_NAND_S3C2410_CLKSTOP
config MTD_NAND_TANGO
tristate "NAND Flash support for Tango chips"
depends on ARCH_TANGO || COMPILE_TEST
- depends on HAS_DMA
help
Enables the NAND Flash controller on Tango chips.

@@ -328,7 +327,7 @@ config MTD_NAND_MARVELL
tristate "NAND controller support on Marvell boards"
depends on PXA3xx || ARCH_MMP || PLAT_ORION || ARCH_MVEBU || \
COMPILE_TEST
- depends on HAS_IOMEM && HAS_DMA
+ depends on HAS_IOMEM
help
This enables the NAND flash controller driver for Marvell boards,
including:
@@ -490,7 +489,6 @@ config MTD_NAND_SH_FLCTL
tristate "Support for NAND on Renesas SuperH FLCTL"
depends on SUPERH || COMPILE_TEST
depends on HAS_IOMEM
- depends on HAS_DMA
help
Several Renesas SuperH CPU has FLCTL. This option enables support
for NAND Flash using FLCTL.
@@ -558,7 +556,6 @@ config MTD_NAND_SUNXI
config MTD_NAND_HISI504
tristate "Support for NAND controller on Hisilicon SoC Hip04"
depends on ARCH_HISI || COMPILE_TEST
- depends on HAS_DMA
help
Enables support for NAND controller on Hisilicon SoC Hip04.

@@ -572,7 +569,6 @@ config MTD_NAND_QCOM
config MTD_NAND_MTK
tristate "Support for NAND controller on MTK SoCs"
depends on ARCH_MEDIATEK || COMPILE_TEST
- depends on HAS_DMA
help
Enables support for NAND controller on MTK SoCs.
This controller is found on mt27xx, mt81xx, mt65xx SoCs.
diff --git a/drivers/mtd/spi-nor/Kconfig b/drivers/mtd/spi-nor/Kconfig
index 89da88e591215db1..c493b8230a38c059 100644
--- a/drivers/mtd/spi-nor/Kconfig
+++ b/drivers/mtd/spi-nor/Kconfig
@@ -71,7 +71,7 @@ config SPI_FSL_QUADSPI
config SPI_HISI_SFC
tristate "Hisilicon SPI-NOR Flash Controller(SFC)"
depends on ARCH_HISI || COMPILE_TEST
- depends on HAS_IOMEM && HAS_DMA
+ depends on HAS_IOMEM
help
This enables support for hisilicon SPI-NOR flash controller.

--
2.7.4


2018-03-18 22:04:10

by Boris Brezillon

[permalink] [raw]
Subject: Re: [PATCH v2 14/21] mtd: Remove depends on HAS_DMA in case of platform dependency

Hi Geert,

On Fri, 16 Mar 2018 14:51:47 +0100
Geert Uytterhoeven <[email protected]> wrote:

> Remove dependencies on HAS_DMA where a Kconfig symbol depends on another
> symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST".
> In most cases this other symbol is an architecture or platform specific
> symbol, or PCI.
>
> Generic symbols and drivers without platform dependencies keep their
> dependencies on HAS_DMA, to prevent compiling subsystems or drivers that
> cannot work anyway.
>
> This simplifies the dependencies, and allows to improve compile-testing.
>

Don't know which release you're targeting but it's likely to conflict
with the change I have in my nand/next branch. Is this a problem if I
take this patch through the mtd tree after [1] has reached Linus' tree?

Regards,

Boris

[1]https://lkml.org/lkml/2018/3/16/435

> Signed-off-by: Geert Uytterhoeven <[email protected]>
> Reviewed-by: Mark Brown <[email protected]>
> Acked-by: Robin Murphy <[email protected]>
> ---
> v2:
> - Add Reviewed-by, Acked-by,
> - Drop RFC state,
> - Drop new dependency of MTD_NAND_MARVELL on HAS_DMA,
> - Split per subsystem.
> ---
> drivers/mtd/nand/Kconfig | 8 ++------
> drivers/mtd/spi-nor/Kconfig | 2 +-
> 2 files changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
> index 736ac887303c88ba..55a2f8a2fa90cd87 100644
> --- a/drivers/mtd/nand/Kconfig
> +++ b/drivers/mtd/nand/Kconfig
> @@ -46,7 +46,7 @@ config MTD_NAND_DENALI
> config MTD_NAND_DENALI_PCI
> tristate "Support Denali NAND controller on Intel Moorestown"
> select MTD_NAND_DENALI
> - depends on HAS_DMA && PCI
> + depends on PCI
> help
> Enable the driver for NAND flash on Intel Moorestown, using the
> Denali NAND controller core.
> @@ -184,7 +184,6 @@ config MTD_NAND_S3C2410_CLKSTOP
> config MTD_NAND_TANGO
> tristate "NAND Flash support for Tango chips"
> depends on ARCH_TANGO || COMPILE_TEST
> - depends on HAS_DMA
> help
> Enables the NAND Flash controller on Tango chips.
>
> @@ -328,7 +327,7 @@ config MTD_NAND_MARVELL
> tristate "NAND controller support on Marvell boards"
> depends on PXA3xx || ARCH_MMP || PLAT_ORION || ARCH_MVEBU || \
> COMPILE_TEST
> - depends on HAS_IOMEM && HAS_DMA
> + depends on HAS_IOMEM
> help
> This enables the NAND flash controller driver for Marvell boards,
> including:
> @@ -490,7 +489,6 @@ config MTD_NAND_SH_FLCTL
> tristate "Support for NAND on Renesas SuperH FLCTL"
> depends on SUPERH || COMPILE_TEST
> depends on HAS_IOMEM
> - depends on HAS_DMA
> help
> Several Renesas SuperH CPU has FLCTL. This option enables support
> for NAND Flash using FLCTL.
> @@ -558,7 +556,6 @@ config MTD_NAND_SUNXI
> config MTD_NAND_HISI504
> tristate "Support for NAND controller on Hisilicon SoC Hip04"
> depends on ARCH_HISI || COMPILE_TEST
> - depends on HAS_DMA
> help
> Enables support for NAND controller on Hisilicon SoC Hip04.
>
> @@ -572,7 +569,6 @@ config MTD_NAND_QCOM
> config MTD_NAND_MTK
> tristate "Support for NAND controller on MTK SoCs"
> depends on ARCH_MEDIATEK || COMPILE_TEST
> - depends on HAS_DMA
> help
> Enables support for NAND controller on MTK SoCs.
> This controller is found on mt27xx, mt81xx, mt65xx SoCs.
> diff --git a/drivers/mtd/spi-nor/Kconfig b/drivers/mtd/spi-nor/Kconfig
> index 89da88e591215db1..c493b8230a38c059 100644
> --- a/drivers/mtd/spi-nor/Kconfig
> +++ b/drivers/mtd/spi-nor/Kconfig
> @@ -71,7 +71,7 @@ config SPI_FSL_QUADSPI
> config SPI_HISI_SFC
> tristate "Hisilicon SPI-NOR Flash Controller(SFC)"
> depends on ARCH_HISI || COMPILE_TEST
> - depends on HAS_IOMEM && HAS_DMA
> + depends on HAS_IOMEM
> help
> This enables support for hisilicon SPI-NOR flash controller.
>



--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

2018-03-20 10:06:48

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH v2 14/21] mtd: Remove depends on HAS_DMA in case of platform dependency

Hi Boris,

On Sun, Mar 18, 2018 at 11:04 PM, Boris Brezillon
<[email protected]> wrote:
> On Fri, 16 Mar 2018 14:51:47 +0100
> Geert Uytterhoeven <[email protected]> wrote:
>
>> Remove dependencies on HAS_DMA where a Kconfig symbol depends on another
>> symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST".
>> In most cases this other symbol is an architecture or platform specific
>> symbol, or PCI.
>>
>> Generic symbols and drivers without platform dependencies keep their
>> dependencies on HAS_DMA, to prevent compiling subsystems or drivers that
>> cannot work anyway.
>>
>> This simplifies the dependencies, and allows to improve compile-testing.
>>
>
> Don't know which release you're targeting but it's likely to conflict
> with the change I have in my nand/next branch. Is this a problem if I
> take this patch through the mtd tree after [1] has reached Linus' tree?

No problem, I will rebase and resubmit after v4.17-rc1.

> [1]https://lkml.org/lkml/2018/3/16/435
>
>> Signed-off-by: Geert Uytterhoeven <[email protected]>
>> Reviewed-by: Mark Brown <[email protected]>
>> Acked-by: Robin Murphy <[email protected]>

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds