public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] CAN: sja1000: Add support for Connect Tech Inc's Canpro/104-Plus Opto CAN board
@ 2012-10-16 21:03 Muhammad Ghias
  2012-10-17  6:35 ` Wolfgang Grandegger
  2012-10-17 10:13 ` Marc Kleine-Budde
  0 siblings, 2 replies; 4+ messages in thread
From: Muhammad Ghias @ 2012-10-16 21:03 UTC (permalink / raw)
  To: 'Wolfgang Grandegger', 'Marc Kleine-Budde'; +Cc: linux-kernel

Patch adds support for CANpro/104-Plus Opto CAN board. Board uses PLX9030
bridge and two NXP SJA1000 CAN controllers. Patch is generated and tested
with kernel 3.6.1.

If you have any questions or any feedback please let me know.

Thanks,

Signed-off-by: Muhammad Ghias <mghias@connecttech.com>
---
diff -uprN -X linux-3.6.1-vanilla/Documentation/dontdiff
linux-3.6.1-vanilla/drivers/net/can/sja1000/Kconfig
linux-3.6.1/drivers/net/can/sja1000/Kconfig
--- linux-3.6.1-vanilla/drivers/net/can/sja1000/Kconfig	2012-10-07
11:41:28.000000000 -0400
+++ linux-3.6.1/drivers/net/can/sja1000/Kconfig	2012-10-16
10:04:46.000000000 -0400
@@ -93,6 +93,7 @@ config CAN_PLX_PCI
 	   - Marathon CAN-bus-PCI card (http://www.marathon.ru/)
 	   - TEWS TECHNOLOGIES TPMC810 card (http://www.tews.com/)
 	   - IXXAT Automation PC-I 04/PCI card (http://www.ixxat.com/)
+	   - Connect Tech Inc. CANpro/104-Plus Opto (CRG001) card
(http://www.connecttech.com)
 
 config CAN_TSCAN1
 	tristate "TS-CAN1 PC104 boards"
diff -uprN -X linux-3.6.1-vanilla/Documentation/dontdiff
linux-3.6.1-vanilla/drivers/net/can/sja1000/plx_pci.c
linux-3.6.1/drivers/net/can/sja1000/plx_pci.c
--- linux-3.6.1-vanilla/drivers/net/can/sja1000/plx_pci.c	2012-10-07
11:41:28.000000000 -0400
+++ linux-3.6.1/drivers/net/can/sja1000/plx_pci.c	2012-10-16
10:11:05.000000000 -0400
@@ -44,6 +44,7 @@ MODULE_SUPPORTED_DEVICE("Adlink PCI-7841
 			"esd CAN-PCI/CPCI/PCI104/200, "
 			"esd CAN-PCI/PMC/266, "
 			"esd CAN-PCIe/2000, "
+			"Connect Tech Inc. CANpro/104-Plus Opto (CRG001), "
 			"IXXAT PC-I 04/PCI")
 MODULE_LICENSE("GPL v2");
 
@@ -131,6 +132,9 @@ struct plx_pci_card {
 #define TEWS_PCI_VENDOR_ID		0x1498
 #define TEWS_PCI_DEVICE_ID_TMPC810	0x032A
 
+#define CTI_PCI_VENDOR_ID		0x12c4
+#define CTI_PCI_DEVICE_ID_CRG001	0x0900
+
 static void plx_pci_reset_common(struct pci_dev *pdev);
 static void plx_pci_reset_marathon(struct pci_dev *pdev);
 static void plx9056_pci_reset_common(struct pci_dev *pdev);
@@ -222,6 +226,14 @@ static struct plx_pci_card_info plx_pci_
 	/* based on PLX9030 */
 };
 
+static struct plx_pci_card_info plx_pci_card_info_cti __devinitdata = {
+	"Connect Tech Inc. CANpro/104-Plus Opto (CRG001)", 2,
+	PLX_PCI_CAN_CLOCK, PLX_PCI_OCR, PLX_PCI_CDR,
+	{0, 0x00, 0x00}, { {2, 0x000, 0x80}, {2, 0x100, 0x80} },
+	&plx_pci_reset_common
+	/* based on PLX9030 */
+};
+
 static DEFINE_PCI_DEVICE_TABLE(plx_pci_tbl) = {
 	{
 		/* Adlink PCI-7841/cPCI-7841 */
@@ -300,6 +312,13 @@ static DEFINE_PCI_DEVICE_TABLE(plx_pci_t
 		0, 0,
 		(kernel_ulong_t)&plx_pci_card_info_tews
 	},
+	{
+		/* Connect Tech Inc. CANpro/104-Plus Opto (CRG001) card */
+		PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030,
+		CTI_PCI_VENDOR_ID, CTI_PCI_DEVICE_ID_CRG001,
+		0, 0,
+		(kernel_ulong_t)&plx_pci_card_info_cti
+	},
 	{ 0,}
 };
 MODULE_DEVICE_TABLE(pci, plx_pci_tbl);


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

* Re: [PATCH] CAN: sja1000: Add support for Connect Tech Inc's Canpro/104-Plus Opto CAN board
  2012-10-16 21:03 [PATCH] CAN: sja1000: Add support for Connect Tech Inc's Canpro/104-Plus Opto CAN board Muhammad Ghias
@ 2012-10-17  6:35 ` Wolfgang Grandegger
  2012-10-17 10:13 ` Marc Kleine-Budde
  1 sibling, 0 replies; 4+ messages in thread
From: Wolfgang Grandegger @ 2012-10-17  6:35 UTC (permalink / raw)
  To: Muhammad Ghias; +Cc: 'Marc Kleine-Budde', linux-kernel

On 10/16/2012 11:03 PM, Muhammad Ghias wrote:
> Patch adds support for CANpro/104-Plus Opto CAN board. Board uses PLX9030
> bridge and two NXP SJA1000 CAN controllers. Patch is generated and tested
> with kernel 3.6.1.
> 
> If you have any questions or any feedback please let me know.
> 
> Thanks,

The above two lines should go ...

> Signed-off-by: Muhammad Ghias <mghias@connecttech.com>
> ---

... here (out of the commit message).

Apart from that the patch looks good. You can add my

Acked-by: Wolfgang Grandegger <wg@grandegger.com>

Thanks for your contribution.

Wolfgang.


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

* Re: [PATCH] CAN: sja1000: Add support for Connect Tech Inc's Canpro/104-Plus Opto CAN board
  2012-10-16 21:03 [PATCH] CAN: sja1000: Add support for Connect Tech Inc's Canpro/104-Plus Opto CAN board Muhammad Ghias
  2012-10-17  6:35 ` Wolfgang Grandegger
@ 2012-10-17 10:13 ` Marc Kleine-Budde
  2012-10-17 18:42   ` Muhammad Ghias
  1 sibling, 1 reply; 4+ messages in thread
From: Marc Kleine-Budde @ 2012-10-17 10:13 UTC (permalink / raw)
  To: Muhammad Ghias
  Cc: 'Wolfgang Grandegger', linux-kernel,
	linux-can@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 909 bytes --]

On 10/16/2012 11:03 PM, Muhammad Ghias wrote:
> Patch adds support for CANpro/104-Plus Opto CAN board. Board uses PLX9030
> bridge and two NXP SJA1000 CAN controllers. Patch is generated and tested
> with kernel 3.6.1.
> 
> If you have any questions or any feedback please let me know.

Thanks, the code looks good. Please try, if possible, to send your
patches via git send-email, as outlooks messed up the patch. I've fixed
all line wrapping problems by hand, applied the patch and send a v2,
please test.

regards, Marc

P.S.: Please use the linux-can@vger.kernel.org mailing list for CAN
related patches/topics.

-- 
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   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

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

* RE: [PATCH] CAN: sja1000: Add support for Connect Tech Inc's Canpro/104-Plus Opto CAN board
  2012-10-17 10:13 ` Marc Kleine-Budde
@ 2012-10-17 18:42   ` Muhammad Ghias
  0 siblings, 0 replies; 4+ messages in thread
From: Muhammad Ghias @ 2012-10-17 18:42 UTC (permalink / raw)
  To: 'Marc Kleine-Budde'
  Cc: 'Wolfgang Grandegger', linux-kernel, linux-can

Hi Marc,

I tested the patch v2 with kernel 3.6.1 and 3.7-rc1. Clean compile and works
with hardware.

Regards,
Muhammad

-----Original Message-----
From: Marc Kleine-Budde [mailto:mkl@pengutronix.de] 
Sent: October-17-12 6:13 AM
To: Muhammad Ghias
Cc: 'Wolfgang Grandegger'; linux-kernel@vger.kernel.org;
linux-can@vger.kernel.org
Subject: Re: [PATCH] CAN: sja1000: Add support for Connect Tech Inc's
Canpro/104-Plus Opto CAN board

On 10/16/2012 11:03 PM, Muhammad Ghias wrote:
> Patch adds support for CANpro/104-Plus Opto CAN board. Board uses PLX9030
> bridge and two NXP SJA1000 CAN controllers. Patch is generated and tested
> with kernel 3.6.1.
> 
> If you have any questions or any feedback please let me know.

Thanks, the code looks good. Please try, if possible, to send your
patches via git send-email, as outlooks messed up the patch. I've fixed
all line wrapping problems by hand, applied the patch and send a v2,
please test.

regards, Marc

P.S.: Please use the linux-can@vger.kernel.org mailing list for CAN
related patches/topics.

-- 
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   |



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

end of thread, other threads:[~2012-10-17 18:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-16 21:03 [PATCH] CAN: sja1000: Add support for Connect Tech Inc's Canpro/104-Plus Opto CAN board Muhammad Ghias
2012-10-17  6:35 ` Wolfgang Grandegger
2012-10-17 10:13 ` Marc Kleine-Budde
2012-10-17 18:42   ` Muhammad Ghias

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox