Skip to contentSkip to conversation

mtd: mxc_nand: Select the driver via ARCH_MXC

PATCH Applied Fabio Estevam 4 participants 6 messages Jul 2, 2012 – Jul 16, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: mxc_nand: Select the driver via ARCH_MXC

From: Fabio Estevam <[email protected]>

With device tree support in place, we should not use IMX_HAVE_PLATFORM_MXC_NAND as a dependency for selecting the mxc_nand driver.

Use ARCH_MXC symbol instead, so that the driver can be even selected when a single device-tree machine is selected.

---
 drivers/mtd/nand/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mtd/nand/Kconfig +1 -1
index de69978..d2a0db1 100644
@@ -521,7 +521,7 @@ config MTD_NAND_MPC5121_NFC
 
 config MTD_NAND_MXC
 	tristate "MXC NAND support"
-	depends on IMX_HAVE_PLATFORM_MXC_NAND
+	depends on ARCH_MXC
 	help
 	  This enables the driver for the NAND flash controller on the
 	  MXC processors.
Signature · 1 line
1.7.1
#1 lore raw

Hello Fabio,

Quoted 7 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

With device tree support in place, we should not use IMX_HAVE_PLATFORM_MXC_NAND as a dependency for selecting the mxc_nand driver.

Use ARCH_MXC symbol instead, so that the driver can be even selected when a single device-tree machine is selected.

the obvious alternative is to select IMX_HAVE_PLATFORM_MXC_NAND for the dt-based machines, too.

Or make it:

	depends on IMX_HAVE_PLATFORM_MXC_NAND || DT || COMPILE_COVERAGE

(COMPILE_COVERAGE doesn't exist AFAIK, but IMHO it's sensible to introduce it.)

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
#2 lore raw

Hi Uwe,

Quoted 2 lines · Uwe Kleine-König

the obvious alternative is to select IMX_HAVE_PLATFORM_MXC_NAND for the dt-based machines, too.

That would cause platform-mxc_nand.c to be build, which is something that a dt machine does not need.

Quoted 4 lines

Or make it:

        depends on IMX_HAVE_PLATFORM_MXC_NAND || DT || COMPILE_COVERAGE

What about
"depends on IMX_HAVE_PLATFORM_MXC_NAND || CONFIG_OF" ?

Quoted 2 lines

(COMPILE_COVERAGE doesn't exist AFAIK, but IMHO it's sensible to introduce it.)

Ok, then maybe this could be introduced via another patchset.

Regards,

Fabio Estevam

Acked-by on v1 1/1
#3 lore raw
In reply to Fabio Estevam
Quoted 9 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

With device tree support in place, we should not use IMX_HAVE_PLATFORM_MXC_NAND as a dependency for selecting the mxc_nand driver.

Use ARCH_MXC symbol instead, so that the driver can be even selected when a single device-tree machine is selected.

Simple solution for a problem. I don't want to add even more dependencies. Also I think being able to compile in a driver even if it has no possible users in the tree does not hurt, so:

Quoted 21 lines
---
 drivers/mtd/nand/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mtd/nand/Kconfig +1 -1
index de69978..d2a0db1 100644
@@ -521,7 +521,7 @@ config MTD_NAND_MPC5121_NFC
 
 config MTD_NAND_MXC
 	tristate "MXC NAND support"
-	depends on IMX_HAVE_PLATFORM_MXC_NAND
+	depends on ARCH_MXC
 	help
 	  This enables the driver for the NAND flash controller on the
 	  MXC processors.
Signature · 1 line
1.7.1
Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
Acked-by on v1 1/1
#4 lore raw
In reply to Fabio Estevam
Quoted 9 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

With device tree support in place, we should not use IMX_HAVE_PLATFORM_MXC_NAND as a dependency for selecting the mxc_nand driver.

Use ARCH_MXC symbol instead, so that the driver can be even selected when a single device-tree machine is selected.

Thanks
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
#5 lore raw
In reply to Fabio Estevam
Quoted 9 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

With device tree support in place, we should not use IMX_HAVE_PLATFORM_MXC_NAND as a dependency for selecting the mxc_nand driver.

Use ARCH_MXC symbol instead, so that the driver can be even selected when a single device-tree machine is selected.

Pushed to l2-mtd.git, thanks!

Signature · 2 lines
Best Regards,
Artem Bityutskiy