From af573a5b67191c0931a145387c472b18112edcf1 Mon Sep 17 00:00:00 2001 From: Imre Deak Date: Tue, 21 Mar 2006 13:55:33 -0400 Subject: [PATCH] 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 --- drivers/video/omap/sossi.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; -- 2.41.0