Hi, Jean-Christophe PLAGNIOL-VILLARD wrote: >> #define ONENAND_BLOCK_SIZE 2048 >> +#define ONENAND_BOOTLOADER_SIZE 0x40000 > why hardcoded value?
Is it possible to get image size instead of hard value. Then we can read exactly u-boot image size on boot up. >> + /* Check for invalid block mark*/ >> + if (page < 2) { >> + unsigned int mark = >> onenand_readw(THIS_ONENAND(ONENAND_SPARERAM)); > please add a empty line > > and why not do this > if (page < 2 && (onenand_readw(THIS_ONENAND(ONENAND_SPARERAM)) != > 0xffff)) > return 1; okay. >> - for (page = ONENAND_START_PAGE; >> - page < ONENAND_PAGES_PER_BLOCK; page++) { >> - >> - onenand_read_page(0, page, buf + offset, pagesize); >> - offset += pagesize; >> - } >> + for (page = ONENAND_START_PAGE; block < nblocks; page = 0, block++) > please add the {} and move the page = 0 to the second 'for' it will be easier > to read and understand okay. Thanks, Rohit _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot