* i.MX53, add access to third I2C peripheral
@ 2013-02-04 19:04 George Pontis
2013-02-04 19:08 ` Alexander Shiyan
0 siblings, 1 reply; 6+ messages in thread
From: George Pontis @ 2013-02-04 19:04 UTC (permalink / raw)
To: barebox
All versions of the i.MX53 have three I2C peripherals. This patch provides
access to it.
diff -Naur a/arch/arm/mach-imx/include/mach/devices-imx53.h
b/arch/arm/mach-imx/include/mach/devices-imx
53.h
--- bb.a/arch/arm/mach-imx/include/mach/devices-imx53.h 2013-02-04
06:24:51.000000000 -0800
+++ bb.b/arch/arm/mach-imx/include/mach/devices-imx53.h 2013-02-03
22:24:26.930091420 -0800
@@ -21,6 +21,11 @@
return imx_add_i2c((void *)MX53_I2C2_BASE_ADDR, 1, pdata);
}
+static inline struct device_d *imx53_add_i2c2(struct i2c_platform_data
*pdata)
+{
+ return imx_add_i2c((void *)MX53_I2C2_BASE_ADDR, 2, pdata);
+}
+
static inline struct device_d *imx53_add_uart0(void)
{
return imx_add_uart_imx21((void *)MX53_UART1_BASE_ADDR, 0);
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: i.MX53, add access to third I2C peripheral
2013-02-04 19:04 i.MX53, add access to third I2C peripheral George Pontis
@ 2013-02-04 19:08 ` Alexander Shiyan
2013-02-05 0:31 ` George Pontis
0 siblings, 1 reply; 6+ messages in thread
From: Alexander Shiyan @ 2013-02-04 19:08 UTC (permalink / raw)
To: George Pontis; +Cc: barebox
> All versions of the i.MX53 have three I2C peripherals. This patch provides
> access to it.
...
> +static inline struct device_d *imx53_add_i2c2(struct i2c_platform_data
> *pdata)
> +{
> + return imx_add_i2c((void *)MX53_I2C2_BASE_ADDR, 2, pdata);
> +}
> +
MX53_I2C3_BASE_ADDR ?
---
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: i.MX53, add access to third I2C peripheral
2013-02-04 19:08 ` Alexander Shiyan
@ 2013-02-05 0:31 ` George Pontis
2013-02-05 8:52 ` Sascha Hauer
0 siblings, 1 reply; 6+ messages in thread
From: George Pontis @ 2013-02-05 0:31 UTC (permalink / raw)
To: barebox
> -----Original Message-----
> From: Alexander Shiyan [mailto:shc_work@mail.ru]
> Sent: Monday, February 04, 2013 11:09 AM
> To: George Pontis
> Cc: barebox@lists.infradead.org
> Subject: Re: i.MX53, add access to third I2C peripheral
>
> > All versions of the i.MX53 have three I2C peripherals. This patch
> provides
> > access to it.
> ...
> > +static inline struct device_d *imx53_add_i2c2(struct
> i2c_platform_data
> > *pdata)
> > +{
> > + return imx_add_i2c((void *)MX53_I2C2_BASE_ADDR, 2, pdata);
> > +}
> > +
> MX53_I2C3_BASE_ADDR ?
>
> ---
Thanks for the correction Alex. I also forgot to handle the clock for this new peripheral. With both in place, a device on the third bus is recognized at boot and listed by devinfo.
diff -Naur bb.a/arch/arm/mach-imx/include/mach/devices-imx53.h bb.b/arch/arm/mach-imx/include/mach/devic
es-imx53.h
--- bb.a/arch/arm/mach-imx/include/mach/devices-imx53.h 2013-02-04 06:24:51.000000000 -0800
+++ bb.b/arch/arm/mach-imx/include/mach/devices-imx53.h 2013-02-03 22:24:26.930091420 -0800
@@ -21,6 +21,11 @@
return imx_add_i2c((void *)MX53_I2C2_BASE_ADDR, 1, pdata);
}
+static inline struct device_d *imx53_add_i2c2(struct i2c_platform_data *pdata)
+{
+ return imx_add_i2c((void *)MX53_I2C3_BASE_ADDR, 2, pdata);
+}
+
static inline struct device_d *imx53_add_uart0(void)
{
return imx_add_uart_imx21((void *)MX53_UART1_BASE_ADDR, 0);
diff -Naur bb.a/arch/arm/mach-imx/clk-imx5.c bb.b/arch/arm/mach-imx/clk-imx5.c
--- bb.a/arch/arm/mach-imx/clk-imx5.c 2013-02-04 06:24:51.000000000 -0800
+++ bb.b/arch/arm/mach-imx/clk-imx5.c 2013-02-04 16:14:04.729284183 -0800
@@ -272,6 +272,7 @@
clkdev_add_physbase(clks[uart_root], MX53_UART3_BASE_ADDR, NULL);
clkdev_add_physbase(clks[per_root], MX53_I2C1_BASE_ADDR, NULL);
clkdev_add_physbase(clks[per_root], MX53_I2C2_BASE_ADDR, NULL);
+ clkdev_add_physbase(clks[per_root], MX53_I2C3_BASE_ADDR, NULL);
clkdev_add_physbase(clks[per_root], MX53_GPT1_BASE_ADDR, NULL);
clkdev_add_physbase(clks[ipg], MX53_CSPI_BASE_ADDR, NULL);
clkdev_add_physbase(clks[ecspi_podf], MX53_ECSPI1_BASE_ADDR, NULL);
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: i.MX53, add access to third I2C peripheral
2013-02-05 0:31 ` George Pontis
@ 2013-02-05 8:52 ` Sascha Hauer
2013-02-05 17:48 ` i.MX53, add access to third I2C peripheral ( resubmit with Signed-off tag ) George Pontis
0 siblings, 1 reply; 6+ messages in thread
From: Sascha Hauer @ 2013-02-05 8:52 UTC (permalink / raw)
To: George Pontis; +Cc: barebox
Hi George,
On Mon, Feb 04, 2013 at 04:31:20PM -0800, George Pontis wrote:
> > -----Original Message-----
> > From: Alexander Shiyan [mailto:shc_work@mail.ru]
> > Sent: Monday, February 04, 2013 11:09 AM
> > To: George Pontis
> > Cc: barebox@lists.infradead.org
> > Subject: Re: i.MX53, add access to third I2C peripheral
> >
> > > All versions of the i.MX53 have three I2C peripherals. This patch
> > provides
> > > access to it.
> > ...
> > > +static inline struct device_d *imx53_add_i2c2(struct
> > i2c_platform_data
> > > *pdata)
> > > +{
> > > + return imx_add_i2c((void *)MX53_I2C2_BASE_ADDR, 2, pdata);
> > > +}
> > > +
> > MX53_I2C3_BASE_ADDR ?
> >
> > ---
>
> Thanks for the correction Alex. I also forgot to handle the clock for this new peripheral. With both in place, a device on the third bus is recognized at boot and listed by devinfo.
This version looks ok. Please resend with a proper signed-off-by tag.
Sascha
>
> diff -Naur bb.a/arch/arm/mach-imx/include/mach/devices-imx53.h bb.b/arch/arm/mach-imx/include/mach/devic
> es-imx53.h
> --- bb.a/arch/arm/mach-imx/include/mach/devices-imx53.h 2013-02-04 06:24:51.000000000 -0800
> +++ bb.b/arch/arm/mach-imx/include/mach/devices-imx53.h 2013-02-03 22:24:26.930091420 -0800
> @@ -21,6 +21,11 @@
> return imx_add_i2c((void *)MX53_I2C2_BASE_ADDR, 1, pdata);
> }
>
> +static inline struct device_d *imx53_add_i2c2(struct i2c_platform_data *pdata)
> +{
> + return imx_add_i2c((void *)MX53_I2C3_BASE_ADDR, 2, pdata);
> +}
> +
> static inline struct device_d *imx53_add_uart0(void)
> {
> return imx_add_uart_imx21((void *)MX53_UART1_BASE_ADDR, 0);
> diff -Naur bb.a/arch/arm/mach-imx/clk-imx5.c bb.b/arch/arm/mach-imx/clk-imx5.c
> --- bb.a/arch/arm/mach-imx/clk-imx5.c 2013-02-04 06:24:51.000000000 -0800
> +++ bb.b/arch/arm/mach-imx/clk-imx5.c 2013-02-04 16:14:04.729284183 -0800
> @@ -272,6 +272,7 @@
> clkdev_add_physbase(clks[uart_root], MX53_UART3_BASE_ADDR, NULL);
> clkdev_add_physbase(clks[per_root], MX53_I2C1_BASE_ADDR, NULL);
> clkdev_add_physbase(clks[per_root], MX53_I2C2_BASE_ADDR, NULL);
> + clkdev_add_physbase(clks[per_root], MX53_I2C3_BASE_ADDR, NULL);
> clkdev_add_physbase(clks[per_root], MX53_GPT1_BASE_ADDR, NULL);
> clkdev_add_physbase(clks[ipg], MX53_CSPI_BASE_ADDR, NULL);
> clkdev_add_physbase(clks[ecspi_podf], MX53_ECSPI1_BASE_ADDR, NULL);
>
>
>
> _______________________________________________
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: i.MX53, add access to third I2C peripheral ( resubmit with Signed-off tag )
2013-02-05 8:52 ` Sascha Hauer
@ 2013-02-05 17:48 ` George Pontis
2013-02-06 18:48 ` Sascha Hauer
0 siblings, 1 reply; 6+ messages in thread
From: George Pontis @ 2013-02-05 17:48 UTC (permalink / raw)
To: barebox
Subject: i.MX53 i2c, add support for third i2c interface
Signed-off-by: George Pontis <gpontis@spamcop.net>
---
diff -Naur bb.a/arch/arm/mach-imx/include/mach/devices-imx53.h
bb.b/arch/arm/mach-imx/include/mach/devic
es-imx53.h
--- bb.a/arch/arm/mach-imx/include/mach/devices-imx53.h 2013-02-04
06:24:51.000000000 -0800
+++ bb.b/arch/arm/mach-imx/include/mach/devices-imx53.h 2013-02-03
22:24:26.930091420 -0800
@@ -21,6 +21,11 @@
return imx_add_i2c((void *)MX53_I2C2_BASE_ADDR, 1, pdata);
}
+static inline struct device_d *imx53_add_i2c2(struct i2c_platform_data
*pdata)
+{
+ return imx_add_i2c((void *)MX53_I2C3_BASE_ADDR, 2, pdata);
+}
+
static inline struct device_d *imx53_add_uart0(void)
{
return imx_add_uart_imx21((void *)MX53_UART1_BASE_ADDR, 0);
diff -Naur bb.a/arch/arm/mach-imx/clk-imx5.c
bb.b/arch/arm/mach-imx/clk-imx5.c
--- bb.a/arch/arm/mach-imx/clk-imx5.c 2013-02-04 06:24:51.000000000 -0800
+++ bb.b/arch/arm/mach-imx/clk-imx5.c 2013-02-04 16:14:04.729284183 -0800
@@ -272,6 +272,7 @@
clkdev_add_physbase(clks[uart_root], MX53_UART3_BASE_ADDR, NULL);
clkdev_add_physbase(clks[per_root], MX53_I2C1_BASE_ADDR, NULL);
clkdev_add_physbase(clks[per_root], MX53_I2C2_BASE_ADDR, NULL);
+ clkdev_add_physbase(clks[per_root], MX53_I2C3_BASE_ADDR, NULL);
clkdev_add_physbase(clks[per_root], MX53_GPT1_BASE_ADDR, NULL);
clkdev_add_physbase(clks[ipg], MX53_CSPI_BASE_ADDR, NULL);
clkdev_add_physbase(clks[ecspi_podf], MX53_ECSPI1_BASE_ADDR, NULL);
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: i.MX53, add access to third I2C peripheral ( resubmit with Signed-off tag )
2013-02-05 17:48 ` i.MX53, add access to third I2C peripheral ( resubmit with Signed-off tag ) George Pontis
@ 2013-02-06 18:48 ` Sascha Hauer
0 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2013-02-06 18:48 UTC (permalink / raw)
To: George Pontis; +Cc: barebox
On Tue, Feb 05, 2013 at 09:48:51AM -0800, George Pontis wrote:
> Subject: i.MX53 i2c, add support for third i2c interface
>
> Signed-off-by: George Pontis <gpontis@spamcop.net>
Applied, thanks.
Your mailer wraps lines. I had to apply this manually. Please figure out
how to send patches correctly next time.
Sascha
> ---
> diff -Naur bb.a/arch/arm/mach-imx/include/mach/devices-imx53.h
> bb.b/arch/arm/mach-imx/include/mach/devic
> es-imx53.h
> --- bb.a/arch/arm/mach-imx/include/mach/devices-imx53.h 2013-02-04
> 06:24:51.000000000 -0800
> +++ bb.b/arch/arm/mach-imx/include/mach/devices-imx53.h 2013-02-03
> 22:24:26.930091420 -0800
> @@ -21,6 +21,11 @@
> return imx_add_i2c((void *)MX53_I2C2_BASE_ADDR, 1, pdata);
> }
>
> +static inline struct device_d *imx53_add_i2c2(struct i2c_platform_data
> *pdata)
> +{
> + return imx_add_i2c((void *)MX53_I2C3_BASE_ADDR, 2, pdata);
> +}
> +
> static inline struct device_d *imx53_add_uart0(void)
> {
> return imx_add_uart_imx21((void *)MX53_UART1_BASE_ADDR, 0);
> diff -Naur bb.a/arch/arm/mach-imx/clk-imx5.c
> bb.b/arch/arm/mach-imx/clk-imx5.c
> --- bb.a/arch/arm/mach-imx/clk-imx5.c 2013-02-04 06:24:51.000000000 -0800
> +++ bb.b/arch/arm/mach-imx/clk-imx5.c 2013-02-04 16:14:04.729284183 -0800
> @@ -272,6 +272,7 @@
> clkdev_add_physbase(clks[uart_root], MX53_UART3_BASE_ADDR, NULL);
> clkdev_add_physbase(clks[per_root], MX53_I2C1_BASE_ADDR, NULL);
> clkdev_add_physbase(clks[per_root], MX53_I2C2_BASE_ADDR, NULL);
> + clkdev_add_physbase(clks[per_root], MX53_I2C3_BASE_ADDR, NULL);
> clkdev_add_physbase(clks[per_root], MX53_GPT1_BASE_ADDR, NULL);
> clkdev_add_physbase(clks[ipg], MX53_CSPI_BASE_ADDR, NULL);
> clkdev_add_physbase(clks[ecspi_podf], MX53_ECSPI1_BASE_ADDR, NULL);
>
>
>
> _______________________________________________
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-02-06 18:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-04 19:04 i.MX53, add access to third I2C peripheral George Pontis
2013-02-04 19:08 ` Alexander Shiyan
2013-02-05 0:31 ` George Pontis
2013-02-05 8:52 ` Sascha Hauer
2013-02-05 17:48 ` i.MX53, add access to third I2C peripheral ( resubmit with Signed-off tag ) George Pontis
2013-02-06 18:48 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox