"Mark A. Greer" <[email protected]> writes:

> From: Mark A. Greer <[email protected]>
>
> The existing NAND infrastructure allows the default main and
> mirror bad block tables to be overridden in nand_default_bbt().
> However, the davinci_nand driver does not support this.  So,
> add fields to the davinci driver's platform data so platform
> code can pass in their own bbt's and make the driver honor
> those overrides.
>
> Signed-off-by: Mark A. Greer <[email protected]>

Hi Mark,

Can you resend this to linux-mtd with my signoff.  This will need to
go upstream via the MTD tree and probably should have Sudhakar's
signoff as well.

Thanks,

Kevin

> ---
> This is required by the da830 evm (see following patch) which requires
> different 'offs' and 'veroffs' values than the default.  This seemed
> like the solution that fit best with the existing infratructure.  If
> anyone has a better solution, please speak up.
>
>  arch/arm/mach-davinci/include/mach/nand.h |    4 ++++
>  drivers/mtd/nand/davinci_nand.c           |    2 ++
>  2 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-davinci/include/mach/nand.h 
> b/arch/arm/mach-davinci/include/mach/nand.h
> index b520c4b..b2ad809 100644
> --- a/arch/arm/mach-davinci/include/mach/nand.h
> +++ b/arch/arm/mach-davinci/include/mach/nand.h
> @@ -79,6 +79,10 @@ struct davinci_nand_pdata {                /* 
> platform_data */
>  
>       /* e.g. NAND_BUSWIDTH_16 or NAND_USE_FLASH_BBT */
>       unsigned                options;
> +
> +     /* Main and mirror bbt descriptor overrides */
> +     struct nand_bbt_descr   *bbt_td;
> +     struct nand_bbt_descr   *bbt_md;
>  };
>  
>  #endif       /* __ARCH_ARM_DAVINCI_NAND_H */
> diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
> index 0bcfd49..31461d7 100644
> --- a/drivers/mtd/nand/davinci_nand.c
> +++ b/drivers/mtd/nand/davinci_nand.c
> @@ -591,6 +591,8 @@ static int __init nand_davinci_probe(struct 
> platform_device *pdev)
>  
>       /* options such as NAND_USE_FLASH_BBT or 16-bit widths */
>       info->chip.options      = pdata->options;
> +     info->chip.bbt_td       = pdata->bbt_td;
> +     info->chip.bbt_md       = pdata->bbt_md;
>  
>       info->ioaddr            = (uint32_t __force) vaddr;
>  
> -- 
> 1.6.2.5.182.ga808d
>
>
> _______________________________________________
> Davinci-linux-open-source mailing list
> [email protected]
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to