From: Wolfgang Denk Date: Fri, 02 Oct 2015 06:30:33 +0200 Subject: [U-Boot] [PATCH] Revert "imx: wdog: correct wcr register settings" In-Reply-To: References: <1443727970-10347-1-git-send-email-festevam@gmail.com> <20151001201143.865D8380905@gemini.denx.de> <20151001205008.732FB3822C0@gemini.denx.de> Message-ID: <20151002043033.1486D3822C0@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Fabio, In message you wrote: > > > So both clrsetbits_le16() and writew() are little endian accessors. > > In which way would one write other data to the device than the other? > > Yes, you are right. > > The issue seems to be related to the effect of writing doing > 'writew(WCR_WDE, &wdog->wcr)', which writes 0x40 to the register WCR > versus 'clrsetbits_le16(&wdog->wcr, 0, WCR_WDE)' which only enables > the WDE bit. But if we agree that both are LE accessors, and that the register is BE, then how does it work at all - we would be writing the wrong bit? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "Ja, mach' nur einen Plan, sei nur ein grosses Licht und mach' dann noch 'nen zweiten Plan, geh'n tun sie beide nicht." -- Bert Brecht, Dreigroschenoper