]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
Blackfin arch: IO Port functions to read/write unalligned memory
authorMichael Hennerich <michael.hennerich@analog.com>
Sat, 17 May 2008 08:38:52 +0000 (16:38 +0800)
committerBryan Wu <cooloney@kernel.org>
Sat, 17 May 2008 08:38:52 +0000 (16:38 +0800)
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
arch/blackfin/kernel/bfin_ksyms.c
arch/blackfin/lib/ins.S
arch/blackfin/lib/outs.S
include/asm-blackfin/io.h

index 053edff6c0d84aa4f2b03c24606bf393d261bd01..4367330909b27ec4832a4f4d3b54bd6fed825e50 100644 (file)
@@ -90,7 +90,9 @@ EXPORT_SYMBOL(__umodsi3);
 EXPORT_SYMBOL(outsb);
 EXPORT_SYMBOL(insb);
 EXPORT_SYMBOL(outsw);
+EXPORT_SYMBOL(outsw_8);
 EXPORT_SYMBOL(insw);
+EXPORT_SYMBOL(insw_8);
 EXPORT_SYMBOL(outsl);
 EXPORT_SYMBOL(insl);
 EXPORT_SYMBOL(insl_16);
index df7b8833a0c56abf7a5a4ad6df43253f006331c8..eba2343b1b59246564ba96ef89cad418bbba8bf8 100644 (file)
@@ -7,7 +7,7 @@
  * Description:  Implementation of ins{bwl} for BlackFin processors using zero overhead loops.
  *
  * Modified:
- *               Copyright 2004-2006 Analog Devices Inc.
+ *               Copyright 2004-2008 Analog Devices Inc.
  *               Copyright (C) 2005 Bas Vermeulen, BuyWays BV <bas@buyways.nl>
  *
  * Bugs:         Enter bugs at http://blackfin.uclinux.org/
@@ -63,6 +63,23 @@ ENTRY(_insw)
        RTS;
 ENDPROC(_insw)
 
+ENTRY(_insw_8)
+       P0 = R0;        /* P0 = port */
+       cli R3;
+       P1 = R1;        /* P1 = address */
+       P2 = R2;        /* P2 = count */
+       SSYNC;
+       LSETUP( .Lword8_loop_s, .Lword8_loop_e) LC0 = P2;
+.Lword8_loop_s:  R0 = W[P0];
+               B[P1++] = R0;
+               R0 = R0 >> 8;
+               B[P1++] = R0;
+               NOP;
+.Lword8_loop_e: NOP;
+       sti R3;
+       RTS;
+ENDPROC(_insw_8)
+
 ENTRY(_insb)
        P0 = R0;        /* P0 = port */
        cli R3;
@@ -78,8 +95,6 @@ ENTRY(_insb)
        RTS;
 ENDPROC(_insb)
 
-
-
 ENTRY(_insl_16)
        P0 = R0;        /* P0 = port */
        cli R3;
index 4c3da8ae094ece20119b6181a9b5991b968ad144..3daf96035bf66ca99b92f5459e1c851724e5c30d 100644 (file)
@@ -7,7 +7,7 @@
  * Description:  Implementation of outs{bwl} for BlackFin processors using zero overhead loops.
  *
  * Modified:     Copyright (C) 2005 Bas Vermeulen, BuyWays BV <bas@buyways.nl>
- *               Copyright 2004-2006 Analog Devices Inc.
+ *               Copyright 2004-2008 Analog Devices Inc.
  *
  * Bugs:         Enter bugs at http://blackfin.uclinux.org/
  *
@@ -63,3 +63,17 @@ ENTRY(_outsb)
 .Lbyte_loop_e: B[P0] = R0;
        RTS;
 ENDPROC(_outsb)
+
+ENTRY(_outsw_8)
+       P0 = R0;        /* P0 = port */
+       P1 = R1;        /* P1 = address */
+       P2 = R2;        /* P2 = count */
+
+       LSETUP( .Lword8_loop_s, .Lword8_loop_e) LC0 = P2;
+.Lword8_loop_s: R1 = B[P1++];
+               R0 = B[P1++];
+               R0 = R0 << 8;
+               R0 = R0 + R1;
+.Lword8_loop_e: W[P0] = R0;
+       RTS;
+ENDPROC(_outsw)
index 574fe56989d1d68c82e90ef6d1d365720a7ce162..cbbf7ffdbbff1d4450e29ef0b68c5d1cde99c168 100644 (file)
@@ -117,10 +117,12 @@ static inline unsigned int readl(const volatile void __iomem *addr)
 
 extern void outsb(unsigned long port, const void *addr, unsigned long count);
 extern void outsw(unsigned long port, const void *addr, unsigned long count);
+extern void outsw_8(unsigned long port, const void *addr, unsigned long count);
 extern void outsl(unsigned long port, const void *addr, unsigned long count);
 
 extern void insb(unsigned long port, void *addr, unsigned long count);
 extern void insw(unsigned long port, void *addr, unsigned long count);
+extern void insw_8(unsigned long port, void *addr, unsigned long count);
 extern void insl(unsigned long port, void *addr, unsigned long count);
 extern void insl_16(unsigned long port, void *addr, unsigned long count);