Hi Scott,

On Wed, Mar 30, 2011 at 12:03 AM, Scott Wood <scottw...@freescale.com> wrote:
> On Tue, 29 Mar 2011 10:47:04 +0800
> Lei Wen <adrian.w...@gmail.com> wrote:
>
>> Hi Scott,
>>
>> On Tue, Mar 29, 2011 at 12:05 AM, Scott Wood <scottw...@freescale.com> wrote:
>> > What does this do that setbits*/clrbits* don't?
>>
>> Those and*/or* include the dmb() operation included in the read*/write*, 
>> which
>> is not included in the __raw_read*/__raw_write* that setbits*/clrbits* refer 
>> to.
>> I think it's better to keep another instance to set the bit, since
>> there is read* and __raw_read*
>> exist and have difference.
>
> But why are setbits/clrbits using raw accesses?  That's not how they're
> defined on powerpc, which is where these accessors originated.  I suspect
> they were defined that way out of laziness from before ARM made a
> distinction between raw and non-raw accessors, and it is now a bug in
> setbits/clrbits (and out_be*, in_le*, etc) which should be fixed rather
> than introducing an alternative.
>
> And then if you want a raw version of these functions, introduce
> raw_setbits_le32, raw_in_le16, etc.
>


Yep, that make sense to me. But since this patch is tend to be more discussion.
I'm going to remove this change out of this patch set, and post seperately.
Meanwhile, just use the writel(readl* style in this patch set for current stage.

Best regards,
Lei
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to