[U-Boot] [ANN] U-Boot v2015.10-rc4 released

Wolfgang Denk wd at denx.de
Thu Oct 1 16:22:05 CEST 2015


Dear Fabio,

In message <CAOMZO5ATtUjk_TVS94N6evTKndozVRH9nXyE0UHPJ3sCQ906Zg at 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: wd at denx.de
It is wrong always, everywhere and for everyone to  believe  anything
upon  insufficient  evidence.  - W. K. Clifford, British philosopher,
circa 1876


More information about the U-Boot mailing list