Skip to contentSkip to conversation

i.MX28: Fix ref_cpu clock setup

PATCH Superseded robert at delien.nl 2 participants 2 messages Feb 6, 2012 Arm (32-bit)

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 2/4 i.MX28: Fix ref_cpu clock setup

From: Robert Delien <[email protected]>

Introducing 8-bit wide register, mx28_register_8.

---
 arch/arm/include/asm/arch-mx28/regs-common.h |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
arch/arm/include/asm/arch-mx28/regs-common.h +16 -0
index 75cc9a6..d2e1953 100644
@@ -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_8 name##_reg;	\
+	};
+
 #define	mx28_reg_32(name)				\
 	union {						\
 		struct { __mx28_reg_32(name) };		\
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH v3 2/4 i.MX28: Fix ref_cpu clock setup

Quoted 31 lines

From: Robert Delien <[email protected]>

Introducing 8-bit wide register, mx28_register_8.

---
 arch/arm/include/asm/arch-mx28/regs-common.h |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/arch/arm/include/asm/arch-mx28/regs-common.h index 75cc9a6..d2e1953 100644

arch/arm/include/asm/arch-mx28/regs-common.h +8 -0
@@ -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)

arch/arm/include/asm/arch-mx28/regs-common.h line 73

Quoted 10 lines
arch/arm/include/asm/arch-mx28/regs-common.h +6 -0
+};
+
 struct mx28_register_32 {
 	__mx28_reg_32(reg)
 };
 
+#define	mx28_reg_8(name)				\
+	union {						\
+		struct { __mx28_reg_8(name) };		\
+		struct mx28_register_8 name##_reg;	\

Will this kind of access (via register.reg) even work? I think we should replace it with register_32.

Quoted 5 lines
arch/arm/include/asm/arch-mx28/regs-common.h +2 -0
+	};
+
 #define	mx28_reg_32(name)				\
 	union {						\
 		struct { __mx28_reg_32(name) };		\