Thread (10 messages) flat view 10 messages, 5 authors, 2007-08-16

Re: [PATCH v2] powerpc: add setmaskedbits macros

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2007-08-16 16:40:28

On Thu, 2007-08-16 at 10:26 -0500, Timur Tabi wrote:
Kumar Gala wrote:
quoted
quoted
    setmaskedbits_be32(&uccp->gumr_l,
        UCC_SLOW_GUMR_L_MODE_QMC | UCC_SLOW_GUMR_L_TDCR_1 |
        UCC_SLOW_GUMR_L_RDCR_16,
                UCC_SLOW_GUMR_L_MODE_MASK | UCC_SLOW_GUMR_L_TDCR_MASK |
        UCC_SLOW_GUMR_L_RDCR_MASK);

    setmaskedbits_be32(&uccp->gumr_h,
        UCC_SLOW_GUMR_H_SUART | UCC_SLOW_GUMR_H_TRX |
        UCC_SLOW_GUMR_H_TTX, UCC_SLOW_GUMR_H_RFW);
Can you also show what the UCC_SLOW* values look like.
The second example is actually a trick that lets me set some bits and clear 
others in one shot, so for the gumr_h register, all of the above values are 
single bits.  I guess that's not a good example.
Such tricks deserve at least a comment.

Ben.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help