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