All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] mxs: Convert timeout parameter to 'unsigned int'
@ 2012-08-22 20:10 Fabio Estevam
  2012-08-22 20:16 ` Marek Vasut
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Fabio Estevam @ 2012-08-22 20:10 UTC (permalink / raw
  To: u-boot

From: Fabio Estevam <fabio.estevam@freescale.com>>

For representing a timeout value, it makes more sense to pass it as
'unsigned int'.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 arch/arm/cpu/arm926ejs/mxs/mxs.c          |    6 ++++--
 arch/arm/include/asm/arch-mxs/sys_proto.h |    4 ++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/mxs/mxs.c b/arch/arm/cpu/arm926ejs/mxs/mxs.c
index c028e5e..19c79f2 100644
--- a/arch/arm/cpu/arm926ejs/mxs/mxs.c
+++ b/arch/arm/cpu/arm926ejs/mxs/mxs.c
@@ -81,7 +81,8 @@ void enable_caches(void)
 #endif
 }
 
-int mxs_wait_mask_set(struct mxs_register_32 *reg, uint32_t mask, int timeout)
+int mxs_wait_mask_set(struct mxs_register_32 *reg, uint32_t mask, unsigned
+								int timeout)
 {
 	while (--timeout) {
 		if ((readl(&reg->reg) & mask) == mask)
@@ -92,7 +93,8 @@ int mxs_wait_mask_set(struct mxs_register_32 *reg, uint32_t mask, int timeout)
 	return !timeout;
 }
 
-int mxs_wait_mask_clr(struct mxs_register_32 *reg, uint32_t mask, int timeout)
+int mxs_wait_mask_clr(struct mxs_register_32 *reg, uint32_t mask, unsigned
+								int timeout)
 {
 	while (--timeout) {
 		if ((readl(&reg->reg) & mask) == 0)
diff --git a/arch/arm/include/asm/arch-mxs/sys_proto.h b/arch/arm/include/asm/arch-mxs/sys_proto.h
index 4610363..983b888 100644
--- a/arch/arm/include/asm/arch-mxs/sys_proto.h
+++ b/arch/arm/include/asm/arch-mxs/sys_proto.h
@@ -26,10 +26,10 @@
 int mxs_reset_block(struct mxs_register_32 *reg);
 int mxs_wait_mask_set(struct mxs_register_32 *reg,
 		       uint32_t mask,
-		       int timeout);
+		       unsigned int timeout);
 int mxs_wait_mask_clr(struct mxs_register_32 *reg,
 		       uint32_t mask,
-		       int timeout);
+		       unsigned int timeout);
 
 int mxsmmc_initialize(bd_t *bis, int id, int (*wp)(int));
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] mxs: Convert timeout parameter to 'unsigned int'
  2012-08-22 20:10 [U-Boot] [PATCH] mxs: Convert timeout parameter to 'unsigned int' Fabio Estevam
@ 2012-08-22 20:16 ` Marek Vasut
  2012-08-23 10:17 ` Stefano Babic
  2012-08-27  6:28 ` Stefano Babic
  2 siblings, 0 replies; 4+ messages in thread
