Freescale Semicondu ctor
Application Note
© Freescale Semiconductor, Inc. , 2007. All rights res erved.
NOR-based Flash memory devices have traditionally been
used for non- volatile s torage for a boo tloader. The advantages
of this type of memory include support for execute-in-place
code, random access to memory, and zero error rate.
Because of their higher density and lower cost per byte, NAND
Flash te chnologies are becoming more common.
Unfortunately, the technology comes with a major
disadvantage, which is the early failure of bits during memory
writes. After some number of erase cycles, some bits lose the
ability to be programmed to a zero state. Block-based error
correction solves this problem, but i t prevents random memory
accesses for execute-in-place code without a specialized
NAND Flash memory controller.
The local bus controller in the PowerQUI CC™ MPC8313E
processor is enhanced with a s pecialized NAND Fl ash contr ol
machine (FCM) to provide hardware support for smal l- and
large-page NAND Flash-based memories, including the ability
to boot from NAND Flash memory.
This application note provides a brief ove rview of the FC M
operation and describes the implementation of a bootloader
using u-boot [1] for the MPC8313 device with a small-pa ge
NAND device (Samsung K9F5608U0D and Micron
MT29F2G08AACWP).
Contents
1 MPC8313 Flash Control Machine . . . . . . . . . . . . . . . . 2
1.1Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2Buffers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3Error Checking and Correction. . . . . . . . . . . . . . . . 4
1.4NAND Boot Sequencer . . . . . . . . . . . . . . . . . . . . . 5
2 U-boot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1Stage 0 Bootloader . . . . . . . . . . . . . . . . . . . . . . . . . .5
2.2Board Configuration Settings for NAND boot. . . . 6
2.3u-boot files for NAND Boot . . . . . . . . . . . . . . . . . . 8
2.4NAND u-boot Execution Sequence . . . . . . . . . . . . 8
3 Building and Loading NAND u-boot . . . . . . . . . . . . . .9
4 NAND Auto Boot Settings on RDB Board . . . . . . . .10
5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
6 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Appendix ANAND u-boot Macros. . . . . . . . . . . . . . . . . . . 11
Appendix BNAND u-boot Code. . . . . . . . . . . . . . . . . . . . . 12
Using U-boot to Boot From a NAND
Flash Memory Device for MPC8313E
by Nick Spence
Network Computing Syste ms Grou p,
Freescale Semiconductor, Inc.
Document Number: AN3201
Rev. 0, 06/2007