* m68k i2c driver fixes
@ 2009-02-09 22:52 Bart Veer
0 siblings, 0 replies; only message in thread
From: Bart Veer @ 2009-02-09 22:52 UTC (permalink / raw)
To: ecos-patches
This removes a spurious big of diagnostics code, and fixes a bug
reported quite some time ago.
Bart
2009-02-09 Bart Veer <bartv@ecoscentric.com>
* src/i2c_mcf52xx.c (mcf52xx_i2c_isr): handle RXAK error
condition, reported by Rainer Arndt.
* src/i2c_mcf52xx.c (cyg_mcf52xx_i2c_tx): remove spurious
diag_printf().
Index: src/i2c_mcf52xx.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/i2c/m68k/mcf52xx/current/src/i2c_mcf52xx.c,v
retrieving revision 1.2
diff -u -p -r1.2 i2c_mcf52xx.c
--- src/i2c_mcf52xx.c 29 Jan 2009 17:48:33 -0000 1.2
+++ src/i2c_mcf52xx.c 9 Feb 2009 22:49:01 -0000
@@ -163,7 +163,7 @@ mcf52xx_i2c_isr(cyg_vector_t vec, cyg_ad
} else if (CYG_MCF52xx_I2C_XFER_MODE_STARTRX == extra->i2c_mode) {
// Start followed by RX. The address byte has been sent, we
// need to switch to receiving.
- if (sr & HAL_MCF52xx_I2C_SR_IAL) {
+ if (sr & (HAL_MCF52xx_I2C_SR_IAL | HAL_MCF52xx_I2C_SR_RXAK)) {
// Looks like no device acknowledged the address.
result = CYG_ISR_HANDLED | CYG_ISR_CALL_DSR;
} else {
@@ -367,7 +367,6 @@ cyg_mcf52xx_i2c_tx(const cyg_i2c_device*
if (send_start) {
extra->i2c_data.i2c_tx_data = tx_data;
if (! mcf52xx_i2c_send_start(extra, (dev->i2c_address << 1) | 0x00)) {
- diag_printf("send_start failed\n");
return 0;
}
mcf52xx_i2c_doit(extra);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-02-09 22:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-09 22:52 m68k i2c driver fixes Bart Veer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).