Dear Fabio, In message <caomzo5attujk_tvs94n6evtkndozvrh9nxye0uhpj3scq90...@mail.gmail.com> you wrote: > > Ok, the issue is due to endianness: on LS1021 the watchdog is > big-endian, so that's why we can't use clrsetbits_le16(). ... > + int reg; > > - clrsetbits_le16(&wdog->wcr, 0, WCR_WDE); > + reg = readw(&wdog->wcr); > + reg |= WCR_WDE; > + writew(reg, &wdog->wcr);
But this is broken. We have the clrsetbits() [*] macros exactly to avoid such code. [*] resp. setbits() - using clrsetbits*() with 0 as clear mask is a stupid thing to do anyway. 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: w...@denx.de It is wrong always, everywhere and for everyone to believe anything upon insufficient evidence. - W. K. Clifford, British philosopher, circa 1876 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot