aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorVitaly Bordug <vbordug@ru.mvista.com>2006-01-15 09:30:29 -0500
committerPaul Mackerras <paulus@samba.org>2006-01-20 00:13:29 -0500
commit0ce928e1b2ad4309fae6c4324b9e9e433fbf62a2 (patch)
tree774811b3bba02ac53292c56cc0be0d144e616044 /include
parent63dafe5728e7354bc3f15bd49f13f1f9a433e8fb (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')
-rw-r--r--include/asm-ppc/io.h7
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 *);
575 */ 575 */
576#define xlate_dev_kmem_ptr(p) p 576#define xlate_dev_kmem_ptr(p) p
577 577
578/* access ports */
579#define setbits32(_addr, _v) out_be32((_addr), in_be32(_addr) | (_v))
580#define clrbits32(_addr, _v) out_be32((_addr), in_be32(_addr) & ~(_v))
581
582#define setbits16(_addr, _v) out_be16((_addr), in_be16(_addr) | (_v))
583#define clrbits16(_addr, _v) out_be16((_addr), in_be16(_addr) & ~(_v))
584
578#endif /* __KERNEL__ */ 585#endif /* __KERNEL__ */