* [PATCH] can: sja1000: add support for Elcus CAN200PCI
@ 2013-12-28 19:05 Oleg Moroz
2014-01-02 14:19 ` Oliver Hartkopp
0 siblings, 1 reply; 3+ messages in thread
From: Oleg Moroz @ 2013-12-28 19:05 UTC (permalink / raw)
To: linux-can
This patch adds support for Elcus CAN200PCI card.
Signed-off-by: Oleg Moroz<oleg.moroz@mcc.vniiem.ru>
---
diff -u a/drivers/net/can/sja1000/plx_pci.c b/drivers/net/can/sja1000/plx_pci.c
--- a/drivers/net/can/sja1000/plx_pci.c
+++ b/drivers/net/can/sja1000/plx_pci.c
@@ -45,7 +45,8 @@ MODULE_SUPPORTED_DEVICE("Adlink PCI-7841
"esd CAN-PCI/PMC/266, "
"esd CAN-PCIe/2000, "
"Connect Tech Inc. CANpro/104-Plus Opto (CRG001), "
- "IXXAT PC-I 04/PCI")
+ "IXXAT PC-I 04/PCI, "
+ "ELCUS CAN-200-PCI")
MODULE_LICENSE("GPL v2");
#define PLX_PCI_MAX_CHAN 2
@@ -123,6 +124,11 @@ struct plx_pci_card {
#define ESD_PCI_SUB_SYS_ID_PCIE2000 0x0200
#define ESD_PCI_SUB_SYS_ID_PCI104200 0x0501
+#define CAN200PCI_DEVICE_ID 0x9030
+#define CAN200PCI_VENDOR_ID 0x10b5
+#define CAN200PCI_SUB_DEVICE_ID 0x0301
+#define CAN200PCI_SUB_VENDOR_ID 0xe1c5
+
#define IXXAT_PCI_VENDOR_ID 0x10b5
#define IXXAT_PCI_DEVICE_ID 0x9050
#define IXXAT_PCI_SUB_SYS_ID 0x2540
@@ -234,6 +240,14 @@ static struct plx_pci_card_info plx_pci_
/* based on PLX9030 */
};
+static struct plx_pci_card_info plx_pci_card_info_elcus = {
+ "Eclus CAN-200-PCI", 2,
+ PLX_PCI_CAN_CLOCK, PLX_PCI_OCR, PLX_PCI_CDR,
+ {1, 0x00, 0x00}, { {2, 0x00, 0x80}, {3, 0x00, 0x80} },
+ &plx_pci_reset_common
+ /* based on PLX9030 */
+};
+
static DEFINE_PCI_DEVICE_TABLE(plx_pci_tbl) = {
{
/* Adlink PCI-7841/cPCI-7841 */
@@ -319,6 +333,13 @@ static DEFINE_PCI_DEVICE_TABLE(plx_pci_t
0, 0,
(kernel_ulong_t)&plx_pci_card_info_cti
},
+ {
+ /* Elcus CAN-200-PCI */
+ CAN200PCI_VENDOR_ID, CAN200PCI_DEVICE_ID,
+ CAN200PCI_SUB_VENDOR_ID, CAN200PCI_SUB_DEVICE_ID,
+ 0, 0,
+ (kernel_ulong_t)&plx_pci_card_info_elcus
+ },
{ 0,}
};
MODULE_DEVICE_TABLE(pci, plx_pci_tbl);
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] can: sja1000: add support for Elcus CAN200PCI 2013-12-28 19:05 [PATCH] can: sja1000: add support for Elcus CAN200PCI Oleg Moroz @ 2014-01-02 14:19 ` Oliver Hartkopp 2014-01-03 14:07 ` OIeg Moroz 0 siblings, 1 reply; 3+ messages in thread From: Oliver Hartkopp @ 2014-01-02 14:19 UTC (permalink / raw) To: Oleg Moroz; +Cc: linux-can Hello Oleg, linux/scripts/checkpatch.pl still points out some problems: ' might be better as 'Oleg Moroz <oleg.moroz@mcc.vniiem.ru>> #4: Signed-off-by: Oleg Moroz<oleg.moroz@mcc.vniiem.ru> => there was a space missing :-) ERROR: DOS line endings #16: FILE: drivers/net/can/sja1000/plx_pci.c:48: +^I^I^I"IXXAT PC-I 04/PCI, "^M$ Ugh! Don't use DOS line endings with CR/LF. Unix is only LF (\n) Please repost. Thanks, Oliver On 28.12.2013 20:05, Oleg Moroz wrote: > This patch adds support for Elcus CAN200PCI card. > > Signed-off-by: Oleg Moroz<oleg.moroz@mcc.vniiem.ru> > > --- > > diff -u a/drivers/net/can/sja1000/plx_pci.c b/drivers/net/can/sja1000/plx_pci.c > --- a/drivers/net/can/sja1000/plx_pci.c > +++ b/drivers/net/can/sja1000/plx_pci.c > @@ -45,7 +45,8 @@ MODULE_SUPPORTED_DEVICE("Adlink PCI-7841 > "esd CAN-PCI/PMC/266, " > "esd CAN-PCIe/2000, " > "Connect Tech Inc. CANpro/104-Plus Opto (CRG001), " > - "IXXAT PC-I 04/PCI") > + "IXXAT PC-I 04/PCI, " > + "ELCUS CAN-200-PCI") > MODULE_LICENSE("GPL v2"); > > #define PLX_PCI_MAX_CHAN 2 > @@ -123,6 +124,11 @@ struct plx_pci_card { > #define ESD_PCI_SUB_SYS_ID_PCIE2000 0x0200 > #define ESD_PCI_SUB_SYS_ID_PCI104200 0x0501 > > +#define CAN200PCI_DEVICE_ID 0x9030 > +#define CAN200PCI_VENDOR_ID 0x10b5 > +#define CAN200PCI_SUB_DEVICE_ID 0x0301 > +#define CAN200PCI_SUB_VENDOR_ID 0xe1c5 > + > #define IXXAT_PCI_VENDOR_ID 0x10b5 > #define IXXAT_PCI_DEVICE_ID 0x9050 > #define IXXAT_PCI_SUB_SYS_ID 0x2540 > @@ -234,6 +240,14 @@ static struct plx_pci_card_info plx_pci_ > /* based on PLX9030 */ > }; > > +static struct plx_pci_card_info plx_pci_card_info_elcus = { > + "Eclus CAN-200-PCI", 2, > + PLX_PCI_CAN_CLOCK, PLX_PCI_OCR, PLX_PCI_CDR, > + {1, 0x00, 0x00}, { {2, 0x00, 0x80}, {3, 0x00, 0x80} }, > + &plx_pci_reset_common > + /* based on PLX9030 */ > +}; > + > static DEFINE_PCI_DEVICE_TABLE(plx_pci_tbl) = { > { > /* Adlink PCI-7841/cPCI-7841 */ > @@ -319,6 +333,13 @@ static DEFINE_PCI_DEVICE_TABLE(plx_pci_t > 0, 0, > (kernel_ulong_t)&plx_pci_card_info_cti > }, > + { > + /* Elcus CAN-200-PCI */ > + CAN200PCI_VENDOR_ID, CAN200PCI_DEVICE_ID, > + CAN200PCI_SUB_VENDOR_ID, CAN200PCI_SUB_DEVICE_ID, > + 0, 0, > + (kernel_ulong_t)&plx_pci_card_info_elcus > + }, > { 0,} > }; > MODULE_DEVICE_TABLE(pci, plx_pci_tbl); > > -- > To unsubscribe from this list: send the line "unsubscribe linux-can" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] can: sja1000: add support for Elcus CAN200PCI 2014-01-02 14:19 ` Oliver Hartkopp @ 2014-01-03 14:07 ` OIeg Moroz 0 siblings, 0 replies; 3+ messages in thread From: OIeg Moroz @ 2014-01-03 14:07 UTC (permalink / raw) To: linux-can; +Cc: Oliver Hartkopp Thanks. i've fixed the issue with non-UNIX line ending. checkpatch.pl reports 0 errors 0 warnings Signed-off-by: Oleg Moroz <oleg.moroz@mcc.vniiem.ru> --- linux-source-3.11/drivers/net/can/sja1000/plx_pci.c.orig 2013-12-28 16:01:15.436098522 +0400 +++ linux-source-3.11/drivers/net/can/sja1000/plx_pci.c 2013-12-28 16:01:53.504100100 +0400 @@ -45,7 +45,8 @@ MODULE_SUPPORTED_DEVICE("Adlink PCI-7841 "esd CAN-PCI/PMC/266, " "esd CAN-PCIe/2000, " "Connect Tech Inc. CANpro/104-Plus Opto (CRG001), " - "IXXAT PC-I 04/PCI") + "IXXAT PC-I 04/PCI, " + "ELCUS CAN-200-PCI") MODULE_LICENSE("GPL v2"); #define PLX_PCI_MAX_CHAN 2 @@ -123,6 +124,11 @@ struct plx_pci_card { #define ESD_PCI_SUB_SYS_ID_PCIE2000 0x0200 #define ESD_PCI_SUB_SYS_ID_PCI104200 0x0501 +#define CAN200PCI_DEVICE_ID 0x9030 +#define CAN200PCI_VENDOR_ID 0x10b5 +#define CAN200PCI_SUB_DEVICE_ID 0x0301 +#define CAN200PCI_SUB_VENDOR_ID 0xe1c5 + #define IXXAT_PCI_VENDOR_ID 0x10b5 #define IXXAT_PCI_DEVICE_ID 0x9050 #define IXXAT_PCI_SUB_SYS_ID 0x2540 @@ -234,6 +240,14 @@ static struct plx_pci_card_info plx_pci_ /* based on PLX9030 */ }; +static struct plx_pci_card_info plx_pci_card_info_elcus = { + "Eclus CAN-200-PCI", 2, + PLX_PCI_CAN_CLOCK, PLX_PCI_OCR, PLX_PCI_CDR, + {1, 0x00, 0x00}, { {2, 0x00, 0x80}, {3, 0x00, 0x80} }, + &plx_pci_reset_common + /* based on PLX9030 */ +}; + static DEFINE_PCI_DEVICE_TABLE(plx_pci_tbl) = { { /* Adlink PCI-7841/cPCI-7841 */ @@ -319,6 +333,13 @@ static DEFINE_PCI_DEVICE_TABLE(plx_pci_t 0, 0, (kernel_ulong_t)&plx_pci_card_info_cti }, + { + /* Elcus CAN-200-PCI */ + CAN200PCI_VENDOR_ID, CAN200PCI_DEVICE_ID, + CAN200PCI_SUB_VENDOR_ID, CAN200PCI_SUB_DEVICE_ID, + 0, 0, + (kernel_ulong_t)&plx_pci_card_info_elcus + }, { 0,} }; MODULE_DEVICE_TABLE(pci, plx_pci_tbl); > Hello Oleg, > > linux/scripts/checkpatch.pl still points out some problems: > > ' might be better as 'Oleg Moroz <oleg.moroz@mcc.vniiem.ru>> > #4: > Signed-off-by: Oleg Moroz<oleg.moroz@mcc.vniiem.ru> > > => there was a space missing :-) > > ERROR: DOS line endings > #16: FILE: drivers/net/can/sja1000/plx_pci.c:48: > +^I^I^I"IXXAT PC-I 04/PCI, "^M$ > > Ugh! > > Don't use DOS line endings with CR/LF. > Unix is only LF (\n) > > Please repost. > > Thanks, > Oliver > > On 28.12.2013 20:05, Oleg Moroz wrote: > > This patch adds support for Elcus CAN200PCI card. > > > > Signed-off-by: Oleg Moroz<oleg.moroz@mcc.vniiem.ru> > > > > --- > > > > diff -u a/drivers/net/can/sja1000/plx_pci.c > > b/drivers/net/can/sja1000/plx_pci.c --- > > a/drivers/net/can/sja1000/plx_pci.c > > +++ b/drivers/net/can/sja1000/plx_pci.c > > @@ -45,7 +45,8 @@ MODULE_SUPPORTED_DEVICE("Adlink PCI-7841 > > > > "esd CAN-PCI/PMC/266, " > > "esd CAN-PCIe/2000, " > > "Connect Tech Inc. CANpro/104-Plus Opto (CRG001), " > > > > - "IXXAT PC-I 04/PCI") > > + "IXXAT PC-I 04/PCI, " > > + "ELCUS CAN-200-PCI") > > > > MODULE_LICENSE("GPL v2"); > > > > #define PLX_PCI_MAX_CHAN 2 > > > > @@ -123,6 +124,11 @@ struct plx_pci_card { > > > > #define ESD_PCI_SUB_SYS_ID_PCIE2000 0x0200 > > #define ESD_PCI_SUB_SYS_ID_PCI104200 0x0501 > > > > +#define CAN200PCI_DEVICE_ID 0x9030 > > +#define CAN200PCI_VENDOR_ID 0x10b5 > > +#define CAN200PCI_SUB_DEVICE_ID 0x0301 > > +#define CAN200PCI_SUB_VENDOR_ID 0xe1c5 > > + > > > > #define IXXAT_PCI_VENDOR_ID 0x10b5 > > #define IXXAT_PCI_DEVICE_ID 0x9050 > > #define IXXAT_PCI_SUB_SYS_ID 0x2540 > > > > @@ -234,6 +240,14 @@ static struct plx_pci_card_info plx_pci_ > > > > /* based on PLX9030 */ > > > > }; > > > > +static struct plx_pci_card_info plx_pci_card_info_elcus = { > > + "Eclus CAN-200-PCI", 2, > > + PLX_PCI_CAN_CLOCK, PLX_PCI_OCR, PLX_PCI_CDR, > > + {1, 0x00, 0x00}, { {2, 0x00, 0x80}, {3, 0x00, 0x80} }, > > + &plx_pci_reset_common > > + /* based on PLX9030 */ > > +}; > > + > > > > static DEFINE_PCI_DEVICE_TABLE(plx_pci_tbl) = { > > > > { > > > > /* Adlink PCI-7841/cPCI-7841 */ > > > > @@ -319,6 +333,13 @@ static DEFINE_PCI_DEVICE_TABLE(plx_pci_t > > > > 0, 0, > > (kernel_ulong_t)&plx_pci_card_info_cti > > > > }, > > > > + { > > + /* Elcus CAN-200-PCI */ > > + CAN200PCI_VENDOR_ID, CAN200PCI_DEVICE_ID, > > + CAN200PCI_SUB_VENDOR_ID, CAN200PCI_SUB_DEVICE_ID, > > + 0, 0, > > + (kernel_ulong_t)&plx_pci_card_info_elcus > > + }, > > > > { 0,} > > > > }; > > MODULE_DEVICE_TABLE(pci, plx_pci_tbl); ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-01-03 14:07 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-12-28 19:05 [PATCH] can: sja1000: add support for Elcus CAN200PCI Oleg Moroz 2014-01-02 14:19 ` Oliver Hartkopp 2014-01-03 14:07 ` OIeg Moroz
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.