Hi Wolfgang, On Tue, Mar 22, 2011 at 11:16 PM, Wolfgang Denk <w...@denx.de> wrote: > Dear Lei Wen, > > In message <aanlktikmypvvjdrngrvz3xzsytn_yprpfmuup_3dd...@mail.gmail.com> you > wrote: >> > ... >> >> - writel(readl(ICR) & ~ICR_ACKNA> K, ICR); >> >> - writel(readl(ICR) & ~ICR_ALDIE, ICR); >> >> - writel(readl(ICR) | ICR_TB, ICR); >> >> + PXAI2C_AND(&base->icr, ~ICR_AC> KNAK); >> >> + PXAI2C_AND(&base->icr, ~ICR_ALDIE); >> >> + PXAI2C_OR(&base->icr, ICR_TB); >> > >> > What are benefits of those macros? >> > To me this looks ugly and looses readability. >> >> This intend for short the original too long code, but I don't reject to ret> >> urn >> to the readl, write one. > > Please either use plain writel() / readl() accessors, or, > alternatively, implement standard accessors that could be used by > everybody else for the same purpose, too. > > See for example the misc clrbits*(), setbits*() or clrsetbits*() > macros as dfined for example in "arch/powerpc/include/asm/io.h"
Yep, that is what I want. :) I would post next patch set include this suggestion. Thanks, Lei _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot