Homogenise baud rate type to unsigned int
Subsystems (10)
cover Homogenise baud rate type to unsigned int
The global_data and bd_info structures for each board have different types for the baudrate and bi_baudrate fields. This series lines them all up to be the same.
There is some discussion on the list about using u32 instead of 'unsigned int'. These are equivalent on all current architectures, and other fields in global_data and bd_info do not use this. However I can change this if required.
Simon Glass (14):
sh: Change bi_baudrate and global data baudrate to int
avr32: Change bi_baudrate and global data baudrate to int
m68k: Change bi_baudrate and global data baudrate to int
microblaze: Change bi_baudrate and global data baudrate to int
nios2: Change bi_baudrate and global data baudrate to int
openrisc: Change bi_baudrate and global data baudrate to int
powerpc: Change bi_baudrate and global data baudrate to int
sparc: Change bi_baudrate and global data baudrate to int
arm: Change global data baudrate to int
blackfin: Change global data baudrate to int
mips: Change global data baudrate to int
nds32: Change global data baudrate to int
x86: Change global data baudrate to int
sandbox: Change global data baudrate to int
arch/arm/include/asm/global_data.h | 2 +- arch/arm/include/asm/u-boot.h | 2 +- arch/avr32/include/asm/global_data.h | 2 +- arch/avr32/include/asm/u-boot.h | 2 +- arch/blackfin/include/asm/global_data.h | 2 +- arch/blackfin/include/asm/u-boot.h | 2 +- arch/blackfin/lib/board.c | 2 +- arch/m68k/include/asm/global_data.h | 2 +- arch/m68k/include/asm/u-boot.h | 2 +- arch/microblaze/include/asm/global_data.h | 2 +- arch/microblaze/include/asm/u-boot.h | 2 +- arch/mips/include/asm/global_data.h | 2 +- arch/mips/include/asm/u-boot.h | 2 +- arch/nds32/include/asm/global_data.h | 2 +- arch/nds32/include/asm/u-boot.h | 2 +- arch/nios2/include/asm/global_data.h | 2 +- arch/nios2/include/asm/u-boot.h | 2 +- arch/openrisc/include/asm/global_data.h | 2 +- arch/openrisc/include/asm/u-boot.h | 2 +- arch/powerpc/include/asm/global_data.h | 2 +- arch/powerpc/include/asm/u-boot.h | 2 +- arch/sandbox/include/asm/global_data.h | 2 +- arch/sh/include/asm/global_data.h | 2 +- arch/sh/include/asm/u-boot.h | 2 +- arch/sparc/include/asm/global_data.h | 2 +- arch/sparc/include/asm/u-boot.h | 2 +- arch/x86/include/asm/global_data.h | 2 +- common/cmd_bdinfo.c | 26 +++++++++++++------------- 28 files changed, 40 insertions(+), 40 deletions(-)
Signature · 1 line
1.7.7.3
PATCH 1/14 sh: Change bi_baudrate and global data baudrate to int
These don't need to be longs, so change them.
--- arch/sh/include/asm/global_data.h | 2 +- arch/sh/include/asm/u-boot.h | 2 +- common/cmd_bdinfo.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
arch/sh/include/asm/global_data.h +1 -1
@@ -31,7 +31,7 @@ typedef struct global_data {bd_t *bd;unsigned long flags; -unsigned long baudrate; +unsigned int baudrate;unsigned long cpu_clk;/* CPU clock in Hz! */ unsigned long have_console;/* serial_init() was called */ #ifdef CONFIG_PRE_CONSOLE_BUFFER
arch/sh/include/asm/u-boot.h +1 -1
@@ -33,7 +33,7 @@ typedef struct bd_info {unsigned long bi_flashoffset;/* reserved area for startup monitor */ unsigned long bi_sramstart;/* start of SRAM memory */ unsigned long bi_sramsize;/* size of SRAM memory */ -unsigned long bi_baudrate;/* Console Baudrate */ +unsigned int bi_baudrate;/* Console Baudrate */ unsigned long bi_boot_params;/* where this board expects params */ } bd_t;
common/cmd_bdinfo.c +1 -1
@@ -405,7 +405,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" ));#endif -printf ("baudrate = %ld bps\n" , (ulong )bd->bi_baudrate); +printf ("baudrate = %u bps\n" , bd->bi_baudrate);return 0 ; }
Signature · 1 line
1.7.7.3
PATCH 2/14 avr32: Change bi_baudrate and global data baudrate to int
In reply to Simon GlassThese don't need to be longs, so change them.
--- arch/avr32/include/asm/global_data.h | 2 +- arch/avr32/include/asm/u-boot.h | 2 +- common/cmd_bdinfo.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
arch/avr32/include/asm/global_data.h +1 -1
@@ -33,7 +33,7 @@ typedef struct global_data { bd_t *bd; unsigned long flags; - unsigned long baudrate; + unsigned int baudrate; unsigned long stack_end; /* highest stack address */ unsigned long have_console; /* serial_init() was called */ #ifdef CONFIG_PRE_CONSOLE_BUFFER
arch/avr32/include/asm/u-boot.h +1 -1
@@ -23,7 +23,7 @@#define __ASM_U_BOOT_H__ 1 typedef struct bd_info { - unsigned long bi_baudrate; + unsigned int bi_baudrate; unsigned char bi_phy_id[4]; unsigned long bi_board_number; void *bi_boot_params;
common/cmd_bdinfo.c +1 -1
@@ -344,7 +344,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 = %lu bps\n" , bd->bi_baudrate); +printf ("baudrate = %u bps\n" , bd->bi_baudrate);return 0 ; }
Signature · 1 line
1.7.7.3
PATCH 2/14 avr32: Change bi_baudrate and global data baudrate to int
Quoted 3 lines · Simon Glass
These don't need to be longs, so change them.
Signed-off-by Simon Glass <[email protected]>
Quoted 5 lines
--- arch/avr32/include/asm/global_data.h | 2 +- arch/avr32/include/asm/u-boot.h | 2 +- common/cmd_bdinfo.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
PATCH 3/14 m68k: Change bi_baudrate and global data baudrate to int
In reply to Simon GlassThese don't need to be longs, so change them.
--- arch/m68k/include/asm/global_data.h | 2 +- arch/m68k/include/asm/u-boot.h | 2 +- common/cmd_bdinfo.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
arch/m68k/include/asm/global_data.h +1 -1
@@ -34,7 +34,7 @@ typedef struct global_data { bd_t *bd; unsigned long flags; - unsigned long baudrate; + unsigned int baudrate; unsigned long cpu_clk; /* CPU clock in Hz! */ unsigned long bus_clk; #ifdef CONFIG_PCI
arch/m68k/include/asm/u-boot.h +1 -1
@@ -58,7 +58,7 @@ typedef struct bd_info {unsigned long bi_vcofreq;/* vco Freq in MHz */ unsigned long bi_flbfreq;/* Flexbus Freq in MHz */ #endif - unsigned long bi_baudrate; /* Console Baudrate */ + unsigned int bi_baudrate; /* Console Baudrate */ } bd_t;#endif /* __ASSEMBLY__ */
common/cmd_bdinfo.c +1 -1
@@ -277,7 +277,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])printf ("ip_addr = %s\n" ,getenv ("ipaddr" ));#endif -printf ("baudrate = %ld bps\n" , bd->bi_baudrate); +printf ("baudrate = %u bps\n" , bd->bi_baudrate);return 0 ; }
Signature · 1 line
1.7.7.3
PATCH 4/14 microblaze: Change bi_baudrate and global data baudrate to int
In reply to Simon GlassThese don't need to be longs, so change them.
--- arch/microblaze/include/asm/global_data.h | 2 +- arch/microblaze/include/asm/u-boot.h | 2 +- common/cmd_bdinfo.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
arch/microblaze/include/asm/global_data.h +1 -1
@@ -35,7 +35,7 @@ typedef struct global_data { bd_t *bd; unsigned long flags; - 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 */
arch/microblaze/include/asm/u-boot.h +1 -1
@@ -40,7 +40,7 @@ typedef struct bd_info {unsigned long bi_flashoffset;/* reserved area for startup monitor */ unsigned long bi_sramstart;/* start of SRAM memory */ unsigned long bi_sramsize;/* size of SRAM memory */ -unsigned long bi_baudrate;/* Console Baudrate */ +unsigned int bi_baudrate;/* Console Baudrate */ } bd_t;/* For image.h:image_check_target_arch() */
common/cmd_bdinfo.c +1 -1
@@ -198,7 +198,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" ));#endif -printf ("baudrate = %ld bps\n" , (ulong )bd->bi_baudrate); +printf ("baudrate = %u bps\n" , (ulong )bd->bi_baudrate);return 0 ; }
Signature · 1 line
1.7.7.3
PATCH 5/14 nios2: Change bi_baudrate and global data baudrate to int
In reply to Simon GlassThese don't need to be longs, so change them.
--- arch/nios2/include/asm/global_data.h | 2 +- arch/nios2/include/asm/u-boot.h | 2 +- common/cmd_bdinfo.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
arch/nios2/include/asm/global_data.h +1 -1
@@ -26,7 +26,7 @@ typedef struct global_data { bd_t *bd; unsigned long flags; - unsigned long baudrate; + unsigned int baudrate; unsigned long cpu_clk; /* CPU clock in Hz! */ unsigned long have_console; /* serial_init() was called */ #ifdef CONFIG_PRE_CONSOLE_BUFFER
arch/nios2/include/asm/u-boot.h +1 -1
@@ -39,7 +39,7 @@ typedef struct bd_info {unsigned long bi_flashoffset;/* reserved area for startup monitor */ unsigned long bi_sramstart;/* start of SRAM memory */ unsigned long bi_sramsize;/* size of SRAM memory */ -unsigned long bi_baudrate;/* Console Baudrate */ +unsigned int bi_baudrate;/* Console Baudrate */ } bd_t;/* For image.h:image_check_target_arch() */
common/cmd_bdinfo.c +1 -1
@@ -175,7 +175,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])printf ("ip_addr = %s\n" ,getenv ("ipaddr" ));#endif -printf ("baudrate = %ld bps\n" , bd->bi_baudrate); +printf ("baudrate = %u bps\n" , bd->bi_baudrate);return 0 ; }
Signature · 1 line
1.7.7.3
PATCH 6/14 openrisc: Change bi_baudrate and global data baudrate to int
In reply to Simon GlassThese don't need to be longs, so change them.
--- arch/openrisc/include/asm/global_data.h | 2 +- arch/openrisc/include/asm/u-boot.h | 2 +- common/cmd_bdinfo.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
arch/openrisc/include/asm/global_data.h +1 -1
@@ -35,7 +35,7 @@ typedef struct global_data { bd_t *bd; unsigned long flags; - unsigned long baudrate; + unsigned int baudrate; unsigned long cpu_clk; /* CPU clock in Hz! */ unsigned long have_console; /* serial_init() was called */ phys_size_t ram_size; /* RAM size */
arch/openrisc/include/asm/u-boot.h +1 -1
@@ -32,7 +32,7 @@#define _U_BOOT_H_ typedef struct bd_info { - unsigned long bi_baudrate; /* serial console baudrate */ + unsigned int bi_baudrate; /* serial console baudrate */ unsigned long bi_arch_number; /* unique id for this board */ unsigned long bi_boot_params; /* where this board expects params */ unsigned long bi_memstart; /* start of DRAM memory */
common/cmd_bdinfo.c +1 -1
@@ -509,7 +509,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])printf ("ip_addr = %s\n" ,getenv ("ipaddr" ));#endif -printf ("baudrate = %ld bps\n" , bd->bi_baudrate); +printf ("baudrate = %u bps\n" , bd->bi_baudrate);return 0 ; }
Signature · 1 line
1.7.7.3
PATCH 7/14 powerpc: Change bi_baudrate and global data baudrate to int
In reply to Simon GlassThese don't need to be longs, so change them.
--- arch/powerpc/include/asm/global_data.h | 2 +- arch/powerpc/include/asm/u-boot.h | 2 +- common/cmd_bdinfo.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
arch/powerpc/include/asm/global_data.h +1 -1
@@ -38,7 +38,7 @@ typedef struct global_data { bd_t *bd; unsigned long flags; - unsigned long baudrate; + unsigned int baudrate; unsigned long cpu_clk; /* CPU clock in Hz! */ unsigned long bus_clk; #if defined(CONFIG_8xx)
arch/powerpc/include/asm/u-boot.h +1 -1
@@ -81,7 +81,7 @@ typedef struct bd_info {unsigned long bi_ipbfreq;/* IPB Bus Freq, in MHz */ unsigned long bi_pcifreq;/* PCI Bus Freq, in MHz */ #endif -unsigned long bi_baudrate;/* Console Baudrate */ +unsigned int bi_baudrate;/* Console Baudrate */ #if defined(CONFIG_405) || \ defined(CONFIG_405GP) || \ defined(CONFIG_405CR) || \
common/cmd_bdinfo.c +1 -1
@@ -148,7 +148,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])print_mhz ("ethspeed" , bd->bi_ethspeed);#endif printf ("IP addr = %s\n" ,getenv ("ipaddr" )); -printf ("baudrate = %6ld bps\n" , bd->bi_baudrate); +printf ("baudrate = %6u bps\n" , bd->bi_baudrate);print_num ("relocaddr" , gd->relocaddr);return 0 ; }
Signature · 1 line
1.7.7.3
PATCH 8/14 sparc: Change bi_baudrate and global data baudrate to int
In reply to Simon GlassThese don't need to be longs, so change them.
--- arch/sparc/include/asm/global_data.h | 2 +- arch/sparc/include/asm/u-boot.h | 2 +- common/cmd_bdinfo.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
arch/sparc/include/asm/global_data.h +1 -1
@@ -40,7 +40,7 @@ typedef struct global_data { bd_t *bd; unsigned long flags; - unsigned long baudrate; + unsigned int baudrate; unsigned long cpu_clk; /* CPU clock in Hz! */ unsigned long bus_clk;
arch/sparc/include/asm/u-boot.h +1 -1
@@ -54,7 +54,7 @@ typedef struct bd_info {unsigned short bi_ethspeed;/* Ethernet speed in Mbps */ unsigned long bi_intfreq;/* Internal Freq, in MHz */ unsigned long bi_busfreq;/* Bus Freq, in MHz */ - unsigned long bi_baudrate; /* Console Baudrate */ + unsigned int bi_baudrate; /* Console Baudrate */ } bd_t;#endif /* __ASSEMBLY__ */
common/cmd_bdinfo.c +1 -1
@@ -231,7 +231,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" ));#endif -printf ("baudrate = %6ld bps\n" , bd->bi_baudrate); +printf ("baudrate = %6u bps\n" , bd->bi_baudrate);return 0 ; }
Signature · 1 line
1.7.7.3
PATCH 9/14 arm: Change global data baudrate to int
In reply to Simon GlassThis does not need to be a long, so change it.
Also adjust bi_baudrate to be unsigned.
--- arch/arm/include/asm/global_data.h | 2 +- arch/arm/include/asm/u-boot.h | 2 +- common/cmd_bdinfo.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/include/asm/global_data.h +1 -1
@@ -34,7 +34,7 @@ typedef struct global_data { bd_t *bd; unsigned long flags; - 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 */
arch/arm/include/asm/u-boot.h +1 -1
@@ -37,7 +37,7 @@#define _U_BOOT_H_ 1 typedef struct bd_info { - int bi_baudrate; /* serial console baudrate */ + unsigned int bi_baudrate; /* serial console baudrate */ ulong bi_arch_number; /* unique id for this board */ ulong bi_boot_params; /* where this board expects params */ unsigned long bi_arm_freq; /* arm frequency */
common/cmd_bdinfo.c +1 -1
@@ -369,7 +369,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" ));#endif -printf ("baudrate = %d bps\n" , bd->bi_baudrate); +printf ("baudrate = %u bps\n" , bd->bi_baudrate);#if !(defined(CONFIG_SYS_ICACHE_OFF ) && defined(CONFIG_SYS_DCACHE_OFF ))print_num ("TLB addr" , gd->tlb_addr);#endif
Signature · 1 line
1.7.7.3
PATCH 10/14 blackfin: Change global data baudrate to int
In reply to Simon GlassThis doesn't need to be a long, so change it.
Also adjust bi_baudrate to be unsigned.
--- 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(-)
arch/blackfin/include/asm/global_data.h +1 -1
@@ -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 */
arch/blackfin/include/asm/u-boot.h +1 -1
@@ -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 */
arch/blackfin/lib/board.c +1 -1
@@ -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);
common/cmd_bdinfo.c +1 -1
@@ -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 ; }
Signature · 1 line
1.7.7.3
PATCH 11/14 mips: Change global data baudrate to int
In reply to Simon GlassThis doesn't need to be a long, so change it.
Also adjust bi_baudrate to be unsigned.
--- arch/mips/include/asm/global_data.h | 2 +- arch/mips/include/asm/u-boot.h | 2 +- common/cmd_bdinfo.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
arch/mips/include/asm/global_data.h +1 -1
@@ -48,7 +48,7 @@ typedef struct global_data {unsigned long tbl;unsigned long lastinc;#endif -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 */
arch/mips/include/asm/u-boot.h +1 -1
@@ -32,7 +32,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_arch_number; /* unique id for this board */ unsigned long bi_boot_params; /* where this board expects params */ unsigned long bi_memstart; /* start of DRAM memory */
common/cmd_bdinfo.c +1 -1
@@ -324,7 +324,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 ; }
Signature · 1 line
1.7.7.3
PATCH 12/14 nds32: Change global data baudrate to int
In reply to Simon GlassThis doesn't need to be a long, so change it.
Also adjust bi_baudrate to be unsigned.
--- arch/nds32/include/asm/global_data.h | 2 +- arch/nds32/include/asm/u-boot.h | 2 +- common/cmd_bdinfo.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
arch/nds32/include/asm/global_data.h +1 -1
@@ -44,7 +44,7 @@ typedef struct global_data { bd_t *bd; unsigned long flags; - unsigned long baudrate; + unsigned int baudrate; unsigned long have_console; /* serial_init() was called */ unsigned long reloc_off; /* Relocation Offset */
arch/nds32/include/asm/u-boot.h +1 -1
@@ -39,7 +39,7 @@#include <environment.h> typedef struct bd_info { - int bi_baudrate; /* serial console baudrate */ + unsigned int bi_baudrate; /* serial console baudrate */ unsigned long bi_arch_number; /* unique id for this board */ unsigned long bi_boot_params; /* where this board expects params */ unsigned long bi_memstart; /* start of DRAM memory */
common/cmd_bdinfo.c +1 -1
@@ -487,7 +487,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" ));#endif -printf ("baudrate = %d bps\n" , bd->bi_baudrate); +printf ("baudrate = %u bps\n" , bd->bi_baudrate);return 0 ; }
Signature · 1 line
1.7.7.3
PATCH 13/14 x86: Change global data baudrate to int
In reply to Simon GlassThis doesn't need to be a long, so change it.
--- arch/x86/include/asm/global_data.h | 2 +- common/cmd_bdinfo.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/include/asm/global_data.h +1 -1
@@ -38,7 +38,7 @@ typedef struct global_data {unsigned long gd_addr;/* Location of Global Data */ bd_t *bd;unsigned long flags; -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 */
common/cmd_bdinfo.c +1 -1
@@ -439,7 +439,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])printf ("ip_addr = %s\n" ,getenv ("ipaddr" ));print_mhz ("ethspeed" , bd->bi_ethspeed);#endif -printf ("baudrate = %d bps\n" , bd->bi_baudrate); +printf ("baudrate = %u bps\n" , bd->bi_baudrate);return 0 ; }
Signature · 1 line
1.7.7.3
PATCH 14/14 sandbox: Change global data baudrate to int
In reply to Simon GlassThis doesn't need to be a long, so change it.
--- arch/sandbox/include/asm/global_data.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/sandbox/include/asm/global_data.h +1 -1
@@ -36,7 +36,7 @@ typedef struct global_data { bd_t *bd; unsigned long flags; - unsigned long baudrate; + unsigned int baudrate; unsigned long have_console; /* serial_init() was called */ unsigned long env_addr; /* Address of Environment struct */ unsigned long env_valid; /* Checksum of Environment valid? */
Signature · 1 line
1.7.7.3
cover Homogenise baud rate type to unsigned int
In reply to Simon GlassQuoted 47 lines · Simon Glass
The
global_dataandbd_infostructures for each board have different types for the baudrate andbi_baudratefields. This series lines them all up to be the same.There is some discussion on the list about using u32 instead of 'unsigned int'. These are equivalent on all current architectures, and other fields in
global_dataandbd_infodo not use this. However I can change this if required.Simon Glass (14):
sh: Changebi_baudrateand global data baudrate to int
avr32: Changebi_baudrateand global data baudrate to int
m68k: Changebi_baudrateand global data baudrate to int
microblaze: Changebi_baudrateand global data baudrate to int
nios2: Changebi_baudrateand global data baudrate to int
openrisc: Changebi_baudrateand global data baudrate to int
powerpc: Changebi_baudrateand global data baudrate to int
sparc: Changebi_baudrateand global data baudrate to int
arm: Change global data baudrate to int
blackfin: Change global data baudrate to int
mips: Change global data baudrate to int
nds32: Change global data baudrate to int
x86: Change global data baudrate to int
sandbox: Change global data baudrate to intarch/arm/include/asm/global_data.h | 2 +- arch/arm/include/asm/u-boot.h | 2 +- arch/avr32/include/asm/global_data.h | 2 +- arch/avr32/include/asm/u-boot.h | 2 +- arch/blackfin/include/asm/global_data.h | 2 +- arch/blackfin/include/asm/u-boot.h | 2 +- arch/blackfin/lib/board.c | 2 +- arch/m68k/include/asm/global_data.h | 2 +- arch/m68k/include/asm/u-boot.h | 2 +- arch/microblaze/include/asm/global_data.h | 2 +- arch/microblaze/include/asm/u-boot.h | 2 +- arch/mips/include/asm/global_data.h | 2 +- arch/mips/include/asm/u-boot.h | 2 +- arch/nds32/include/asm/global_data.h | 2 +- arch/nds32/include/asm/u-boot.h | 2 +- arch/nios2/include/asm/global_data.h | 2 +- arch/nios2/include/asm/u-boot.h | 2 +- arch/openrisc/include/asm/global_data.h | 2 +- arch/openrisc/include/asm/u-boot.h | 2 +- arch/powerpc/include/asm/global_data.h | 2 +- arch/powerpc/include/asm/u-boot.h | 2 +-
Quoted 8 lines
arch/sandbox/include/asm/global_data.h | 2 +- arch/sh/include/asm/global_data.h | 2 +- arch/sh/include/asm/u-boot.h | 2 +- arch/sparc/include/asm/global_data.h | 2 +- arch/sparc/include/asm/u-boot.h | 2 +- arch/x86/include/asm/global_data.h | 2 +- common/cmd_bdinfo.c | 26 +++++++++++++------------- 28 files changed, 40 insertions(+), 40 deletions(-)
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121020/e5ee9282/attachment.pgp>