aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@nokia.com>2010-04-09 06:20:57 -0400
committerTomi Valkeinen <tomi.valkeinen@nokia.com>2010-08-03 08:18:47 -0400
commitb63ac1e31422077bed8257a519c6668f8868ed2b (patch)
treeb61b3fb7f248da4bce2a105f4dc76a3760d189ca
parent0c244f770f7fdb3e6779b3433aac9cfb6deb3255 (diff)
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 <tomi.valkeinen@nokia.com>
-rw-r--r--drivers/video/omap2/dss/dsi.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 767f6fb2bdfa..5b6217674559 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)
2089 if (r) 2089 if (r)
2090 goto err; 2090 goto err;
2091 2091
2092 if (REG_GET(DSI_VC_CTRL(channel), 20, 20)) { /* RX_FIFO_NOT_EMPTY */
2093 DSSERR("rx fifo not empty after write, dumping data:\n");
2094 dsi_vc_flush_receive_data(channel);
2095 r = -EIO;
2096 goto err;
2097 }
2098
2092 return 0; 2099 return 0;
2093err: 2100err:
2094 DSSERR("dsi_vc_dcs_write(ch %d, cmd 0x%02x, len %d) failed\n", 2101 DSSERR("dsi_vc_dcs_write(ch %d, cmd 0x%02x, len %d) failed\n",