From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Thu, 1 Oct 2015 15:14:34 -0400 Subject: [U-Boot] ls1021atwr reset issue (was [ANN] U-Boot v2015.10-rc4 released) In-Reply-To: References: <560C1233.3000300@writeme.com> <560C18FC.2000501@freescale.com> <560C1A4D.3070509@writeme.com> <560C23B5.7060104@writeme.com> <560C2AFF.4080502@writeme.com> <560D4F05.5030901@writeme.com> Message-ID: <20151001191434.GA3829@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, Oct 01, 2015 at 04:09:46PM -0300, Fabio Estevam wrote: > On Thu, Oct 1, 2015 at 12:19 PM, Sinan Akman wrote: > > I took a further look at this. I believe this won't work as readw > > will now return the data in the wrong endianness. I think Wolfgang > > also already pointed out at this. We would need to use the macro with > > correct endianness for different platforms (ls1021atwr would need > > big endian) and control this based on the watchdog endian setting in dts. > > The imx platforms do not use dts in U-boot yet. > > > > > However, there seems to be other problems here. The original > > fix was intending to preserve the current set bits in wcr and > > enable DTE. But in the case of ls1021atwr, the watcdog is not > > initialized and out of reset we have SRS bit is set. This would > > disable wdog_rst and prevent reset from working. Before the > > fix it was actually the accidental setting of SRS to zero made > > the reset working because a writew(WCR_WDE, &wdog->wcr) > > would clear that bit, setting WDE alone would not generate wdog_rst. > > > > So I believe a proper fix would have the following steps : > > - move watchdog driver to DM so that we can make use of endian type > > - use macros with the endian type for accessing the registers > > - enable hw_watchdog for the board so that it gets initialized to > > a known value > > - reset SRS to enable generation of wdog_rst, this will reset immediately > > with 0x00 default WT value. > > - or program the timeout and enable WDE so the board > > resets after a longer timeout value if desired > > > > Does this make sense to everyone ? > > Looks good. 2015.10 release is only a few days away: do you think you > could implement your proposal for the upcoming release? That seems rather large. Is there something we can revert today so that: a) All boards in v2015.07 continue to work in v2015.10 as well as before b) Any new boards are not introduced in a totally broken state? -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: