ocld_asm.s
来自「SAMSUNG S3C6410 CPU BSP for winmobile6」· S 代码 · 共 120 行
S
120 行
;
; Copyright (c) Microsoft Corporation. All rights reserved.
;
;
; Use of this source code is subject to the terms of the Microsoft end-user
; license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
; If you did not accept the terms of the EULA, you are not authorized to use
; this source code. For a copy of the EULA, please see the LICENSE.RTF on your
; install media.
;
;
; NAND(SmartCard) Related Routines
;
INCLUDE kxarm.h
TEXTAREA
EXPORT OneNand4burstPageRead
EXPORT OneNand4burstPageWrite
EXPORT OneNand8burstPageRead
EXPORT OneNand8burstPageWrite
;
; Read, 4 burst Page Read
;
LEAF_ENTRY OneNand4burstPageRead
; r0 : OneNand Device Source Address
; r1 : Destination Address(DRAM)
; r2 : Transfer Size(4Byte unit)
stmfd r13!, {r0-r3,r9-r12}
mov r3, r2 ; Count to move (0x80*4burst*4byte + 0x4*4burst*4byte = 2KB + 64B)
read_page
ldmia r0, {r9-r12} ;
stmia r1!, {r9-r12} ;
subs r3, r3, #0x1 ; Count decrement
bne read_page
ldmfd r13!, {r0-r3,r9-r12}
mov pc, lr
; ENTRY_END
;
; Write, 4 burst Page Write
;
LEAF_ENTRY OneNand4burstPageWrite
; r0 : Source Address(DRAM)
; r1 : OneNand Device Destination Address
; r2 : Transfer Size(4Byte unit)
stmfd r13!, {r0-r3,r9-r12}
mov r3, r2 ; Count to move (0x80*4burst*4byte + 0x4*4burst*4byte = 2KB + 64B)
write_page
ldmia r0!, {r9-r12} ;
stmia r1, {r9-r12} ;
subs r3, r3, #0x1 ; Count decrement
bne write_page
ldmfd r13!, {r0-r3,r9-r12}
mov pc, lr
; ENTRY_END
;
; Read, 8 burst Page Read, use map01 only
;
LEAF_ENTRY OneNand8burstPageRead
; r0 : OneNand Device Source Address
; r1 : Destination Address(DRAM)
; r2 : Transfer Size(4Byte unit)
stmfd r13!, {r0-r3,r5-r12}
mov r3, r2 ; Count to move (0x40*8burst*4byte + 0x2*8burst*4byte = 2KB + 64B)
read_page_8
ldmia r0, {r5-r12} ;
stmia r1!, {r5-r12} ;
subs r3, r3, #0x1 ; Count decrement
bne read_page_8
ldmfd r13!, {r0-r3,r5-r12}
mov pc, lr
; ENTRY_END
;
; Write, 8 burst Page Write, use map01 only
;
LEAF_ENTRY OneNand8burstPageWrite
; r0 : Source Address(DRAM)
; r1 : OneNand Device Destination Address
; r2 : Transfer Size(4Byte unit)
stmfd r13!, {r0-r3,r5-r12}
mov r3, r2 ; Count to move (0x40*8burst*4byte + 0x2*8burst*4byte = 2KB + 64B)
write_page_8
ldmia r0!, {r5-r12} ;
stmia r1, {r5-r12} ;
subs r3, r3, #0x1 ; Count decrement
bne write_page_8
ldmfd r13!, {r0-r3,r5-r12}
mov pc, lr
; ENTRY_END
LTORG
END
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?