022-Redefine-I-O-read-and-write-functions.patch 1010 B

1234567891011121314151617181920212223242526272829303132
  1. From f8dab3ef2c0da1c50dee07142c0b8088da61bc82 Mon Sep 17 00:00:00 2001
  2. From: Alison Wang <[email protected]>
  3. Date: Thu, 4 Aug 2011 09:59:45 +0800
  4. Subject: [PATCH 22/52] Redefine I/O read and write functions
  5. Redefine readb(), writeb(), readw(), writew(), readl(), write()
  6. functions.
  7. Signed-off-by: Alison Wang <[email protected]>
  8. ---
  9. arch/m68k/include/asm/cf_io.h | 10 ++++++++++
  10. 1 files changed, 10 insertions(+), 0 deletions(-)
  11. --- a/arch/m68k/include/asm/cf_io.h
  12. +++ b/arch/m68k/include/asm/cf_io.h
  13. @@ -20,6 +20,16 @@
  14. #include <asm-generic/iomap.h>
  15. +/*
  16. + * These should be valid on any ioremap()ed region
  17. + */
  18. +#define readb(addr) in_8(addr)
  19. +#define writeb(val, addr) out_8((addr), (val))
  20. +#define readw(addr) in_le16(addr)
  21. +#define writew(val, addr) out_le16((addr), (val))
  22. +#define readl(addr) in_le32(addr)
  23. +#define writel(val, addr) out_le32((addr), (val))
  24. +
  25. #define readb_relaxed(addr) readb(addr)
  26. #define readw_relaxed(addr) readw(addr)
  27. #define readl_relaxed(addr) readl(addr)