From: Marek Vasut @ 2012-08-22 20:16 UTC (permalink / raw
  To: u-boot

Dear Fabio Estevam,

> From: Fabio Estevam <fabio.estevam@freescale.com>>
> 
> For representing a timeout value, it makes more sense to pass it as
> 'unsigned int'.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Acked-by: Marek Vasut <marex@denx.de>

> ---
>  arch/arm/cpu/arm926ejs/mxs/mxs.c          |    6 ++++--
>  arch/arm/include/asm/arch-mxs/sys_proto.h |    4 ++--
>  2 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/cpu/arm926ejs/mxs/mxs.c
> b/arch/arm/cpu/arm926ejs/mxs/mxs.c index c028e5e..19c79f2 100644
> --- a/arch/arm/cpu/arm926ejs/mxs/mxs.c
> +++ b/arch/arm/cpu/arm926ejs/mxs/mxs.c
> @@ -81,7 +81,8 @@ void enable_caches(void)
>  #endif
>  }
> 
> -int mxs_wait_mask_set(struct mxs_register_32 *reg, uint32_t mask, int
> timeout) +int mxs_wait_mask_set(struct mxs_register_32 *reg, uint32_t
> mask, unsigned +								
int timeout)
>  {
>  	while (--timeout) {
>  		if ((readl(&reg->reg) & mask) == mask)
> @@ -92,7 +93,8 @@ int mxs_wait_mask_set(struct mxs_register_32 *reg,
> uint32_t mask, int timeout) return !timeout;
>  }
> 
> -int mxs_wait_mask_clr(struct mxs_register_32 *reg, uint32_t mask, int
> timeout) +int mxs_wait_mask_clr(struct mxs_register_32 *reg, uint32_t
> mask, unsigned +								
int timeout)
>  {
>  	while (--timeout) {
>  		if ((readl(&reg->reg) & mask) == 0)
> diff --git a/arch/arm/include/asm/arch-mxs/sys_proto.h
> b/arch/arm/include/asm/arch-mxs/sys_proto.h index 4610363..983b888 100644
> --- a/arch/arm/include/asm/arch-mxs/sys_proto.h
> +++ b/arch/arm/include/asm/arch-mxs/sys_proto.h
> @@ -26,10 +26,10 @@
>  int mxs_reset_block(struct mxs_register_32 *reg);
>  int mxs_wait_mask_set(struct mxs_register_32 *reg,
>  		       uint32_t mask,
> -		       int timeout);
> +		       unsigned int timeout);
>  int mxs_wait_mask_clr(struct mxs_register_32 *reg,
>  		       uint32_t mask,
> -		       int timeout);
> +		       unsigned int timeout);
> 
>  int mxsmmc_initialize(bd_t *bis, int id, int (*wp)(int));

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] mxs: Convert timeout parameter to 'unsigned int'
  2012-08-22 20:10 [U-Boot] [PATCH] mxs: Convert timeout parameter to 'unsigned int' Fabio Estevam
  2012-08-22 20:16 ` Marek Vasut
@ 2012-08-23 10:17 ` Stefano Babic
  2012-08-27  6:28 ` Stefano Babic
  2 siblings, 0 replies; 4+ messages in thread
From: Stefano Babic @ 2012-08-23 10:17 UTC (permalink / raw
  To: u-boot

On 22/08/2012 22:10, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>>
> 
> For representing a timeout value, it makes more sense to pass it as
> 'unsigned int'.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  arch/arm/cpu/arm926ejs/mxs/mxs.c          |    6 ++++--
>  arch/arm/include/asm/arch-mxs/sys_proto.h |    4 ++--
>  2 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/cpu/arm926ejs/mxs/mxs.c b/arch/arm/cpu/arm926ejs/mxs/mxs.c
> index c028e5e..19c79f2 100644
> --- a/arch/arm/cpu/arm926ejs/mxs/mxs.c
> +++ b/arch/arm/cpu/arm926ejs/mxs/mxs.c
> @@ -81,7 +81,8 @@ void enable_caches(void)
>  #endif
>  }
>  
> -int mxs_wait_mask_set(struct mxs_register_32 *reg, uint32_t mask, int timeout)
> +int mxs_wait_mask_set(struct mxs_register_32 *reg, uint32_t mask, unsigned
> +								int timeout)
>  {
>  	while (--timeout) {
>  		if ((readl(&reg->reg) & mask) == mask)
> @@ -92,7 +93,8 @@ int mxs_wait_mask_set(struct mxs_register_32 *reg, uint32_t mask, int timeout)
>  	return !timeout;
>  }
>  
> -int mxs_wait_mask_clr(struct mxs_register_32 *reg, uint32_t mask, int timeout)
> +int mxs_wait_mask_clr(struct mxs_register_32 *reg, uint32_t mask, unsigned
> +								int timeout)
>  {
>  	while (--timeout) {
>  		if ((readl(&reg->reg) & mask) == 0)
> diff --git a/arch/arm/include/asm/arch-mxs/sys_proto.h b/arch/arm/include/asm/arch-mxs/sys_proto.h
> index 4610363..983b888 100644
> --- a/arch/arm/include/asm/arch-mxs/sys_proto.h
> +++ b/arch/arm/include/asm/arch-mxs/sys_proto.h
> @@ -26,10 +26,10 @@
>  int mxs_reset_block(struct mxs_register_32 *reg);
>  int mxs_wait_mask_set(struct mxs_register_32 *reg,
>  		       uint32_t mask,
> -		       int timeout);
> +		       unsigned int timeout);
>  int mxs_wait_mask_clr(struct mxs_register_32 *reg,
>  		       uint32_t mask,
> -		       int timeout);
> +		       unsigned int timeout);
>  
>  int mxsmmc_initialize(bd_t *bis, int id, int (*wp)(int));
>  
> 

Acked-by: Stefano Babic <sbabic@denx.de>

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] mxs: Convert timeout parameter to 'unsigned int'
  2012-08-22 20:10 [U-Boot] [PATCH] mxs: Convert timeout parameter to 'unsigned int' Fabio Estevam
  2012-08-22 20:16 ` Marek Vasut
  2012-08-23 10:17 ` Stefano Babic
@ 2012-08-27  6:28 ` Stefano Babic
  2 siblings, 0 replies; 4+ messages in thread
