2 * Linux CAN-bus device driver.
3 * Written for new CAN driver version by Pavel Pisa - OCERA team member
4 * email:pisa@cmp.felk.cvut.cz
5 * This software is released under the GPL-License.
6 * Version lincan-0.3 17 Jun 2004
9 #include "../include/can.h"
10 #include "../include/can_sysdep.h"
11 #include "../include/main.h"
13 extern int template_register(struct hwspecops_t *hwspecops);
14 extern int virtual_register(struct hwspecops_t *hwspecops);
15 extern int oscar_register(struct hwspecops_t *hwspecops);
16 extern int pip_register(struct hwspecops_t *hwspecops);
17 extern int m437_register(struct hwspecops_t *hwspecops);
18 extern int smartcan_register(struct hwspecops_t *hwspecops);
19 extern int pccanf_register(struct hwspecops_t *hwspecops);
20 extern int pccand_register(struct hwspecops_t *hwspecops);
21 extern int pccanq_register(struct hwspecops_t *hwspecops);
22 extern int kv_pcican_register(struct hwspecops_t *hwspecops);
23 extern int ems_cpcpci_register(struct hwspecops_t *hwspecops);
24 extern int nsi_register(struct hwspecops_t *hwspecops);
25 extern int cc104_register(struct hwspecops_t *hwspecops);
26 extern int pci03_register(struct hwspecops_t *hwspecops);
27 extern int pcm3680_register(struct hwspecops_t *hwspecops);
28 extern int aim104_register(struct hwspecops_t *hwspecops);
29 extern int pcccan_register(struct hwspecops_t *hwspecops);
30 extern int ssv_register(struct hwspecops_t *hwspecops);
31 extern int bfadcan_register(struct hwspecops_t *hwspecops);
32 extern int gensja1000mm_register(struct hwspecops_t *hwspecops);
33 extern int gensja1000io_register(struct hwspecops_t *hwspecops);
34 extern int pimx1_register(struct hwspecops_t *hwspecops);
35 extern int msmcan_register(struct hwspecops_t *hwspecops);
36 extern int unican_register(struct hwspecops_t *hwspecops);
37 extern int unican_pci_register(struct hwspecops_t *hwspecops);
38 extern int unican_vme_register(struct hwspecops_t *hwspecops);
39 extern int ipci165_register(struct hwspecops_t *hwspecops);
40 extern int pcan_dongle_register(struct hwspecops_t *hwspecops);
41 extern int eb8245_register(struct hwspecops_t *hwspecops);
42 extern int adlink7841_register(struct hwspecops_t *hwspecops);
43 extern int tscan1_register(struct hwspecops_t *hwspecops);
44 extern int tscan1mmio_register(struct hwspecops_t *hwspecops);
45 extern int ts7kv_register(struct hwspecops_t *hwspecops);
46 extern int ns_dev_register(struct hwspecops_t *hwspecops);
47 extern int hms30c7202_register(struct hwspecops_t *hwspecops);
48 extern int nsi_canpci_register(struct hwspecops_t *hwspecops);
49 extern int usbcan_register(struct hwspecops_t *hwspecops);
50 extern int pcan_pci_register(struct hwspecops_t *hwspecops);
51 extern int esdpci200_register(struct hwspecops_t *hwspecops);
52 extern int esdpci266_register(struct hwspecops_t *hwspecops);
53 extern int sh7760_register(struct hwspecops_t *hwspecops);
55 const struct boardtype_t can_boardtypes[]={
56 #ifdef CONFIG_OC_LINCAN_CARD_template
57 {"template", template_register, 1},
59 #ifdef CONFIG_OC_LINCAN_CARD_virtual
60 {"virtual", virtual_register, 0},
62 #ifdef CONFIG_OC_LINCAN_CARD_oscar
63 {"oscar", oscar_register, 1},
65 #ifdef CONFIG_OC_LINCAN_CARD_pip
66 {"pip5", pip_register, 1},
67 {"pip6", pip_register, 1},
68 {"pip7", pip_register, 1},
69 {"pip8", pip_register, 1},
71 #ifdef CONFIG_OC_LINCAN_CARD_smartcan
72 {"smartcan", smartcan_register, 1},
74 #ifdef CONFIG_OC_LINCAN_CARD_nsi
75 {"nsican", nsi_register, 1},
77 #ifdef CONFIG_OC_LINCAN_CARD_cc_can104
78 {"cc104", cc104_register, 1},
80 #ifdef CONFIG_OC_LINCAN_CARD_aim104
81 {"aim104", aim104_register, 1},
83 #ifdef CONFIG_OC_LINCAN_CARD_pc_i03
84 {"pc-i03", pci03_register, 1},
86 #ifdef CONFIG_OC_LINCAN_CARD_pcm3680
87 {"pcm3680", pcm3680_register, 2},
89 #ifdef CONFIG_OC_LINCAN_CARD_pccan
90 {"pccan-f", pccanf_register, 1},
91 {"pccan-s", pccanf_register, 1},
92 {"pccan-d", pccand_register, 2},
93 {"pccan-q", pccanq_register, 4},
95 #if defined(CONFIG_OC_LINCAN_CARD_kv_pcican)&&defined(CAN_ENABLE_PCI_SUPPORT)
96 {"pcican-s", kv_pcican_register, 0},
97 {"pcican-d", kv_pcican_register, 0},
98 {"pcican-q", kv_pcican_register, 0},
100 #if defined(CONFIG_OC_LINCAN_CARD_ems_cpcpci)&&defined(CAN_ENABLE_PCI_SUPPORT)
101 {"ems_cpcpci", ems_cpcpci_register, 0},
103 #ifdef CONFIG_OC_LINCAN_CARD_m437
104 {"m437", m437_register, 1},
106 #ifdef CONFIG_OC_LINCAN_CARD_pcccan
107 {"pcccan", pcccan_register, 1},
109 #ifdef CONFIG_OC_LINCAN_CARD_ssv
110 {"ssv", ssv_register, 2},
112 #ifdef CONFIG_OC_LINCAN_CARD_bfadcan
113 {"bfadcan", bfadcan_register, 1},
115 #ifdef CONFIG_OC_LINCAN_CARD_gensja1000mm
116 {"gensja1000mm", gensja1000mm_register, 1},
118 #ifdef CONFIG_OC_LINCAN_CARD_gensja1000io
119 {"gensja1000io", gensja1000io_register, 1},
121 #ifdef CONFIG_OC_LINCAN_CARD_pimx1
122 {"pimx1", pimx1_register, 0},
124 #ifdef CONFIG_OC_LINCAN_CARD_msmcan
125 {"msmcan", msmcan_register, 1},
127 #ifdef CONFIG_OC_LINCAN_CARD_unican
128 {"unican", unican_register, 1},
130 #ifdef CONFIG_OC_LINCAN_CARD_ipci165
131 {"ipci165", ipci165_register, 0},
133 #if defined(CONFIG_OC_LINCAN_CARD_unican)&&defined(CAN_ENABLE_PCI_SUPPORT)
134 {"unican-pci", unican_pci_register, 0},
136 #if defined(CONFIG_OC_LINCAN_CARD_unican)&&defined(CAN_ENABLE_VME_SUPPORT)
137 {"unican-vme", unican_vme_register, 1},
139 #if defined(CONFIG_OC_LINCAN_CARD_pcan_dongle)
140 {"pcan_dongle", pcan_dongle_register, 1},
142 #if defined(CONFIG_OC_LINCAN_CARD_eb8245)
143 {"eb8245", eb8245_register, 1},
145 #if defined(CONFIG_OC_LINCAN_CARD_adlink7841)
146 {"adlink7841", adlink7841_register, 0},
148 #if defined(CONFIG_OC_LINCAN_CARD_esdpci200)
149 {"esdpci200", esdpci200_register, 0},
151 #if defined(CONFIG_OC_LINCAN_CARD_esdpci266)
152 {"esdpci266", esdpci200_register, 0},
154 #if defined(CONFIG_OC_LINCAN_CARD_tscan1)
155 {"tscan1", tscan1_register, 1},
156 {"tscan1mmio", tscan1mmio_register, 1},
158 #if defined(CONFIG_OC_LINCAN_CARD_ts7kv)
159 {"ts7kv", ts7kv_register, 1},
161 #if defined(CONFIG_OC_LINCAN_CARD_ns_dev_can)
162 {"ns_dev", ns_dev_register, 1},
164 #if defined(CONFIG_OC_LINCAN_CARD_sh7760)
165 {"sh7760", sh7760_register, 2},
167 #if defined(CONFIG_OC_LINCAN_CARD_hms30c7202_can)
168 {"hms30c7202", hms30c7202_register, 1},
170 #if defined(CONFIG_OC_LINCAN_CARD_nsi_canpci)&&defined(CAN_ENABLE_PCI_SUPPORT)
171 {"nsicanpci", nsi_canpci_register, 1},
173 #if defined(CONFIG_OC_LINCAN_CARD_pcan_pci)&&defined(CAN_ENABLE_PCI_SUPPORT)
174 {"pcan_pci", pcan_pci_register, 0},
176 #if defined(CONFIG_OC_LINCAN_CARD_usbcan)
177 {"usbcan", usbcan_register, 0},
182 const struct boardtype_t* boardtype_find(const char *str)
184 const struct boardtype_t *brp;
186 for(brp=can_boardtypes;brp->boardtype;brp++) {
187 if(!strcmp(str,brp->boardtype))