|
请教一下,我发现在2440init.s里面复制NAND到SDRAM是用 CopyProgramFromNand()如下:
- [ [color=#FF0000]{TRUE}
- nand_boot_beg
- bl CopyProgramFromNand[/color]
- |
- mov r5, #NFCONF
- ;set timing value
- ldr r0, =(7<<12)|(7<<8)|(7<<4)
- str r0, [r5]
- ;enable control
- ldr r0, =(0<<13)|(0<<12)|(0<<10)|(0<<9)|(0<<8)|(1<<6)|(1<<5)|(1<<4)|(1<<1)|(1<<0)
- str r0, [r5, #4]
-
- bl ReadNandID
- mov r6, #0
- ldr r0, =0xec73
- cmp r5, r0
- beq %F1
- ldr r0, =0xec75
- cmp r5, r0
- beq %F1
- mov r6, #1
- 1
- bl ReadNandStatus
-
- mov r8, #0
- ldr r9, =ResetEntry
- 2
- ands r0, r8, #0x1f
- bne %F3
- mov r0, r8
- bl CheckBadBlk
- cmp r0, #0
- addne r8, r8, #32
- bne %F4
- 3
- mov r0, r8
- mov r1, r9
- bl ReadNandPage
- add r9, r9, #512
- add r8, r8, #1
- 4
- cmp r8, #5120
- bcc %B2
-
- mov r5, #NFCONF ;DsNandFlash
- ldr r0, [r5, #4]
- bic r0, r0, #1
- str r0, [r5, #4]
- ]
- ldr pc, =copy_proc_beg
复制代码
但是网上的分析都是删掉条件判断与bl CopyProgramFromNand,直接用后面的汇编操作,请问他们有不同吗?
|
|