From: Imre Deak Date: Tue, 21 Mar 2006 17:55:33 +0000 (-0400) Subject: ARM: OMAP: SoSSI: workaround for HW timing bug X-Git-Tag: v2.6.16-omap1~29 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=af573a5b67191c0931a145387c472b18112edcf1;hp=e6f0b20e67dda73fe665210fc7bc238fa54ae42d;p=linux-2.6-omap-h63xx.git ARM: OMAP: SoSSI: workaround for HW timing bug Certain HW timings can render the SoSSI block dead. This can happen when the SoSSI TW1 value is less then 3 and we are trying to read the SoSSI FIFO. At this point SoSSI goes haywire and return 0 for all its registers. This patch will set a minimum limit of 3 on TW1. Signed-off-by: Imre Deak Signed-off-by: Juha Yrjola --- diff --git a/drivers/video/omap/sossi.c b/drivers/video/omap/sossi.c index 986f639f588..6e8142ba5f7 100644 --- a/drivers/video/omap/sossi.c +++ b/drivers/video/omap/sossi.c @@ -240,6 +240,9 @@ static int calc_rd_timings(struct extif_timings *t) recyc = reoff + 1; tw1 = recyc - reoff; + /* values less then 3 result in the SOSSI block resetting itself */ + if (tw1 < 3) + tw1 = 3; if (tw1 > 0x40) return -1; @@ -284,6 +287,9 @@ static int calc_wr_timings(struct extif_timings *t) wecyc = weoff + 1; tw1 = wecyc - weoff; + /* values less then 3 result in the SOSSI block resetting itself */ + if (tw1 < 3) + tw1 = 3; if (tw1 > 0x40) return -1;