X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=arch%2Fblackfin%2Flib%2Fins.S;h=df7b8833a0c56abf7a5a4ad6df43253f006331c8;hb=1265edb8fd2869d17128f1d60683dd6f4191d550;hp=730d2b427538c3adb29fd33a2a746a5a53c20adb;hpb=5c34202b8bf942da411b6599668a76b07449bbfd;p=linux-2.6 diff --git a/arch/blackfin/lib/ins.S b/arch/blackfin/lib/ins.S index 730d2b4275..df7b8833a0 100644 --- a/arch/blackfin/lib/ins.S +++ b/arch/blackfin/lib/ins.S @@ -29,6 +29,7 @@ */ #include +#include .align 2 @@ -39,10 +40,13 @@ ENTRY(_insl) P2 = R2; /* P2 = count */ SSYNC; LSETUP( .Llong_loop_s, .Llong_loop_e) LC0 = P2; -.Llong_loop_s: R0 = [P0]; -.Llong_loop_e: [P1++] = R0; +.Llong_loop_s: R0 = [P0]; + [P1++] = R0; + NOP; +.Llong_loop_e: NOP; sti R3; RTS; +ENDPROC(_insl) ENTRY(_insw) P0 = R0; /* P0 = port */ @@ -51,10 +55,13 @@ ENTRY(_insw) P2 = R2; /* P2 = count */ SSYNC; LSETUP( .Lword_loop_s, .Lword_loop_e) LC0 = P2; -.Lword_loop_s: R0 = W[P0]; -.Lword_loop_e: W[P1++] = R0; +.Lword_loop_s: R0 = W[P0]; + W[P1++] = R0; + NOP; +.Lword_loop_e: NOP; sti R3; RTS; +ENDPROC(_insw) ENTRY(_insb) P0 = R0; /* P0 = port */ @@ -63,7 +70,29 @@ ENTRY(_insb) P2 = R2; /* P2 = count */ SSYNC; LSETUP( .Lbyte_loop_s, .Lbyte_loop_e) LC0 = P2; -.Lbyte_loop_s: R0 = B[P0]; -.Lbyte_loop_e: B[P1++] = R0; +.Lbyte_loop_s: R0 = B[P0]; + B[P1++] = R0; + NOP; +.Lbyte_loop_e: NOP; sti R3; RTS; +ENDPROC(_insb) + + + +ENTRY(_insl_16) + P0 = R0; /* P0 = port */ + cli R3; + P1 = R1; /* P1 = address */ + P2 = R2; /* P2 = count */ + SSYNC; + LSETUP( .Llong16_loop_s, .Llong16_loop_e) LC0 = P2; +.Llong16_loop_s: R0 = [P0]; + W[P1++] = R0; + R0 = R0 >> 16; + W[P1++] = R0; + NOP; +.Llong16_loop_e: NOP; + sti R3; + RTS; +ENDPROC(_insl_16)