mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: "Eric Bénard" <eric@eukrea.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] i.MX35: add cspi1 support
Date: Wed, 29 Aug 2012 09:00:36 +0200	[thread overview]
Message-ID: <20120829070036.GP26594@pengutronix.de> (raw)
In-Reply-To: <1346189717-10476-1-git-send-email-eric@eukrea.com>

On Tue, Aug 28, 2012 at 11:35:17PM +0200, Eric Bénard wrote:
> tested with a m25p128 flash both in nand boot & spi boot.
> 
> Signed-off-by: Eric Bénard <eric@eukrea.com>

Applied, thanks

Sascha

> ---
>  arch/arm/mach-imx/include/mach/devices-imx35.h |    5 +++++
>  arch/arm/mach-imx/include/mach/imx35-regs.h    |    2 ++
>  arch/arm/mach-imx/speed-imx35.c                |    5 +++++
>  drivers/spi/Kconfig                            |    2 +-
>  drivers/spi/imx_spi.c                          |    2 +-
>  5 files changed, 14 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-imx/include/mach/devices-imx35.h b/arch/arm/mach-imx/include/mach/devices-imx35.h
> index 6c0d750..9ecaa35 100644
> --- a/arch/arm/mach-imx/include/mach/devices-imx35.h
> +++ b/arch/arm/mach-imx/include/mach/devices-imx35.h
> @@ -16,6 +16,11 @@ static inline struct device_d *imx35_add_i2c2(struct i2c_platform_data *pdata)
>  	return imx_add_i2c((void *)IMX_I2C3_BASE, 2, pdata);
>  }
>  
> +static inline struct device_d *imx35_add_spi0(struct spi_imx_master *pdata)
> +{
> +	return imx_add_spi((void *)IMX_CSPI1_BASE, 0, pdata);
> +}
> +
>  static inline struct device_d *imx35_add_uart0(void)
>  {
>  	return imx_add_uart((void *)IMX_UART1_BASE, 0);
> diff --git a/arch/arm/mach-imx/include/mach/imx35-regs.h b/arch/arm/mach-imx/include/mach/imx35-regs.h
> index fafcd61..91d4b9b 100644
> --- a/arch/arm/mach-imx/include/mach/imx35-regs.h
> +++ b/arch/arm/mach-imx/include/mach/imx35-regs.h
> @@ -49,6 +49,7 @@
>  #define IMX_I2C1_BASE		0x43F80000
>  #define IMX_I2C2_BASE		0x43F98000
>  #define IMX_I2C3_BASE		0x43F84000
> +#define IMX_CSPI1_BASE		0x43FA4000
>  #define IMX_SDHC1_BASE		0x53FB4000
>  #define IMX_SDHC2_BASE		0x53FB8000
>  #define IMX_SDHC3_BASE		0x53FBC000
> @@ -75,6 +76,7 @@
>  #define CCM_CGR2	0x34
>  #define CCM_CGR3	0x38
>  
> +#define CCM_CGR0_CSPI1_SHIFT	10
>  #define CCM_CGR1_FEC_SHIFT	0
>  #define CCM_CGR1_I2C1_SHIFT	10
>  #define CCM_CGR1_SDHC1_SHIFT	26
> diff --git a/arch/arm/mach-imx/speed-imx35.c b/arch/arm/mach-imx/speed-imx35.c
> index 684dc14..5f0e229 100644
> --- a/arch/arm/mach-imx/speed-imx35.c
> +++ b/arch/arm/mach-imx/speed-imx35.c
> @@ -186,6 +186,11 @@ ulong imx_get_i2cclk(void)
>  	return imx_get_ipg_perclk();
>  }
>  
> +unsigned long imx_get_cspiclk(void)
> +{
> +	return imx_get_ipgclk();
> +}
> +
>  void imx_dump_clocks(void)
>  {
>  	printf("mpll:    %10ld Hz\n", imx_get_mpllclk());
> diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
> index 609bafd..7a2f54a 100644
> --- a/drivers/spi/Kconfig
> +++ b/drivers/spi/Kconfig
> @@ -16,7 +16,7 @@ config DRIVER_SPI_IMX_0_0
>  
>  config DRIVER_SPI_IMX_0_7
>  	bool
> -	depends on ARCH_IMX25
> +	depends on ARCH_IMX25 || ARCH_IMX35
>  	default y
>  
>  config DRIVER_SPI_IMX_2_3
> diff --git a/drivers/spi/imx_spi.c b/drivers/spi/imx_spi.c
> index 42358f2..06cee86 100644
> --- a/drivers/spi/imx_spi.c
> +++ b/drivers/spi/imx_spi.c
> @@ -517,7 +517,7 @@ static int imx_spi_probe(struct device_d *dev)
>  		version = SPI_IMX_VER_0_0;
>  #endif
>  #ifdef CONFIG_DRIVER_SPI_IMX_0_7
> -	if (cpu_is_mx25())
> +	if (cpu_is_mx25() || cpu_is_mx35())
>  		version = SPI_IMX_VER_0_7;
>  #endif
>  #ifdef CONFIG_DRIVER_SPI_IMX_2_3
> -- 
> 1.7.7.6
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2012-08-29  7:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-28 21:35 Eric Bénard
2012-08-29  7:00 ` Sascha Hauer [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=20120829070036.GP26594@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=eric@eukrea.com \
    /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