X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=onenand_ipl%2Fonenand_ipl.h;h=7ebb3e32ddb9663e3e07c5919280477b19270601;hb=23bda7d43faed8b019adf122bc67c7a8e40f1580;hp=9188b96625dca9bad0112d40a8c5579637da8514;hpb=4b7a6dd89633d60dc4b58476d5ce48247f82a3ca;p=u-boot diff --git a/onenand_ipl/onenand_ipl.h b/onenand_ipl/onenand_ipl.h index 9188b96625..7ebb3e32dd 100644 --- a/onenand_ipl/onenand_ipl.h +++ b/onenand_ipl/onenand_ipl.h @@ -23,21 +23,14 @@ #include -#define ONENAND_BLOCK_SIZE 2048 +#define onenand_readw(a) readw(THIS_ONENAND(a)) +#define onenand_writew(v, a) writew(v, THIS_ONENAND(a)) -#ifndef CFG_PRINTF -#define printf(format, args...) -#endif - -#define onenand_readw(a) readw(a) -#define onenand_writew(v, a) writew(v, a) - -#define THIS_ONENAND(a) (CFG_ONENAND_BASE + (a)) - -#define READ_INTERRUPT() \ - onenand_readw(THIS_ONENAND(ONENAND_REG_INTERRUPT)) +#define THIS_ONENAND(a) (CONFIG_SYS_ONENAND_BASE + (a)) -#define ONENAND_PAGE_SIZE 2048 +#define READ_INTERRUPT() onenand_readw(ONENAND_REG_INTERRUPT) -extern int onenand_read_block0(unsigned char *buf); +extern int (*onenand_read_page)(ulong block, ulong page, + u_char *buf, int pagesize); +extern int onenand_read_block(unsigned char *buf); #endif