public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 2/4 v3] i.MX28: Fix ref_cpu clock setup
@ 2012-02-06 14:58 robert at delien.nl
  2012-02-06 15:33 ` Marek Vasut
  0 siblings, 1 reply; 2+ messages in thread
From: robert at delien.nl @ 2012-02-06 14:58 UTC (permalink / raw)
  To: u-boot

From: Robert Delien <robert@delien.nl>

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(-)

diff --git a/arch/arm/include/asm/arch-mx28/regs-common.h b/arch/arm/include/asm/arch-mx28/regs-common.h
index 75cc9a6..d2e1953 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_8 name##_reg;	\
+	};
+
 #define	mx28_reg_32(name)				\
 	union {						\
 		struct { __mx28_reg_32(name) };		\
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH 2/4 v3] i.MX28: Fix ref_cpu clock setup
  2012-02-06 14:58 [U-Boot] [PATCH 2/4 v3] i.MX28: Fix ref_cpu clock setup robert at delien.nl
@ 2012-02-06 15:33 ` Marek Vasut
  0 siblings, 0 replies; 2+ messages in thread
From: Marek Vasut @ 2012-02-06 15:33 UTC (permalink / raw)
  To: u-boot

> From: Robert Delien <robert@delien.nl>
> 
> 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(-)
> 
> diff --git a/arch/arm/include/asm/arch-mx28/regs-common.h
> b/arch/arm/include/asm/arch-mx28/regs-common.h index 75cc9a6..d2e1953
> 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_8 name##_reg;	\

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

> +	};
> +
>  #define	mx28_reg_32(name)				\
>  	union {						\
>  		struct { __mx28_reg_32(name) };		\

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-02-06 15:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-06 14:58 [U-Boot] [PATCH 2/4 v3] i.MX28: Fix ref_cpu clock setup robert at delien.nl
2012-02-06 15:33 ` Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox