[U-Boot] [RFC][PATCH 14/19] nand_fsl_nfc: get rid of local var

Scott Wood scottwood at freescale.com
Thu Jul 29 18:40:50 CEST 2010


On Thu, 29 Jul 2010 12:45:03 +0200
Heiko Schocher <hs at denx.de> wrote:

> If we have -fPIC enabled, this var leads in one entry in the
> GOT. The result of this is that the image size is > 0x800.
> 
> Signed-off-by: Heiko Schocher <hs at denx.de>

Acked-by: Scott Wood <scottwood at freescale.com>

> diff --git a/nand_spl/nand_boot_fsl_nfc.c b/nand_spl/nand_boot_fsl_nfc.c
> index 9720f6a..0543512 100644
> --- a/nand_spl/nand_boot_fsl_nfc.c
> +++ b/nand_spl/nand_boot_fsl_nfc.c
> @@ -34,10 +34,9 @@
>  #include <asm/io.h>
>  #include <fsl_nfc.h>
> 
> -struct fsl_nfc_regs *nfc;
> -
>  static void nfc_wait_ready(void)
>  {
> +	struct fsl_nfc_regs *nfc = (void *)NFC_BASE_ADDR;

Alternatively, would this work at file scope?

static struct fsl_nfc_regs *const nfc = (void *)NFC_BASE_ADDR;

-Scott



More information about the U-Boot mailing list