]> rtime.felk.cvut.cz Git - lincan.git/blob - lincan/src/boardlist.c
Added initial version of MSMCAN card support into LinCAN driver.
[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.2  9 Jul 2003
7  */
8
9 #include "../include/can.h"
10 #include "../include/can_sysdep.h"
11 #include "../include/main.h"
12
13 #include "supported_cards.h"
14
15 extern int template_register(struct hwspecops_t *hwspecops);
16 extern int pip5_register(struct hwspecops_t *hwspecops);
17 extern int pip6_register(struct hwspecops_t *hwspecops);
18 extern int m437_register(struct hwspecops_t *hwspecops);
19 extern int smartcan_register(struct hwspecops_t *hwspecops);
20 extern int pccanf_register(struct hwspecops_t *hwspecops);
21 extern int pccand_register(struct hwspecops_t *hwspecops);
22 extern int pccanq_register(struct hwspecops_t *hwspecops);
23 extern int kv_pcican_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 virtual_register(struct hwspecops_t *hwspecops);
35
36 const struct boardtype_t can_boardtypes[]={
37     #ifdef ENABLE_CARD_template
38         {"template", template_register, 1},
39     #endif
40     #ifdef ENABLE_CARD_template
41         {"virtual", virtual_register, 0},
42     #endif
43     #ifdef ENABLE_CARD_pip
44         {"pip5", pip5_register, 1},
45         {"pip6", pip6_register, 1},
46     #endif
47     #ifdef ENABLE_CARD_smartcan
48         {"smartcan", smartcan_register, 1},
49     #endif
50     #ifdef ENABLE_CARD_nsi
51         {"nsican", nsi_register, 1},
52     #endif
53     #ifdef ENABLE_CARD_cc_can104
54         {"cc104", cc104_register, 1},
55     #endif
56     #ifdef ENABLE_CARD_aim104
57         {"aim104", aim104_register, 1},
58     #endif
59     #ifdef ENABLE_CARD_pc_i03
60         {"pc-i03", pci03_register, 1},
61     #endif
62     #ifdef ENABLE_CARD_pcm3680
63         {"pcm3680", pcm3680_register, 2},
64     #endif
65     #ifdef ENABLE_CARD_pccan
66         {"pccan-f", pccanf_register, 1},
67         {"pccan-s", pccanf_register, 1},
68         {"pccan-d", pccand_register, 2},
69         {"pccan-q", pccanq_register, 4},
70     #endif
71     #if defined(ENABLE_CARD_kv_pcican)&&defined(CAN_ENABLE_PCI_SUPPORT)
72         {"pcican-s", kv_pcican_register, 0},
73         {"pcican-d", kv_pcican_register, 0},
74         {"pcican-q", kv_pcican_register, 0},
75     #endif
76     #ifdef ENABLE_CARD_m437
77         {"m437", m437_register, 1},
78     #endif
79     #ifdef ENABLE_CARD_pcccan
80         {"pcccan", pcccan_register, 1},
81     #endif
82     #ifdef ENABLE_CARD_ssv
83         {"ssv", ssv_register, 2},
84     #endif
85     #ifdef ENABLE_CARD_bfadcan
86         {"bfadcan", bfadcan_register, 1},
87     #endif
88     #ifdef ENABLE_CARD_pikronisa
89         {"pikronisa", pikronisa_register, 1},
90     #endif
91     #ifdef ENABLE_CARD_msmcan
92         {"msmcan", msmcan_register, 1},
93     #endif
94         {NULL}
95 };
96
97 const struct boardtype_t* boardtype_find(const char *str)
98 {
99         const struct boardtype_t *brp;
100
101         for(brp=can_boardtypes;brp->boardtype;brp++) {
102                 if(!strcmp(str,brp->boardtype))
103                         return brp;
104         }
105
106         return NULL;
107 }