On Wed, Feb 06, 2019 at 04:55:54PM -0800, Andrey Smirnov wrote: > On Tue, Feb 5, 2019 at 11:49 PM Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> wrote: > > +static inline void esdhc_clrbits32(struct fsl_esdhc_host *host, unsigned int reg, > > + u32 clear) > > +{ > > + u32 val; > > + > > + val = esdhc_read32(host, reg); > > + val &= ~clear; > > + esdhc_write32(host, reg, val); > > You can simplify this to: > > esdhc_clrsetbits32(host, reg, clear, 0); > > > +} > > + > > +static inline void esdhc_setbits32(struct fsl_esdhc_host *host, unsigned int reg, > > + u32 set) > > +{ > > + u32 val; > > + > > + val = esdhc_read32(host, reg); > > + val |= set; > > + esdhc_write32(host, reg, val); > > and this to: > > esdhc_clrsetbits32(host, reg, 0, set); Ok, did that. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox