[aadk-commits] dbailey: uClinux/trunk r197 - in
/uClinux/trunk/uClinux-dist/linux-2.6.x/driv...
aadk-commits at lists.digium.com
aadk-commits at lists.digium.com
Fri Mar 2 14:16:40 MST 2007
Author: dbailey
Date: Fri Mar 2 15:16:39 2007
New Revision: 197
URL: http://svn.digium.com/view/aadk?view=rev&rev=197
Log:
Changed the sx00i so that it can work without the SPI_MMC module being compiled into the build
Changed the I2C interface to timeout more quickly when talking to an I2C device
Modified:
uClinux/trunk/uClinux-dist/linux-2.6.x/drivers/i2c/busses/i2c-bfin-twi.c
uClinux/trunk/uClinux-dist/linux-2.6.x/drivers/zaptel/sx00i.c
Modified: uClinux/trunk/uClinux-dist/linux-2.6.x/drivers/i2c/busses/i2c-bfin-twi.c
URL: http://svn.digium.com/view/aadk/uClinux/trunk/uClinux-dist/linux-2.6.x/drivers/i2c/busses/i2c-bfin-twi.c?view=diff&rev=197&r1=196&r2=197
==============================================================================
--- uClinux/trunk/uClinux-dist/linux-2.6.x/drivers/i2c/busses/i2c-bfin-twi.c (original)
+++ uClinux/trunk/uClinux-dist/linux-2.6.x/drivers/i2c/busses/i2c-bfin-twi.c Fri Mar 2 15:16:39 2007
@@ -28,11 +28,12 @@
#include <asm/irq.h>
#define I2C_BFIN_TWI 0x00
-#define POLL_TIMEOUT (2*HZ)
+#define POLL_TIMEOUT (1*HZ)/4
#ifndef CONFIG_TWICLK_KHZ
#define CONFIG_TWICLK_KHZ 400
#endif
+#define I2C_XFER_TIMEOUT_COUNT 3
/* SMBus mode*/
#define TWI_I2C_MODE_STANDARD 0x01
#define TWI_I2C_MODE_STANDARDSUB 0x02
@@ -226,7 +227,7 @@
iface->transPtr = pmsg->buf;
iface->writeNum = iface->readNum = pmsg->len;
iface->result = 0;
- iface->timeout_count = 10;
+ iface->timeout_count = I2C_XFER_TIMEOUT_COUNT;
/* Set Transmit device address */
bfin_write_TWI_MASTER_ADDR(pmsg->addr);
@@ -376,7 +377,7 @@
iface->manual_stop = 0;
iface->read_write = read_write;
iface->command = command;
- iface->timeout_count = 10;
+ iface->timeout_count = I2C_XFER_TIMEOUT_COUNT;
/* FIFO Initiation. Data in FIFO should be discarded before start a new operation.*/
bfin_write_TWI_FIFO_CTL(0x3);
Modified: uClinux/trunk/uClinux-dist/linux-2.6.x/drivers/zaptel/sx00i.c
URL: http://svn.digium.com/view/aadk/uClinux/trunk/uClinux-dist/linux-2.6.x/drivers/zaptel/sx00i.c?view=diff&rev=197&r1=196&r2=197
==============================================================================
--- uClinux/trunk/uClinux-dist/linux-2.6.x/drivers/zaptel/sx00i.c (original)
+++ uClinux/trunk/uClinux-dist/linux-2.6.x/drivers/zaptel/sx00i.c Fri Mar 2 15:16:39 2007
@@ -32,6 +32,7 @@
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/sched.h>
+#include <linux/autoconf.h>
#include <asm/blackfin.h>
#include <asm/cacheflush.h>
@@ -274,8 +275,14 @@
extern spinlock_t spilock;
-extern int mtd_spiinuse;
+extern int mtd_spiinuse; /* MTD device will always be present (for now)*/
+
+/* Handle option of MMC SPI Module */
+#if defined(CONFIG_SPI_MMC_MODULE) || defined(CONFIG_SPI_MMC)
extern int mmc_spiinuse;
+#else
+int mmc_spiinuse = 0; /* No SPI_MMC, always satisfy that its not in use */
+#endif
struct calregs {
unsigned char vals[NUM_CAL_REGS];
More information about the aadk-commits
mailing list