Hello Li Rui,
The following is the definition in CodeWarrior initialization file, which is similar as defined in u-boot header file.
# CS0 - 8MB NOR FLASH
writemem.l 0xe0005000 0xff801001 # BR0 base address at 0xff800000, port size 16 bit, GPCM, valid
writemem.l 0xe0005004 0xff806ff7 # OR0 8MB flash size, 15 w.s., timing relaxed
# CS1 - NAND Flash 32 KB
writemem.l 0xe0005008 0xf0000c21 # BR1 base address at 0xF0000000, port size 8 bit, FCM, valid
writemem.l 0xe000500c 0xFFFF8796 # OR1 32KB size
For BRn, ORn definition please refer to page 11-10(11) from http://cache.freescale.com/files/32bit/doc/ref_manual/MPC8306RM.pdf.
I think what you concern is OR1[AM], the following is its description.
GPCM address mask. Masks corresponding BRn bits. Masking address bits independently allows external
devices of different size address ranges to be used. Address mask bits can be set or cleared in any order in
the field, allowing a resource to reside in more than one area of the address map.
0 Corresponding address bits are masked and therefore don’t care for address checking.
1 Corresponding address bits are used in the comparison between base and transaction addresses.
Please note NAND Flash is IO device, unlike NOR Flash, it is not memory mapped device, only the SRAM within NAND Flash is mapped into memory, so the size is 32k, and ORn[AM] is 0xFFFF8000, this is correct.
Have a great day,
Yiping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------