mtd: nand/raw: MTD_NAND_BCM47XXNFLASH needs CONFIG_BCMA

Message ID 20180711084010.57950-1-arnd@arndb.de
State Accepted
Delegated to: Miquel Raynal
Headers show
Series
  • mtd: nand/raw: MTD_NAND_BCM47XXNFLASH needs CONFIG_BCMA
Related show

Commit Message

Arnd Bergmann July 11, 2018, 8:39 a.m.
We already have a dependency on BCMA_NFLASH, which in turn depends on
BCMA, but since BCMA is a tristate option and BCMA_NFLASH is bool,
we can run into an invalid configuration with MTD_NAND_BCM47XXNFLASH=y
and BCMA=m:

drivers/mtd/nand/raw/bcm47xxnflash/ops_bcm4706.o: In function `bcm47xxnflash_ops_bcm4706_init':
ops_bcm4706.c:(.text+0x790): undefined reference to `bcma_chipco_pll_read'

Adding the dependency here forces MTD_NAND_BCM47XXNFLASH to only be
configured =m here so it can link against the BCMA driver.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/mtd/nand/raw/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Boris Brezillon July 11, 2018, 8:44 a.m. | #1
On Wed, 11 Jul 2018 10:39:44 +0200
Arnd Bergmann <arnd@arndb.de> wrote:

> We already have a dependency on BCMA_NFLASH, which in turn depends on
> BCMA, but since BCMA is a tristate option and BCMA_NFLASH is bool,
> we can run into an invalid configuration with MTD_NAND_BCM47XXNFLASH=y
> and BCMA=m:
> 
> drivers/mtd/nand/raw/bcm47xxnflash/ops_bcm4706.o: In function `bcm47xxnflash_ops_bcm4706_init':
> ops_bcm4706.c:(.text+0x790): undefined reference to `bcma_chipco_pll_read'
> 
> Adding the dependency here forces MTD_NAND_BCM47XXNFLASH to only be
> configured =m here so it can link against the BCMA driver.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>

> ---
>  drivers/mtd/nand/raw/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
> index 230311fa2cc0..b457f92d55d4 100644
> --- a/drivers/mtd/nand/raw/Kconfig
> +++ b/drivers/mtd/nand/raw/Kconfig
> @@ -364,6 +364,7 @@ config MTD_NAND_BRCMNAND
>  config MTD_NAND_BCM47XXNFLASH
>  	tristate "Support for NAND flash on BCM4706 BCMA bus"
>  	depends on BCMA_NFLASH
> +	depends on BCMA
>  	help
>  	  BCMA bus can have various flash memories attached, they are
>  	  registered by bcma as platform devices. This enables driver for
Miquel Raynal July 18, 2018, 7:50 a.m. | #2
Hi Arnd,

Boris Brezillon <boris.brezillon@bootlin.com> wrote on Wed, 11 Jul 2018
10:44:46 +0200:

> On Wed, 11 Jul 2018 10:39:44 +0200
> Arnd Bergmann <arnd@arndb.de> wrote:
> 
> > We already have a dependency on BCMA_NFLASH, which in turn depends on
> > BCMA, but since BCMA is a tristate option and BCMA_NFLASH is bool,
> > we can run into an invalid configuration with MTD_NAND_BCM47XXNFLASH=y
> > and BCMA=m:
> > 
> > drivers/mtd/nand/raw/bcm47xxnflash/ops_bcm4706.o: In function `bcm47xxnflash_ops_bcm4706_init':
> > ops_bcm4706.c:(.text+0x790): undefined reference to `bcma_chipco_pll_read'
> > 
> > Adding the dependency here forces MTD_NAND_BCM47XXNFLASH to only be
> > configured =m here so it can link against the BCMA driver.
> > 
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>  
> 
> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
> 

Applied with prefix changed to "mtd: rawnand:".

Thanks,
Miquèl

Patch

diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
index 230311fa2cc0..b457f92d55d4 100644
--- a/drivers/mtd/nand/raw/Kconfig
+++ b/drivers/mtd/nand/raw/Kconfig
@@ -364,6 +364,7 @@  config MTD_NAND_BRCMNAND
 config MTD_NAND_BCM47XXNFLASH
 	tristate "Support for NAND flash on BCM4706 BCMA bus"
 	depends on BCMA_NFLASH
+	depends on BCMA
 	help
 	  BCMA bus can have various flash memories attached, they are
 	  registered by bcma as platform devices. This enables driver for