From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Fri, 17 Aug 2012 12:44:27 +0200 Subject: [U-Boot] [PATCH 2/3] mxc_spi: change to use version config instead of soc config in mxc_spi In-Reply-To: <1345012685-24932-2-git-send-email-r65388@freescale.com> References: <1345012685-24932-1-git-send-email-r65388@freescale.com> <1345012685-24932-2-git-send-email-r65388@freescale.com> Message-ID: <502E208B.3040802@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > --- 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 =====================================================================