Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201383
b: refs/heads/master
c: 79f64db
h: refs/heads/master
i:
  201381: e225f17
  201379: c798b1c
  201375: ebe3248
v: v3
  • Loading branch information
Catalin Marinas authored and Russell King committed Jul 29, 2010
1 parent 20f9229 commit a6b9d3d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6775a558fece413376e1dacd435adb5fbe225f40
refs/heads/master: 79f64dbf68c8a9779a7e9a25e0a9f0217a25b57a
11 changes: 11 additions & 0 deletions trunk/arch/arm/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <linux/types.h>
#include <asm/byteorder.h>
#include <asm/memory.h>
#include <asm/system.h>

/*
* ISA I/O bus memory addresses are 1:1 with the physical address.
Expand Down Expand Up @@ -191,13 +192,23 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
#define writel_relaxed(v,c) ((void)__raw_writel((__force u32) \
cpu_to_le32(v),__mem_pci(c)))

#ifdef CONFIG_ARM_DMA_MEM_BUFFERABLE
#define readb(c) ({ u8 __v = readb_relaxed(c); rmb(); __v; })
#define readw(c) ({ u16 __v = readw_relaxed(c); rmb(); __v; })
#define readl(c) ({ u32 __v = readl_relaxed(c); rmb(); __v; })

#define writeb(v,c) ({ wmb(); writeb_relaxed(v,c); })
#define writew(v,c) ({ wmb(); writew_relaxed(v,c); })
#define writel(v,c) ({ wmb(); writel_relaxed(v,c); })
#else
#define readb(c) readb_relaxed(c)
#define readw(c) readw_relaxed(c)
#define readl(c) readl_relaxed(c)

#define writeb(v,c) writeb_relaxed(v,c)
#define writew(v,c) writew_relaxed(v,c)
#define writel(v,c) writel_relaxed(v,c)
#endif

#define readsb(p,d,l) __raw_readsb(__mem_pci(p),d,l)
#define readsw(p,d,l) __raw_readsw(__mem_pci(p),d,l)
Expand Down

0 comments on commit a6b9d3d

Please sign in to comment.