[U-Boot] [PATCH V2 1/2] arm: change tbu/l type to unsigned int

Change tbu/l type to unsigned int.
From the timer file for arm,
"(((unsigned long long)gd->arch.tbu) << 32) | gd->arch.tbl;" is used, This piece code is based on tbu/tbl is 32bits, so change the type to unsigned int.
Signed-off-by: Peng Fan peng.fan@nxp.com Cc: Simon Glass sjg@chromium.org Cc: Tom Rini trini@konsulko.com ---
V2: Add more commit log
arch/arm/include/asm/global_data.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h index 1aab629..3cc0e5f 100644 --- a/arch/arm/include/asm/global_data.h +++ b/arch/arm/include/asm/global_data.h @@ -32,8 +32,8 @@ struct arch_global_data { #endif /* "static data" needed by most of timer.c on ARM platforms */ unsigned long timer_rate_hz; - unsigned long tbu; - unsigned long tbl; + unsigned int tbu; + unsigned int tbl; unsigned long lastinc; unsigned long long timer_reset_value; #if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF))

Change type of timebase_l/h to unsigned int.
From lib/time.c: ((uint64_t)gd->timebase_h << 32) | gd->timebase_l;
This piece code is based on that timebase_h and timebase_l are 32bits width, so change the type to unsigned int.
Signed-off-by: Peng Fan peng.fan@nxp.com Cc: Eddie Cai eddie.cai.linux@gmail.com Cc: Jagan Teki jteki@openedev.com Cc: York Sun york.sun@nxp.com Cc: "Robert P. J. Day" rpjday@crashcourse.ca Cc: Michal Simek michal.simek@xilinx.com Cc: Tom Rini trini@konsulko.com Reviewed-by: Simon Glass sjg@chromium.org ---
V2: Add more commit log, add Simon's review tag.
include/asm-generic/global_data.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 1a77c98..51838b5 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -83,8 +83,8 @@ typedef struct global_data { #ifdef CONFIG_SYS_I2C_MXC void *srdata[10]; #endif - unsigned long timebase_h; - unsigned long timebase_l; + unsigned int timebase_h; + unsigned int timebase_l; #ifdef CONFIG_SYS_MALLOC_F_LEN unsigned long malloc_base; /* base address of early malloc() */ unsigned long malloc_limit; /* limit address */

On Tue, May 09, 2017 at 10:32:03AM +0800, Peng Fan wrote:
Change type of timebase_l/h to unsigned int.
From lib/time.c: ((uint64_t)gd->timebase_h << 32) | gd->timebase_l;
This piece code is based on that timebase_h and timebase_l are 32bits width, so change the type to unsigned int.
Signed-off-by: Peng Fan peng.fan@nxp.com Cc: Eddie Cai eddie.cai.linux@gmail.com Cc: Jagan Teki jteki@openedev.com Cc: York Sun york.sun@nxp.com Cc: "Robert P. J. Day" rpjday@crashcourse.ca Cc: Michal Simek michal.simek@xilinx.com Cc: Tom Rini trini@konsulko.com Reviewed-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!

On Tue, May 09, 2017 at 10:32:02AM +0800, Peng Fan wrote:
Change tbu/l type to unsigned int.
From the timer file for arm,
"(((unsigned long long)gd->arch.tbu) << 32) | gd->arch.tbl;" is used, This piece code is based on tbu/tbl is 32bits, so change the type to unsigned int.
Signed-off-by: Peng Fan peng.fan@nxp.com Cc: Simon Glass sjg@chromium.org Cc: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!
participants (2)
-
Peng Fan
-
Tom Rini