diff options
author | Wolfgang Denk <wd@denx.de> | 2007-05-17 00:06:11 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2007-05-17 00:06:11 +0200 |
commit | 3a71b5ca775fc9cf506c12d91925019591446c7c (patch) | |
tree | 0eb875a5ed89145e1d73ce411b8e2705a53132bd /cpu/microblaze/start.S | |
parent | 3162eb836903c8b247fdc7470dd39bfa6996f495 (diff) | |
parent | 70124c2602ae2d4c5d3dba05b482d91548242de8 (diff) | |
download | u-boot-imx-3a71b5ca775fc9cf506c12d91925019591446c7c.zip u-boot-imx-3a71b5ca775fc9cf506c12d91925019591446c7c.tar.gz u-boot-imx-3a71b5ca775fc9cf506c12d91925019591446c7c.tar.bz2 |
Merge with /home/git/u-boot
Diffstat (limited to 'cpu/microblaze/start.S')
-rw-r--r-- | cpu/microblaze/start.S | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/cpu/microblaze/start.S b/cpu/microblaze/start.S index ca3befc..3c027ff 100644 --- a/cpu/microblaze/start.S +++ b/cpu/microblaze/start.S @@ -117,3 +117,36 @@ clear_bss: 3: /* jumping to board_init */ brai board_init 1: bri 1b + +/* + * Read 16bit little endian + */ + .text + .global in16 + .ent in16 + .align 2 +in16: lhu r3, r0, r5 + bslli r4, r3, 8 + bsrli r3, r3, 8 + andi r4, r4, 0xffff + or r3, r3, r4 + rtsd r15, 8 + sext16 r3, r3 + .end in16 + +/* + * Write 16bit little endian + * first parameter(r5) - address, second(r6) - short value + */ + .text + .global out16 + .ent out16 + .align 2 +out16: bslli r3, r6, 8 + bsrli r6, r6, 8 + andi r3, r3, 0xffff + or r3, r3, r6 + sh r3, r0, r5 + rtsd r15, 8 + or r0, r0, r0 + .end out16 |