[U-Boot] [PATCH] OneNAND: Destaticize largepage_memorybased
Wolfgang Denk
wd at denx.de
Sun Oct 3 20:10:52 CEST 2010
Dear Marek Vasut,
In message <1286029567-30231-1-git-send-email-marek.vasut at gmail.com> you wrote:
> 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.
>
> 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 },
> };
NAK.
We don't want to make static data globally visible.
If there is an issue with relocation of such data on ARM, we need to
fix that.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"The more data I punch in this card, the lighter it becomes, and the
lower the mailing cost."
- Stan Kelly-Bootle, "The Devil's DP Dictionary"
More information about the U-Boot
mailing list