/*
* Init GPK0CON/GPK2CON for NFCON
*/
nand_pin_mux:
ldr r0, =0xe03002a0 // GPK0CON
ldr r1, =0x22443322
str r1, [r0]
ldr r0, =0xe03002e0 // GPK2CON
ldr r1, =0x11133333
str r1, [r0]
mov pc, lr
/*
* Nand Interface Init for SMDKC100
*/
nand_asm_init:
ldr r0, =ELFIN_NAND_BASE //0xE7200000
ldr r1, [r0, #NFCONF_OFFSET]
orr r1, r1, #0x70
orr r1, r1, #0x7700
str r1, [r0, #NFCONF_OFFSET]
ldr r1, [r0, #NFCONT_OFFSET]
orr r1, r1, #0x03
str r1, [r0, #NFCONT_OFFSET]
mov pc, lr
第一个代码段,是初始化GPIO引脚,第二个代码段是,NAND控制器初始化设置。