From b63ac1e31422077bed8257a519c6668f8868ed2b Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Fri, 9 Apr 2010 13:20:57 +0300 Subject: OMAP: DSS2: DSI: handle error in synchronous write Check if the peripheral answered something, and if so, dump the data and return an error. Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/dss/dsi.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/video/omap2') diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 767f6fb2bdf..5b621767455 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -2089,6 +2089,13 @@ int dsi_vc_dcs_write(int channel, u8 *data, int len) if (r) goto err; + if (REG_GET(DSI_VC_CTRL(channel), 20, 20)) { /* RX_FIFO_NOT_EMPTY */ + DSSERR("rx fifo not empty after write, dumping data:\n"); + dsi_vc_flush_receive_data(channel); + r = -EIO; + goto err; + } + return 0; err: DSSERR("dsi_vc_dcs_write(ch %d, cmd 0x%02x, len %d) failed\n", -- cgit v1.2.3-70-g09d2