Hi,

Just wanted to submit a patch to add IrCCv2.0 chipset support for SMC driver.
Works OK in SIR mode, I will test it in MIR/FIR mode end of the week.

This patch is for 2.2.12. Another one for 2.3.x will come soon.




--- linux-2.2.12/drivers/net/irda/smc-ircc.c    Wed Aug 18 03:24:38 1999 
+++ linux/drivers/net/irda/smc-ircc.c.IrCC2     Wed Aug 18 03:42:26 1999 
@@ -6,8 +6,8 @@
  * Status:        Experimental.
  * Author:        Thomas Davis ([EMAIL PROTECTED]) 
  * Created at:    
- * Modified at:   Wed May 19 15:30:08 1999
- * Modified by:   Dag Brattli <[EMAIL PROTECTED]> 
+ * Modified at:   Thu Jun 10 22:56:27 MST 1999
+ * Modified by:   Stephane Fillod <[EMAIL PROTECTED]>
  * 
  *     Copyright (c) 1998-1999 Thomas Davis, All Rights Reserved. 
  *      
@@ -19,7 +19,7 @@
  *     I, Thomas Davis, admit no liability nor provide warranty for any
  *     of this software. This material is provided "AS-IS" and at no 
charge. 
  *
- *     Applicable Models : Fujitsu Lifebook 635t
+ *     Applicable Models : Fujitsu Lifebook 635t, 270Dx
  *                        Sony PCG-505TX (gets DMA wrong.) 
  *
  ********************************************************************/
@@ -54,14 +54,16 @@

 #define CHIP_IO_EXTENT 8

-static unsigned int io[]  = { 0x2e8, 0x140, ~0, ~0 }; 
-static unsigned int io2[] = { 0x2f8, 0x3e8, 0, 0}; 
+static unsigned int io[]  = { 0x2e8, 0x140, 0x118, ~0 }; 
+static unsigned int io2[] = { 0x2f8, 0x3e8, 0x2e8, 0};

 static struct ircc_cb *dev_self[] = { NULL, NULL, NULL, NULL};

 /* Some prototypes */
 static int  ircc_open( int i, unsigned int iobase, unsigned int 
board_addr);
+#ifdef MODULE
 static int  ircc_close( struct irda_device *idev);
+#endif /* MODULE */
 static int  ircc_probe( int iobase, int board_addr); 
 static int  ircc_dma_receive( struct irda_device *idev); 
 static int  ircc_dma_receive_complete(struct irda_device *idev, int 
iobase);
@@ -266,6 +268,7 @@
  *    Close driver instance
  *
  */
+#ifdef MODULE
 static int ircc_close( struct irda_device *idev) 
 {
        int iobase;
@@ -306,6 +309,7 @@
        DEBUG( ircc_debug, "--> " __FUNCTION__ "\n"); 
        return 0;
 }
+#endif /* MODULE */

 /*
  * Function ircc_probe (iobase, board_addr, irq, dma)
@@ -329,10 +333,10 @@
        irq = config >> 4 & 0x0f;
        dma = config & 0x0f;

-       if (high == 0x10 && low == 0xb8 && chip == 0xf1) {
-               DEBUG(0, "SMC IrDA Controller found; version = %d, "
+       if (high == 0x10 && low == 0xb8 && (chip == 0xf1 || chip == 0xf2)) 
{ 
+               DEBUG(0, "SMC IrDA Controller found; IrCC version %d.%d, "
                      "port 0x%04x, dma %d, interrupt %d\n",
-                     version, iobase, dma, irq);
+                     chip & 0x0f, version, iobase, dma, irq);
        } else {
                return -1;
        }



_______________________________________________
Linux-IrDA mailing list  -  [EMAIL PROTECTED]
http://www.pasta.cs.UiT.No/mailman/listinfo/linux-irda

Reply via email to