linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] mx25: flexcan clock support
       [not found] <1275046938-8465-1-git-send-email-mkl@pengutronix.de>
@ 2010-05-28 11:42 ` Marc Kleine-Budde
  2010-05-28 11:42 ` [PATCH 2/4] mx25: Add flexcan devices Marc Kleine-Budde
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Marc Kleine-Budde @ 2010-05-28 11:42 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 1550149..158a29b 100644
--- a/arch/arm/mach-mx25/clock.c
+++ b/arch/arm/mach-mx25/clock.c
@@ -191,6 +191,8 @@ DEFINE_CLOCK(i2c_clk,	 0, CCM_CGCR0,  6, get_rate_i2c, NULL, NULL);
 DEFINE_CLOCK(fec_clk,	 0, CCM_CGCR1, 15, get_rate_ipg, NULL, &fec_ahb_clk);
 DEFINE_CLOCK(dryice_clk, 0, CCM_CGCR1,  8, get_rate_ipg, NULL, NULL);
 DEFINE_CLOCK(lcdc_clk,	 0, CCM_CGCR1, 29, get_rate_lcdc, NULL, &lcdc_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)	\
 	{				\
@@ -225,6 +227,8 @@ static struct clk_lookup lookups[] = {
 	_REGISTER_CLOCK("fec.0", NULL, fec_clk)
 	_REGISTER_CLOCK("imxdi_rtc.0", NULL, dryice_clk)
 	_REGISTER_CLOCK("imx-fb.0", NULL, lcdc_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] 6+ messages in thread

* [PATCH 2/4] mx25: Add flexcan devices
       [not found] <1275046938-8465-1-git-send-email-mkl@pengutronix.de>
  2010-05-28 11:42 ` [PATCH 1/4] mx25: flexcan clock support Marc Kleine-Budde
@ 2010-05-28 11:42 ` Marc Kleine-Budde
  2010-05-28 11:42 ` [PATCH 3/4] mx35: adjust flexcan clock definition Marc Kleine-Budde
  2010-05-28 11:42 ` [PATCH 4/4] mx35: add flexcan devices Marc Kleine-Budde
  3 siblings, 0 replies; 6+ messages in thread
From: Marc Kleine-Budde @ 2010-05-28 11:42 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 |   38 ++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-mx25/devices.h |    2 ++
 2 files changed, 40 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mx25/devices.c b/arch/arm/mach-mx25/devices.c
index 3a405fa..e8b320b 100644
--- a/arch/arm/mach-mx25/devices.c
+++ b/arch/arm/mach-mx25/devices.c
@@ -390,6 +390,44 @@ struct platform_device mxc_i2c_device2 = {
 	.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 cee12c0..e3267d6 100644
--- a/arch/arm/mach-mx25/devices.h
+++ b/arch/arm/mach-mx25/devices.h
@@ -22,3 +22,5 @@ extern struct platform_device mxc_nand_device;
 extern struct platform_device mx25_rtc_device;
 extern struct platform_device mx25_fb_device;
 extern struct platform_device mxc_wdt;
+extern struct platform_device mxc_can_device0;
+extern struct platform_device mxc_can_device1;
-- 
1.7.1

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

* [PATCH 3/4] mx35: adjust flexcan clock definition
       [not found] <1275046938-8465-1-git-send-email-mkl@pengutronix.de>
  2010-05-28 11:42 ` [PATCH 1/4] mx25: flexcan clock support Marc Kleine-Budde
  2010-05-28 11:42 ` [PATCH 2/4] mx25: Add flexcan devices Marc Kleine-Budde
@ 2010-05-28 11:42 ` Marc Kleine-Budde
  2010-05-28 11:42 ` [PATCH 4/4] mx35: add flexcan devices Marc Kleine-Budde
  3 siblings, 0 replies; 6+ messages in thread
From: Marc Kleine-Budde @ 2010-05-28 11:42 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 9f3e943..ba4e722 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] 6+ messages in thread

* [PATCH 4/4] mx35: add flexcan devices
       [not found] <1275046938-8465-1-git-send-email-mkl@pengutronix.de>
                   ` (2 preceding siblings ...)
  2010-05-28 11:42 ` [PATCH 3/4] mx35: adjust flexcan clock definition Marc Kleine-Budde
@ 2010-05-28 11:42 ` Marc Kleine-Budde
  2010-05-28 13:34   ` Hans J. Koch
  3 siblings, 1 reply; 6+ messages in thread
From: Marc Kleine-Budde @ 2010-05-28 11:42 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 db7acd6..0e1e20b 100644
--- a/arch/arm/mach-mx3/devices.c
+++ b/arch/arm/mach-mx3/devices.c
@@ -127,6 +127,46 @@ struct platform_device mxc_uart_device4 = {
 };
 #endif /* CONFIG_ARCH_MX31 */
 
+#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 2c3c864..f600d09 100644
--- a/arch/arm/mach-mx3/devices.h
+++ b/arch/arm/mach-mx3/devices.h
@@ -29,3 +29,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] 6+ messages in thread

* [PATCH 4/4] mx35: add flexcan devices
  2010-05-28 11:42 ` [PATCH 4/4] mx35: add flexcan devices Marc Kleine-Budde
@ 2010-05-28 13:34   ` Hans J. Koch
  2010-05-28 13:45     ` Marc Kleine-Budde
  0 siblings, 1 reply; 6+ messages in thread
From: Hans J. Koch @ 2010-05-28 13:34 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, May 28, 2010 at 01:42:18PM +0200, Marc Kleine-Budde wrote:
> 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 db7acd6..0e1e20b 100644
> --- a/arch/arm/mach-mx3/devices.c
> +++ b/arch/arm/mach-mx3/devices.c
> @@ -127,6 +127,46 @@ struct platform_device mxc_uart_device4 = {
>  };
>  #endif /* CONFIG_ARCH_MX31 */
>  
> +#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",

Did you also post the flexcan driver itself somewhere? I've got such a device
on my desk right now, and would be willing to test that. I've made some tests
with Sascha's old version, but it's not really satisfying...

Thanks,
Hans

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

* [PATCH 4/4] mx35: add flexcan devices
  2010-05-28 13:34   ` Hans J. Koch
@ 2010-05-28 13:45     ` Marc Kleine-Budde
  0 siblings, 0 replies; 6+ messages in thread
From: Marc Kleine-Budde @ 2010-05-28 13:45 UTC (permalink / raw)
  To: linux-arm-kernel

Hans J. Koch wrote:
> On Fri, May 28, 2010 at 01:42:18PM +0200, Marc Kleine-Budde wrote:
>> 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 db7acd6..0e1e20b 100644
>> --- a/arch/arm/mach-mx3/devices.c
>> +++ b/arch/arm/mach-mx3/devices.c
>> @@ -127,6 +127,46 @@ struct platform_device mxc_uart_device4 = {
>>  };
>>  #endif /* CONFIG_ARCH_MX31 */
>>  
>> +#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",
> 
> Did you also post the flexcan driver itself somewhere? I've got such a device
> on my desk right now, and would be willing to test that. I've made some tests
> with Sascha's old version, but it's not really satisfying...

It's not yet posted, I'm currently restructuring the driver with regards
to the set_bittiming and control mode discussion on the socketcan ML.

cheers, 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/20100528/a45970b7/attachment.sig>

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

end of thread, other threads:[~2010-05-28 13:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1275046938-8465-1-git-send-email-mkl@pengutronix.de>
2010-05-28 11:42 ` [PATCH 1/4] mx25: flexcan clock support Marc Kleine-Budde
2010-05-28 11:42 ` [PATCH 2/4] mx25: Add flexcan devices Marc Kleine-Budde
2010-05-28 11:42 ` [PATCH 3/4] mx35: adjust flexcan clock definition Marc Kleine-Budde
2010-05-28 11:42 ` [PATCH 4/4] mx35: add flexcan devices Marc Kleine-Budde
2010-05-28 13:34   ` Hans J. Koch
2010-05-28 13:45     ` 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).