Patchwork [U-Boot,10/14] blackfin: Change global data baudrate to int

login
register
mail settings
Submitter Simon Glass
Date Oct. 13, 2012, 12:21 a.m.
Message ID <1350087681-16442-11-git-send-email-sjg@chromium.org>
Download mbox | patch
Permalink /patch/191252/
State Accepted, archived
Delegated to: Tom Rini
Headers show

Comments

Simon Glass - Oct. 13, 2012, 12:21 a.m.
This doesn't need to be a long, so change it.

Also adjust bi_baudrate to be unsigned.

Signed-off-by: Simon Glass <sjg@chromium.org>
---
 arch/blackfin/include/asm/global_data.h |    2 +-
 arch/blackfin/include/asm/u-boot.h      |    2 +-
 arch/blackfin/lib/board.c               |    2 +-
 common/cmd_bdinfo.c                     |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

Patch

diff --git a/arch/blackfin/include/asm/global_data.h b/arch/blackfin/include/asm/global_data.h
index 290a9e7..d91e5a4 100644
--- a/arch/blackfin/include/asm/global_data.h
+++ b/arch/blackfin/include/asm/global_data.h
@@ -41,7 +41,7 @@  typedef struct global_data {
 	bd_t *bd;
 	unsigned long flags;
 	unsigned long board_type;
-	unsigned long baudrate;
+	unsigned int baudrate;
 	unsigned long have_console;	/* serial_init() was called */
 #ifdef CONFIG_PRE_CONSOLE_BUFFER
 	unsigned long	precon_buf_idx;	/* Pre-Console buffer index */
diff --git a/arch/blackfin/include/asm/u-boot.h b/arch/blackfin/include/asm/u-boot.h
index df81183..7abd6c2 100644
--- a/arch/blackfin/include/asm/u-boot.h
+++ b/arch/blackfin/include/asm/u-boot.h
@@ -29,7 +29,7 @@ 
 #define _U_BOOT_H_	1
 
 typedef struct bd_info {
-	int bi_baudrate;		/* serial console baudrate */
+	unsigned int bi_baudrate;	/* serial console baudrate */
 	unsigned long bi_boot_params;	/* where this board expects params */
 	unsigned long bi_memstart;	/* start of DRAM memory */
 	phys_size_t bi_memsize;		/* size  of DRAM memory in bytes */
diff --git a/arch/blackfin/lib/board.c b/arch/blackfin/lib/board.c
index e47b606..9fbbea0 100644
--- a/arch/blackfin/lib/board.c
+++ b/arch/blackfin/lib/board.c
@@ -78,7 +78,7 @@  static void display_global_data(void)
 	printf(" gd: %p\n", gd);
 	printf(" |-flags: %lx\n", gd->flags);
 	printf(" |-board_type: %lx\n", gd->board_type);
-	printf(" |-baudrate: %lu\n", gd->baudrate);
+	printf(" |-baudrate: %u\n", gd->baudrate);
 	printf(" |-have_console: %lx\n", gd->have_console);
 	printf(" |-ram_size: %lx\n", gd->ram_size);
 	printf(" |-env_addr: %lx\n", gd->env_addr);
diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c
index 7686996..bc737d0 100644
--- a/common/cmd_bdinfo.c
+++ b/common/cmd_bdinfo.c
@@ -304,7 +304,7 @@  int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
 	print_eth(0);
 	printf("ip_addr     = %s\n", getenv("ipaddr"));
-	printf("baudrate    = %d bps\n", bd->bi_baudrate);
+	printf("baudrate    = %u bps\n", bd->bi_baudrate);
 
 	return 0;
 }