projects
/
project
/
bcm63xx
/
atf.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a51443f
)
lib/mmio: Add mmio_clrsetbits_16 inline function
author
Konstantin Porotchkin
<kostap@marvell.com>
Sun, 7 Oct 2018 14:42:56 +0000
(17:42 +0300)
committer
Konstantin Porotchkin
<kostap@marvell.com>
Thu, 18 Oct 2018 09:13:11 +0000
(12:13 +0300)
Add 16-bit variant of mmio_clrsetbits function
Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com>
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
include/lib/mmio.h
patch
|
blob
|
history
diff --git
a/include/lib/mmio.h
b/include/lib/mmio.h
index 880d2c51284e91d2cd1d626b44ca120c1151e8d7..38fdf0f235682fcdac0b05bf2e2c9439f455fb17 100644
(file)
--- a/
include/lib/mmio.h
+++ b/
include/lib/mmio.h
@@
-29,6
+29,13
@@
static inline uint16_t mmio_read_16(uintptr_t addr)
return *(volatile uint16_t*)addr;
}
+static inline void mmio_clrsetbits_16(uintptr_t addr,
+ uint16_t clear,
+ uint16_t set)
+{
+ mmio_write_16(addr, (mmio_read_16(addr) & ~clear) | set);
+}
+
static inline void mmio_write_32(uintptr_t addr, uint32_t value)
{
*(volatile uint32_t*)addr = value;