Re: [U-Boot] [PATCH 09/11] dma: ti-edma3: Add BIT(x) macro definition

2015-07-04 Thread Jagan Teki
On 4 July 2015 at 18:23, R, Vignesh vigne...@ti.com wrote:


 On 7/3/2015 7:27 PM, Andy Pont wrote:
 Vignesh wrote...

 [snip]

 +#define BIT(x)  (1  (x))
 +

 Is this not something that would be better in a global header file somewhere 
 rather than it starting a trend of a per-driver, per-arch, etc. definitions?

 I agree there are few per arch defintions.
 How about adding it to include/linux/bitops.h as in linux kernel?

Patch is under review [1] in fact you may give comment on the same.

[1] https://patchwork.ozlabs.org/patch/470478/

thanks!
-- 
Jagan | openedev.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 09/11] dma: ti-edma3: Add BIT(x) macro definition

2015-07-04 Thread R, Vignesh


On 7/3/2015 7:27 PM, Andy Pont wrote:
 Vignesh wrote...
 
 [snip]
 
 +#define BIT(x)  (1  (x))
 +
 
 Is this not something that would be better in a global header file somewhere 
 rather than it starting a trend of a per-driver, per-arch, etc. definitions?

I agree there are few per arch defintions.
How about adding it to include/linux/bitops.h as in linux kernel?

Regards
Vignesh
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 09/11] dma: ti-edma3: Add BIT(x) macro definition

2015-07-03 Thread Andy Pont
Vignesh wrote...

[snip]

 +#define BIT(x)   (1  (x))
 +

Is this not something that would be better in a global header file somewhere 
rather than it starting a trend of a per-driver, per-arch, etc. definitions?

Andy.



___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 09/11] dma: ti-edma3: Add BIT(x) macro definition

2015-07-03 Thread Vignesh R
Add BIT(x) macro definition to edma3 driver file. Fixes following
compiler warning when CONFIG_TI_EDMA3 is enabled for am437x and dra7x:

drivers/dma/ti-edma3.c: In function ‘edma3_set_dest’:
drivers/dma/ti-edma3.c:92:10: warning: implicit declaration of function
‘BIT’ [-Wimplicit-function-declaration]

Signed-off-by: Vignesh R vigne...@ti.com
---
 drivers/dma/ti-edma3.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/dma/ti-edma3.c b/drivers/dma/ti-edma3.c
index 8184ded9fa81..638cf525a278 100644
--- a/drivers/dma/ti-edma3.c
+++ b/drivers/dma/ti-edma3.c
@@ -13,6 +13,8 @@
 #include common.h
 #include asm/ti-common/ti-edma3.h
 
+#define BIT(x) (1  (x))
+
 #define EDMA3_SL_BASE(slot)(0x4000 + ((slot)  5))
 #define EDMA3_SL_MAX_NUM   512
 #define EDMA3_SLOPT_FIFO_WIDTH_MASK(0x7  8)
-- 
2.4.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot