2 * Copyright 2004-2010 Analog Devices Inc.
4 * Licensed under the GPL-2 or later.
10 #include <linux/compiler.h>
11 #include <linux/types.h>
12 #include <asm/byteorder.h>
14 #define DECLARE_BFIN_RAW_READX(size, type, asm, asm_sign) \
15 static inline type __raw_read##size(const volatile void __iomem *addr) \
19 __asm__ __volatile__ ( \
22 "%0 = "#asm" [%2] "#asm_sign";" \
24 : "=d"(val), "=d"(tmp) \
29 DECLARE_BFIN_RAW_READX(b
, u8
, b
, (z
))
30 #define __raw_readb __raw_readb
31 DECLARE_BFIN_RAW_READX(w
, u16
, w
, (z
))
32 #define __raw_readw __raw_readw
33 DECLARE_BFIN_RAW_READX(l
, u32
, , )
34 #define __raw_readl __raw_readl
36 extern void outsb(unsigned long port
, const void *addr
, unsigned long count
);
37 extern void outsw(unsigned long port
, const void *addr
, unsigned long count
);
38 extern void outsw_8(unsigned long port
, const void *addr
, unsigned long count
);
39 extern void outsl(unsigned long port
, const void *addr
, unsigned long count
);
44 extern void insb(unsigned long port
, void *addr
, unsigned long count
);
45 extern void insw(unsigned long port
, void *addr
, unsigned long count
);
46 extern void insw_8(unsigned long port
, void *addr
, unsigned long count
);
47 extern void insl(unsigned long port
, void *addr
, unsigned long count
);
48 extern void insl_16(unsigned long port
, void *addr
, unsigned long count
);
53 extern void dma_outsb(unsigned long port
, const void *addr
, unsigned short count
);
54 extern void dma_outsw(unsigned long port
, const void *addr
, unsigned short count
);
55 extern void dma_outsl(unsigned long port
, const void *addr
, unsigned short count
);
57 extern void dma_insb(unsigned long port
, void *addr
, unsigned short count
);
58 extern void dma_insw(unsigned long port
, void *addr
, unsigned short count
);
59 extern void dma_insl(unsigned long port
, void *addr
, unsigned short count
);
64 * Ensure ordering of I/O space writes. This will make sure that writes
65 * following the barrier will arrive after all previous writes.
67 #define mmiowb() do { SSYNC(); wmb(); } while (0)
69 #include <asm-generic/io.h>