public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/4 v3] i.MX28: Fix ref_cpu clock setup
Date: Mon, 6 Feb 2012 16:33:41 +0100	[thread overview]
Message-ID: <201202061633.41627.marek.vasut@gmail.com> (raw)
In-Reply-To: <1328540291-24271-1-git-send-email-robert@delien.nl>

> 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) };		\

      reply	other threads:[~2012-02-06 15:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201202061633.41627.marek.vasut@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox