diff options
author | Matthew McClintock <msm@freescale.com> | 2011-04-05 14:39:34 -0500 |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2011-04-15 15:53:11 -0500 |
commit | 62974546888c1f9abfdb4ba9f66465a5d102d4d3 (patch) | |
tree | e4643dc68c210b359fdf329316d90770bc7f6e95 /nand_spl | |
parent | aad99bbc396a2e3b2913adcb02ed61d6d7e0f1ec (diff) | |
download | u-boot-imx-62974546888c1f9abfdb4ba9f66465a5d102d4d3.zip u-boot-imx-62974546888c1f9abfdb4ba9f66465a5d102d4d3.tar.gz u-boot-imx-62974546888c1f9abfdb4ba9f66465a5d102d4d3.tar.bz2 |
nand/spl: Assuming a static nand page size to reduce code size
Change variables to const to reduce code size, these values are
hardcoded via defines anyways so we might as well assume they
are constants
Signed-off-by: Matthew McClintock <msm@freescale.com>
cc: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'nand_spl')
-rw-r--r-- | nand_spl/nand_boot_fsl_elbc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/nand_spl/nand_boot_fsl_elbc.c b/nand_spl/nand_boot_fsl_elbc.c index 9547d44..502605b 100644 --- a/nand_spl/nand_boot_fsl_elbc.c +++ b/nand_spl/nand_boot_fsl_elbc.c @@ -51,11 +51,11 @@ static void nand_load(unsigned int offs, int uboot_size, uchar *dst) { fsl_lbc_t *regs = LBC_BASE_ADDR; uchar *buf = (uchar *)CONFIG_SYS_NAND_BASE; - int large = in_be32(®s->bank[0].or) & OR_FCM_PGS; - int block_shift = large ? 17 : 14; - int block_size = 1 << block_shift; - int page_size = large ? 2048 : 512; - int bad_marker = large ? page_size + 0 : page_size + 5; + const int large = CONFIG_SYS_NAND_OR_PRELIM & OR_FCM_PGS; + const int block_shift = large ? 17 : 14; + const int block_size = 1 << block_shift; + const int page_size = large ? 2048 : 512; + const int bad_marker = large ? page_size + 0 : page_size + 5; int fmr = (15 << FMR_CWTO_SHIFT) | (2 << FMR_AL_SHIFT) | 2; int pos = 0; |