summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Delien <robert@delien.nl>2012-02-26 12:15:06 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2012-03-26 23:09:24 +0200
commit531bb825fdee7fd1d14417061f07335787514f20 (patch)
tree16895359f3f3bc186919b7ec6be2430661e1603e
parentb228e14e9653fe4ead0f39a7a879d1a50e61321a (diff)
downloadu-boot-imx-531bb825fdee7fd1d14417061f07335787514f20.zip
u-boot-imx-531bb825fdee7fd1d14417061f07335787514f20.tar.gz
u-boot-imx-531bb825fdee7fd1d14417061f07335787514f20.tar.bz2
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>
-rw-r--r--arch/arm/include/asm/arch-mx28/regs-common.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-mx28/regs-common.h b/arch/arm/include/asm/arch-mx28/regs-common.h
index 75cc9a6..94b512d 100644
--- a/arch/arm/include/asm/arch-mx28/regs-common.h
+++ b/arch/arm/include/asm/arch-mx28/regs-common.h
@@ -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) }; \