4 #define REG(x)(*((volatile uint32_t *)(x)))
5 #define BIT(x)(0x1 << x)
7 /* Write a uint32_t value to a memory address. */
9 write32(uint32_t address
, uint32_t value
)
14 /* Read an uint32_t from a memory address */
15 static inline uint32_t
16 read32(uint32_t address
)
21 /* Set a 32 bits value depending on a mask */
23 set32(uint32_t address
, uint32_t mask
, uint32_t value
)
26 val
= read32(address
);
29 /* apply the value using the mask */
30 val
|= (value
& mask
);
31 write32(address
, val
);
33 #endif /* __MMIO_H__ */