All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/3] mxc_spi: change to use version config instead of soc config in mxc_spi
Date: Fri, 17 Aug 2012 12:44:27 +0200	[thread overview]
Message-ID: <502E208B.3040802@denx.de> (raw)
In-Reply-To: <1345012685-24932-2-git-send-email-r65388@freescale.com>

On 15/08/2012 08:38, Terry Lv wrote:
> In mxc_spi, we used to use soc config, e.g. CONFIG_MX35, CONFIG_MX51.
> In this way, we can't exlain the difference of spi in each soc and we
> need to modify the driver for each new soc.
> Thus, now it use spi version config which can be found in  reference
> manual to diff. And new soc just need to add spi version config in
> config files to enable it. it would be eaiser than before.
> 
> Signed-off-by: Terry Lv <r65388@freescale.com>
> ---

Hi Terry,


>  README                |    4 ++-
>  drivers/spi/mxc_spi.c |   59 ++++++++++++++++++++++++-------------------------
>  2 files changed, 32 insertions(+), 31 deletions(-)
>  mode change 100644 => 100755 drivers/spi/mxc_spi.c
> 
> diff --git a/README b/README
> index 07f1d11..19268d9 100644
> --- a/README
> +++ b/README
> @@ -1910,7 +1910,9 @@ The following options need to be configured:
>  		CONFIG_MXC_SPI
>  
>  		Enables the driver for the SPI controllers on i.MX and MXC
> -		SoCs. Currently i.MX31/35/51 are supported.
> +		SoCs. The board must also define the version of SPI controller
> +		and SPI base addresses that will be used.
> +		Currently i.MX31/35/51/53 are supported.

I agree with this series, that drops also all nasty adresses using the
defines from ix-regs.h. However, I disagree that you move the decision
which controller should be used into the board configuration file. This
is a SOC propriety, not a board configuration option. A MX31 board
cannot set CONFIG_SPI_VER_2_3 - it must use always the right one that
belong to the SOC.

I thing that the version number should be moved into the corresponding
imx-regs.hm selecting another name, CONFIG_ can then be misleading with
the board configuration (only SPI_VER_*, maybe ?).

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-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

  reply	other threads:[~2012-08-17 10:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-15  6:38 [U-Boot] [PATCH 1/3] mx53_smd: add spi nor support Terry Lv
2012-08-15  6:38 ` [U-Boot] [PATCH 2/3] mxc_spi: change to use version config instead of soc config in mxc_spi Terry Lv
2012-08-17 10:44   ` Stefano Babic [this message]
2012-08-15  6:38 ` [U-Boot] [PATCH 3/3] mxc_spi: apply new mxc_spi version configs to other soc configs Terry Lv
2012-08-17 10:46   ` Stefano Babic
2012-08-17 10:36 ` [U-Boot] [PATCH 1/3] mx53_smd: add spi nor support 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=502E208B.3040802@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.