Dear Tom, In message <20140325200435.GV16360@bill-the-cat> you wrote: > > But as Wolfgang's v4 shows, it's also not hard to just call > clrsetbits_le32 directly. Arguably the cases where mask==1 we should > just call setbits_le32 but that's not a big deal.
We would have to call setbits_le32() or clrbits_le32() depending on the arguments... I was already about to rewrite the code more in the style previously used, i. e. turn for example 134 clrsetbits_le32(reg, 1 << TRI_SHIFT(pin), 135 (tri == PMUX_TRI_TRISTATE) << TRI_SHIFT(pin)); back into if (tri == PMUX_TRI_TRISTATE) setbits_le32(reg, 1 << TRI_SHIFT(pin)); else clrbits_le32(reg, 1 << TRI_SHIFT(pin)); but then I decided to keep the changes copmpared to the update_reg_mask_shift_val() version minimal. If the if/then version should be preferred, I can easily redo that patch. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de No, I'm not going to explain it. If you can't figure it out, you didn't want to know anyway... :-) - Larry Wall in <1991aug7.180856.2...@netlabs.com> _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot