[U-Boot] [PATCH] Revert "imx: wdog: correct wcr register settings"

Wolfgang Denk wd at denx.de
Fri Oct 2 06:30:33 CEST 2015


Dear Fabio,

In message <CAOMZO5CAQXVzpX9mW7uHKB98JnMBeuT3ZjiUe4-V4=adjRk0zg at mail.gmail.com> 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


More information about the U-Boot mailing list