mt29f nand: fix kblock buffer initialization: load correctly all buffer.
authoraleph <aleph@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 9 May 2011 10:56:29 +0000 (10:56 +0000)
committeraleph <aleph@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 9 May 2011 10:56:29 +0000 (10:56 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4884 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/cpu/cortex-m3/drv/mt29f_sam3.c

index 03f5109fde26c6c1451e3804c41f27f7826348e8..ce2fadedd8d9dac14a18a291701f5a14e21d9921 100644 (file)
@@ -882,7 +882,7 @@ bool mt29f_init(Mt29f *chip, struct Heap *heap, unsigned chip_select)
        }
 
        // Load the first block in the cache
-       return mt29f_readDirect(&chip->fd, 0, chip->fd.priv.buf, 0, MT29F_DATA_SIZE);
+       return mt29f_readDirect(&chip->fd, 0, chip->fd.priv.buf, 0, chip->fd.blk_size);
 }