diff options
author | Vitaly Bordug <vbordug@ru.mvista.com> | 2006-01-15 17:30:29 +0300 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-20 16:13:29 +1100 |
commit | 0ce928e1b2ad4309fae6c4324b9e9e433fbf62a2 (patch) | |
tree | 774811b3bba02ac53292c56cc0be0d144e616044 /include/asm-ppc | |
parent | 63dafe5728e7354bc3f15bd49f13f1f9a433e8fb (diff) |
[PATCH] ppc32 8xx: Added setbitsXX/clrbitsXX macro for read-modify-write operations
This adds setbitsXX/clrbitsXX macro for read-modify-write operations
and converts the 8xx core and drivers to use them.
Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-ppc')
-rw-r--r-- | include/asm-ppc/io.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/asm-ppc/io.h b/include/asm-ppc/io.h index df9cf6ed189d..b919d8fb7d98 100644 --- a/include/asm-ppc/io.h +++ b/include/asm-ppc/io.h @@ -575,4 +575,11 @@ extern void pci_iounmap(struct pci_dev *dev, void __iomem *); */ #define xlate_dev_kmem_ptr(p) p +/* access ports */ +#define setbits32(_addr, _v) out_be32((_addr), in_be32(_addr) | (_v)) +#define clrbits32(_addr, _v) out_be32((_addr), in_be32(_addr) & ~(_v)) + +#define setbits16(_addr, _v) out_be16((_addr), in_be16(_addr) | (_v)) +#define clrbits16(_addr, _v) out_be16((_addr), in_be16(_addr) & ~(_v)) + #endif /* __KERNEL__ */ |