public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [Resend PATCH V2 (forgot generic.c)] mx31: provide readable WEIM CS accessor
Date: Thu, 29 Sep 2011 15:21:28 +0200	[thread overview]
Message-ID: <4E8470D8.1030702@denx.de> (raw)
In-Reply-To: <1317299103-18117-1-git-send-email-helmut.raiger@hale.at>

On 09/29/2011 02:25 PM, Helmut Raiger wrote:
> setup_weimcs() and some macros are added to support the setup
> for i.MX31 WEIM chip selects. As a compromise between verbosity
> and readability an ASCII-art'ish bit comment is used instead of
> bitfields.
> All i.MX31 boards have been patched to use this approach using a
> helper program to verify the changes.
> 
> Signed-off-by: Helmut Raiger <helmut.raiger@hale.at>
> ---
>   V2:
> 	added sys_proto.h for mx31
> 	introduced mxc_setup_weimcs(), which is SOC independent
> 	not inlined any more (codesize increased by 60-90 bytes)
> ---
>  arch/arm/cpu/arm1136/mx31/generic.c         |    9 +++

Ah, ok, I now I can find the implementation ;-)

I have only a couple of open points...

>  arch/arm/include/asm/arch-mx31/imx-regs.h   |   26 +++++++-
>  arch/arm/include/asm/arch-mx31/sys_proto.h  |   35 +++++++++++
>  board/davedenx/qong/qong.c                  |   87 ++++++++++-----------------
>  board/freescale/mx31ads/mx31ads.c           |   15 ++++-
>  board/freescale/mx31pdk/mx31pdk.c           |   14 ++++-
>  board/imx31_phycore/imx31_phycore.c         |   41 ++++++++++---
>  board/logicpd/imx31_litekit/imx31_litekit.c |   28 +++++++--
>  8 files changed, 176 insertions(+), 79 deletions(-)
>  create mode 100644 arch/arm/include/asm/arch-mx31/sys_proto.h
> 
> diff --git a/arch/arm/cpu/arm1136/mx31/generic.c b/arch/arm/cpu/arm1136/mx31/generic.c
> index e3a4d1b..29af156 100644
> --- a/arch/arm/cpu/arm1136/mx31/generic.c
> +++ b/arch/arm/cpu/arm1136/mx31/generic.c
> @@ -25,6 +25,8 @@
>  #include <asm/arch/imx-regs.h>
>  #include <asm/arch/clock.h>
>  #include <asm/io.h>
> +#include <asm/arch/sys_proto.h>
> +

Drop newline

>  
>  static u32 mx31_decode_pll(u32 reg, u32 infreq)
>  {
> @@ -126,6 +128,13 @@ void mx31_set_pad(enum iomux_pins pin, u32 config)
>  
>  }
>  
> +void mxc_setup_weimcs(int cs, const struct mxc_weimcs *weimcs)
> +{
> +	writel(weimcs->upper, WEIM_CSCR_U(cs));
> +	writel(weimcs->lower, WEIM_CSCR_L(cs));
> +	writel(weimcs->additional, WEIM_CSCR_A(cs));
> +}

Even if more hidden, the access is always made with base + offset,
instead of defining a structure.

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

  reply	other threads:[~2011-09-29 13:21 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-22 12:12 [U-Boot] mx31: Add board support for HALE TT-01 Helmut Raiger
2011-09-22 12:12 ` [U-Boot] [PATCH 1/2] mx31: define pins and init for UART2 and CSPI3 Helmut Raiger
2011-09-22 12:12 ` [U-Boot] [PATCH 2/2] TT-01: add basic board support for HALE TT-01 Helmut Raiger
2011-09-22 13:36   ` Fabio Estevam
2011-09-22 13:51   ` Stefano Babic
2011-10-06 13:07     ` Helmut Raiger
2011-10-06 13:27       ` Stefano Babic
2011-09-22 14:08   ` Wolfgang Denk
2011-09-28 12:48     ` [U-Boot] mx31: Approach for WEIM CS accessors Helmut Raiger
2011-09-28 12:48       ` [U-Boot] [PATCH] mx31: provide readable WEIM CS accessor Helmut Raiger
2011-09-28 15:14         ` Stefano Babic
2011-09-29  6:32           ` Helmut Raiger
2011-09-29  6:59             ` Stefano Babic
2011-09-29  7:30           ` Helmut Raiger
2011-09-29  9:17             ` Stefano Babic
2011-09-29 12:19         ` [U-Boot] [PATCH V2] " Helmut Raiger
2011-09-29 12:25         ` [U-Boot] [Resend PATCH V2 (forgot generic.c)] " Helmut Raiger
2011-09-29 13:21           ` Stefano Babic [this message]
2011-09-29 14:01             ` Helmut Raiger
2011-09-29 14:16               ` Stefano Babic
2011-09-29 14:55                 ` [U-Boot] [PATCH V3] " Helmut Raiger
2011-09-29 15:11                   ` Helmut Raiger
2011-09-29 15:19                     ` Stefano Babic
2011-09-29 15:45                 ` [U-Boot] [Resend PATCH " Helmut Raiger
2011-09-30  7:32                   ` Stefano Babic
2011-10-05 11:51                   ` Stefano Babic
2011-09-29 17:32               ` [U-Boot] [Resend PATCH V2 (forgot generic.c)] " Wolfgang Denk
2011-10-14  8:05 ` [U-Boot] [PATCH V2 1/3] mx31: define pins and init for UART2 and CSPI3 Helmut Raiger
2011-10-14  8:05   ` [U-Boot] [PATCH V2 2/3] mx31: add ESD control registers Helmut Raiger
2011-10-14 13:29     ` Stefano Babic
2011-10-14  8:05   ` [U-Boot] [PATCH V2 3/3] mx31: Add board support for HALE TT-01 Helmut Raiger
2011-10-14 11:04     ` Stefano Babic
2011-10-14 21:14       ` Wolfgang Denk
2011-10-15  5:40         ` stefano babic
2011-10-15  8:52           ` Wolfgang Denk
2011-10-15 11:11             ` Stefano Babic
2011-10-14 10:04   ` [U-Boot] [PATCH V2 1/3] mx31: define pins and init for UART2 and CSPI3 Stefano Babic
2011-10-27 11:31 ` [U-Boot] [PATCH V3 " Helmut Raiger
2011-10-27 11:31   ` [U-Boot] [PATCH V3 2/3] mx31: add ESD control registers Helmut Raiger
2011-10-27 12:49     ` Stefano Babic
2011-10-28  8:28     ` Stefano Babic
2011-10-27 11:31   ` [U-Boot] [PATCH V3 3/3] mx31: Add board support for HALE TT-01 Helmut Raiger
2011-10-27 12:59     ` Stefano Babic
2011-10-27 12:49   ` [U-Boot] [PATCH V3 1/3] mx31: define pins and init for UART2 and CSPI3 Stefano Babic
2011-10-28  8:28   ` Stefano Babic

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=4E8470D8.1030702@denx.de \
    --to=sbabic@denx.de \
    --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