From 69bcabb51686fdd133cb1848c0d3b0a4fc6ca5cf Mon Sep 17 00:00:00 2001 From: apgmoorthy Date: Fri, 27 Mar 2009 14:45:23 +0530 Subject: Fix OneNAND ipl to read CONFIG_SYS_MONITOR_LEN Currently OneNAND initial program loader (ipl) reads only block 0 ie 128KB. However, u-boot image for apollon board is 195KB making the board unbootable with OneNAND. Fix ipl to read CONFIG_SYS_MONITOR_LEN. CONFIG_SYS_MONITOR_LEN macro holds the U-Boot image size. Signed-off-by: Rohit Hagargundgi Signed-off-by: Gangheyamoorthy Signed-off-by: Scott Wood --- onenand_ipl/onenand_ipl.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'onenand_ipl/onenand_ipl.h') diff --git a/onenand_ipl/onenand_ipl.h b/onenand_ipl/onenand_ipl.h index 57e54f5..412572a 100644 --- a/onenand_ipl/onenand_ipl.h +++ b/onenand_ipl/onenand_ipl.h @@ -23,15 +23,13 @@ #include -#define onenand_readw(a) readw(a) -#define onenand_writew(v, a) writew(v, a) +#define onenand_readw(a) readw(THIS_ONENAND(a)) +#define onenand_writew(v, a) writew(v, THIS_ONENAND(a)) #define THIS_ONENAND(a) (CONFIG_SYS_ONENAND_BASE + (a)) #define READ_INTERRUPT() \ onenand_readw(THIS_ONENAND(ONENAND_REG_INTERRUPT)) -#define ONENAND_PAGE_SIZE 2048 - -extern int onenand_read_block0(unsigned char *buf); +extern int onenand_read_block(unsigned char *buf); #endif -- cgit v1.1