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