mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] ARM i.MX: Add support for i2c on imx6
Date: Thu, 9 Aug 2012 09:35:15 +0200	[thread overview]
Message-ID: <20120809073515.GT1451@pengutronix.de> (raw)
In-Reply-To: <1344329099-8528-1-git-send-email-s.trumtrar@pengutronix.de>

On Tue, Aug 07, 2012 at 10:44:59AM +0200, Steffen Trumtrar wrote:
> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>

Applied, thanks

Sascha

> ---
> Hi all,
> 
> this patch adds support for i2c on imx6. The patch was tested on a sabrelite
> board, where I measured SCL and SDATA, as there are no devices connected (apart
> from an sgtl5000).
> 
>  arch/arm/mach-imx/include/mach/devices-imx6.h |   15 +++++++++++++++
>  arch/arm/mach-imx/speed-imx6.c                |    6 ++++++
>  2 files changed, 21 insertions(+)
> 
> diff --git a/arch/arm/mach-imx/include/mach/devices-imx6.h b/arch/arm/mach-imx/include/mach/devices-imx6.h
> index ca063c5..c73e488 100644
> --- a/arch/arm/mach-imx/include/mach/devices-imx6.h
> +++ b/arch/arm/mach-imx/include/mach/devices-imx6.h
> @@ -49,3 +49,18 @@ static inline struct device_d *imx6_add_spi0(struct spi_imx_master *pdata)
>  {
>  	return imx_add_spi((void *)MX6_ECSPI1_BASE_ADDR, 0, pdata);
>  }
> +
> +static inline struct device_d *imx6_add_i2c0(struct i2c_platform_data *pdata)
> +{
> +	return imx_add_i2c((void *)MX6_I2C1_BASE_ADDR, 0, pdata);
> +}
> +
> +static inline struct device_d *imx6_add_i2c1(struct i2c_platform_data *pdata)
> +{
> +	return imx_add_i2c((void *)MX6_I2C2_BASE_ADDR, 1, pdata);
> +}
> +
> +static inline struct device_d *imx6_add_i2c2(struct i2c_platform_data *pdata)
> +{
> +	return imx_add_i2c((void *)MX6_I2C3_BASE_ADDR, 2, pdata);
> +}
> diff --git a/arch/arm/mach-imx/speed-imx6.c b/arch/arm/mach-imx/speed-imx6.c
> index df24545..645b2c9 100644
> --- a/arch/arm/mach-imx/speed-imx6.c
> +++ b/arch/arm/mach-imx/speed-imx6.c
> @@ -332,6 +332,11 @@ u32 imx_get_fecclk(void)
>  	return __get_ipg_clk();
>  }
>  
> +u32 imx_get_i2cclk(void)
> +{
> +	return __get_ipg_per_clk();
> +}
> +
>  u32 imx_get_cspiclk(void)
>  {
>  	return __get_cspi_clk();
> @@ -351,6 +356,7 @@ void imx_dump_clocks(void)
>  	printf("mx6q pll8: %d\n", freq);
>  	printf("mcu main:  %d\n", __get_mcu_main_clk());
>  	printf("periph:    %d\n", __get_periph_clk());
> +	printf("i2c:	   %d\n", __get_ipg_per_clk());
>  	printf("ipg:       %d\n", __get_ipg_clk());
>  	printf("ipg per:   %d\n", __get_ipg_per_clk());
>  	printf("cspi:      %d\n", __get_cspi_clk());
> -- 
> 1.7.10.4
> 
> 
> _______________________________________________
> 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-09  7:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-07  8:44 Steffen Trumtrar
2012-08-09  7:35 ` 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=20120809073515.GT1451@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.trumtrar@pengutronix.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