5 * CAN bus driver for the alone generic (as possible as) MSCAN controller.
8 * Andrey Volkov <avolkov@varma-el.com>
11 * 2005-2006, Varma Electronics Oy
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30 #include <linux/kernel.h>
31 #include <linux/module.h>
32 #include <linux/interrupt.h>
33 #include <linux/delay.h>
34 #include <linux/netdevice.h>
35 #include <linux/if_arp.h>
36 #include <linux/if_ether.h>
37 #include <linux/list.h>
38 #include <linux/can.h>
39 #include <linux/can/dev.h>
40 #include <linux/can/error.h>
41 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
49 #include <linux/can/version.h> /* for RCSID. Removed by mkpatch script */
52 #define MSCAN_NORMAL_MODE 0
53 #define MSCAN_SLEEP_MODE MSCAN_SLPRQ
54 #define MSCAN_INIT_MODE (MSCAN_INITRQ | MSCAN_SLPRQ)
55 #define MSCAN_POWEROFF_MODE (MSCAN_CSWAI | MSCAN_SLPRQ)
56 #define MSCAN_SET_MODE_RETRIES 255
59 #define BTR0_BRP_MASK 0x3f
60 #define BTR0_SJW_SHIFT 6
61 #define BTR0_SJW_MASK (0x3 << BTR0_SJW_SHIFT)
63 #define BTR1_TSEG1_MASK 0xf
64 #define BTR1_TSEG2_SHIFT 4
65 #define BTR1_TSEG2_MASK (0x7 << BTR1_TSEG2_SHIFT)
66 #define BTR1_SAM_SHIFT 7
68 #define BTR0_SET_BRP(brp) (((brp) - 1) & BTR0_BRP_MASK)
69 #define BTR0_SET_SJW(sjw) ((((sjw) - 1) << BTR0_SJW_SHIFT) & \
72 #define BTR1_SET_TSEG1(tseg1) (((tseg1) - 1) & BTR1_TSEG1_MASK)
73 #define BTR1_SET_TSEG2(tseg2) ((((tseg2) - 1) << BTR1_TSEG2_SHIFT) & \
75 #define BTR1_SET_SAM(sam) (((sam) & 1) << BTR1_SAM_SHIFT)
77 static struct can_bittiming_const mscan_bittiming_const = {
94 #define TX_QUEUE_SIZE 3
96 struct tx_queue_entry {
97 struct list_head list;
105 volatile unsigned long flags;
111 struct list_head tx_head;
112 struct tx_queue_entry tx_queue[TX_QUEUE_SIZE];
113 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28)
114 struct napi_struct napi;
115 #elif LINUX_VERSION_CODE > KERNEL_VERSION(2,6,23)
116 struct napi_struct napi;
117 struct net_device *dev;
121 #define F_RX_PROGRESS 0
122 #define F_TX_PROGRESS 1
123 #define F_TX_WAIT_ALL 2
125 static enum can_state state_map[] = {
127 CAN_STATE_BUS_WARNING,
128 CAN_STATE_BUS_PASSIVE,
132 static int mscan_set_mode(struct net_device *dev, u8 mode)
134 struct mscan_regs *regs = (struct mscan_regs *)dev->base_addr;
135 struct mscan_priv *priv = netdev_priv(dev);
140 if (mode != MSCAN_NORMAL_MODE) {
142 if (priv->tx_active) {
143 /* Abort transfers before going to sleep */
144 out_8(®s->cantier, 0);
145 out_8(®s->cantarq, priv->tx_active);
146 out_8(®s->cantier, priv->tx_active);
149 canctl1 = in_8(®s->canctl1);
150 if ((mode & MSCAN_SLPRQ) && (canctl1 & MSCAN_SLPAK) == 0) {
151 out_8(®s->canctl0,
152 in_8(®s->canctl0) | MSCAN_SLPRQ);
153 for (i = 0; i < MSCAN_SET_MODE_RETRIES; i++) {
154 if (in_8(®s->canctl1) & MSCAN_SLPAK)
158 if (i >= MSCAN_SET_MODE_RETRIES)
162 priv->can.state = CAN_STATE_SLEEPING;
164 if (!ret && (mode & MSCAN_INITRQ)
165 && (canctl1 & MSCAN_INITAK) == 0) {
166 out_8(®s->canctl0,
167 in_8(®s->canctl0) | MSCAN_INITRQ);
168 for (i = 0; i < MSCAN_SET_MODE_RETRIES; i++) {
169 if (in_8(®s->canctl1) & MSCAN_INITAK)
172 if (i >= MSCAN_SET_MODE_RETRIES)
176 priv->can.state = CAN_STATE_STOPPED;
178 if (!ret && (mode & MSCAN_CSWAI))
179 out_8(®s->canctl0,
180 in_8(®s->canctl0) | MSCAN_CSWAI);
183 canctl1 = in_8(®s->canctl1);
184 if (canctl1 & (MSCAN_SLPAK | MSCAN_INITAK)) {
185 out_8(®s->canctl0, in_8(®s->canctl0) &
186 ~(MSCAN_SLPRQ | MSCAN_INITRQ));
187 for (i = 0; i < MSCAN_SET_MODE_RETRIES; i++) {
188 canctl1 = in_8(®s->canctl1);
189 if (!(canctl1 & (MSCAN_INITAK | MSCAN_SLPAK)))
192 if (i >= MSCAN_SET_MODE_RETRIES)
195 priv->can.state = CAN_STATE_ACTIVE;
201 static int mscan_start(struct net_device *dev)
203 struct mscan_priv *priv = netdev_priv(dev);
204 struct mscan_regs *regs = (struct mscan_regs *)dev->base_addr;
208 out_8(®s->canrier, 0);
210 INIT_LIST_HEAD(&priv->tx_head);
213 priv->shadow_canrier = 0;
216 err = mscan_set_mode(dev, MSCAN_NORMAL_MODE);
220 canrflg = in_8(®s->canrflg);
221 priv->shadow_statflg = canrflg & MSCAN_STAT_MSK;
222 priv->can.state = state_map[max(MSCAN_STATE_RX(canrflg),
223 MSCAN_STATE_TX(canrflg))];
224 out_8(®s->cantier, 0);
226 /* Enable receive interrupts. */
227 out_8(®s->canrier, MSCAN_OVRIE | MSCAN_RXFIE | MSCAN_CSCIE |
228 MSCAN_RSTATE1 | MSCAN_RSTATE0 | MSCAN_TSTATE1 | MSCAN_TSTATE0);
233 static int mscan_start_xmit(struct sk_buff *skb, struct net_device *dev)
235 struct can_frame *frame = (struct can_frame *)skb->data;
236 struct mscan_regs *regs = (struct mscan_regs *)dev->base_addr;
237 struct mscan_priv *priv = netdev_priv(dev);
241 if (frame->can_dlc > 8)
244 dev_dbg(ND2D(dev), "%s\n", __func__);
245 out_8(®s->cantier, 0);
247 i = ~priv->tx_active & MSCAN_TXE;
249 switch (hweight8(i)) {
251 netif_stop_queue(dev);
252 dev_err(ND2D(dev), "BUG! Tx Ring full when queue awake!\n");
253 return NETDEV_TX_BUSY;
255 /* if buf_id < 3, then current frame will be send out of order,
256 since buffer with lower id have higher priority (hell..) */
259 if (priv->cur_pri == 0xff)
260 set_bit(F_TX_WAIT_ALL, &priv->flags);
261 netif_stop_queue(dev);
263 set_bit(F_TX_PROGRESS, &priv->flags);
265 out_8(®s->cantbsel, i);
267 rtr = frame->can_id & CAN_RTR_FLAG;
269 if (frame->can_id & CAN_EFF_FLAG) {
270 dev_dbg(ND2D(dev), "sending extended frame\n");
272 can_id = (frame->can_id & CAN_EFF_MASK) << 1;
275 out_be16(®s->tx.idr3_2, can_id);
278 can_id = (can_id & 0x7) | ((can_id << 2) & 0xffe0) | (3 << 3);
280 dev_dbg(ND2D(dev), "sending standard frame\n");
281 can_id = (frame->can_id & CAN_SFF_MASK) << 5;
285 out_be16(®s->tx.idr1_0, can_id);
288 volatile void __iomem *data = ®s->tx.dsr1_0;
289 u16 *payload = (u16 *) frame->data;
290 /*Its safe to write into dsr[dlc+1] */
291 for (i = 0; i < (frame->can_dlc + 1) / 2; i++) {
292 out_be16(data, *payload++);
293 data += 2 + _MSCAN_RESERVED_DSR_SIZE;
297 out_8(®s->tx.dlr, frame->can_dlc);
298 out_8(®s->tx.tbpr, priv->cur_pri);
300 /* Start transmission. */
301 out_8(®s->cantflg, 1 << buf_id);
303 if (!test_bit(F_TX_PROGRESS, &priv->flags))
304 dev->trans_start = jiffies;
306 list_add_tail(&priv->tx_queue[buf_id].list, &priv->tx_head);
308 can_put_echo_skb(skb, dev, buf_id);
310 /* Enable interrupt. */
311 priv->tx_active |= 1 << buf_id;
312 out_8(®s->cantier, priv->tx_active);
317 static inline int check_set_state(struct net_device *dev, u8 canrflg)
319 struct mscan_priv *priv = netdev_priv(dev);
320 enum can_state state;
323 if (!(canrflg & MSCAN_CSCIF) || priv->can.state > CAN_STATE_BUS_OFF)
326 state = state_map[max(MSCAN_STATE_RX(canrflg),
327 MSCAN_STATE_TX(canrflg))];
328 if (priv->can.state < state)
330 if (state == CAN_STATE_BUS_OFF)
332 priv->can.state = state;
336 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,23)
337 static int mscan_rx_poll(struct napi_struct *napi, int quota)
339 static int mscan_rx_poll(struct net_device *dev, int *budget)
342 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28)
343 struct mscan_priv *priv = container_of(napi, struct mscan_priv, napi);
344 struct net_device *dev = napi->dev;
345 #elif LINUX_VERSION_CODE > KERNEL_VERSION(2,6,23)
346 struct mscan_priv *priv = container_of(napi, struct mscan_priv, napi);
347 struct net_device *dev = priv->dev;
349 struct mscan_priv *priv = netdev_priv(dev);
350 int quota = min(dev->quota, *budget);
352 struct mscan_regs *regs = (struct mscan_regs *)dev->base_addr;
353 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
354 struct net_device_stats *stats = can_get_stats(dev);
356 struct net_device_stats *stats = &dev->stats;
361 struct can_frame *frame;
366 while (npackets < quota && ((canrflg = in_8(®s->canrflg)) &
367 (MSCAN_RXF | MSCAN_ERR_IF))) {
369 skb = dev_alloc_skb(sizeof(struct can_frame));
371 if (printk_ratelimit())
372 dev_notice(ND2D(dev), "packet dropped\n");
374 out_8(®s->canrflg, canrflg);
378 frame = (struct can_frame *)skb_put(skb, sizeof(*frame));
379 memset(frame, 0, sizeof(*frame));
381 if (canrflg & MSCAN_RXF) {
382 can_id = in_be16(®s->rx.idr1_0);
383 if (can_id & (1 << 3)) {
384 frame->can_id = CAN_EFF_FLAG;
385 can_id = ((can_id << 16) |
386 in_be16(®s->rx.idr3_2));
387 can_id = ((can_id & 0xffe00000) |
388 ((can_id & 0x7ffff) << 2)) >> 2;
394 frame->can_id |= can_id >> 1;
396 frame->can_id |= CAN_RTR_FLAG;
397 frame->can_dlc = in_8(®s->rx.dlr) & 0xf;
399 if (!(frame->can_id & CAN_RTR_FLAG)) {
400 volatile void __iomem *data = ®s->rx.dsr1_0;
401 u16 *payload = (u16 *) frame->data;
402 for (i = 0; i < (frame->can_dlc + 1) / 2; i++) {
403 *payload++ = in_be16(data);
404 data += 2 + _MSCAN_RESERVED_DSR_SIZE;
409 "received pkt: id: %u dlc: %u data: ",
410 frame->can_id, frame->can_dlc);
413 i < frame->can_dlc && !(frame->can_id &
415 printk(KERN_DEBUG "%2x ", frame->data[i]);
416 printk(KERN_DEBUG "\n");
419 out_8(®s->canrflg, MSCAN_RXF);
420 dev->last_rx = jiffies;
422 stats->rx_bytes += frame->can_dlc;
423 } else if (canrflg & MSCAN_ERR_IF) {
424 frame->can_id = CAN_ERR_FLAG;
426 if (canrflg & MSCAN_OVRIF) {
427 frame->can_id |= CAN_ERR_CRTL;
428 frame->data[1] = CAN_ERR_CRTL_RX_OVERFLOW;
429 stats->rx_over_errors++;
433 if (check_set_state(dev, canrflg)) {
434 frame->can_id |= CAN_ERR_CRTL;
435 switch (priv->can.state) {
436 case CAN_STATE_BUS_WARNING:
437 if ((priv->shadow_statflg &
439 (canrflg & MSCAN_RSTAT_MSK))
441 CAN_ERR_CRTL_RX_WARNING;
443 if ((priv->shadow_statflg &
445 (canrflg & MSCAN_TSTAT_MSK))
447 CAN_ERR_CRTL_TX_WARNING;
449 case CAN_STATE_BUS_PASSIVE:
451 CAN_ERR_CRTL_RX_PASSIVE;
453 case CAN_STATE_BUS_OFF:
454 frame->can_id |= CAN_ERR_BUSOFF;
455 frame->can_id &= ~CAN_ERR_CRTL;
461 priv->shadow_statflg = canrflg & MSCAN_STAT_MSK;
462 frame->can_dlc = CAN_ERR_DLC;
463 out_8(®s->canrflg, MSCAN_ERR_IF);
468 skb->protocol = __constant_htons(ETH_P_CAN);
469 skb->ip_summed = CHECKSUM_UNNECESSARY;
470 netif_receive_skb(skb);
473 #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,23)
475 dev->quota -= npackets;
478 if (!(in_8(®s->canrflg) & (MSCAN_RXF | MSCAN_ERR_IF))) {
479 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28)
480 netif_rx_complete(&priv->napi);
481 #elif LINUX_VERSION_CODE > KERNEL_VERSION(2,6,23)
482 netif_rx_complete(dev, &priv->napi);
484 netif_rx_complete(dev);
486 clear_bit(F_RX_PROGRESS, &priv->flags);
488 out_8(®s->canrier,
489 in_8(®s->canrier) | MSCAN_ERR_IF | MSCAN_RXFIE);
491 if (priv->can.state < CAN_STATE_BUS_OFF)
492 out_8(®s->canrier, priv->shadow_canrier);
500 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
501 static irqreturn_t mscan_isr(int irq, void *dev_id, struct pt_regs *r)
503 static irqreturn_t mscan_isr(int irq, void *dev_id)
506 struct net_device *dev = (struct net_device *)dev_id;
507 struct mscan_priv *priv = netdev_priv(dev);
508 struct mscan_regs *regs = (struct mscan_regs *)dev->base_addr;
509 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
510 struct net_device_stats *stats = can_get_stats(dev);
512 struct net_device_stats *stats = &dev->stats;
514 u8 cantier, cantflg, canrflg;
515 irqreturn_t ret = IRQ_NONE;
517 cantier = in_8(®s->cantier) & MSCAN_TXE;
518 cantflg = in_8(®s->cantflg) & cantier;
520 if (cantier && cantflg) {
522 struct list_head *tmp, *pos;
524 list_for_each_safe(pos, tmp, &priv->tx_head) {
525 struct tx_queue_entry *entry =
526 list_entry(pos, struct tx_queue_entry, list);
527 u8 mask = entry->mask;
529 if (!(cantflg & mask))
532 out_8(®s->cantbsel, mask);
533 stats->tx_bytes += in_8(®s->tx.dlr);
535 can_get_echo_skb(dev, entry->id);
536 priv->tx_active &= ~mask;
540 if (list_empty(&priv->tx_head)) {
541 clear_bit(F_TX_WAIT_ALL, &priv->flags);
542 clear_bit(F_TX_PROGRESS, &priv->flags);
545 dev->trans_start = jiffies;
547 if (!test_bit(F_TX_WAIT_ALL, &priv->flags))
548 netif_wake_queue(dev);
550 out_8(®s->cantier, priv->tx_active);
554 canrflg = in_8(®s->canrflg);
555 if ((canrflg & ~MSCAN_STAT_MSK) &&
556 !test_and_set_bit(F_RX_PROGRESS, &priv->flags)) {
558 printk(KERN_DEBUG "%s: canrflg=%#02x canrier=%#02x\n",
559 dev->name, canrflg, in_8(®s->canrier));
562 if (check_set_state(dev, canrflg)) {
563 out_8(®s->canrflg, MSCAN_CSCIF);
567 if (canrflg & ~MSCAN_STAT_MSK) {
568 priv->shadow_canrier = in_8(®s->canrier);
569 out_8(®s->canrier, 0);
570 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28)
571 netif_rx_schedule(&priv->napi);
572 #elif LINUX_VERSION_CODE > KERNEL_VERSION(2,6,23)
573 netif_rx_schedule(dev, &priv->napi);
575 netif_rx_schedule(dev);
579 clear_bit(F_RX_PROGRESS, &priv->flags);
584 static int mscan_do_set_mode(struct net_device *dev, enum can_mode mode)
587 struct mscan_priv *priv = netdev_priv(dev);
590 if (!priv->open_time)
596 netif_stop_queue(dev);
599 CAN_MODE_STOP) ? MSCAN_INIT_MODE :
603 if (priv->can.state <= CAN_STATE_BUS_OFF)
604 mscan_set_mode(dev, MSCAN_INIT_MODE);
605 ret = mscan_start(dev);
608 if (netif_queue_stopped(dev))
609 netif_wake_queue(dev);
619 static int mscan_do_set_bittiming(struct net_device *dev)
621 struct mscan_regs *regs = (struct mscan_regs *)dev->base_addr;
622 struct mscan_priv *priv = netdev_priv(dev);
623 struct can_bittiming *bt = &priv->can.bittiming;
626 btr0 = BTR0_SET_BRP(bt->brp) | BTR0_SET_SJW(bt->sjw);
627 btr1 = (BTR1_SET_TSEG1(bt->prop_seg + bt->phase_seg1) |
628 BTR1_SET_TSEG2(bt->phase_seg2) |
629 BTR1_SET_SAM(priv->can.ctrlmode & CAN_CTRLMODE_3_SAMPLES));
631 dev_info(ND2D(dev), "BTR0=0x%02x BTR1=0x%02x\n", btr0, btr1);
633 out_8(®s->canbtr0, btr0);
634 out_8(®s->canbtr1, btr1);
639 static int mscan_open(struct net_device *dev)
642 struct mscan_priv *priv = netdev_priv(dev);
643 struct mscan_regs *regs = (struct mscan_regs *)dev->base_addr;
645 /* determine and set bittime */
646 ret = can_set_bittiming(dev);
650 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,23)
651 napi_enable(&priv->napi);
653 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
654 ret = request_irq(dev->irq, mscan_isr, SA_SHIRQ, dev->name, dev);
656 ret = request_irq(dev->irq, mscan_isr, IRQF_SHARED, dev->name, dev);
660 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,23)
661 napi_disable(&priv->napi);
663 printk(KERN_ERR "%s - failed to attach interrupt\n",
668 priv->open_time = jiffies;
670 out_8(®s->canctl1, in_8(®s->canctl1) & ~MSCAN_LISTEN);
672 ret = mscan_start(dev);
676 netif_start_queue(dev);
681 static int mscan_close(struct net_device *dev)
683 struct mscan_regs *regs = (struct mscan_regs *)dev->base_addr;
684 struct mscan_priv *priv = netdev_priv(dev);
686 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,23)
687 napi_disable(&priv->napi);
690 out_8(®s->cantier, 0);
691 out_8(®s->canrier, 0);
692 free_irq(dev->irq, dev);
693 mscan_set_mode(dev, MSCAN_INIT_MODE);
694 can_close_cleanup(dev);
695 netif_stop_queue(dev);
701 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28)
702 static const struct net_device_ops mscan_netdev_ops = {
703 .ndo_open = mscan_open,
704 .ndo_stop = mscan_close,
705 .ndo_start_xmit = mscan_start_xmit,
709 int register_mscandev(struct net_device *dev, int clock_src)
711 struct mscan_regs *regs = (struct mscan_regs *)dev->base_addr;
714 ctl1 = in_8(®s->canctl1);
716 ctl1 |= MSCAN_CLKSRC;
718 ctl1 &= ~MSCAN_CLKSRC;
721 out_8(®s->canctl1, ctl1);
724 /* acceptance mask/acceptance code (accept everything) */
725 out_be16(®s->canidar1_0, 0);
726 out_be16(®s->canidar3_2, 0);
727 out_be16(®s->canidar5_4, 0);
728 out_be16(®s->canidar7_6, 0);
730 out_be16(®s->canidmr1_0, 0xffff);
731 out_be16(®s->canidmr3_2, 0xffff);
732 out_be16(®s->canidmr5_4, 0xffff);
733 out_be16(®s->canidmr7_6, 0xffff);
734 /* Two 32 bit Acceptance Filters */
735 out_8(®s->canidac, MSCAN_AF_32BIT);
737 mscan_set_mode(dev, MSCAN_INIT_MODE);
739 return register_candev(dev);
741 EXPORT_SYMBOL(register_mscandev);
743 void unregister_mscandev(struct net_device *dev)
745 struct mscan_regs *regs = (struct mscan_regs *)dev->base_addr;
746 mscan_set_mode(dev, MSCAN_INIT_MODE);
747 out_8(®s->canctl1, in_8(®s->canctl1) & ~MSCAN_CANE);
748 unregister_candev(dev);
750 EXPORT_SYMBOL(unregister_mscandev);
752 struct net_device *alloc_mscandev(void)
754 struct net_device *dev;
755 struct mscan_priv *priv;
758 dev = alloc_candev(sizeof(struct mscan_priv));
761 priv = netdev_priv(dev);
763 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28)
764 dev->netdev_ops = &mscan_netdev_ops;
766 dev->open = mscan_open;
767 dev->stop = mscan_close;
768 dev->hard_start_xmit = mscan_start_xmit;
771 dev->flags |= IFF_ECHO; /* we support local echo */
773 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28)
774 netif_napi_add(dev, &priv->napi, mscan_rx_poll, 8);
775 #elif LINUX_VERSION_CODE > KERNEL_VERSION(2,6,23)
777 netif_napi_add(dev, &priv->napi, mscan_rx_poll, 8);
779 dev->poll = mscan_rx_poll;
783 priv->can.bittiming_const = &mscan_bittiming_const;
784 priv->can.do_set_bittiming = mscan_do_set_bittiming;
785 priv->can.do_set_mode = mscan_do_set_mode;
787 for (i = 0; i < TX_QUEUE_SIZE; i++) {
788 priv->tx_queue[i].id = i;
789 priv->tx_queue[i].mask = 1 << i;
794 EXPORT_SYMBOL(alloc_mscandev);
796 MODULE_AUTHOR("Andrey Volkov <avolkov@varma-el.com>");
797 MODULE_LICENSE("GPL v2");
798 MODULE_DESCRIPTION("CAN port driver for a mscan based chips");