linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] add flexcan support to i.mx
@ 2010-07-21 21:59 Marc Kleine-Budde
  2010-07-21 21:59 ` [PATCH 1/5] mx25: flexcan clock support Marc Kleine-Budde
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Marc Kleine-Budde @ 2010-07-21 21:59 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

this series of patches prepares the i.mx tree for the flexcan driver.
Clock support is added or adjusted. The last patch registers flexcan on
the pcm043.

This series of patches applies to the sha's "imx/linux-2.6.git imx-for-2.6.36"
tree and is available at:
git://git.pengutronix.de/git/mkl/linux-2.6.git for-imx-for-2.6.36

The actual flexcan driver is going over the net-next-2.6 tree and is currently
in the (hopefully) final round of review, it is available at:
git://git.pengutronix.de/git/mkl/linux-2.6.git for-net-next-2.6

The combination (current mainline + for-net-next-2.6 + for-imx-for-2.6.36)
has been successfully tested on the pcm043 (i.mx35).

please consider to apply
Cheers, Marc


P.S.: this can be pulled:

The following changes since commit 10fda3e745c337332a58ce1c43704d7af3eb79fd:

  eukrea_mbimx27-baseboard: fix compile when CONFIG_SPI_IMX is disabled (2010-07-20 08:33:00 +0200)

are available in the git repository at:
  git://git.pengutronix.de/git/mkl/linux-2.6.git for-imx-for-2.6.36

Marc Kleine-Budde (3):
      mx35: adjust flexcan clock definition
      mx35: add flexcan devices
      pcm043: register flexcan device

Sascha Hauer (2):
      mx25: flexcan clock support
      mx25: Add flexcan devices

 arch/arm/mach-mx25/clock.c      |    4 ++
 arch/arm/mach-mx25/devices.c    |   95 +++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-mx25/devices.h    |    2 +
 arch/arm/mach-mx3/clock-imx35.c |    4 +-
 arch/arm/mach-mx3/devices.c     |   40 ++++++++++++++++
 arch/arm/mach-mx3/devices.h     |    2 +
 arch/arm/mach-mx3/mach-pcm043.c |    4 ++
 7 files changed, 149 insertions(+), 2 deletions(-)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/5] mx25: flexcan clock support
  2010-07-21 21:59 [PATCH 0/5] add flexcan support to i.mx Marc Kleine-Budde
@ 2010-07-21 21:59 ` Marc Kleine-Budde
  2010-07-21 21:59 ` [PATCH 2/5] mx25: Add flexcan devices Marc Kleine-Budde
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Marc Kleine-Budde @ 2010-07-21 21:59 UTC (permalink / raw)
  To: linux-arm-kernel

From: Sascha Hauer <s.hauer@pengutronix.de>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 arch/arm/mach-mx25/clock.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mx25/clock.c b/arch/arm/mach-mx25/clock.c
index 02f8247..40c7cc4 100644
--- a/arch/arm/mach-mx25/clock.c
+++ b/arch/arm/mach-mx25/clock.c
@@ -240,6 +240,8 @@ DEFINE_CLOCK(ssi1_clk,  0, CCM_CGCR2, 11, get_rate_ssi1, NULL, &ssi1_per_clk);
 DEFINE_CLOCK(ssi2_clk,  1, CCM_CGCR2, 12, get_rate_ssi2, NULL, &ssi2_per_clk);
 DEFINE_CLOCK(audmux_clk, 0, CCM_CGCR1, 0, NULL, NULL, NULL);
 DEFINE_CLOCK(csi_clk,    0, CCM_CGCR1,  4, get_rate_csi, NULL,  &csi_per_clk);
+DEFINE_CLOCK(can1_clk,	 0, CCM_CGCR1,  2, get_rate_ipg, NULL, NULL);
+DEFINE_CLOCK(can2_clk,	 0, CCM_CGCR1,  3, get_rate_ipg, NULL, NULL);
 
 #define _REGISTER_CLOCK(d, n, c)	\
 	{				\
@@ -279,6 +281,8 @@ static struct clk_lookup lookups[] = {
 	_REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk)
 	_REGISTER_CLOCK("mx2-camera.0", NULL, csi_clk)
 	_REGISTER_CLOCK(NULL, "audmux", audmux_clk)
+	_REGISTER_CLOCK("flexcan.0", NULL, can1_clk)
+	_REGISTER_CLOCK("flexcan.1", NULL, can2_clk)
 };
 
 int __init mx25_clocks_init(void)
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/5] mx25: Add flexcan devices
  2010-07-21 21:59 [PATCH 0/5] add flexcan support to i.mx Marc Kleine-Budde
  2010-07-21 21:59 ` [PATCH 1/5] mx25: flexcan clock support Marc Kleine-Budde
