From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Fri, 7 Oct 2011 10:46:33 -0500 Subject: [U-Boot] [PATCH 2/2] nand: Merge changes from Linux nand driver In-Reply-To: <4E8F14EA.9040902@aizo.com> References: <20111006210607.900BE140874A@gemini.denx.de> <4E8E1CAC.6000405@freescale.com> <4E8F14EA.9040902@aizo.com> Message-ID: <4E8F1ED9.5040701@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 10/07/2011 10:04 AM, Christian Hitz wrote: > Am 06.10.2011 23:25, schrieb Scott Wood: >> What do the string changes have to do with synchronizing the NAND driver? > > Strings read from ONFI are now sanitized. For that strim() is used which > was not yet available in U-Boots string library. Of course I went > overboard with syncing the whole string library. I'll submit a new > version that only adds strim(). Please make it a separate patch. >> How much does this update affect image size? This may be a good time to >> start ifdeffing portions of the NAND code based on what's actually >> needed by the target. > > before: u-boot.bin: 298112 bytes > after: u-boot.bin: 301928 bytes > (based on our at91sam9g20ek based design, ONFI enabled) > > One option would be to ifdef the 1-bit software ECC. This would free > aroud 2k (down to: 299744 bytes). There are a bunch of things that could be ifdeffed, which gc-sections doesn't help with because they are referenced with things like: if (!pointer) pointer = some_func; Think large page versus small page, functions that the hw-specific driver overrides, all the different types of ECC (ifdeffing out 1-bit but not 4 or 8 won't keep U-Boot from growing on boards that use 1-bit), ONFI, the read_page/write_page variants, etc. -Scott