]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - board/karo/tx28/flash.c
TX6 Release 2013-04-22
[karo-tx-uboot.git] / board / karo / tx28 / flash.c
index 55a4e076bf5a72f85d7562ee004cb7b1dfa36d7e..2b725ed3ecb1b35e36fe64412c6f72b2533b6386 100644 (file)
@@ -104,7 +104,7 @@ static void encode_hamming_13_8(void *_src, void *_ecc, size_t size)
 
 static u32 calc_chksum(void *buf, size_t size)
 {
-       u32 chksum;
+       u32 chksum = 0;
        u8 *bp = buf;
        size_t i;
 
@@ -152,10 +152,8 @@ static int calc_bb_offset(nand_info_t *mtd, struct mx28_fcb *fcb)
 static struct mx28_fcb *create_fcb(void *buf, int fw1_start_block,
                                int fw2_start_block, size_t fw_size)
 {
-       struct mx28_gpmi_regs *gpmi_base =
-               (struct mx28_gpmi_regs *)MXS_GPMI_BASE;
-       struct mx28_bch_regs *bch_base =
-               (struct mx28_bch_regs *)MXS_BCH_BASE;
+       struct gpmi_regs *gpmi_base = (void *)GPMI_BASE_ADDRESS;
+       struct bch_regs *bch_base = (void *)BCH_BASE_ADDRESS;
        u32 fl0, fl1;
        u32 t0, t1;
        int metadata_size;