Skip to contentSkip to conversation

arm: change tbu/l type to unsigned int

PATCH New Peng Fan 2 participants 4 messages May 9, 2017 – May 12, 2017

Subsystems (2)
lore
Share & tools
lore

Peng Fan

author
#0 lore raw

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.

Cc Simon Glass <[email protected]>
Cc Tom Rini <[email protected]>

---

V2: Add more commit log

 arch/arm/include/asm/global_data.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/include/asm/global_data.h +2 -2
index 1aab629..3cc0e5f 100644
@@ -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))
Signature · 1 line
2.6.6
author
#1 lore raw

PATCH v2 2/2 asm-generic: global_data: change timebase_l/h to unsigned int

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.

Cc Eddie Cai <[email protected]>
Cc Jagan Teki <[email protected]>
Cc York Sun <[email protected]>
Cc "Robert P. J. Day" <[email protected]>
Cc Michal Simek <[email protected]>
Cc Tom Rini <[email protected]>

---

V2: Add more commit log, add Simon's review tag.

 include/asm-generic/global_data.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/asm-generic/global_data.h +2 -2
index 1a77c98..51838b5 100644
@@ -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 */
Signature · 1 line
2.6.6
#2 lore raw

PATCH v2 2/2 asm-generic: global_data: change timebase_l/h to unsigned int

Quoted 5 lines · Peng Fan

Change type of timebase_l/h to unsigned int.

Quoted 1 line

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.

Quoted 8 lines
Cc Eddie Cai <[email protected]>
Cc Jagan Teki <[email protected]>
Cc York Sun <[email protected]>
Cc "Robert P. J. Day" <[email protected]>
Cc Michal Simek <[email protected]>
Cc Tom Rini <[email protected]>

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170512/f395aef9/attachment.sig>
#3 lore raw

PATCH v2 1/2 arm: change tbu/l type to unsigned int

In reply to Peng Fan
Quoted 9 lines · Peng Fan

Change tbu/l type to unsigned int.

Quoted 1 line

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.

Cc Simon Glass <[email protected]>
Cc Tom Rini <[email protected]>

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170512/08088f10/attachment.sig>