Lines Matching refs:addr
24 static ALWAYS_INLINE void sys_set_bit(mem_addr_t addr, unsigned int bit) in sys_set_bit() argument
26 uint32_t temp = *(volatile uint32_t *)addr; in sys_set_bit()
28 *(volatile uint32_t *)addr = temp | (1 << bit); in sys_set_bit()
31 static ALWAYS_INLINE void sys_clear_bit(mem_addr_t addr, unsigned int bit) in sys_clear_bit() argument
33 uint32_t temp = *(volatile uint32_t *)addr; in sys_clear_bit()
35 *(volatile uint32_t *)addr = temp & ~(1 << bit); in sys_clear_bit()
38 static ALWAYS_INLINE int sys_test_bit(mem_addr_t addr, unsigned int bit) in sys_test_bit() argument
40 uint32_t temp = *(volatile uint32_t *)addr; in sys_test_bit()
45 static ALWAYS_INLINE void sys_set_bits(mem_addr_t addr, unsigned int mask) in sys_set_bits() argument
47 uint32_t temp = *(volatile uint32_t *)addr; in sys_set_bits()
49 *(volatile uint32_t *)addr = temp | mask; in sys_set_bits()
52 static ALWAYS_INLINE void sys_clear_bits(mem_addr_t addr, unsigned int mask) in sys_clear_bits() argument
54 uint32_t temp = *(volatile uint32_t *)addr; in sys_clear_bits()
56 *(volatile uint32_t *)addr = temp & ~mask; in sys_clear_bits()
60 void sys_bitfield_set_bit(mem_addr_t addr, unsigned int bit) in sys_bitfield_set_bit() argument
65 sys_set_bit(addr + ((bit >> 5) << 2), bit & 0x1F); in sys_bitfield_set_bit()
69 void sys_bitfield_clear_bit(mem_addr_t addr, unsigned int bit) in sys_bitfield_clear_bit() argument
71 sys_clear_bit(addr + ((bit >> 5) << 2), bit & 0x1F); in sys_bitfield_clear_bit()
75 int sys_bitfield_test_bit(mem_addr_t addr, unsigned int bit) in sys_bitfield_test_bit() argument
77 return sys_test_bit(addr + ((bit >> 5) << 2), bit & 0x1F); in sys_bitfield_test_bit()
81 int sys_test_and_set_bit(mem_addr_t addr, unsigned int bit) in sys_test_and_set_bit() argument
85 ret = sys_test_bit(addr, bit); in sys_test_and_set_bit()
86 sys_set_bit(addr, bit); in sys_test_and_set_bit()
92 int sys_test_and_clear_bit(mem_addr_t addr, unsigned int bit) in sys_test_and_clear_bit() argument
96 ret = sys_test_bit(addr, bit); in sys_test_and_clear_bit()
97 sys_clear_bit(addr, bit); in sys_test_and_clear_bit()
103 int sys_bitfield_test_and_set_bit(mem_addr_t addr, unsigned int bit) in sys_bitfield_test_and_set_bit() argument
107 ret = sys_bitfield_test_bit(addr, bit); in sys_bitfield_test_and_set_bit()
108 sys_bitfield_set_bit(addr, bit); in sys_bitfield_test_and_set_bit()
114 int sys_bitfield_test_and_clear_bit(mem_addr_t addr, unsigned int bit) in sys_bitfield_test_and_clear_bit() argument
118 ret = sys_bitfield_test_bit(addr, bit); in sys_bitfield_test_and_clear_bit()
119 sys_bitfield_clear_bit(addr, bit); in sys_bitfield_test_and_clear_bit()