2 * linux/drivers/net/irda/sa1100_ir.c
4 * Copyright (C) 2000-2001 Russell King
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 * Infra-red driver for the StrongARM SA1100 embedded microprocessor
12 * Note that we don't have to worry about the SA1111's DMA bugs in here,
13 * so we use the straight forward dma_map_* functions with a null pointer.
15 * This driver takes one kernel command line parameter, sa1100ir=, with
16 * the following options:
17 * max_rate:baudrate - set the maximum baud rate
18 * power_level:level - set the transmitter power level
19 * tx_lpm:0|1 - set transmit low power mode
21 #include <linux/module.h>
22 #include <linux/moduleparam.h>
23 #include <linux/types.h>
24 #include <linux/init.h>
25 #include <linux/errno.h>
26 #include <linux/netdevice.h>
27 #include <linux/slab.h>
28 #include <linux/rtnetlink.h>
29 #include <linux/interrupt.h>
30 #include <linux/delay.h>
31 #include <linux/platform_device.h>
32 #include <linux/dma-mapping.h>
34 #include <net/irda/irda.h>
35 #include <net/irda/wrapper.h>
36 #include <net/irda/irda_device.h>
39 #include <mach/hardware.h>
40 #include <asm/mach/irda.h>
42 static int power_level = 3;
44 static int max_rate = 4000000;
48 struct scatterlist sg;
60 struct sa1100_buf dma_rx;
61 struct sa1100_buf dma_tx;
64 struct irda_platform_data *pdata;
65 struct irlap_cb *irlap;
71 int (*tx_start)(struct sk_buff *, struct net_device *, struct sa1100_irda *);
72 irqreturn_t (*irq)(struct net_device *, struct sa1100_irda *);
75 static int sa1100_irda_set_speed(struct sa1100_irda *, int);
77 #define IS_FIR(si) ((si)->speed >= 4000000)
79 #define HPSIR_MAX_RXLEN 2047
82 * Allocate and map the receive buffer, unless it is already allocated.
84 static int sa1100_irda_rx_alloc(struct sa1100_irda *si)
89 si->dma_rx.skb = alloc_skb(HPSIR_MAX_RXLEN + 1, GFP_ATOMIC);
90 if (!si->dma_rx.skb) {
91 printk(KERN_ERR "sa1100_ir: out of memory for RX SKB\n");
96 * Align any IP headers that may be contained
99 skb_reserve(si->dma_rx.skb, 1);
101 sg_set_buf(&si->dma_rx.sg, si->dma_rx.skb->data, HPSIR_MAX_RXLEN);
102 if (dma_map_sg(si->dev, &si->dma_rx.sg, 1, DMA_FROM_DEVICE) == 0) {
103 dev_kfree_skb_any(si->dma_rx.skb);
111 * We want to get here as soon as possible, and get the receiver setup.
112 * We use the existing buffer.
114 static void sa1100_irda_rx_dma_start(struct sa1100_irda *si)
116 if (!si->dma_rx.skb) {
117 printk(KERN_ERR "sa1100_ir: rx buffer went missing\n");
122 * First empty receive FIFO
124 Ser2HSCR0 = HSCR0_HSSP;
127 * Enable the DMA, receiver and receive interrupt.
129 sa1100_clear_dma(si->dma_rx.regs);
130 sa1100_start_dma(si->dma_rx.regs, sg_dma_address(&si->dma_rx.sg),
131 sg_dma_len(&si->dma_rx.sg));
132 Ser2HSCR0 = HSCR0_HSSP | HSCR0_RXE;
135 static void sa1100_irda_check_speed(struct sa1100_irda *si)
138 sa1100_irda_set_speed(si, si->newspeed);
144 * HP-SIR format support.
146 static int sa1100_irda_sir_tx_start(struct sk_buff *skb, struct net_device *dev,
147 struct sa1100_irda *si)
149 si->tx_buff.data = si->tx_buff.head;
150 si->tx_buff.len = async_wrap_skb(skb, si->tx_buff.data,
151 si->tx_buff.truesize);
154 * Set the transmit interrupt enable. This will fire off an
155 * interrupt immediately. Note that we disable the receiver
156 * so we won't get spurious characters received.
158 Ser2UTCR3 = UTCR3_TIE | UTCR3_TXE;
165 static irqreturn_t sa1100_irda_sir_irq(struct net_device *dev, struct sa1100_irda *si)
172 * Deal with any receive errors first. The bytes in error may be
173 * the only bytes in the receive FIFO, so we do this first.
175 while (status & UTSR0_EIF) {
181 if (stat & (UTSR1_FRE | UTSR1_ROR)) {
182 dev->stats.rx_errors++;
183 if (stat & UTSR1_FRE)
184 dev->stats.rx_frame_errors++;
185 if (stat & UTSR1_ROR)
186 dev->stats.rx_fifo_errors++;
188 async_unwrap_char(dev, &dev->stats, &si->rx_buff, data);
194 * We must clear certain bits.
196 Ser2UTSR0 = status & (UTSR0_RID | UTSR0_RBB | UTSR0_REB);
198 if (status & UTSR0_RFS) {
200 * There are at least 4 bytes in the FIFO. Read 3 bytes
201 * and leave the rest to the block below.
203 async_unwrap_char(dev, &dev->stats, &si->rx_buff, Ser2UTDR);
204 async_unwrap_char(dev, &dev->stats, &si->rx_buff, Ser2UTDR);
205 async_unwrap_char(dev, &dev->stats, &si->rx_buff, Ser2UTDR);
208 if (status & (UTSR0_RFS | UTSR0_RID)) {
210 * Fifo contains more than 1 character.
213 async_unwrap_char(dev, &dev->stats, &si->rx_buff,
215 } while (Ser2UTSR1 & UTSR1_RNE);
219 if (status & UTSR0_TFS && si->tx_buff.len) {
221 * Transmitter FIFO is not full
224 Ser2UTDR = *si->tx_buff.data++;
225 si->tx_buff.len -= 1;
226 } while (Ser2UTSR1 & UTSR1_TNF && si->tx_buff.len);
228 if (si->tx_buff.len == 0) {
229 dev->stats.tx_packets++;
230 dev->stats.tx_bytes += si->tx_buff.data -
234 * We need to ensure that the transmitter has
239 while (Ser2UTSR1 & UTSR1_TBY);
242 * Ok, we've finished transmitting. Now enable
243 * the receiver. Sometimes we get a receive IRQ
244 * immediately after a transmit...
246 Ser2UTSR0 = UTSR0_REB | UTSR0_RBB | UTSR0_RID;
247 Ser2UTCR3 = UTCR3_RIE | UTCR3_RXE | UTCR3_TXE;
249 sa1100_irda_check_speed(si);
252 netif_wake_queue(dev);
260 * FIR format support.
262 static void sa1100_irda_firtxdma_irq(void *id)
264 struct net_device *dev = id;
265 struct sa1100_irda *si = netdev_priv(dev);
269 * Wait for the transmission to complete. Unfortunately,
270 * the hardware doesn't give us an interrupt to indicate
275 while (!(Ser2HSSR0 & HSSR0_TUR) || Ser2HSSR1 & HSSR1_TBY);
278 * Clear the transmit underrun bit.
280 Ser2HSSR0 = HSSR0_TUR;
283 * Do we need to change speed? Note that we're lazy
284 * here - we don't free the old dma_rx.skb. We don't need
285 * to allocate a buffer either.
287 sa1100_irda_check_speed(si);
290 * Start reception. This disables the transmitter for
291 * us. This will be using the existing RX buffer.
293 sa1100_irda_rx_dma_start(si);
295 /* Account and free the packet. */
296 skb = si->dma_tx.skb;
298 dma_unmap_sg(si->dev, &si->dma_tx.sg, 1,
300 dev->stats.tx_packets ++;
301 dev->stats.tx_bytes += skb->len;
302 dev_kfree_skb_irq(skb);
303 si->dma_tx.skb = NULL;
307 * Make sure that the TX queue is available for sending
308 * (for retries). TX has priority over RX at all times.
310 netif_wake_queue(dev);
313 static int sa1100_irda_fir_tx_start(struct sk_buff *skb, struct net_device *dev,
314 struct sa1100_irda *si)
316 int mtt = irda_get_mtt(skb);
318 si->dma_tx.skb = skb;
319 sg_set_buf(&si->dma_tx.sg, skb->data, skb->len);
320 if (dma_map_sg(si->dev, &si->dma_tx.sg, 1, DMA_TO_DEVICE) == 0) {
321 si->dma_tx.skb = NULL;
322 netif_wake_queue(dev);
323 dev->stats.tx_dropped++;
328 sa1100_start_dma(si->dma_tx.regs, sg_dma_address(&si->dma_tx.sg),
329 sg_dma_len(&si->dma_tx.sg));
332 * If we have a mean turn-around time, impose the specified
333 * specified delay. We could shorten this by timing from
334 * the point we received the packet.
339 Ser2HSCR0 = HSCR0_HSSP | HSCR0_TXE;
344 static void sa1100_irda_fir_error(struct sa1100_irda *si, struct net_device *dev)
346 struct sk_buff *skb = si->dma_rx.skb;
348 unsigned int len, stat, data;
351 printk(KERN_ERR "sa1100_ir: SKB is NULL!\n");
356 * Get the current data position.
358 dma_addr = sa1100_get_dma_pos(si->dma_rx.regs);
359 len = dma_addr - sg_dma_address(&si->dma_rx.sg);
360 if (len > HPSIR_MAX_RXLEN)
361 len = HPSIR_MAX_RXLEN;
362 dma_unmap_sg(si->dev, &si->dma_rx.sg, 1, DMA_FROM_DEVICE);
366 * Read Status, and then Data.
372 if (stat & (HSSR1_CRE | HSSR1_ROR)) {
373 dev->stats.rx_errors++;
374 if (stat & HSSR1_CRE)
375 dev->stats.rx_crc_errors++;
376 if (stat & HSSR1_ROR)
377 dev->stats.rx_frame_errors++;
379 skb->data[len++] = data;
382 * If we hit the end of frame, there's
383 * no point in continuing.
385 if (stat & HSSR1_EOF)
387 } while (Ser2HSSR0 & HSSR0_EIF);
389 if (stat & HSSR1_EOF) {
390 si->dma_rx.skb = NULL;
394 skb_reset_mac_header(skb);
395 skb->protocol = htons(ETH_P_IRDA);
396 dev->stats.rx_packets++;
397 dev->stats.rx_bytes += len;
400 * Before we pass the buffer up, allocate a new one.
402 sa1100_irda_rx_alloc(si);
407 * Remap the buffer - it was previously mapped, and we
408 * hope that this succeeds.
410 dma_map_sg(si->dev, &si->dma_rx.sg, 1, DMA_FROM_DEVICE);
415 * We only have to handle RX events here; transmit events go via the TX
416 * DMA handler. We disable RX, process, and the restart RX.
418 static irqreturn_t sa1100_irda_fir_irq(struct net_device *dev, struct sa1100_irda *si)
423 sa1100_stop_dma(si->dma_rx.regs);
426 * Framing error - we throw away the packet completely.
427 * Clearing RXE flushes the error conditions and data
430 if (Ser2HSSR0 & (HSSR0_FRE | HSSR0_RAB)) {
431 dev->stats.rx_errors++;
433 if (Ser2HSSR0 & HSSR0_FRE)
434 dev->stats.rx_frame_errors++;
437 * Clear out the DMA...
439 Ser2HSCR0 = HSCR0_HSSP;
442 * Clear selected status bits now, so we
443 * don't miss them next time around.
445 Ser2HSSR0 = HSSR0_FRE | HSSR0_RAB;
449 * Deal with any receive errors. The any of the lowest
450 * 8 bytes in the FIFO may contain an error. We must read
451 * them one by one. The "error" could even be the end of
454 if (Ser2HSSR0 & HSSR0_EIF)
455 sa1100_irda_fir_error(si, dev);
458 * No matter what happens, we must restart reception.
460 sa1100_irda_rx_dma_start(si);
466 * Set the IrDA communications speed.
468 static int sa1100_irda_set_speed(struct sa1100_irda *si, int speed)
471 int brd, ret = -EINVAL;
474 case 9600: case 19200: case 38400:
475 case 57600: case 115200:
476 brd = 3686400 / (16 * speed) - 1;
479 * Stop the receive DMA.
482 sa1100_stop_dma(si->dma_rx.regs);
484 local_irq_save(flags);
487 Ser2HSCR0 = HSCR0_UART;
489 Ser2UTCR1 = brd >> 8;
493 * Clear status register
495 Ser2UTSR0 = UTSR0_REB | UTSR0_RBB | UTSR0_RID;
496 Ser2UTCR3 = UTCR3_RIE | UTCR3_RXE | UTCR3_TXE;
498 if (si->pdata->set_speed)
499 si->pdata->set_speed(si->dev, speed);
502 si->tx_start = sa1100_irda_sir_tx_start;
503 si->irq = sa1100_irda_sir_irq;
505 local_irq_restore(flags);
510 local_irq_save(flags);
513 Ser2HSCR0 = HSCR0_HSSP;
517 si->tx_start = sa1100_irda_fir_tx_start;
518 si->irq = sa1100_irda_fir_irq;
520 if (si->pdata->set_speed)
521 si->pdata->set_speed(si->dev, speed);
523 sa1100_irda_rx_alloc(si);
524 sa1100_irda_rx_dma_start(si);
526 local_irq_restore(flags);
538 * Control the power state of the IrDA transmitter.
541 * 1 - short range, lowest power
542 * 2 - medium range, medium power
543 * 3 - maximum range, high power
545 * Currently, only assabet is known to support this.
548 __sa1100_irda_set_power(struct sa1100_irda *si, unsigned int state)
551 if (si->pdata->set_power)
552 ret = si->pdata->set_power(si->dev, state);
557 sa1100_set_power(struct sa1100_irda *si, unsigned int state)
561 ret = __sa1100_irda_set_power(si, state);
568 static irqreturn_t sa1100_irda_irq(int irq, void *dev_id)
570 struct net_device *dev = dev_id;
571 struct sa1100_irda *si = netdev_priv(dev);
573 return si->irq(dev, si);
576 static int sa1100_irda_hard_xmit(struct sk_buff *skb, struct net_device *dev)
578 struct sa1100_irda *si = netdev_priv(dev);
579 int speed = irda_get_next_speed(skb);
582 * Does this packet contain a request to change the interface
583 * speed? If so, remember it until we complete the transmission
586 if (speed != si->speed && speed != -1)
587 si->newspeed = speed;
589 /* If this is an empty frame, we can bypass a lot. */
591 sa1100_irda_check_speed(si);
596 netif_stop_queue(dev);
598 /* We must not already have a skb to transmit... */
599 BUG_ON(si->dma_tx.skb);
601 return si->tx_start(skb, dev, si);
605 sa1100_irda_ioctl(struct net_device *dev, struct ifreq *ifreq, int cmd)
607 struct if_irda_req *rq = (struct if_irda_req *)ifreq;
608 struct sa1100_irda *si = netdev_priv(dev);
609 int ret = -EOPNOTSUPP;
613 if (capable(CAP_NET_ADMIN)) {
615 * We are unable to set the speed if the
616 * device is not running.
619 ret = sa1100_irda_set_speed(si,
622 printk("sa1100_irda_ioctl: SIOCSBANDWIDTH: !netif_running\n");
630 if (capable(CAP_NET_ADMIN)) {
631 irda_device_set_media_busy(dev, TRUE);
637 rq->ifr_receiving = IS_FIR(si) ? 0
638 : si->rx_buff.state != OUTSIDE_FRAME;
648 static int sa1100_irda_startup(struct sa1100_irda *si)
653 * Ensure that the ports for this device are setup correctly.
655 if (si->pdata->startup) {
656 ret = si->pdata->startup(si->dev);
662 * Configure PPC for IRDA - we want to drive TXD2 low.
663 * We also want to drive this pin low during sleep.
670 * Enable HP-SIR modulation, and ensure that the port is disabled.
673 Ser2HSCR0 = HSCR0_UART;
674 Ser2UTCR4 = si->utcr4;
675 Ser2UTCR0 = UTCR0_8BitData;
676 Ser2HSCR2 = HSCR2_TrDataH | HSCR2_RcDataL;
679 * Clear status register
681 Ser2UTSR0 = UTSR0_REB | UTSR0_RBB | UTSR0_RID;
683 ret = sa1100_irda_set_speed(si, si->speed = 9600);
688 if (si->pdata->shutdown)
689 si->pdata->shutdown(si->dev);
695 static void sa1100_irda_shutdown(struct sa1100_irda *si)
698 * Stop all DMA activity.
700 sa1100_stop_dma(si->dma_rx.regs);
701 sa1100_stop_dma(si->dma_tx.regs);
703 /* Disable the port. */
707 if (si->pdata->shutdown)
708 si->pdata->shutdown(si->dev);
711 static int sa1100_irda_start(struct net_device *dev)
713 struct sa1100_irda *si = netdev_priv(dev);
718 err = sa1100_request_dma(DMA_Ser2HSSPRd, "IrDA receive",
719 NULL, NULL, &si->dma_rx.regs);
723 err = sa1100_request_dma(DMA_Ser2HSSPWr, "IrDA transmit",
724 sa1100_irda_firtxdma_irq, dev,
730 * Setup the serial port for the specified speed.
732 err = sa1100_irda_startup(si);
737 * Open a new IrLAP layer instance.
739 si->irlap = irlap_open(dev, &si->qos, "sa1100");
744 err = request_irq(dev->irq, sa1100_irda_irq, 0, dev->name, dev);
749 * Now enable the interrupt and start the queue
752 sa1100_set_power(si, power_level); /* low power mode */
754 netif_start_queue(dev);
758 irlap_close(si->irlap);
761 sa1100_irda_shutdown(si);
763 sa1100_free_dma(si->dma_tx.regs);
765 sa1100_free_dma(si->dma_rx.regs);
770 static int sa1100_irda_stop(struct net_device *dev)
772 struct sa1100_irda *si = netdev_priv(dev);
775 netif_stop_queue(dev);
778 sa1100_irda_shutdown(si);
781 * If we have been doing any DMA activity, make sure we
782 * tidy that up cleanly.
784 skb = si->dma_rx.skb;
786 dma_unmap_sg(si->dev, &si->dma_rx.sg, 1,
789 si->dma_rx.skb = NULL;
792 skb = si->dma_tx.skb;
794 dma_unmap_sg(si->dev, &si->dma_tx.sg, 1,
797 si->dma_tx.skb = NULL;
802 irlap_close(si->irlap);
809 sa1100_free_dma(si->dma_tx.regs);
810 sa1100_free_dma(si->dma_rx.regs);
811 free_irq(dev->irq, dev);
813 sa1100_set_power(si, 0);
818 static int sa1100_irda_init_iobuf(iobuff_t *io, int size)
820 io->head = kmalloc(size, GFP_KERNEL | GFP_DMA);
821 if (io->head != NULL) {
823 io->in_frame = FALSE;
824 io->state = OUTSIDE_FRAME;
827 return io->head ? 0 : -ENOMEM;
830 static const struct net_device_ops sa1100_irda_netdev_ops = {
831 .ndo_open = sa1100_irda_start,
832 .ndo_stop = sa1100_irda_stop,
833 .ndo_start_xmit = sa1100_irda_hard_xmit,
834 .ndo_do_ioctl = sa1100_irda_ioctl,
837 static int sa1100_irda_probe(struct platform_device *pdev)
839 struct net_device *dev;
840 struct sa1100_irda *si;
841 unsigned int baudrate_mask;
844 if (!pdev->dev.platform_data)
847 irq = platform_get_irq(pdev, 0);
849 return irq < 0 ? irq : -ENXIO;
851 err = request_mem_region(__PREG(Ser2UTCR0), 0x24, "IrDA") ? 0 : -EBUSY;
854 err = request_mem_region(__PREG(Ser2HSCR0), 0x1c, "IrDA") ? 0 : -EBUSY;
857 err = request_mem_region(__PREG(Ser2HSCR2), 0x04, "IrDA") ? 0 : -EBUSY;
861 dev = alloc_irdadev(sizeof(struct sa1100_irda));
865 SET_NETDEV_DEV(dev, &pdev->dev);
867 si = netdev_priv(dev);
868 si->dev = &pdev->dev;
869 si->pdata = pdev->dev.platform_data;
871 sg_init_table(&si->dma_rx.sg, 1);
872 sg_init_table(&si->dma_tx.sg, 1);
875 * Initialise the HP-SIR buffers
877 err = sa1100_irda_init_iobuf(&si->rx_buff, 14384);
880 err = sa1100_irda_init_iobuf(&si->tx_buff, 4000);
884 dev->netdev_ops = &sa1100_irda_netdev_ops;
887 irda_init_max_qos_capabilies(&si->qos);
890 * We support original IRDA up to 115k2. (we don't currently
891 * support 4Mbps). Min Turn Time set to 1ms or greater.
893 baudrate_mask = IR_9600;
896 case 4000000: baudrate_mask |= IR_4000000 << 8;
897 case 115200: baudrate_mask |= IR_115200;
898 case 57600: baudrate_mask |= IR_57600;
899 case 38400: baudrate_mask |= IR_38400;
900 case 19200: baudrate_mask |= IR_19200;
903 si->qos.baud_rate.bits &= baudrate_mask;
904 si->qos.min_turn_time.bits = 7;
906 irda_qos_bits_to_value(&si->qos);
908 si->utcr4 = UTCR4_HPSIR;
910 si->utcr4 |= UTCR4_Z1_6us;
913 * Initially enable HP-SIR modulation, and ensure that the port
917 Ser2UTCR4 = si->utcr4;
918 Ser2HSCR0 = HSCR0_UART;
920 err = register_netdev(dev);
922 platform_set_drvdata(pdev, dev);
926 kfree(si->tx_buff.head);
927 kfree(si->rx_buff.head);
930 release_mem_region(__PREG(Ser2HSCR2), 0x04);
932 release_mem_region(__PREG(Ser2HSCR0), 0x1c);
934 release_mem_region(__PREG(Ser2UTCR0), 0x24);
940 static int sa1100_irda_remove(struct platform_device *pdev)
942 struct net_device *dev = platform_get_drvdata(pdev);
945 struct sa1100_irda *si = netdev_priv(dev);
946 unregister_netdev(dev);
947 kfree(si->tx_buff.head);
948 kfree(si->rx_buff.head);
952 release_mem_region(__PREG(Ser2HSCR2), 0x04);
953 release_mem_region(__PREG(Ser2HSCR0), 0x1c);
954 release_mem_region(__PREG(Ser2UTCR0), 0x24);
961 * Suspend the IrDA interface.
963 static int sa1100_irda_suspend(struct platform_device *pdev, pm_message_t state)
965 struct net_device *dev = platform_get_drvdata(pdev);
966 struct sa1100_irda *si;
971 si = netdev_priv(dev);
974 * Stop the transmit queue
976 netif_device_detach(dev);
977 disable_irq(dev->irq);
978 sa1100_irda_shutdown(si);
979 __sa1100_irda_set_power(si, 0);
986 * Resume the IrDA interface.
988 static int sa1100_irda_resume(struct platform_device *pdev)
990 struct net_device *dev = platform_get_drvdata(pdev);
991 struct sa1100_irda *si;
996 si = netdev_priv(dev);
999 * If we missed a speed change, initialise at the new speed
1000 * directly. It is debatable whether this is actually
1001 * required, but in the interests of continuing from where
1002 * we left off it is desirable. The converse argument is
1003 * that we should re-negotiate at 9600 baud again.
1006 si->speed = si->newspeed;
1010 sa1100_irda_startup(si);
1011 __sa1100_irda_set_power(si, si->power);
1012 enable_irq(dev->irq);
1015 * This automatically wakes up the queue
1017 netif_device_attach(dev);
1023 #define sa1100_irda_suspend NULL
1024 #define sa1100_irda_resume NULL
1027 static struct platform_driver sa1100ir_driver = {
1028 .probe = sa1100_irda_probe,
1029 .remove = sa1100_irda_remove,
1030 .suspend = sa1100_irda_suspend,
1031 .resume = sa1100_irda_resume,
1033 .name = "sa11x0-ir",
1034 .owner = THIS_MODULE,
1038 static int __init sa1100_irda_init(void)
1041 * Limit power level a sensible range.
1043 if (power_level < 1)
1045 if (power_level > 3)
1048 return platform_driver_register(&sa1100ir_driver);
1051 static void __exit sa1100_irda_exit(void)
1053 platform_driver_unregister(&sa1100ir_driver);
1056 module_init(sa1100_irda_init);
1057 module_exit(sa1100_irda_exit);
1058 module_param(power_level, int, 0);
1059 module_param(tx_lpm, int, 0);
1060 module_param(max_rate, int, 0);
1062 MODULE_AUTHOR("Russell King <rmk@arm.linux.org.uk>");
1063 MODULE_DESCRIPTION("StrongARM SA1100 IrDA driver");
1064 MODULE_LICENSE("GPL");
1065 MODULE_PARM_DESC(power_level, "IrDA power level, 1 (low) to 3 (high)");
1066 MODULE_PARM_DESC(tx_lpm, "Enable transmitter low power (1.6us) mode");
1067 MODULE_PARM_DESC(max_rate, "Maximum baud rate (4000000, 115200, 57600, 38400, 19200, 9600)");
1068 MODULE_ALIAS("platform:sa11x0-ir");