Patchwork [U-Boot,4/4] km/common: i2c deblock: enabled print of i2c deblock status

login
register
mail settings
Submitter Holger Brunck
Date July 5, 2011, 8:24 a.m.
Message ID <1309854242-11354-5-git-send-email-holger.brunck@keymile.com>
Download mbox | patch
Permalink /patch/103216/
State Accepted
Commit c7506c2b0325efc5c586425feca9f0e567f2e8b4
Headers show

Comments

Holger Brunck - July 5, 2011, 8:24 a.m.
From: Stefan Bigler <stefan.bigler@keymile.com>

Enable printout of i2c deblocking status if chips were in block
state or deblocking failed.

Signed-off-by: Stefan Bigler <stefan.bigler@keymile.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
---
 board/keymile/common/common.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
Wolfgang Denk - July 28, 2011, 1:40 p.m.
Dear Holger Brunck,

In message <1309854242-11354-5-git-send-email-holger.brunck@keymile.com> you wrote:
> From: Stefan Bigler <stefan.bigler@keymile.com>
> 
> Enable printout of i2c deblocking status if chips were in block
> state or deblocking failed.
> 
> Signed-off-by: Stefan Bigler <stefan.bigler@keymile.com>
> cc: Valentin Longchamp <valentin.longchamp@keymile.com>
> cc: Heiko Schocher <hs@denx.de>
> cc: Wolfgang Denk <wd@denx.de>
> ---
>  board/keymile/common/common.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/board/keymile/common/common.c b/board/keymile/common/common.c
index 7f388e1..fce9d58 100644
--- a/board/keymile/common/common.c
+++ b/board/keymile/common/common.c
@@ -139,6 +139,7 @@  int i2c_make_abort(void)
 			sda_state = get_sda();
 			if (scl_state && sda_state) {
 				ret = 0;
+				printf("[INFO] i2c abort after %d clocks\n", i);
 				break;
 			}
 		}
@@ -146,6 +147,8 @@  int i2c_make_abort(void)
 	if (ret == 0)
 		for (i = 0; i < 5; i++)
 			i2c_write_start_seq();
+	else
+		printf("[ERROR] i2c abort failed\n");
 
 	/* respect stop setup time */
 	udelay(DELAY_ABORT_SEQ);