Thanks Tony,
This does work. However, you should ensure you have the right u-boot (explained in the Wiki). One way to tell is to type help nb_update. The correct version will give three parameters. I did a flash_erase on the boot partition from Linux and this also seems to work (as opposed to the u-boot nand erase.chip). This let me erase the partition, but preserve the rest of the NAND device. However, I have two issue with this mode.
Need MMC
After this was working, I have removed the mmc card. Then the version of u-boot for the Linux-link seems to not allow the saveenv command. You can load an environment over the network with a u-boot script, but it would be considerably easier if the u-boot supported saving an environment to the NAND as opposed to the mmc. People may wish to develop SDHC drivers from something other than mmc.
Compiling the NAND u-boot?
Also, I have difficulty getting the code to compile so that I can boot from NAND. I have compiled an image that boots from mmc, with the updated nb_update, but for some reason it doesn't seem to boot and goes to serial download mode when I flash my own image? Being able to compile my own image, would allow fixing the saveenv area for instance.
$ git remote -v
origin https://github.com/Timesys/u-boot-timesys.git (fetch)
origin https://github.com/Timesys/u-boot-timesys.git (push)
$ git branch
2011.12-mvf
* 2011.12-pcm052
EDIT: Compiling the NAND u-boot is a tool issue. Rebuilding source with the TimeSys armv7l gcc/binutils does boot from NAND. Strange my 4.8.1 gcc+binutils does not boot from NAND, but does boot from mmc. The 2011.12-pcm052 is the correct branch to use for a NAND boot build. An update to gcc 4.8.2 also allows a boot.
Anyways, thanks again (to you, Dan Douglass and Russell Robinson) for the initial difficult hurdle of getting this to work at all.
Also, this thread may be useful for others to understand the details of drivers/mtd/nand/fsl_nfc.c.
UPDATE: The PHYTEC Wiki has a better sequence for updating the NAND u-boot from the eMMC u-boot. The key is to pad the u-boot memory with all FFs before using nb_update. I use a Linux flash_eraseall to ensure my partitions are erased. Without the mw.b 0x80400000 0xff 0x40000, to pad the image with FFs whenever I changed the u-boot configuration the image size changed and the NAND image fails to boot. I also recommend a direct serial connection on the TWR-SER board as the USB serial is very buggy when switching between NAND and eMMC.