X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=nand_spl%2Fnand_boot_fsl_elbc.c;h=502605b1d5cc00ddf13c6763282b83783cc47222;hb=23608e23fd657577602f5c202a2f2ef8fb1b1b18;hp=7f14a6fe458c5dd93b4d88addac669817be63a24;hpb=269610f6ba2e4a7bc27d2e53d43160614016964f;p=u-boot diff --git a/nand_spl/nand_boot_fsl_elbc.c b/nand_spl/nand_boot_fsl_elbc.c index 7f14a6fe45..502605b1d5 100644 --- a/nand_spl/nand_boot_fsl_elbc.c +++ b/nand_spl/nand_boot_fsl_elbc.c @@ -25,7 +25,6 @@ #include #include -#include #include #include @@ -33,7 +32,7 @@ static void nand_wait(void) { - fsl_lbus_t *regs = (fsl_lbus_t *)(CONFIG_SYS_IMMR + 0x5000); + fsl_lbc_t *regs = LBC_BASE_ADDR; for (;;) { uint32_t status = in_be32(®s->ltesr); @@ -50,13 +49,13 @@ static void nand_wait(void) static void nand_load(unsigned int offs, int uboot_size, uchar *dst) { - fsl_lbus_t *regs = (fsl_lbus_t *)(CONFIG_SYS_IMMR + 0x5000); + 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;