Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 230572
b: refs/heads/master
c: 540ac55
h: refs/heads/master
v: v3
  • Loading branch information
Michael Hennerich authored and Ben Dooks committed Jan 12, 2011
1 parent 8862c39 commit 5dcbae6
Show file tree
Hide file tree
Showing 11 changed files with 83 additions and 1,064 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: adeaf46d311715deee9ae38ef1edb0d6b6fb0d55
refs/heads/master: 540ac5553e8169413a90a8e68b3a10f801640eb7
8 changes: 0 additions & 8 deletions trunk/drivers/i2c/busses/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -638,14 +638,6 @@ config I2C_XILINX
This driver can also be built as a module. If so, the module
will be called xilinx_i2c.

config I2C_EG20T
tristate "PCH I2C of Intel EG20T"
depends on PCI
help
This driver is for PCH(Platform controller Hub) I2C of EG20T which
is an IOH(Input/Output Hub) for x86 embedded processor.
This driver can access PCH I2C bus device.

comment "External I2C/SMBus adapter drivers"

config I2C_PARPORT
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/i2c/busses/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ obj-$(CONFIG_I2C_STU300) += i2c-stu300.o
obj-$(CONFIG_I2C_VERSATILE) += i2c-versatile.o
obj-$(CONFIG_I2C_OCTEON) += i2c-octeon.o
obj-$(CONFIG_I2C_XILINX) += i2c-xiic.o
obj-$(CONFIG_I2C_EG20T) += i2c-eg20t.o

# External I2C/SMBus adapter drivers
obj-$(CONFIG_I2C_PARPORT) += i2c-parport.o
Expand Down
22 changes: 22 additions & 0 deletions trunk/drivers/i2c/busses/i2c-bfin-twi.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/completion.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/delay.h>

#include <asm/blackfin.h>
#include <asm/portmux.h>
Expand Down Expand Up @@ -159,6 +160,27 @@ static void bfin_twi_handle_interrupt(struct bfin_twi_iface *iface,
if (mast_stat & BUFWRERR)
dev_dbg(&iface->adap.dev, "Buffer Write Error\n");

/* Faulty slave devices, may drive SDA low after a transfer
* finishes. To release the bus this code generates up to 9
* extra clocks until SDA is released.
*/

if (read_MASTER_STAT(iface) & SDASEN) {
int cnt = 9;
do {
write_MASTER_CTL(iface, SCLOVR);
udelay(6);
write_MASTER_CTL(iface, 0);
udelay(6);
} while ((read_MASTER_STAT(iface) & SDASEN) && cnt--);

write_MASTER_CTL(iface, SDAOVR | SCLOVR);
udelay(6);
write_MASTER_CTL(iface, SDAOVR);
udelay(6);
write_MASTER_CTL(iface, 0);
}

/* If it is a quick transfer, only address without data,
* not an err, return 1.
*/
Expand Down
Loading

0 comments on commit 5dcbae6

Please sign in to comment.