ARM: BCM: Do not select MTD_NAND_BRCMNAND
Subsystems (4)
cover ARM: BCM: Do not select MTD_NAND_BRCMNAND
Hi Arnd, Kevin, Olof,
This two patches fix a linking failure when ARCH_BCM_IPROC is selected for the BRCMNAND driver since we end-up selecting this driver without its proper depdendencies. Instead do not do this select driver which is user-selectable, but add it to the multi_v7_defconfig.
Let me know if you would prefer a pull request for this rather than individual patches. Thanks!
Florian Fainelli (2):
ARM: BCM: Do not select CONFIG_MTD_NAND_BRCMNAND
ARM: multi_v7_defconfig: Enable BRCMNAND driver
arch/arm/configs/multi_v7_defconfig | 1 + arch/arm/mach-bcm/Kconfig | 1 - 2 files changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.1.0
PATCH 1/2 ARM: BCM: Do not select CONFIG_MTD_NAND_BRCMNAND
This reverts 7dc95b40f599293aedf30432749ad25b51549041 ("ARM: BCM: Enable NAND support for iProc SoCs") since it creates an unmet dependency for MTD_NAND_BRCMNAND which depends on MTD and MTD_NAND, this results in the following build failure for brcmnand:
LD init/built-in.odrivers/built-in.o: In function `brcmnand_remove':/home/fainelli/dev/linux/drivers/mtd/nand/brcmnand/brcmnand.c:2234:
undefined reference to nand_release' drivers/built-in.o: In function brcmnand_init_cs':/home/fainelli/dev/linux/drivers/mtd/nand/brcmnand/brcmnand.c:1933:
undefined reference to `nand_scan_ident' /home/fainelli/dev/linux/drivers/mtd/nand/brcmnand/brcmnand.c:1958:
undefined reference to `nand_scan_tail'
Makefile:931: recipe for target 'vmlinux' failed
make: *** [vmlinux] Error 1
Instead, select this driver an all dependencies on the multi_v7_defconfig.
--- arch/arm/mach-bcm/Kconfig | 1 - 1 file changed, 1 deletion(-)
arch/arm/mach-bcm/Kconfig +0 -1
@@ -19,7 +19,6 @@ config ARCH_BCM_IPROC select ARCH_REQUIRE_GPIOLIB select ARM_AMBA select PINCTRL - select MTD_NAND_BRCMNAND help This enables support for systems based on Broadcom IPROC architected SoCs. The IPROC complex contains one or more ARM CPUs along with common
Signature · 1 line
2.1.0
PATCH 1/2 ARM: BCM: Do not select CONFIG_MTD_NAND_BRCMNAND
Quoted 4 lines · Florian Fainelli
This reverts
7dc95b40f599293aedf30432749ad25b51549041("ARM: BCM: Enable NAND support for iProc SoCs") since it creates an unmet dependency forMTD_NAND_BRCMNANDwhich depends on MTD andMTD_NAND, this results in the following build failure for brcmnand:
This commit message doesn't make too much sense to me. If MTD_NAND_BRCMNAND really depends on MTD and MTD_NAND then there couldn't be this problem you described.
Maybe MTD_NAND_BRCMNAND is *missing* that dependency?
PATCH 1/2 ARM: BCM: Do not select CONFIG_MTD_NAND_BRCMNAND
Quoted 11 lines · Rafa? Mi?ecki
Quoted 4 lines · Florian Fainelli
This reverts
7dc95b40f599293aedf30432749ad25b51549041("ARM: BCM: Enable NAND support for iProc SoCs") since it creates an unmet dependency forMTD_NAND_BRCMNANDwhich depends on MTD andMTD_NAND, this results in the following build failure for brcmnand:This commit message doesn't make too much sense to me. If
MTD_NAND_BRCMNANDreally depends on MTD andMTD_NANDthen there couldn't be this problem you described.Maybe
MTD_NAND_BRCMNANDis *missing* that dependency?
Per Documentation/kbuild/kconfig-language.txt: "select will force a symbol to a value without visiting the dependencies. By abusing select you are able to select a symbol FOO even if FOO depends on BAR that is not set."
I believe this is what is happening here.
PATCH 1/2 ARM: BCM: Do not select CONFIG_MTD_NAND_BRCMNAND
Le 06/27/15 16:01, Gregory Fong a ?crit :
Quoted 11 lines · Rafa? Mi?ecki
Quoted 10 lines · Florian Fainelli
Quoted 4 lines
This reverts
7dc95b40f599293aedf30432749ad25b51549041("ARM: BCM: Enable NAND support for iProc SoCs") since it creates an unmet dependency forMTD_NAND_BRCMNANDwhich depends on MTD andMTD_NAND, this results in the following build failure for brcmnand:This commit message doesn't make too much sense to me. If
MTD_NAND_BRCMNANDreally depends on MTD andMTD_NANDthen there couldn't be this problem you described.
Quoted 8 lines
Quoted 1 line
Maybe
MTD_NAND_BRCMNANDis *missing* that dependency?Per
Documentation/kbuild/kconfig-language.txt: "select will force a symbol to a value without visiting the dependencies. By abusing select you are able to select a symbol FOO even if FOO depends on BAR that is not set."I believe this is what is happening here.
Right, what is happening is actually that CONFIG_MTD gates CONFIG_MTD_NAND, using a if MTD statement, which only affects the user-selectability aspect of it, it does therefore only *implicitly* enforce a depdency CONFIG_MTD for CONFIG_MTD_NAND because all of this is user-selectable, so you need CONFIG_MTD to have CONFIG_MTD_NAND *apppear* as a selectable option first. The same is true for all NAND drivers, which are gated with an if MTD_NAND statement.
I could put that in the commit message and resubmit if this is deemed appropriate to understand what is being fixed here; I thought mentioning the unmet dependency would be enough though.
Thanks!
Signature · 1 line
Florian
PATCH 1/2 ARM: BCM: Do not select CONFIG_MTD_NAND_BRCMNAND
In reply to Gregory FongQuoted 11 lines · Gregory Fong
Quoted 10 lines · Rafa? Mi?ecki
Quoted 4 lines · Florian Fainelli
This reverts
7dc95b40f599293aedf30432749ad25b51549041("ARM: BCM: Enable NAND support for iProc SoCs") since it creates an unmet dependency forMTD_NAND_BRCMNANDwhich depends on MTD andMTD_NAND, this results in the following build failure for brcmnand:This commit message doesn't make too much sense to me. If
MTD_NAND_BRCMNANDreally depends on MTD andMTD_NANDthen there couldn't be this problem you described.
Quoted 8 lines
Quoted 1 line
Maybe
MTD_NAND_BRCMNANDis *missing* that dependency?Per
Documentation/kbuild/kconfig-language.txt: "select will force a symbol to a value without visiting the dependencies. By abusing select you are able to select a symbol FOO even if FOO depends on BAR that is not set."I believe this is what is happening here.
Oops, it seems I still don't know Kconfig well enough.
Thanks for explaining, sorry for the noise, it looks fine!
Signature · 1 line
Rafa?
PATCH 1/2 ARM: BCM: Do not select CONFIG_MTD_NAND_BRCMNAND
In reply to Florian FainelliQuoted 17 lines · Florian Fainelli
This reverts
7dc95b40f599293aedf30432749ad25b51549041("ARM: BCM: Enable NAND support for iProc SoCs") since it creates an unmet dependency forMTD_NAND_BRCMNANDwhich depends on MTD andMTD_NAND, this results in the following build failure for brcmnand:LD
init/built-in.odrivers/built-in.o: In function `brcmnand_remove':/home/fainelli/dev/linux/drivers/mtd/nand/brcmnand/brcmnand.c:2234:
undefined reference tonand_release' drivers/built-in.o: In functionbrcmnand_init_cs':/home/fainelli/dev/linux/drivers/mtd/nand/brcmnand/brcmnand.c:1933:
undefined reference to `nand_scan_ident'/home/fainelli/dev/linux/drivers/mtd/nand/brcmnand/brcmnand.c:1958:
undefined reference to `nand_scan_tail'
Makefile:931: recipe for target 'vmlinux' failed
make: *** [vmlinux] Error 1
Quoted 4 lines
Instead, select this driver an all dependencies on the
multi_v7_defconfig.Signed-off-by Florian Fainelli <[email protected]>
FWIW (I've been a bit disconnected this last week):
Drivers should not be select-ed like this. Thanks for the patch.
Quoted 16 lines
--- arch/arm/mach-bcm/Kconfig | 1 - 1 file changed, 1 deletion(-)arch/arm/mach-bcm/Kconfig +0
-1@@ -19,7 +19,6 @@ config ARCH_BCM_IPROC select ARCH_REQUIRE_GPIOLIB select ARM_AMBA select PINCTRL - select MTD_NAND_BRCMNAND help This enables support for systems based on Broadcom IPROC architected SoCs. The IPROC complex contains one or more ARM CPUs along with common
PATCH 2/2 ARM: multi_v7_defconfig: Enable BRCMNAND driver
In reply to Florian FainelliThe Broadcom NAND driver is used by brcmstb, bcm63xx, bcm5301x and Cygnus/iProc under mach-bcm, this is enough critical mass to enable it.
--- arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/configs/multi_v7_defconfig +1 -0
@@ -169,6 +169,7 @@ CONFIG_MTD_BLOCK=y CONFIG_MTD_M25P80=y CONFIG_MTD_NAND=y CONFIG_MTD_NAND_ATMEL=y +CONFIG_MTD_NAND_BRCMNAND=y CONFIG_MTD_NAND_DAVINCI=y CONFIG_MTD_SPI_NOR=y CONFIG_MTD_UBI=y
Signature · 1 line
2.1.0
Kevin Hilman
Appliedcover ARM: BCM: Do not select MTD_NAND_BRCMNAND
In reply to Florian FainelliQuoted 9 lines · Florian Fainelli
Hi Arnd, Kevin, Olof,
This two patches fix a linking failure when
ARCH_BCM_IPROCis selected for the BRCMNAND driver since we end-up selecting this driver without its proper depdendencies. Instead do not do this select driver which is user-selectable, but add it to themulti_v7_defconfig.Let me know if you would prefer a pull request for this rather than individual patches. Thanks!
Individual patches are fine.
I've picked these up for the arm-soc/late branch which I'll try to get in before -rc1, but if not it will make it for -rc2.
Thanks,
Kevin