diff mbox

[U-Boot,V4,1/6] io: add and* and or* operation api to set and clear bit

Message ID 1301292225-15069-1-git-send-email-leiwen@marvell.com
State Superseded
Headers show

Commit Message

Lei Wen March 28, 2011, 6:03 a.m. UTC
Those api take use of read*/write* to align the current dmb usage.
Also this could short the code length in one line.

Signed-off-by: Lei Wen <leiwen@marvell.com>
---
Changelog:
V4.1
fix code style issue

 arch/arm/include/asm/io.h |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

Comments

Wolfgang Denk March 28, 2011, 6:29 a.m. UTC | #1
Dear Lei Wen,

In message <1301292225-15069-1-git-send-email-leiwen@marvell.com> you wrote:
> Those api take use of read*/write* to align the current dmb usage.
> Also this could short the code length in one line.
> 
> Signed-off-by: Lei Wen <leiwen@marvell.com>
> ---
> Changelog:
> V4.1
> fix code style issue

That should be V4.1 (or better V5) in the Subject then, too.


Please also note that all your patches are missing a correct
changelog.

1/6 has no changelog at all.
2/6 fails to document the v4 changes
3/6 shows only V3 changes
4/6 ditto
5/6 ditto
6/6 ditto 

This is not acceptable.  I do not intend to read and compare ll the
previous versions, so I refuse to review this.

You may consider this a NAK to the whole patch series.

Best regards,

Wolfgang Denk
Lei Wen March 28, 2011, 7:04 a.m. UTC | #2
Hi Wolfgang,

On Mon, Mar 28, 2011 at 2:29 PM, Wolfgang Denk <wd@denx.de> wrote:
> Dear Lei Wen,
>
> In message <1301292225-15069-1-git-send-email-leiwen@marvell.com> you wrote:
>> Those api take use of read*/write* to align the current dmb usage.
>> Also this could short the code length in one line.
>>
>> Signed-off-by: Lei Wen <leiwen@marvell.com>
>> ---
>> Changelog:
>> V4.1
>> fix code style issue
>
> That should be V4.1 (or better V5) in the Subject then, too.
>
>
> Please also note that all your patches are missing a correct
> changelog.
>
> 1/6 has no changelog at all.
> 2/6 fails to document the v4 changes
> 3/6 shows only V3 changes
> 4/6 ditto
> 5/6 ditto
> 6/6 ditto
>

Thanks for this reminding. I've post V5 seris to add those changelog.

Best regards,
Lei
diff mbox

Patch

diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index 1fbc531..71e85e8 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -141,6 +141,14 @@  extern inline void __raw_readsl(unsigned int addr, void *data, int longlen)
 #define readw(c)	({ u16 __v = __arch_getw(c); __iormb(); __v; })
 #define readl(c)	({ u32 __v = __arch_getl(c); __iormb(); __v; })
 
+#define orb(v, c)       writeb(readb(c) | v, c)
+#define orw(v, c)       writew(readw(c) | v, c)
+#define orl(v, c)       writel(readl(c) | v, c)
+
+#define andb(v, c)      writeb(readb(c) & v, c)
+#define andw(v, c)      writew(readw(c) & v, c)
+#define andl(v, c)      writel(readl(c) & v, c)
+
 /*
  * The compiler seems to be incapable of optimising constants
  * properly.  Spell it out to the compiler in some cases.