]> rtime.felk.cvut.cz Git - lincan.git/blob - lincan/src/boardlist.c
Ronald Gomes from Technologic Systemscontributed support for TS-CAN1 and TS-7KV cards.
[lincan.git] / lincan / src / boardlist.c
1 /* boards_list.c
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
7  */
8
9 #include "../include/can.h"
10 #include "../include/can_sysdep.h"
11 #include "../include/main.h"
12
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 pikronisa_register(struct hwspecops_t *hwspecops);
33 extern int pimx1_register(struct hwspecops_t *hwspecops);
34 extern int msmcan_register(struct hwspecops_t *hwspecops);
35 extern int unican_register(struct hwspecops_t *hwspecops);
36 extern int unican_pci_register(struct hwspecops_t *hwspecops);
37 extern int unican_vme_register(struct hwspecops_t *hwspecops);
38 extern int ipci165_register(struct hwspecops_t *hwspecops);
39 extern int pcan_dongle_register(struct hwspecops_t *hwspecops);
40 extern int eb8245_register(struct hwspecops_t *hwspecops);
41 extern int adlink7841_register(struct hwspecops_t *hwspecops);
42 extern int tscan1_register(struct hwspecops_t *hwspecops);
43 extern int ns_dev_register(struct hwspecops_t *hwspecops);
44 extern int hms30c7202_register(struct hwspecops_t *hwspecops);
45
46 const struct boardtype_t can_boardtypes[]={
47     #ifdef CONFIG_OC_LINCAN_CARD_template
48         {"template", template_register, 1},
49     #endif
50     #ifdef CONFIG_OC_LINCAN_CARD_template
51         {"virtual", virtual_register, 0},
52     #endif
53     #ifdef CONFIG_OC_LINCAN_CARD_oscar
54         {"oscar", oscar_register, 1},
55     #endif
56     #ifdef CONFIG_OC_LINCAN_CARD_pip
57         {"pip5", pip_register, 1},
58         {"pip6", pip_register, 1},
59         {"pip7", pip_register, 1},
60         {"pip8", pip_register, 1},
61     #endif
62     #ifdef CONFIG_OC_LINCAN_CARD_smartcan
63         {"smartcan", smartcan_register, 1},
64     #endif
65     #ifdef CONFIG_OC_LINCAN_CARD_nsi
66         {"nsican", nsi_register, 1},
67     #endif
68     #ifdef CONFIG_OC_LINCAN_CARD_cc_can104
69         {"cc104", cc104_register, 1},
70     #endif
71     #ifdef CONFIG_OC_LINCAN_CARD_aim104
72         {"aim104", aim104_register, 1},
73     #endif
74     #ifdef CONFIG_OC_LINCAN_CARD_pc_i03
75         {"pc-i03", pci03_register, 1},
76     #endif
77     #ifdef CONFIG_OC_LINCAN_CARD_pcm3680
78         {"pcm3680", pcm3680_register, 2},
79     #endif
80     #ifdef CONFIG_OC_LINCAN_CARD_pccan
81         {"pccan-f", pccanf_register, 1},
82         {"pccan-s", pccanf_register, 1},
83         {"pccan-d", pccand_register, 2},
84         {"pccan-q", pccanq_register, 4},
85     #endif
86     #if defined(CONFIG_OC_LINCAN_CARD_kv_pcican)&&defined(CAN_ENABLE_PCI_SUPPORT)
87         {"pcican-s", kv_pcican_register, 0},
88         {"pcican-d", kv_pcican_register, 0},
89         {"pcican-q", kv_pcican_register, 0},
90     #endif
91     #if defined(CONFIG_OC_LINCAN_CARD_ems_cpcpci)&&defined(CAN_ENABLE_PCI_SUPPORT)
92         {"ems_cpcpci", ems_cpcpci_register, 0},
93     #endif
94     #ifdef CONFIG_OC_LINCAN_CARD_m437
95         {"m437", m437_register, 1},
96     #endif
97     #ifdef CONFIG_OC_LINCAN_CARD_pcccan
98         {"pcccan", pcccan_register, 1},
99     #endif
100     #ifdef CONFIG_OC_LINCAN_CARD_ssv
101         {"ssv", ssv_register, 2},
102     #endif
103     #ifdef CONFIG_OC_LINCAN_CARD_bfadcan
104         {"bfadcan", bfadcan_register, 1},
105     #endif
106     #ifdef CONFIG_OC_LINCAN_CARD_pikronisa
107         {"pikronisa", pikronisa_register, 1},
108     #endif
109     #ifdef CONFIG_OC_LINCAN_CARD_pimx1
110         {"pimx1", pimx1_register, 0},
111     #endif
112     #ifdef CONFIG_OC_LINCAN_CARD_msmcan
113         {"msmcan", msmcan_register, 1},
114     #endif
115     #ifdef CONFIG_OC_LINCAN_CARD_unican
116         {"unican", unican_register, 1},
117     #endif
118     #ifdef CONFIG_OC_LINCAN_CARD_ipci165
119         {"ipci165", ipci165_register, 0},
120     #endif
121     #if defined(CONFIG_OC_LINCAN_CARD_unican)&&defined(CAN_ENABLE_PCI_SUPPORT)
122         {"unican-pci", unican_pci_register, 0},
123     #endif
124     #if defined(CONFIG_OC_LINCAN_CARD_unican)&&defined(CAN_ENABLE_VME_SUPPORT)
125         {"unican-vme", unican_vme_register, 1},
126     #endif
127     #if defined(CONFIG_OC_LINCAN_CARD_pcan_dongle)
128         {"pcan_dongle", pcan_dongle_register, 1},
129     #endif
130     #if defined(CONFIG_OC_LINCAN_CARD_eb8245)
131         {"eb8245", eb8245_register, 1},
132     #endif
133     #if defined(CONFIG_OC_LINCAN_CARD_adlink7841)
134         {"adlink7841", adlink7841_register, 0},
135     #endif
136     #if defined(CONFIG_OC_LINCAN_CARD_tscan1)
137         {"tscan1", tscan1_register, 1},
138         {"ts7kv", tscan1_register, 1},
139     #endif
140     #if defined(CONFIG_OC_LINCAN_CARD_ns_dev_can)
141         {"ns_dev", ns_dev_register, 1},
142     #endif
143     #if defined(CONFIG_OC_LINCAN_CARD_hms30c7202_can)
144         {"hms30c7202", hms30c7202_register, 1},
145     #endif
146         {NULL}
147 };
148
149 const struct boardtype_t* boardtype_find(const char *str)
150 {
151         const struct boardtype_t *brp;
152
153         for(brp=can_boardtypes;brp->boardtype;brp++) {
154                 if(!strcmp(str,brp->boardtype))
155                         return brp;
156         }
157
158         return NULL;
159 }