diff options
author | Yi Li <yi.li@analog.com> | 2009-01-07 18:14:39 +0300 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2009-01-07 18:14:39 +0300 |
commit | 6a01f230339321292cf065551f8cf55361052461 (patch) | |
tree | 7ac2ac8fc9f05a7315ef6a7f6f0a387433c62c14 /arch/blackfin/lib/ins.S | |
parent | 5105432a3201e3f0e6c219cd0a74feee1e5e262b (diff) | |
download | linux-6a01f230339321292cf065551f8cf55361052461.tar.xz |
Blackfin arch: merge adeos blackfin part to arch/blackfin/
[Mike Frysinger <vapier.adi@gmail.com>:
- handle bf531/bf532/bf534/bf536 variants in ipipe.h
- cleanup IPIPE logic for bfin_set_irq_handler()
- cleanup ipipe asm code a bit and add missing ENDPROC()
- simplify IPIPE code in trap_c
- unify some of the IPIPE code and fix style
- simplify DO_IRQ_L1 handling with ipipe code
- revert IRQ_SW_INT# addition from ipipe merge
- remove duplicate get_{c,s}clk() prototypes
]
Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/lib/ins.S')
-rw-r--r-- | arch/blackfin/lib/ins.S | 163 |
1 files changed, 160 insertions, 3 deletions
diff --git a/arch/blackfin/lib/ins.S b/arch/blackfin/lib/ins.S index d60554dce87b..1b84b21ca7d1 100644 --- a/arch/blackfin/lib/ins.S +++ b/arch/blackfin/lib/ins.S @@ -56,7 +56,16 @@ ENTRY(_insl) #ifdef CONFIG_BFIN_INS_LOWOVERHEAD P0 = R0; /* P0 = port */ +#ifdef CONFIG_IPIPE + [--sp] = rets + [--sp] = (P5:0); + sp += -12 + call ___ipipe_stall_root_raw + sp += 12 + (P5:0) = [sp++]; +#else cli R3; +#endif P1 = R1; /* P1 = address */ P2 = R2; /* P2 = count */ SSYNC; @@ -65,7 +74,14 @@ ENTRY(_insl) [P1++] = R0; NOP; .Llong_loop_e: NOP; +#ifdef CONFIG_IPIPE + sp += -12 + call ___ipipe_unstall_root_raw + sp += 12 + rets = [sp++] +#else sti R3; +#endif RTS; #else P0 = R0; /* P0 = port */ @@ -74,13 +90,28 @@ ENTRY(_insl) SSYNC; LSETUP( .Llong_loop_s, .Llong_loop_e) LC0 = P2; .Llong_loop_s: +#ifdef CONFIG_IPIPE + [--sp] = rets + [--sp] = (P5:0); + sp += -12 + call ___ipipe_stall_root_raw + sp += 12 + (P5:0) = [sp++]; +#else CLI R3; +#endif NOP; NOP; NOP; R0 = [P0]; [P1++] = R0; .Llong_loop_e: +#ifdef CONFIG_IPIPE + sp += -12 + call ___ipipe_unstall_root_raw + sp += 12 + rets = [sp++] +#else STI R3; - +#endif RTS; #endif ENDPROC(_insl) @@ -88,7 +119,16 @@ ENDPROC(_insl) ENTRY(_insw) #ifdef CONFIG_BFIN_INS_LOWOVERHEAD P0 = R0; /* P0 = port */ +#ifdef CONFIG_IPIPE + [--sp] = rets + [--sp] = (P5:0); + sp += -12 + call ___ipipe_stall_root_raw + sp += 12 + (P5:0) = [sp++]; +#else cli R3; +#endif P1 = R1; /* P1 = address */ P2 = R2; /* P2 = count */ SSYNC; @@ -97,7 +137,14 @@ ENTRY(_insw) W[P1++] = R0; NOP; .Lword_loop_e: NOP; +#ifdef CONFIG_IPIPE + sp += -12 + call ___ipipe_unstall_root_raw + sp += 12 + rets = [sp++] +#else sti R3; +#endif RTS; #else P0 = R0; /* P0 = port */ @@ -106,12 +153,28 @@ ENTRY(_insw) SSYNC; LSETUP( .Lword_loop_s, .Lword_loop_e) LC0 = P2; .Lword_loop_s: +#ifdef CONFIG_IPIPE + [--sp] = rets + [--sp] = (P5:0); + sp += -12 + call ___ipipe_stall_root_raw + sp += 12 + (P5:0) = [sp++]; +#else CLI R3; +#endif NOP; NOP; NOP; R0 = W[P0]; W[P1++] = R0; .Lword_loop_e: +#ifdef CONFIG_IPIPE + sp += -12 + call ___ipipe_unstall_root_raw + sp += 12 + rets = [sp++] +#else STI R3; +#endif RTS; #endif @@ -120,7 +183,16 @@ ENDPROC(_insw) ENTRY(_insw_8) #ifdef CONFIG_BFIN_INS_LOWOVERHEAD P0 = R0; /* P0 = port */ +#ifdef CONFIG_IPIPE + [--sp] = rets + [--sp] = (P5:0); + sp += -12 + call ___ipipe_stall_root_raw + sp += 12 + (P5:0) = [sp++]; +#else cli R3; +#endif P1 = R1; /* P1 = address */ P2 = R2; /* P2 = count */ SSYNC; @@ -131,7 +203,14 @@ ENTRY(_insw_8) B[P1++] = R0; NOP; .Lword8_loop_e: NOP; +#ifdef CONFIG_IPIPE + sp += -12 + call ___ipipe_unstall_root_raw + sp += 12 + rets = [sp++] +#else sti R3; +#endif RTS; #else P0 = R0; /* P0 = port */ @@ -140,7 +219,16 @@ ENTRY(_insw_8) SSYNC; LSETUP( .Lword8_loop_s, .Lword8_loop_e) LC0 = P2; .Lword8_loop_s: +#ifdef CONFIG_IPIPE + [--sp] = rets + [--sp] = (P5:0); + sp += -12 + call ___ipipe_stall_root_raw + sp += 12 + (P5:0) = [sp++]; +#else CLI R3; +#endif NOP; NOP; NOP; R0 = W[P0]; B[P1++] = R0; @@ -148,8 +236,14 @@ ENTRY(_insw_8) B[P1++] = R0; NOP; .Lword8_loop_e: +#ifdef CONFIG_IPIPE + sp += -12 + call ___ipipe_unstall_root_raw + sp += 12 + rets = [sp++] +#else STI R3; - +#endif RTS; #endif ENDPROC(_insw_8) @@ -157,7 +251,16 @@ ENDPROC(_insw_8) ENTRY(_insb) #ifdef CONFIG_BFIN_INS_LOWOVERHEAD P0 = R0; /* P0 = port */ +#ifdef CONFIG_IPIPE + [--sp] = rets + [--sp] = (P5:0); + sp += -12 + call ___ipipe_stall_root_raw + sp += 12 + (P5:0) = [sp++]; +#else cli R3; +#endif P1 = R1; /* P1 = address */ P2 = R2; /* P2 = count */ SSYNC; @@ -166,7 +269,14 @@ ENTRY(_insb) B[P1++] = R0; NOP; .Lbyte_loop_e: NOP; +#ifdef CONFIG_IPIPE + sp += -12 + call ___ipipe_unstall_root_raw + sp += 12 + rets = [sp++] +#else sti R3; +#endif RTS; #else P0 = R0; /* P0 = port */ @@ -175,13 +285,28 @@ ENTRY(_insb) SSYNC; LSETUP( .Lbyte_loop_s, .Lbyte_loop_e) LC0 = P2; .Lbyte_loop_s: +#ifdef CONFIG_IPIPE + [--sp] = rets + [--sp] = (P5:0); + sp += -12 + call ___ipipe_stall_root_raw + sp += 12 + (P5:0) = [sp++]; +#else CLI R3; +#endif NOP; NOP; NOP; R0 = B[P0]; B[P1++] = R0; .Lbyte_loop_e: +#ifdef CONFIG_IPIPE + sp += -12 + call ___ipipe_unstall_root_raw + sp += 12 + rets = [sp++] +#else STI R3; - +#endif RTS; #endif ENDPROC(_insb) @@ -189,7 +314,16 @@ ENDPROC(_insb) ENTRY(_insl_16) #ifdef CONFIG_BFIN_INS_LOWOVERHEAD P0 = R0; /* P0 = port */ +#ifdef CONFIG_IPIPE + [--sp] = rets + [--sp] = (P5:0); + sp += -12 + call ___ipipe_stall_root_raw + sp += 12 + (P5:0) = [sp++]; +#else cli R3; +#endif P1 = R1; /* P1 = address */ P2 = R2; /* P2 = count */ SSYNC; @@ -200,7 +334,14 @@ ENTRY(_insl_16) W[P1++] = R0; NOP; .Llong16_loop_e: NOP; +#ifdef CONFIG_IPIPE + sp += -12 + call ___ipipe_unstall_root_raw + sp += 12 + rets = [sp++] +#else sti R3; +#endif RTS; #else P0 = R0; /* P0 = port */ @@ -209,14 +350,30 @@ ENTRY(_insl_16) SSYNC; LSETUP( .Llong16_loop_s, .Llong16_loop_e) LC0 = P2; .Llong16_loop_s: +#ifdef CONFIG_IPIPE + [--sp] = rets + [--sp] = (P5:0); + sp += -12 + call ___ipipe_stall_root_raw + sp += 12 + (P5:0) = [sp++]; +#else CLI R3; +#endif NOP; NOP; NOP; R0 = [P0]; W[P1++] = R0; R0 = R0 >> 16; W[P1++] = R0; .Llong16_loop_e: +#ifdef CONFIG_IPIPE + sp += -12 + call ___ipipe_unstall_root_raw + sp += 12 + rets = [sp++] +#else STI R3; +#endif RTS; #endif ENDPROC(_insl_16) |