mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-30 08:31:03 +00:00
Introducing 8-bit wide register, mx28_register_8
This patch introduces an 8-bit register, mx28_register_8, in order to prepare for fixing erroneous 32-bit wide access of registers hw_clkctrl_frac0 and hw_clkctrl_frac1. Signed-off-by: Robert Delien <robert@delien.nl> Acked-by: Marek Vasut <marex@denx.de> Tested-by: Marek Vasut <marex@denx.de>
This commit is contained in:
parent
b228e14e96
commit
531bb825fd
1 changed files with 16 additions and 0 deletions
|
@ -47,16 +47,32 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#define __mx28_reg_8(name) \
|
||||
uint8_t name[4]; \
|
||||
uint8_t name##_set[4]; \
|
||||
uint8_t name##_clr[4]; \
|
||||
uint8_t name##_tog[4]; \
|
||||
|
||||
#define __mx28_reg_32(name) \
|
||||
uint32_t name; \
|
||||
uint32_t name##_set; \
|
||||
uint32_t name##_clr; \
|
||||
uint32_t name##_tog;
|
||||
|
||||
struct mx28_register_8 {
|
||||
__mx28_reg_8(reg)
|
||||
};
|
||||
|
||||
struct mx28_register_32 {
|
||||
__mx28_reg_32(reg)
|
||||
};
|
||||
|
||||
#define mx28_reg_8(name) \
|
||||
union { \
|
||||
struct { __mx28_reg_8(name) }; \
|
||||
struct mx28_register_32 name##_reg; \
|
||||
};
|
||||
|
||||
#define mx28_reg_32(name) \
|
||||
union { \
|
||||
struct { __mx28_reg_32(name) }; \
|
||||
|
|
Loading…
Reference in a new issue