@ 2010-07-21 21:59 ` Marc Kleine-Budde
  2010-07-21 23:59   ` Fabio Estevam
  2010-07-21 21:59 ` [PATCH 3/5] mx35: adjust flexcan clock definition Marc Kleine-Budde
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 8+ messages in thread
From: Marc Kleine-Budde @ 2010-07-21 21:59 UTC (permalink / raw)
  To: linux-arm-kernel

From: Sascha Hauer <s.hauer@pengutronix.de>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 arch/arm/mach-mx25/devices.c |   95 ++++++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-mx25/devices.h |    2 +
 2 files changed, 97 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mx25/devices.c b/arch/arm/mach-mx25/devices.c
index 3468eb1..ecff519 100644
--- a/arch/arm/mach-mx25/devices.c
+++ b/arch/arm/mach-mx25/devices.c
@@ -179,6 +179,101 @@ struct platform_device mxc_pwm_device3 = {
 	.resource = mxc_pwm_resources3,
 };
 
+static struct resource mxc_i2c_1_resources[] = {
+	{
+		.start	= 0x43f80000,
+		.end	= 0x43f83fff,
+		.flags	= IORESOURCE_MEM,
+	}, {
+		.start	= 3,
+		.end	= 3,
+		.flags	= IORESOURCE_IRQ,
+	}
+};
+
+struct platform_device mxc_i2c_device0 = {
+	.name = "imx-i2c",
+	.id = 0,
+	.num_resources = ARRAY_SIZE(mxc_i2c_1_resources),
+	.resource = mxc_i2c_1_resources,
+};
+
+static struct resource mxc_i2c_2_resources[] = {
+	{
+		.start	= 0x43f98000,
+		.end	= 0x43f9bfff,
+		.flags	= IORESOURCE_MEM,
+	}, {
+		.start	= 4,
+		.end	= 4,
+		.flags	= IORESOURCE_IRQ,
+	}
+};
+
+struct platform_device mxc_i2c_device1 = {
+	.name = "imx-i2c",
+	.id = 1,
+	.num_resources = ARRAY_SIZE(mxc_i2c_2_resources),
+	.resource = mxc_i2c_2_resources,
+};
+
+static struct resource mxc_i2c_3_resources[] = {
+	{
+		.start	= 0x43f84000,
+		.end	= 0x43f87fff,
+		.flags	= IORESOURCE_MEM,
+	}, {
+		.start	= 10,
+		.end	= 10,
+		.flags	= IORESOURCE_IRQ,
+	}
+};
+
+struct platform_device mxc_i2c_device2 = {
+	.name = "imx-i2c",
+	.id = 2,
+	.num_resources = ARRAY_SIZE(mxc_i2c_3_resources),
+	.resource = mxc_i2c_3_resources,
+};
+
+static struct resource mxc_can_1_resources[] = {
+	{
+		.start	= 0x43f88000,
+		.end	= 0x43f8bfff,
+		.flags	= IORESOURCE_MEM,
+	}, {
+		.start	= 43,
+		.end	= 43,
+		.flags	= IORESOURCE_IRQ,
+	}
+};
+
+struct platform_device mxc_can_device0 = {
+	.name = "flexcan",
+	.id = 0,
+	.num_resources = ARRAY_SIZE(mxc_can_1_resources),
+	.resource = mxc_can_1_resources,
+};
+
+static struct resource mxc_can_2_resources[] = {
+	{
+		.start	= 0x43f8c000,
+		.end	= 0x43f8ffff,
+		.flags	= IORESOURCE_MEM,
+	}, {
+		.start	= 44,
+		.end	= 44,
+		.flags	= IORESOURCE_IRQ,
+	}
+};
+
+struct platform_device mxc_can_device1 = {
+	.name = "flexcan",
+	.id = 1,
+	.num_resources = ARRAY_SIZE(mxc_can_2_resources),
+	.resource = mxc_can_2_resources,
+};
+
 static struct mxc_gpio_port imx_gpio_ports[] = {
 	{
 		.chip.label = "gpio-0",
diff --git a/arch/arm/mach-mx25/devices.h b/arch/arm/mach-mx25/devices.h
index 4aceb68..66b72b1 100644
--- a/arch/arm/mach-mx25/devices.h
+++ b/arch/arm/mach-mx25/devices.h
@@ -14,3 +14,5 @@ extern struct platform_device mx25_kpp_device;
 extern struct platform_device imx_ssi_device0;
 extern struct platform_device imx_ssi_device1;
 extern struct platform_device mx25_csi_device;
+extern struct platform_device mxc_can_device0;
+extern struct platform_device mxc_can_device1;
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/5] mx35: adjust flexcan clock definition
  2010-07-21 21:59 [PATCH 0/5] add flexcan support to i.mx Marc Kleine-Budde
  2010-07-21 21:59 ` [PATCH 1/5] mx25: flexcan clock support Marc Kleine-Budde
  2010-07-21 21:59 ` [PATCH 2/5] mx25: Add flexcan devices Marc Kleine-Budde
@ 2010-07-21 21:59 ` Marc Kleine-Budde
  2010-07-21 21:59 ` [PATCH 4/5] mx35: add flexcan devices Marc Kleine-Budde
  2010-07-21 21:59 ` [PATCH 5/5] pcm043: register flexcan device Marc Kleine-Budde
  4 siblings, 0 replies; 8+ messages in thread
