]> rtime.felk.cvut.cz Git - lincan.git/blob - lincan/src/boardlist.c
a446d4d4d0205178011e22f49b9ff1c4ea262935
[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 pip5_register(struct hwspecops_t *hwspecops);
16 extern int pip6_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
38 const struct boardtype_t can_boardtypes[]={
39     #ifdef CONFIG_OC_LINCAN_CARD_template
40         {"template", template_register, 1},
41     #endif
42     #ifdef CONFIG_OC_LINCAN_CARD_template
43         {"virtual", virtual_register, 0},
44     #endif
45     #ifdef CONFIG_OC_LINCAN_CARD_pip
46         {"pip5", pip5_register, 1},
47         {"pip6", pip6_register, 1},
48     #endif
49     #ifdef CONFIG_OC_LINCAN_CARD_smartcan
50         {"smartcan", smartcan_register, 1},
51     #endif
52     #ifdef CONFIG_OC_LINCAN_CARD_nsi
53         {"nsican", nsi_register, 1},
54     #endif
55     #ifdef CONFIG_OC_LINCAN_CARD_cc_can104
56         {"cc104", cc104_register, 1},
57     #endif
58     #ifdef CONFIG_OC_LINCAN_CARD_aim104
59         {"aim104", aim104_register, 1},
60     #endif
61     #ifdef CONFIG_OC_LINCAN_CARD_pc_i03
62         {"pc-i03", pci03_register, 1},
63     #endif
64     #ifdef CONFIG_OC_LINCAN_CARD_pcm3680
65         {"pcm3680", pcm3680_register, 2},
66     #endif
67     #ifdef CONFIG_OC_LINCAN_CARD_pccan
68         {"pccan-f", pccanf_register, 1},
69         {"pccan-s", pccanf_register, 1},
70         {"pccan-d", pccand_register, 2},
71         {"pccan-q", pccanq_register, 4},
72     #endif
73     #if defined(CONFIG_OC_LINCAN_CARD_kv_pcican)&&defined(CAN_ENABLE_PCI_SUPPORT)
74         {"pcican-s", kv_pcican_register, 0},
75         {"pcican-d", kv_pcican_register, 0},
76         {"pcican-q", kv_pcican_register, 0},
77     #endif
78     #if defined(CONFIG_OC_LINCAN_CARD_ems_cpcpci)&&defined(CAN_ENABLE_PCI_SUPPORT)
79         {"ems_cpcpci", ems_cpcpci_register, 0},
80     #endif
81     #ifdef CONFIG_OC_LINCAN_CARD_m437
82         {"m437", m437_register, 1},
83     #endif
84     #ifdef CONFIG_OC_LINCAN_CARD_pcccan
85         {"pcccan", pcccan_register, 1},
86     #endif
87     #ifdef CONFIG_OC_LINCAN_CARD_ssv
88         {"ssv", ssv_register, 2},
89     #endif
90     #ifdef CONFIG_OC_LINCAN_CARD_bfadcan
91         {"bfadcan", bfadcan_register, 1},
92     #endif
93     #ifdef CONFIG_OC_LINCAN_CARD_pikronisa
94         {"pikronisa", pikronisa_register, 1},
95     #endif
96     #ifdef CONFIG_OC_LINCAN_CARD_msmcan
97         {"msmcan", msmcan_register, 1},
98     #endif
99     #ifdef CONFIG_OC_LINCAN_CARD_unican
100         {"unican", unican_register, 1},
101     #endif
102     #if defined(CONFIG_OC_LINCAN_CARD_unican)&&defined(CAN_ENABLE_PCI_SUPPORT)
103         {"unican-pci", unican_pci_register, 0},
104     #endif
105     #if defined(CONFIG_OC_LINCAN_CARD_unican)&&defined(CAN_ENABLE_VME_SUPPORT)
106         {"unican-vme", unican_vme_register, 1},
107     #endif
108         {NULL}
109 };
110
111 const struct boardtype_t* boardtype_find(const char *str)
112 {
113         const struct boardtype_t *brp;
114
115         for(brp=can_boardtypes;brp->boardtype;brp++) {
116                 if(!strcmp(str,brp->boardtype))
117                         return brp;
118         }
119
120         return NULL;
121 }