From: Stefano Babic @ 2012-08-27  6:28 UTC (permalink / raw
  To: u-boot

On 22/08/2012 22:10, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>>
> 
> For representing a timeout value, it makes more sense to pass it as
> 'unsigned int'.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  arch/arm/cpu/arm926ejs/mxs/mxs.c          |    6 ++++--
>  arch/arm/include/asm/arch-mxs/sys_proto.h |    4 ++--
>  2 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/cpu/arm926ejs/mxs/mxs.c b/arch/arm/cpu/arm926ejs/mxs/mxs.c
> index c028e5e..19c79f2 100644
> --- a/arch/arm/cpu/arm926ejs/mxs/mxs.c
> +++ b/arch/arm/cpu/arm926ejs/mxs/mxs.c
> @@ -81,7 +81,8 @@ void enable_caches(void)
>  #endif
>  }
>  
> -int mxs_wait_mask_set(struct mxs_register_32 *reg, uint32_t mask, int timeout)
> +int mxs_wait_mask_set(struct mxs_register_32 *reg, uint32_t mask, unsigned
> +								int timeout)
>  {
>  	while (--timeout) {
>  		if ((readl(&reg->reg) & mask) == mask)
> @@ -92,7 +93,8 @@ int mxs_wait_mask_set(struct mxs_register_32 *reg, uint32_t mask, int timeout)
>  	return !timeout;
>  }
>  
> -int mxs_wait_mask_clr(struct mxs_register_32 *reg, uint32_t mask, int timeout)
> +int mxs_wait_mask_clr(struct mxs_register_32 *reg, uint32_t mask, unsigned
> +								int timeout)
>  {
>  	while (--timeout) {
>  		if ((readl(&reg->reg) & mask) == 0)
> diff --git a/arch/arm/include/asm/arch-mxs/sys_proto.h b/arch/arm/include/asm/arch-mxs/sys_proto.h
> index 4610363..983b888 100644
> --- a/arch/arm/include/asm/arch-mxs/sys_proto.h
> +++ b/arch/arm/include/asm/arch-mxs/sys_proto.h
> @@ -26,10 +26,10 @@
>  int mxs_reset_block(struct mxs_register_32 *reg);
>  int mxs_wait_mask_set(struct mxs_register_32 *reg,
>  		       uint32_t mask,
> -		       int timeout);
> +		       unsigned int timeout);
>  int mxs_wait_mask_clr(struct mxs_register_32 *reg,
>  		       uint32_t mask,
> -		       int timeout);
> +		       unsigned int timeout);
>  
>  int mxsmmc_initialize(bd_t *bis, int id, int (*wp)(int));
>  
> 

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-08-27  6:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-22 20:10 [U-Boot] [PATCH] mxs: Convert timeout parameter to 'unsigned int' Fabio Estevam
2012-08-22 20:16 ` Marek Vasut
2012-08-23 10:17 ` Stefano Babic
2012-08-27  6:28 ` Stefano Babic

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.