On Wed, Nov 05, 2014 at 04:59:53PM +0000, Lee Jones wrote:
> This is the BBT format ST use internally.  It has to be used on boards
> which were flashed with or actively use ST's tooling and boards which
> are booted using ST's bootloaders.
> 
> Signed-off-by: Lee Jones <[email protected]>
> ---
>  drivers/mtd/nand/Kconfig        |   8 +
>  drivers/mtd/nand/Makefile       |   4 +-
>  drivers/mtd/nand/stm_nand_bbt.c | 619 
> ++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 630 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/mtd/nand/stm_nand_bbt.c
> 
> diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
> index 2738eec..040374d 100644
> --- a/drivers/mtd/nand/Kconfig
> +++ b/drivers/mtd/nand/Kconfig
> @@ -520,4 +520,12 @@ config MTD_NAND_STM_BCH
>       help
>         Adds support for the STMicroelectronics NANDi BCH Controller.
>  
> +config MTD_NAND_STM_BCH_BBT
> +     bool "STMicroelectronics: NANDi BCH Controller Bad Block Table support"
> +     default y if MTD_NAND_STM_BCH=y || MTD_NAND_STM_BCH=m

This line could be simplified. But it's also weird now that you can
select CONFIG_MTD_NAND_STM_BCH_BBT, but that won't build the BBT code if
MTD_NAND_STM_BCH=n. So I'd suggest the following instead:

        depends on MTD_NAND_STM_BCH
        default y

Or maybe this could be more explicit about the default:

        depends on MTD_NAND_STM_BCH
        default MTD_NAND_STM_BCH

> +     help
> +       Adds support for the STMicroelectronics Bad Block Table support.
> +       If you are using a device which has has already been initialised
> +       by ST or using their tooling/bootloaders, leave this enabled.
> +
>  endif # MTD_NAND
> diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
> index 6044e0a..e342c91 100644
> --- a/drivers/mtd/nand/Makefile
> +++ b/drivers/mtd/nand/Makefile
> @@ -41,7 +41,9 @@ obj-$(CONFIG_MTD_NAND_MLC_LPC32XX)      += lpc32xx_mlc.o
>  obj-$(CONFIG_MTD_NAND_SH_FLCTL)              += sh_flctl.o
>  obj-$(CONFIG_MTD_NAND_MXC)           += mxc_nand.o
>  obj-$(CONFIG_MTD_NAND_SOCRATES)              += socrates_nand.o
> -obj-$(CONFIG_MTD_NAND_STM_BCH)               += stm_nand_bch.o
> +obj-$(CONFIG_MTD_NAND_STM_BCH)               += stm-nand.o
> +stm-nand-y                           += stm_nand_bch.o
> +stm-nand-$(CONFIG_MTD_NAND_STM_BCH_BBT)      += stm_nand_bbt.o
>  obj-$(CONFIG_MTD_NAND_TXX9NDFMC)     += txx9ndfmc.o
>  obj-$(CONFIG_MTD_NAND_NUC900)                += nuc900_nand.o
>  obj-$(CONFIG_MTD_NAND_MPC5121_NFC)   += mpc5121_nfc.o

[...]

Brian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to