Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

can: sja1000: plx_pci: Add support for Moxa CAN devices

This patch adds support for Moxa CAN devices.

Signed-off-by: Lukas Resch <l.resch@incubedit.com>
Signed-off-by: Christoph Zehentner <c.zehentner@incubedit.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>

authored by

Lukas Resch and committed by
Marc Kleine-Budde
460d2830 46d0847c

+18
+18
drivers/net/can/sja1000/plx_pci.c
··· 142 142 #define CTI_PCI_VENDOR_ID 0x12c4 143 143 #define CTI_PCI_DEVICE_ID_CRG001 0x0900 144 144 145 + #define MOXA_PCI_VENDOR_ID 0x1393 146 + #define MOXA_PCI_DEVICE_ID 0x0100 147 + 145 148 static void plx_pci_reset_common(struct pci_dev *pdev); 146 149 static void plx9056_pci_reset_common(struct pci_dev *pdev); 147 150 static void plx_pci_reset_marathon_pci(struct pci_dev *pdev); ··· 261 258 /* based on PLX9030 */ 262 259 }; 263 260 261 + static struct plx_pci_card_info plx_pci_card_info_moxa = { 262 + "MOXA", 2, 263 + PLX_PCI_CAN_CLOCK, PLX_PCI_OCR, PLX_PCI_CDR, 264 + {0, 0x00, 0x00}, { {0, 0x00, 0x80}, {1, 0x00, 0x80} }, 265 + &plx_pci_reset_common 266 + /* based on PLX9052 */ 267 + }; 268 + 264 269 static const struct pci_device_id plx_pci_tbl[] = { 265 270 { 266 271 /* Adlink PCI-7841/cPCI-7841 */ ··· 367 356 CAN200PCI_SUB_VENDOR_ID, CAN200PCI_SUB_DEVICE_ID, 368 357 0, 0, 369 358 (kernel_ulong_t)&plx_pci_card_info_elcus 359 + }, 360 + { 361 + /* moxa */ 362 + MOXA_PCI_VENDOR_ID, MOXA_PCI_DEVICE_ID, 363 + PCI_ANY_ID, PCI_ANY_ID, 364 + 0, 0, 365 + (kernel_ulong_t)&plx_pci_card_info_moxa 370 366 }, 371 367 { 0,} 372 368 };