linux-cvs-patches
[Top] [All Lists]

CVS Update@linux-mips.org: linux

To: linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
From: ppopov@linux-mips.org
Date: Fri, 11 Feb 2005 19:49:10 +0000
Reply-to: linux-mips@linux-mips.org
Sender: linux-cvs-patches-bounce@linux-mips.org
CVSROOT:        /home/cvs
Module name:    linux
Changes by:     ppopov@ftp.linux-mips.org       05/02/11 19:49:04

Modified files:
        drivers/i2c    : Tag: linux_2_4 Config.in Makefile 
                         i2c-algo-au1550.c i2c-au1550.c 

Log message:
        This patch enhances the support for the AMD Alchemy PSC SMBUS controller
        for the Au1200 and Au1550.

diff -urN linux/drivers/i2c/Config.in linux/drivers/i2c/Config.in
--- linux/drivers/i2c/Attic/Config.in   2004/07/07 00:38:02     1.7.2.8
+++ linux/drivers/i2c/Attic/Config.in   2005/02/11 19:49:04     1.7.2.9
@@ -58,8 +58,8 @@
       dep_tristate 'I2C SGI interfaces' CONFIG_I2C_ALGO_SGI $CONFIG_I2C
    fi
 
-   if [ "$CONFIG_SOC_AU1550" = "y" ]; then
-      dep_tristate 'Au1550 SMBus interface' CONFIG_I2C_ALGO_AU1550 $CONFIG_I2C
+   if [ "$CONFIG_SOC_AU1550" = "y" -o "$CONFIG_SOC_AU1200" ]; then
+      dep_tristate 'Au1550/Au1200 SMBus interface' CONFIG_I2C_ALGO_AU1550 
$CONFIG_I2C
    fi
  
 # This is needed for automatic patch generation: sensors code starts here
diff -urN linux/drivers/i2c/Makefile linux/drivers/i2c/Makefile
--- linux/drivers/i2c/Makefile  2004/07/07 00:38:02     1.8.2.5
+++ linux/drivers/i2c/Makefile  2005/02/11 19:49:04     1.8.2.6
@@ -6,7 +6,7 @@
 
 export-objs    := i2c-core.o i2c-algo-bit.o i2c-algo-pcf.o \
                   i2c-algo-ite.o i2c-algo-sibyte.o i2c-algo-sgi.o \
-                  i2c-algo-au1550.o i2c-proc.o
+                  i2c-algo-au1550.o i2c-proc.o i2c-au1550.o
 
 obj-$(CONFIG_I2C)              += i2c-core.o
 obj-$(CONFIG_I2C_CHARDEV)      += i2c-dev.o
diff -urN linux/drivers/i2c/i2c-algo-au1550.c 
linux/drivers/i2c/i2c-algo-au1550.c
--- linux/drivers/i2c/Attic/i2c-algo-au1550.c   2004/09/18 22:07:37     1.1.2.2
+++ linux/drivers/i2c/Attic/i2c-algo-au1550.c   2005/02/11 19:49:04     1.1.2.3
@@ -14,7 +14,6 @@
 #include <linux/delay.h>
 
 #include <asm/au1000.h>
-#include <asm/pb1550.h>
 #include <asm/au1xxx_psc.h>
 
 #include <linux/i2c.h>
@@ -304,17 +303,17 @@
        /* Divide by 8 to get a 6.25 MHz clock.  The later protocol
         * timings are based on this clock.
         */
-       sp->psc_smbcfg |= PSC_SMBCFG_SET_DIV(PSC_SMBCFG_DIV8);
+       sp->psc_smbcfg |= PSC_SMBCFG_SET_DIV(PSC_SMBCFG_DIV2);
        sp->psc_smbmsk = PSC_SMBMSK_ALLMASK;
        au_sync();
 
        /* Set the protocol timer values.  See Table 71 in the
         * Au1550 Data Book for standard timing values.
         */
-       sp->psc_smbtmr = PSC_SMBTMR_SET_TH(0) | PSC_SMBTMR_SET_PS(15) | \
-               PSC_SMBTMR_SET_PU(15) | PSC_SMBTMR_SET_SH(15) | \
-               PSC_SMBTMR_SET_SU(15) | PSC_SMBTMR_SET_CL(15) | \
-               PSC_SMBTMR_SET_CH(15);
+       sp->psc_smbtmr = PSC_SMBTMR_SET_TH(2) | PSC_SMBTMR_SET_PS(15) | \
+               PSC_SMBTMR_SET_PU(11) | PSC_SMBTMR_SET_SH(11) | \
+               PSC_SMBTMR_SET_SU(11) | PSC_SMBTMR_SET_CL(15) | \
+               PSC_SMBTMR_SET_CH(11);
        au_sync();
 
        sp->psc_smbcfg |= PSC_SMBCFG_DE_ENABLE;
diff -urN linux/drivers/i2c/i2c-au1550.c linux/drivers/i2c/i2c-au1550.c
--- linux/drivers/i2c/Attic/i2c-au1550.c        2004/09/18 22:07:37     1.1.2.2
+++ linux/drivers/i2c/Attic/i2c-au1550.c        2005/02/11 19:49:04     1.1.2.3
@@ -28,12 +28,25 @@
 #include <linux/errno.h>
 
 #include <asm/au1000.h>
-#include <asm/pb1550.h>
 #include <asm/au1xxx_psc.h>
+#if defined( CONFIG_MIPS_PB1550 )
+       #include <asm/pb1550.h>
+#endif
+#if defined( CONFIG_MIPS_PB1200 )
+       #include <asm/pb1200.h>
+#endif
+#if defined( CONFIG_MIPS_DB1200 )
+       #include <asm/db1200.h>
+#endif
+#if defined( CONFIG_MIPS_FICMMP )
+       #include <asm/ficmmp.h>
+#endif
 
 #include <linux/i2c.h>
 #include <linux/i2c-algo-au1550.h>
 
+
+
 static int
 pb1550_reg(struct i2c_client *client)
 {
@@ -81,7 +94,6 @@
 int __init
 i2c_pb1550_init(void)
 {
-
        /* This is where we would set up a 50MHz clock source
         * and routing.  On the Pb1550, the SMBus is PSC2, which
         * uses a shared clock with USB.  This has been already
@@ -116,6 +128,14 @@
        return pb1550_board_adapter.algo->master_xfer(&pb1550_board_adapter, 
&wm_i2c_msg, 1);
 }
 
+/* the next function is needed by DVB driver. */
+int pb1550_i2c_xfer(struct i2c_msg msgs[], int num)
+{
+    return pb1550_board_adapter.algo->master_xfer(&pb1550_board_adapter, msgs, 
num);
+}
+
+EXPORT_SYMBOL(pb1550_wm_codec_write);
+EXPORT_SYMBOL(pb1550_i2c_xfer);
 
 MODULE_AUTHOR("Dan Malek, Embedded Edge, LLC.");
 MODULE_DESCRIPTION("SMBus adapter Alchemy pb1550");

<Prev in Thread] Current Thread [Next in Thread>