Skip to contentSkip to conversation

MXS: Enable FLEXCAN for MXS/DT

PATCH New Marek Vasut 3 participants 8 messages May 27, 2012 – Jun 26, 2012

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MXS: Enable FLEXCAN for MXS/DT

Cc Detlev Zundel <[email protected]>
CC Dong Aisheng <[email protected]>
CC Fabio Estevam <[email protected]>
Cc Linux ARM kernel <[email protected]>
CC Shawn Guo <[email protected]>
Cc Stefano Babic <[email protected]>
Cc Wolfgang Denk <[email protected]>
---
 arch/arm/boot/dts/imx28.dtsi |    2 ++
 arch/arm/mach-mxs/Kconfig    |    1 +
 2 files changed, 3 insertions(+)
arch/arm/boot/dts/imx28.dtsi +2 -0
index 119f183..13c6084 100644
@@ -278,12 +278,14 @@
 			};
 
 			can0: can at 80032000 {
+				compatible = "fsl,p1010-flexcan";
 				reg = <0x80032000 2000>;
 				interrupts = <8>;
 				status = "disabled";
 			};
 
 			can1: can at 80034000 {
+				compatible = "fsl,p1010-flexcan";
 				reg = <0x80034000 2000>;
 				interrupts = <9>;
 				status = "disabled";
arch/arm/mach-mxs/Kconfig +1 -0
index 91cf062..0406f37 100644
@@ -18,6 +18,7 @@ config SOC_IMX28
 	select CPU_ARM926T
 	select HAVE_PWM
 	select PINCTRL_IMX28
+	select MXS_HAVE_PLATFORM_FLEXCAN
 
 comment "MXS platforms:"
 
Signature · 1 line
1.7.10
#1 lore raw

PATCH 1/1 MXS: Enable FLEXCAN for MXS/DT

Quoted 37 lines · Marek Vasut
Cc Detlev Zundel <[email protected]>
CC Dong Aisheng <[email protected]>
CC Fabio Estevam <[email protected]>
Cc Linux ARM kernel <[email protected]>
CC Shawn Guo <[email protected]>
Cc Stefano Babic <[email protected]>
Cc Wolfgang Denk <[email protected]>
---
 arch/arm/boot/dts/imx28.dtsi |    2 ++
 arch/arm/mach-mxs/Kconfig    |    1 +
 2 files changed, 3 insertions(+)
arch/arm/boot/dts/imx28.dtsi +2 -0
index 119f183..13c6084 100644
@@ -278,12 +278,14 @@
 			};
 
 			can0: can at 80032000 {
+				compatible = "fsl,p1010-flexcan";
 				reg = <0x80032000 2000>;
 				interrupts = <8>;
 				status = "disabled";
 			};
 
 			can1: can at 80034000 {
+				compatible = "fsl,p1010-flexcan";
 				reg = <0x80034000 2000>;
 				interrupts = <9>;
 				status = "disabled";
arch/arm/mach-mxs/Kconfig +0 -0
index 91cf062..0406f37 100644

arch/arm/mach-mxs/Kconfig config SOC_IMX28 · line 21

Quoted 4 lines
arch/arm/mach-mxs/Kconfig +1 -0
@@ -18,6 +18,7 @@ config SOC_IMX28
 	select CPU_ARM926T
 	select HAVE_PWM
 	select PINCTRL_IMX28
+	select MXS_HAVE_PLATFORM_FLEXCAN

This change shouldn't be part of this patch. Furthermore, this symbol and arch/arm/mach-mxs/devices/platform-flexcan.c should be removed completely after we covert all these board files that have flexcan device enabled over to DT.

Regards,
Shawn

Quoted 6 lines
arch/arm/mach-mxs/Kconfig +0 -0
 comment "MXS platforms:"
 
Signature · 1 line
1.7.10
#2 lore raw

PATCH 1/1 MXS: Enable FLEXCAN for MXS/DT

In reply to Marek Vasut
Quoted 37 lines · Marek Vasut
Cc Detlev Zundel <[email protected]>
CC Dong Aisheng <[email protected]>
CC Fabio Estevam <[email protected]>
Cc Linux ARM kernel <[email protected]>
CC Shawn Guo <[email protected]>
Cc Stefano Babic <[email protected]>
Cc Wolfgang Denk <[email protected]>
---
 arch/arm/boot/dts/imx28.dtsi |    2 ++
 arch/arm/mach-mxs/Kconfig    |    1 +
 2 files changed, 3 insertions(+)
arch/arm/boot/dts/imx28.dtsi +2 -0
index 119f183..13c6084 100644
@@ -278,12 +278,14 @@
 			};
 
 			can0: can at 80032000 {
+				compatible = "fsl,p1010-flexcan";
 				reg = <0x80032000 2000>;
 				interrupts = <8>;
 				status = "disabled";
 			};
 
 			can1: can at 80034000 {
+				compatible = "fsl,p1010-flexcan";
 				reg = <0x80034000 2000>;
 				interrupts = <9>;
 				status = "disabled";
arch/arm/mach-mxs/Kconfig +0 -0
index 91cf062..0406f37 100644

arch/arm/mach-mxs/Kconfig config SOC_IMX28 · line 21

Quoted 4 lines
arch/arm/mach-mxs/Kconfig +1 -0
@@ -18,6 +18,7 @@ config SOC_IMX28
 	select CPU_ARM926T
 	select HAVE_PWM
 	select PINCTRL_IMX28
+	select MXS_HAVE_PLATFORM_FLEXCAN

This compiles in the code to create a flexcan platform device, which should not be needed in the DT case. You save some bytes if you use:

+ select HAVE_CAN_FLEXCAN if NET && CAN

arch/arm/mach-mxs/Kconfig config SOC_IMX28 · line 24

Quoted 3 lines
arch/arm/mach-mxs/Kconfig +0 -0
 comment "MXS platforms:"
 

Marc

Signature · 12 lines
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: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120626/fc2a62f9/attachment.sig>
#3 lore raw

PATCH 1/1 MXS: Enable FLEXCAN for MXS/DT

Quoted 46 lines · Marc Kleine-Budde
Quoted 37 lines · Marek Vasut
Cc Detlev Zundel <[email protected]>
CC Dong Aisheng <[email protected]>
CC Fabio Estevam <[email protected]>
Cc Linux ARM kernel <[email protected]>
CC Shawn Guo <[email protected]>
Cc Stefano Babic <[email protected]>
Cc Wolfgang Denk <[email protected]>
---
 arch/arm/boot/dts/imx28.dtsi |    2 ++
 arch/arm/mach-mxs/Kconfig    |    1 +
 2 files changed, 3 insertions(+)
arch/arm/boot/dts/imx28.dtsi +2 -0
index 119f183..13c6084 100644
@@ -278,12 +278,14 @@
 			};
 
 			can0: can at 80032000 {
+				compatible = "fsl,p1010-flexcan";
 				reg = <0x80032000 2000>;
 				interrupts = <8>;
 				status = "disabled";
 			};
 
 			can1: can at 80034000 {
+				compatible = "fsl,p1010-flexcan";
 				reg = <0x80034000 2000>;
 				interrupts = <9>;
 				status = "disabled";
arch/arm/mach-mxs/Kconfig +0 -0
index 91cf062..0406f37 100644

arch/arm/mach-mxs/Kconfig config SOC_IMX28 · line 21

Quoted 4 lines
arch/arm/mach-mxs/Kconfig +1 -0
@@ -18,6 +18,7 @@ config SOC_IMX28
 	select CPU_ARM926T
 	select HAVE_PWM
 	select PINCTRL_IMX28
+	select MXS_HAVE_PLATFORM_FLEXCAN

This compiles in the code to create a flexcan platform device, which should not be needed in the DT case. You save some bytes if you use:

Quoted 1 line

+ select HAVE_CAN_FLEXCAN if NET && CAN

...and put this select to MACH_MXS_DT, instead of SOC_IMX28

Marc

Signature · 12 lines
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: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120626/737e6568/attachment.sig>
#4 lore raw

PATCH 1/1 MXS: Enable FLEXCAN for MXS/DT

Quoted 4 lines · Marc Kleine-Budde
Quoted 1 line

+ select HAVE_CAN_FLEXCAN if NET && CAN

...and put this select to MACH_MXS_DT, instead of SOC_IMX28

Hmm, why? Flexcan is a feature/block of SoC rather than a machine, isn't it?

Signature · 2 lines
Regards,
Shawn
#5 lore raw

PATCH 1/1 MXS: Enable FLEXCAN for MXS/DT

Quoted 7 lines · Shawn Guo
Quoted 4 lines · Marc Kleine-Budde
Quoted 1 line

+ select HAVE_CAN_FLEXCAN if NET && CAN

...and put this select to MACH_MXS_DT, instead of SOC_IMX28

Hmm, why? Flexcan is a feature/block of SoC rather than a machine, isn't it?

Yes, but the HAVE_CAN_FLEXCAN is used to make the driver available in Kconfig. What about removing the "depends on HAVE_CAN_FLEXCAN" from the driver symbol in Kconfig? I can push it via net-next and it will be mainline in 3.6. You can remove the HAVE_CAN_FLEXCAN from the ARM (and powerpc) trees.

To avoid Kconfig hickups I'll keep the HAVE_CAN_FLEXCAN symbol in the net-tree as long as the select HAVE_CAN_FLEXCAN is still present.

Marc

Signature · 12 lines
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: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120626/e1a388a0/attachment.sig>
#6 lore raw

PATCH 1/1 MXS: Enable FLEXCAN for MXS/DT

Quoted 6 lines · Marc Kleine-Budde

Yes, but the HAVE_CAN_FLEXCAN is used to make the driver available in Kconfig. What about removing the "depends on HAVE_CAN_FLEXCAN" from the driver symbol in Kconfig? I can push it via net-next and it will be mainline in 3.6. You can remove the HAVE_CAN_FLEXCAN from the ARM (and powerpc) trees.

Ok, that works for me if you would like to have the CAN_FLEXCAN show up anyway for all the ARCHs, but otherwise we just end up with replacing "depends on HAVE_CAN_FLEXCAN" with "depends on ARCH_MXS || ARCH_MXC".

Signature · 2 lines
Regards,
Shawn
#7 lore raw

PATCH 1/1 MXS: Enable FLEXCAN for MXS/DT

Dear Shawn Guo,

Quoted 10 lines · Marc Kleine-Budde
Quoted 5 lines

Yes, but the HAVE_CAN_FLEXCAN is used to make the driver available in Kconfig. What about removing the "depends on HAVE_CAN_FLEXCAN" from the driver symbol in Kconfig? I can push it via net-next and it will be mainline in 3.6. You can remove the HAVE_CAN_FLEXCAN from the ARM (and powerpc) trees.

Ok, that works for me if you would like to have the CAN_FLEXCAN show up anyway for all the ARCHs, but otherwise we just end up with replacing "depends on HAVE_CAN_FLEXCAN" with "depends on ARCH_MXS || ARCH_MXC".

PPC also uses the flexcan, so don't forget about that.

Best regards,
Marek Vasut