All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ARM: BCM: Do not select MTD_NAND_BRCMNAND
@ 2015-06-27 16:25 Florian Fainelli
  2015-06-27 16:25 ` [PATCH 1/2] ARM: BCM: Do not select CONFIG_MTD_NAND_BRCMNAND Florian Fainelli
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Florian Fainelli @ 2015-06-27 16:25 UTC (permalink / raw)
  To: linux-arm-kernel

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(-)

-- 
2.1.0

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/2] ARM: BCM: Do not select CONFIG_MTD_NAND_BRCMNAND
  2015-06-27 16:25 [PATCH 0/2] ARM: BCM: Do not select MTD_NAND_BRCMNAND Florian Fainelli
@ 2015-06-27 16:25 ` Florian Fainelli
  2015-06-27 21:39   ` Rafał Miłecki
  2015-07-06 21:01     ` Brian Norris
  2015-06-27 16:25 ` [PATCH 2/2] ARM: multi_v7_defconfig: Enable BRCMNAND driver Florian Fainelli
  2015-07-01 20:40 ` [PATCH 0/2] ARM: BCM: Do not select MTD_NAND_BRCMNAND Kevin Hilman
  2 siblings, 2 replies; 10+ messages in thread
From: Florian Fainelli @ 2015-06-27 16:25 UTC (permalink / raw)
  To: linux-arm-kernel

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.o
drivers/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.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 arch/arm/mach-bcm/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
index e9184feffc4e..0ac9e4b3b265 100644
--- a/arch/arm/mach-bcm/Kconfig
+++ b/arch/arm/mach-bcm/Kconfig
@@ -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
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/2] ARM: multi_v7_defconfig: Enable BRCMNAND driver
  2015-06-27 16:25 [PATCH 0/2] ARM: BCM: Do not select MTD_NAND_BRCMNAND Florian Fainelli
  2015-06-27 16:25 ` [PATCH 1/2] ARM: BCM: Do not select CONFIG_MTD_NAND_BRCMNAND Florian Fainelli
@ 2015-06-27 16:25 ` Florian Fainelli
  2015-07-01 20:40 ` [PATCH 0/2] ARM: BCM: Do not select MTD_NAND_BRCMNAND Kevin Hilman
  2 siblings, 0 replies; 10+ messages in thread
From: Florian Fainelli @ 2015-06-27 16:25 UTC (permalink / raw)
  To: linux-arm-kernel

The Broadcom NAND driver is used by brcmstb, bcm63xx, bcm5301x and
Cygnus/iProc under mach-bcm, this is enough critical mass to enable it.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 arch/arm/configs/multi_v7_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index fd6a6d23bc20..6d83a1bf0c74 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -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
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 1/2] ARM: BCM: Do not select CONFIG_MTD_NAND_BRCMNAND
  2015-06-27 16:25 ` [PATCH 1/2] ARM: BCM: Do not select CONFIG_MTD_NAND_BRCMNAND Florian Fainelli
@ 2015-06-27 21:39   ` Rafał Miłecki
  2015-06-27 23:01     ` Gregory Fong
  2015-07-06 21:01     ` Brian Norris
  1 sibling, 1 reply; 10+ messages in thread
From: Rafał Miłecki @ 2015-06-27 21:39 UTC (permalink / raw)
  To: linux-arm-kernel

On 27 June 2015 at 18:25, Florian Fainelli <f.fainelli@gmail.com> wrote:
> 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:

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?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/2] ARM: BCM: Do not select CONFIG_MTD_NAND_BRCMNAND
  2015-06-27 21:39   ` Rafał Miłecki
@ 2015-06-27 23:01     ` Gregory Fong
  2015-06-28  1:40       ` Florian Fainelli
  2015-06-28  7:19       ` Rafał Miłecki
  0 siblings, 2 replies; 10+ messages in thread
From: Gregory Fong @ 2015-06-27 23:01 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Jun 27, 2015 at 2:39 PM, Rafa? Mi?ecki <zajec5@gmail.com> wrote:
> On 27 June 2015 at 18:25, Florian Fainelli <f.fainelli@gmail.com> wrote:
>> 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:
>
> 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?

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.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/2] ARM: BCM: Do not select CONFIG_MTD_NAND_BRCMNAND
  2015-06-27 23:01     ` Gregory Fong
@ 2015-06-28  1:40       ` Florian Fainelli
  2015-06-28  7:19       ` Rafał Miłecki
  1 sibling, 0 replies; 10+ messages in thread
From: Florian Fainelli @ 2015-06-28  1:40 UTC (permalink / raw)
  To: linux-arm-kernel

Le 06/27/15 16:01, Gregory Fong a ?crit :
> On Sat, Jun 27, 2015 at 2:39 PM, Rafa? Mi?ecki <zajec5@gmail.com> wrote:
>> On 27 June 2015 at 18:25, Florian Fainelli <f.fainelli@gmail.com> wrote:
>>> 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:
>>
>> 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?
> 
> 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!
-- 
Florian

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/2] ARM: BCM: Do not select CONFIG_MTD_NAND_BRCMNAND
  2015-06-27 23:01     ` Gregory Fong
  2015-06-28  1:40       ` Florian Fainelli
