[U-Boot] [PATCH] OneNAND: Destaticize largepage_memorybased

Marek Vasut marek.vasut at gmail.com
Sat Oct 2 16:35:19 CEST 2010


Dne So 2. října 2010 16:26:07 Marek Vasut napsal(a):
> This moves "struct nand_bbt_descr largepage_memorybased" into .data.rel,
> which allows it to be PIC with current U-Boot infrastructure for
> relocation.
> 
> Also, I squished the ff_patternt into the structure.

Please ignore this one, the linker is playing weird games with me ...
> 
> Signed-off-by: Marek Vasut <marek.vasut at gmail.com>
> ---
>  drivers/mtd/onenand/onenand_bbt.c |    6 ++----
>  1 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/mtd/onenand/onenand_bbt.c
> b/drivers/mtd/onenand/onenand_bbt.c index 1354877..c6d1dc9 100644
> --- a/drivers/mtd/onenand/onenand_bbt.c
> +++ b/drivers/mtd/onenand/onenand_bbt.c
> @@ -231,13 +231,11 @@ int onenand_scan_bbt(struct mtd_info *mtd, struct
> nand_bbt_descr *bd) * Define some generic bad / good block scan pattern
> which are used * while scanning a device for factory marked good / bad
> blocks.
>   */
> -static uint8_t scan_ff_pattern[] = { 0xff, 0xff };
> -
> -static struct nand_bbt_descr largepage_memorybased = {
> +struct nand_bbt_descr largepage_memorybased = {
>  	.options = 0,
>  	.offs = 0,
>  	.len = 2,
> -	.pattern = scan_ff_pattern,
> +	.pattern = { 0xff, 0xff },
>  };
> 
>  /**


More information about the U-Boot mailing list