From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Wed, 29 Jun 2011 08:35:20 +0200 Subject: [U-Boot] [PATCH] OMAP[34]: fix broken timer In-Reply-To: <1293496390-13372-1-git-send-email-john.rigby@linaro.org> References: <1293496390-13372-1-git-send-email-john.rigby@linaro.org> Message-ID: <4E0AC7A8.2010802@aribaud.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi John, Le 28/12/2010 01:33, John Rigby a ?crit : > As implemented now the timer used to implement __udelay counts > to 0xffffffff and then gets stuck there because the the programmed > reload value is 0xffffffff. This value is not only wrong but > illegal according to the reference manual. > > One can reproduce the bug by leaving a board at the u-boot prompt > for sometime then issuing a sleep command. The sleep will hang > forever. > > The timer is a count up timer that reloads as it rolls over > from 0xffffffff so the correct load value is 0. > > Change TIMER_LOAD_VAL from 0xffffffff to 0 and introduce > a new constant called TIMER_OVERFLOW_VAL set to 0xffffffff. > > Signed-off-by: John Rigby Applied to u-boot-arm/master, thanks. Amicalement, -- Albert.