@ 2015-06-28  7:19       ` Rafał Miłecki
  1 sibling, 0 replies; 10+ messages in thread
From: Rafał Miłecki @ 2015-06-28  7:19 UTC (permalink / raw)
  To: linux-arm-kernel

On 28 June 2015 at 01:01, Gregory Fong <gregory.0xf0@gmail.com> wrote:
> On Sat, Jun 27, 2015 at 2:39 PM, Rafa? Mi?ecki <zajec5@gmail.com> wrote:
>> On 27 June 2015 at 18:25, Florian Fainelli <f.fainelli@gmail.com> wrote:
>>> 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:
>>
>> 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?
>
> 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!

-- 
Rafa?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 0/2] ARM: BCM: Do not select MTD_NAND_BRCMNAND
  2015-06-27 16:25 [PATCH 0/2] ARM: BCM: Do not select MTD_NAND_BRCMNAND Florian Fainelli
  2015-06-27 16:25 ` [PATCH 1/2] ARM: BCM: Do not select CONFIG_MTD_NAND_BRCMNAND Florian Fainelli
  2015-06-27 16:25 ` [PATCH 2/2] ARM: multi_v7_defconfig: Enable BRCMNAND driver Florian Fainelli
@ 2015-07-01 20:40 ` Kevin Hilman
  2 siblings, 0 replies; 10+ messages in thread
From: Kevin Hilman @ 2015-07-01 20:40 UTC (permalink / raw)
  To: linux-arm-kernel

Florian Fainelli <f.fainelli@gmail.com> writes:

> 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!

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] ARM: BCM: Do not select CONFIG_MTD_NAND_BRCMNAND
  2015-06-27 16:25 ` [PATCH 1/2] ARM: BCM: Do not select CONFIG_MTD_NAND_BRCMNAND Florian Fainelli
@ 2015-07-06 21:01     ` Brian Norris
  2015-07-06 21:01     ` Brian Norris
  1 sibling, 0 replies; 10+ messages in thread
From: Brian Norris @ 2015-07-06 21:01 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: arm, zajec5, hauke, nbd, linux-arm-kernel, arnd, olof, khilman,
	bcm-kernel-feedback-list, jdzheng, sbranden, jonathar, rjui,
	gregory.0xf0, linux-mtd

On Sat, Jun 27, 2015 at 09:25:43AM -0700, Florian Fainelli wrote:
> 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.o
> drivers/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.
> 
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

FWIW (I've been a bit disconnected this last week):

Acked-by: Brian Norris <computersforpeace@gmail.com>

Drivers should not be select-ed like this. Thanks for the patch.

> ---
>  arch/arm/mach-bcm/Kconfig | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
> index e9184feffc4e..0ac9e4b3b265 100644
> --- a/arch/arm/mach-bcm/Kconfig
> +++ b/arch/arm/mach-bcm/Kconfig
> @@ -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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/2] ARM: BCM: Do not select CONFIG_MTD_NAND_BRCMNAND
@ 2015-07-06 21:01     ` Brian Norris
  0 siblings, 0 replies; 10+ messages in thread
From: Brian Norris @ 2015-07-06 21:01 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Jun 27, 2015 at 09:25:43AM -0700, Florian Fainelli wrote:
> 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.o
> drivers/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.
> 
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

FWIW (I've been a bit disconnected this last week):

Acked-by: Brian Norris <computersforpeace@gmail.com>

Drivers should not be select-ed like this. Thanks for the patch.

> ---
>  arch/arm/mach-bcm/Kconfig | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
> index e9184feffc4e..0ac9e4b3b265 100644
> --- a/arch/arm/mach-bcm/Kconfig
> +++ b/arch/arm/mach-bcm/Kconfig
> @@ -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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-07-06 21:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-27 16:25 [PATCH 0/2] ARM: BCM: Do not select MTD_NAND_BRCMNAND Florian Fainelli
2015-06-27 16:25 ` [PATCH 1/2] ARM: BCM: Do not select CONFIG_MTD_NAND_BRCMNAND Florian Fainelli
2015-06-27 21:39   ` Rafał Miłecki
2015-06-27 23:01     ` Gregory Fong
2015-06-28  1:40       ` Florian Fainelli
2015-06-28  7:19       ` Rafał Miłecki
2015-07-06 21:01   ` Brian Norris
2015-07-06 21:01     ` Brian Norris
2015-06-27 16:25 ` [PATCH 2/2] ARM: multi_v7_defconfig: Enable BRCMNAND driver Florian Fainelli
2015-07-01 20:40 ` [PATCH 0/2] ARM: BCM: Do not select MTD_NAND_BRCMNAND Kevin Hilman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.