From: Marc Kleine-Budde @ 2010-07-21 21:59 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 arch/arm/mach-mx3/clock-imx35.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-mx3/clock-imx35.c b/arch/arm/mach-mx3/clock-imx35.c
index 28be011..d3af0fd 100644
--- a/arch/arm/mach-mx3/clock-imx35.c
+++ b/arch/arm/mach-mx3/clock-imx35.c
@@ -428,8 +428,8 @@ static struct clk nfc_clk = {
 static struct clk_lookup lookups[] = {
 	_REGISTER_CLOCK(NULL, "asrc", asrc_clk)
 	_REGISTER_CLOCK(NULL, "ata", ata_clk)
-	_REGISTER_CLOCK(NULL, "can", can1_clk)
-	_REGISTER_CLOCK(NULL, "can", can2_clk)
+	_REGISTER_CLOCK("flexcan.0", NULL, can1_clk)
+	_REGISTER_CLOCK("flexcan.1", NULL, can2_clk)
 	_REGISTER_CLOCK("spi_imx.0", NULL, cspi1_clk)
 	_REGISTER_CLOCK("spi_imx.1", NULL, cspi2_clk)
 	_REGISTER_CLOCK(NULL, "ect", ect_clk)
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/5] mx35: add flexcan devices
  2010-07-21 21:59 [PATCH 0/5] add flexcan support to i.mx Marc Kleine-Budde
                   ` (2 preceding siblings ...)
  2010-07-21 21:59 ` [PATCH 3/5] mx35: adjust flexcan clock definition Marc Kleine-Budde
@ 2010-07-21 21:59 ` Marc Kleine-Budde
  2010-07-21 21:59 ` [PATCH 5/5] pcm043: register flexcan device Marc Kleine-Budde
  4 siblings, 0 replies; 8+ messages in thread
From: Marc Kleine-Budde @ 2010-07-21 21:59 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 arch/arm/mach-mx3/devices.c |   40 ++++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-mx3/devices.h |    2 ++
 2 files changed, 42 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c
index a4fd1a2..a8aa157 100644
--- a/arch/arm/mach-mx3/devices.c
+++ b/arch/arm/mach-mx3/devices.c
@@ -29,6 +29,46 @@
 
 #include "devices.h"
 
+#ifdef CONFIG_ARCH_MX35
+static struct resource mxc_can_1_resources[] = {
+	{
+		.start	= 0x53fe4000,
+		.end	= 0x53fe7fff,
+		.flags	= IORESOURCE_MEM,
+	}, {
+		.start	= 43,
+		.end	= 43,
+		.flags	= IORESOURCE_IRQ,
+	}
+};
+
+struct platform_device mxc_can_device0 = {
+	.name = "flexcan",
+	.id = 0,
+	.num_resources = ARRAY_SIZE(mxc_can_1_resources),
+	.resource = mxc_can_1_resources,
+};
+
+static struct resource mxc_can_2_resources[] = {
+	{
+		.start	= 0x53fe8000,
+		.end	= 0x53feffff,
+		.flags	= IORESOURCE_MEM,
+	}, {
+		.start	= 44,
+		.end	= 44,
+		.flags	= IORESOURCE_IRQ,
+	}
+};
+
+struct platform_device mxc_can_device1 = {
+	.name = "flexcan",
+	.id = 1,
+	.num_resources = ARRAY_SIZE(mxc_can_2_resources),
+	.resource = mxc_can_2_resources,
+};
+#endif /* CONFIG_ARCH_MX35 */
+
 /* GPIO port description */
 static struct mxc_gpio_port imx_gpio_ports[] = {
 	{
diff --git a/arch/arm/mach-mx3/devices.h b/arch/arm/mach-mx3/devices.h
index e553523..c92bc91 100644
--- a/arch/arm/mach-mx3/devices.h
+++ b/arch/arm/mach-mx3/devices.h
@@ -16,3 +16,5 @@ extern struct platform_device imx_ssi_device1;
 extern struct platform_device imx_wdt_device0;
 extern struct platform_device imx_rtc_device0;
 extern struct platform_device imx_kpp_device;
+extern struct platform_device mxc_can_device0;
+extern struct platform_device mxc_can_device1;
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 5/5] pcm043: register flexcan device
  2010-07-21 21:59 [PATCH 0/5] add flexcan support to i.mx Marc Kleine-Budde
                   ` (3 preceding siblings ...)
  2010-07-21 21:59 ` [PATCH 4/5] mx35: add flexcan devices Marc Kleine-Budde
@ 2010-07-21 21:59 ` Marc Kleine-Budde
  4 siblings, 0 replies; 8+ messages in thread
From: Marc Kleine-Budde @ 2010-07-21 21:59 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 arch/arm/mach-mx3/mach-pcm043.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mx3/mach-pcm043.c b/arch/arm/mach-mx3/mach-pcm043.c
index b92f624..73d33af 100644
--- a/arch/arm/mach-mx3/mach-pcm043.c
+++ b/arch/arm/mach-mx3/mach-pcm043.c
@@ -143,6 +143,7 @@ static struct platform_device *devices[] __initdata = {
 	&pcm043_flash,
 	&mxc_fec_device,
 	&imx_wdt_device0,
+	&mxc_can_device1,
 };
 
 static struct pad_desc pcm043_pads[] = {
@@ -214,6 +215,9 @@ static struct pad_desc pcm043_pads[] = {
 	MX35_PAD_STXD4__AUDMUX_AUD4_TXD,
 	MX35_PAD_SRXD4__AUDMUX_AUD4_RXD,
 	MX35_PAD_SCK4__AUDMUX_AUD4_TXC,
+	/* CAN2 */
+	MX35_PAD_TX5_RX0__CAN2_TXCAN,
+	MX35_PAD_TX4_RX1__CAN2_RXCAN,
 };
 
 #define AC97_GPIO_TXFS	(1 * 32 + 31)
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/5] mx25: Add flexcan devices
  2010-07-21 21:59 ` [PATCH 2/5] mx25: Add flexcan devices Marc Kleine-Budde
@ 2010-07-21 23:59   ` Fabio Estevam
  2010-07-22  6:34     ` Marc Kleine-Budde
  0 siblings, 1 reply; 8+ messages in thread
From: Fabio Estevam @ 2010-07-21 23:59 UTC (permalink / raw)
  To: linux-arm-kernel

Marc,

--- On Wed, 7/21/10, Marc Kleine-Budde <mkl@pengutronix.de> wrote:
...
>  
> +static struct resource mxc_i2c_1_resources[] = {
> +??? {
> +??? ???

Shouldn't the inclusion of i2c be handled by a separate patch?

Regards,

Fabio Estevam 


      

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 2/5] mx25: Add flexcan devices
  2010-07-21 23:59   ` Fabio Estevam
@ 2010-07-22  6:34     ` Marc Kleine-Budde
  0 siblings, 0 replies; 8+ messages in thread
From: Marc Kleine-Budde @ 2010-07-22  6:34 UTC (permalink / raw)
  To: linux-arm-kernel

Fabio Estevam wrote:
> Marc,
> 
> --- On Wed, 7/21/10, Marc Kleine-Budde <mkl@pengutronix.de> wrote:
> ...
>>  
>> +static struct resource mxc_i2c_1_resources[] = {
>> +    {
>> +       
> 
> Shouldn't the inclusion of i2c be handled by a separate patch?
doh! It seems I've handled a rebase conflict wrong.

Thanks for catching this,
Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100722/5ef95746/attachment.sig>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-07-22  6:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-21 21:59 [PATCH 0/5] add flexcan support to i.mx Marc Kleine-Budde
2010-07-21 21:59 ` [PATCH 1/5] mx25: flexcan clock support Marc Kleine-Budde
2010-07-21 21:59 ` [PATCH 2/5] mx25: Add flexcan devices Marc Kleine-Budde
2010-07-21 23:59   ` Fabio Estevam
2010-07-22  6:34     ` Marc Kleine-Budde
2010-07-21 21:59 ` [PATCH 3/5] mx35: adjust flexcan clock definition Marc Kleine-Budde
2010-07-21 21:59 ` [PATCH 4/5] mx35: add flexcan devices Marc Kleine-Budde
2010-07-21 21:59 ` [PATCH 5/5] pcm043: register flexcan device Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).