From: Maxim Artamonov Date: Mon, 01 Dec 2008 11:05:53 +0300 Subject: [U-Boot] Fwd: [PATCH] nand booting support (SPL) for phyCORE-i.MX31 Message-ID: <157361228118753@webmail47.yandex.ru> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello, Magnus 29.11.08, 12:59, "Magnus Lilja" : Thank for time that you spend to review this patch. > Hi > 2008/11/29 user : > > nand booting support (SPL) for phyCORE-i.MX31 > >... > > Patch is applicable on v2008.10 release tag master branch. > stgit couldn't apply the patch, but the standard 'patch' command could > (it said 'applied with fuzz' on start.S). May be it's my native utf-8 charset doesn't recode to latin-8859-1? Anything, I try this again. > Your patch seems to have some trailing whitespaces here and there. It is require to correct in according codestyle? > > #define CCM_MPCTL (CCM_BASE + 0x10) > > -#define CCM_UPCTL (CCM_BASE + 0x10) > > +#define CCM_UPCTL (CCM_BASE + 0x14) > The above fix should really go into the arm-tree immediately since > it's a separate bug fix (IMHO). What can I make with it? > > +/* > > + * Set INT to 0, FCMD to 1, rest to 0 in NFC_CONFIG2 Register for Command > Change "rest" to "reset" (for all #define's below as well). More correctly to change "rest" to "the rest". > > + /* Block of NAND flash to be unlocked */ > > + /*NFC_UNLOCKSTART_BLKADDR = 0x0;*/ > > + /*NFC_UNLOCKEND_BLKADDR = 0x4000;*/ > > + > > + /* Unlock NAND Flash Block Command for given address range */ > > + /*NFC_WRPROT = 0x4;*/ > If the above is not needed, remove it. You are right. > > + mx31_read_page(from, buf); > > + from ++; > Remove space before ++; > > + buf = buf + CFG_NAND_PAGE_SIZE; > > + } > > + return 0; > > +} > Insert empty line. > Shouldn't the code check if the current block is marked as bad before > copying all the pages from that block into SDRAM? The first block is > typically guaranteed to be good (if I understand correctly) but any > subsequent block may be marked bad already from the factory and should > be skipped. The entire U-boot won't fit in the first block, atleast > for small page NAND devices. Yes, it's so. I wrote it for guaranteed first block chip. But for phycore board it's not so. I'll add bb verify feature. Best wishes, Maxim