All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] [PATCH]  rtcan-flexcan: Add support for imx6q platform
@ 2012-12-11 14:12 Thierry Bultel
  0 siblings, 0 replies; only message in thread
From: Thierry Bultel @ 2012-12-11 14:12 UTC (permalink / raw)
  To: xenomai

Hello,

This patch adds support for rtcan-flexcan on the iMX6q
Many thanks to Wolfgang for the original driver.

Regards
Thierry

Signed-off-by: Thierry Bultel <thierry.bultel@wanadoo.fr>
--- rtcan_flexcan.c	2012-12-11 10:43:58.066794062 +0100
+++ rtcan_flexcan.c.imx6q	2012-12-11 14:57:25.634571266 +0100
@@ -1099,13 +1099,40 @@ static struct of_device_id flexcan_of_ma
  	{},
  };

+enum flexcan_ip_version {
+	FLEXCAN_VER_3_0_0,
+	FLEXCAN_VER_3_0_4,
+	FLEXCAN_VER_10_0_12,
+};
+
+static struct platform_device_id flexcan_devtype[] = {
+	{
+		.name = "imx25-flexcan",
+		.driver_data = FLEXCAN_VER_3_0_0,
+	}, {
+		.name = "imx28-flexcan",
+		.driver_data = FLEXCAN_VER_3_0_4,
+	}, {
+		.name = "imx35-flexcan",
+		.driver_data = FLEXCAN_VER_3_0_0,
+	}, {
+		.name = "imx53-flexcan",
+		.driver_data = FLEXCAN_VER_3_0_0,
+	}, {
+		.name = "imx6q-flexcan",
+		.driver_data = FLEXCAN_VER_10_0_12,
+	},
+};
+
  static struct platform_driver flexcan_driver = {
  	.driver = {
  		/* For legacy platform support */
-		.name = "flexcan",
+		.name = DRV_NAME,
  		.owner = THIS_MODULE,
  		.of_match_table = flexcan_of_match,
+
  	},
+	.id_table = flexcan_devtype,
  	.probe = flexcan_probe,
  	.remove = __devexit_p(flexcan_remove),
  };
@@ -1113,14 +1140,14 @@ static struct platform_driver flexcan_dr
  #if LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)
  static int __init flexcan_init(void)
  {
-	pr_info("%s netdevice driver\n", DRV_NAME);
-	return platform_driver_register(&flexcan_driver);
+	pr_info("RTCAN %s netdevice driver\n", DRV_NAME);
+	return platform_driver_register(&flexcan_driver);;
  }

  static void __exit flexcan_exit(void)
  {
  	platform_driver_unregister(&flexcan_driver);
-	pr_info("%s: driver removed\n", DRV_NAME);
+	pr_info("RTCAN %s: driver removed\n", DRV_NAME);
  }
  module_init(flexcan_init);
  module_exit(flexcan_exit);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-12-11 14:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-11 14:12 [Xenomai] [PATCH] rtcan-flexcan: Add support for imx6q platform Thierry Bultel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.