mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
bd_info: remove bi_barudrate member from struct bd_info
gd->bd->bi_baudrate is a copy of gd->baudrate. Since baudrate is a common feature for all architectures, keep gd->baudrate only. It is true that bi_baudrate was passed to the kernel in that structure but it was a long time ago. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Tom Rini <trini@ti.com> Cc: Simon Glass <sjg@chromium.org> Cc: Wolfgang Denk <wd@denx.de> Cc: Heiko Schocher <hs@denx.de> Acked-by: Michal Simek <monstr@monstr.eu> (For microblaze)
This commit is contained in:
committed by
Tom Rini
parent
3e41c54ad8
commit
8e2615752e
@@ -27,7 +27,6 @@
|
|||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
typedef struct bd_info {
|
typedef struct bd_info {
|
||||||
unsigned int bi_baudrate; /* serial console baudrate */
|
|
||||||
ulong bi_arch_number; /* unique id for this board */
|
ulong bi_arch_number; /* unique id for this board */
|
||||||
ulong bi_boot_params; /* where this board expects params */
|
ulong bi_boot_params; /* where this board expects params */
|
||||||
unsigned long bi_arm_freq; /* arm frequency */
|
unsigned long bi_arm_freq; /* arm frequency */
|
||||||
|
@@ -445,7 +445,6 @@ void board_init_f(ulong bootflag)
|
|||||||
post_run(NULL, POST_ROM | post_bootmode_get(0));
|
post_run(NULL, POST_ROM | post_bootmode_get(0));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
gd->bd->bi_baudrate = gd->baudrate;
|
|
||||||
/* Ram ist board specific, so move it to board code ... */
|
/* Ram ist board specific, so move it to board code ... */
|
||||||
dram_init_banksize();
|
dram_init_banksize();
|
||||||
display_dram_config(); /* and display it */
|
display_dram_config(); /* and display it */
|
||||||
|
@@ -7,7 +7,6 @@
|
|||||||
#define __ASM_U_BOOT_H__ 1
|
#define __ASM_U_BOOT_H__ 1
|
||||||
|
|
||||||
typedef struct bd_info {
|
typedef struct bd_info {
|
||||||
unsigned int bi_baudrate;
|
|
||||||
unsigned char bi_phy_id[4];
|
unsigned char bi_phy_id[4];
|
||||||
unsigned long bi_board_number;
|
unsigned long bi_board_number;
|
||||||
void *bi_boot_params;
|
void *bi_boot_params;
|
||||||
|
@@ -220,7 +220,6 @@ void board_init_f(ulong board_type)
|
|||||||
*/
|
*/
|
||||||
bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
|
bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
|
||||||
bd->bi_dram[0].size = sdram_size;
|
bd->bi_dram[0].size = sdram_size;
|
||||||
bd->bi_baudrate = gd->baudrate;
|
|
||||||
|
|
||||||
memcpy(new_gd, gd, sizeof(gd_t));
|
memcpy(new_gd, gd, sizeof(gd_t));
|
||||||
|
|
||||||
|
@@ -13,7 +13,6 @@
|
|||||||
#define _U_BOOT_H_ 1
|
#define _U_BOOT_H_ 1
|
||||||
|
|
||||||
typedef struct bd_info {
|
typedef struct bd_info {
|
||||||
unsigned int bi_baudrate; /* serial console baudrate */
|
|
||||||
unsigned long bi_boot_params; /* where this board expects params */
|
unsigned long bi_boot_params; /* where this board expects params */
|
||||||
unsigned long bi_memstart; /* start of DRAM memory */
|
unsigned long bi_memstart; /* start of DRAM memory */
|
||||||
phys_size_t bi_memsize; /* size of DRAM memory in bytes */
|
phys_size_t bi_memsize; /* size of DRAM memory in bytes */
|
||||||
|
@@ -69,7 +69,6 @@ static int display_banner(void)
|
|||||||
static int init_baudrate(void)
|
static int init_baudrate(void)
|
||||||
{
|
{
|
||||||
gd->baudrate = getenv_ulong("baudrate", 10, CONFIG_BAUDRATE);
|
gd->baudrate = getenv_ulong("baudrate", 10, CONFIG_BAUDRATE);
|
||||||
gd->bd->bi_baudrate = gd->baudrate;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,7 +91,6 @@ static void display_global_data(void)
|
|||||||
printf(" |-env_valid: %lx\n", gd->env_valid);
|
printf(" |-env_valid: %lx\n", gd->env_valid);
|
||||||
printf(" |-jt(%p): %p\n", gd->jt, *(gd->jt));
|
printf(" |-jt(%p): %p\n", gd->jt, *(gd->jt));
|
||||||
printf(" \\-bd: %p\n", gd->bd);
|
printf(" \\-bd: %p\n", gd->bd);
|
||||||
printf(" |-bi_baudrate: %x\n", bd->bi_baudrate);
|
|
||||||
printf(" |-bi_boot_params: %lx\n", bd->bi_boot_params);
|
printf(" |-bi_boot_params: %lx\n", bd->bi_boot_params);
|
||||||
printf(" |-bi_memstart: %lx\n", bd->bi_memstart);
|
printf(" |-bi_memstart: %lx\n", bd->bi_memstart);
|
||||||
printf(" |-bi_memsize: %lx\n", bd->bi_memsize);
|
printf(" |-bi_memsize: %lx\n", bd->bi_memsize);
|
||||||
|
@@ -44,7 +44,6 @@ typedef struct bd_info {
|
|||||||
unsigned long bi_vcofreq; /* vco Freq in MHz */
|
unsigned long bi_vcofreq; /* vco Freq in MHz */
|
||||||
unsigned long bi_flbfreq; /* Flexbus Freq in MHz */
|
unsigned long bi_flbfreq; /* Flexbus Freq in MHz */
|
||||||
#endif
|
#endif
|
||||||
unsigned int bi_baudrate; /* Console Baudrate */
|
|
||||||
} bd_t;
|
} bd_t;
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
|
@@ -342,7 +342,6 @@ board_init_f (ulong bootflag)
|
|||||||
bd->bi_vcofreq = gd->arch.vco_clk; /* vco Freq in Hz */
|
bd->bi_vcofreq = gd->arch.vco_clk; /* vco Freq in Hz */
|
||||||
bd->bi_flbfreq = gd->arch.flb_clk; /* flexbus Freq in Hz */
|
bd->bi_flbfreq = gd->arch.flb_clk; /* flexbus Freq in Hz */
|
||||||
#endif
|
#endif
|
||||||
bd->bi_baudrate = gd->baudrate; /* Console Baudrate */
|
|
||||||
|
|
||||||
#ifdef CONFIG_SYS_EXTBDINFO
|
#ifdef CONFIG_SYS_EXTBDINFO
|
||||||
strncpy (bd->bi_s_version, "1.2", sizeof (bd->bi_s_version));
|
strncpy (bd->bi_s_version, "1.2", sizeof (bd->bi_s_version));
|
||||||
|
@@ -24,7 +24,6 @@ typedef struct bd_info {
|
|||||||
unsigned long bi_flashoffset; /* reserved area for startup monitor */
|
unsigned long bi_flashoffset; /* reserved area for startup monitor */
|
||||||
unsigned long bi_sramstart; /* start of SRAM memory */
|
unsigned long bi_sramstart; /* start of SRAM memory */
|
||||||
unsigned long bi_sramsize; /* size of SRAM memory */
|
unsigned long bi_sramsize; /* size of SRAM memory */
|
||||||
unsigned int bi_baudrate; /* Console Baudrate */
|
|
||||||
ulong bi_boot_params; /* where this board expects params */
|
ulong bi_boot_params; /* where this board expects params */
|
||||||
} bd_t;
|
} bd_t;
|
||||||
|
|
||||||
|
@@ -78,7 +78,6 @@ void board_init_f(ulong not_used)
|
|||||||
memset((void *)bd, 0, GENERATED_BD_INFO_SIZE);
|
memset((void *)bd, 0, GENERATED_BD_INFO_SIZE);
|
||||||
gd->bd = bd;
|
gd->bd = bd;
|
||||||
gd->baudrate = CONFIG_BAUDRATE;
|
gd->baudrate = CONFIG_BAUDRATE;
|
||||||
bd->bi_baudrate = CONFIG_BAUDRATE;
|
|
||||||
bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
|
bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
|
||||||
bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
|
bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
|
||||||
gd->flags |= GD_FLG_RELOC; /* tell others: relocation done */
|
gd->flags |= GD_FLG_RELOC; /* tell others: relocation done */
|
||||||
|
@@ -23,7 +23,6 @@
|
|||||||
#else /* !CONFIG_SYS_GENERIC_BOARD */
|
#else /* !CONFIG_SYS_GENERIC_BOARD */
|
||||||
|
|
||||||
typedef struct bd_info {
|
typedef struct bd_info {
|
||||||
unsigned int bi_baudrate; /* serial console baudrate */
|
|
||||||
unsigned long bi_arch_number; /* unique id for this board */
|
unsigned long bi_arch_number; /* unique id for this board */
|
||||||
unsigned long bi_boot_params; /* where this board expects params */
|
unsigned long bi_boot_params; /* where this board expects params */
|
||||||
unsigned long bi_memstart; /* start of DRAM memory */
|
unsigned long bi_memstart; /* start of DRAM memory */
|
||||||
|
@@ -204,7 +204,6 @@ void board_init_f(ulong bootflag)
|
|||||||
*/
|
*/
|
||||||
bd->bi_memstart = CONFIG_SYS_SDRAM_BASE; /* start of DRAM */
|
bd->bi_memstart = CONFIG_SYS_SDRAM_BASE; /* start of DRAM */
|
||||||
bd->bi_memsize = gd->ram_size; /* size of DRAM in bytes */
|
bd->bi_memsize = gd->ram_size; /* size of DRAM in bytes */
|
||||||
bd->bi_baudrate = gd->baudrate; /* Console Baudrate */
|
|
||||||
|
|
||||||
memcpy(id, (void *)gd, sizeof(gd_t));
|
memcpy(id, (void *)gd, sizeof(gd_t));
|
||||||
|
|
||||||
|
@@ -23,7 +23,6 @@
|
|||||||
#include <environment.h>
|
#include <environment.h>
|
||||||
|
|
||||||
typedef struct bd_info {
|
typedef struct bd_info {
|
||||||
unsigned int bi_baudrate; /* serial console baudrate */
|
|
||||||
unsigned long bi_arch_number; /* unique id for this board */
|
unsigned long bi_arch_number; /* unique id for this board */
|
||||||
unsigned long bi_boot_params; /* where this board expects params */
|
unsigned long bi_boot_params; /* where this board expects params */
|
||||||
unsigned long bi_memstart; /* start of DRAM memory */
|
unsigned long bi_memstart; /* start of DRAM memory */
|
||||||
|
@@ -255,7 +255,6 @@ void board_init_f(ulong bootflag)
|
|||||||
addr_sp &= ~0x07;
|
addr_sp &= ~0x07;
|
||||||
debug("New Stack Pointer is: %08lx\n", addr_sp);
|
debug("New Stack Pointer is: %08lx\n", addr_sp);
|
||||||
|
|
||||||
gd->bd->bi_baudrate = gd->baudrate;
|
|
||||||
/* Ram isn't board specific, so move it to board code ... */
|
/* Ram isn't board specific, so move it to board code ... */
|
||||||
dram_init_banksize();
|
dram_init_banksize();
|
||||||
display_dram_config(); /* and display it */
|
display_dram_config(); /* and display it */
|
||||||
|
@@ -23,7 +23,6 @@ typedef struct bd_info {
|
|||||||
unsigned long bi_flashoffset; /* reserved area for startup monitor */
|
unsigned long bi_flashoffset; /* reserved area for startup monitor */
|
||||||
unsigned long bi_sramstart; /* start of SRAM memory */
|
unsigned long bi_sramstart; /* start of SRAM memory */
|
||||||
unsigned long bi_sramsize; /* size of SRAM memory */
|
unsigned long bi_sramsize; /* size of SRAM memory */
|
||||||
unsigned int bi_baudrate; /* Console Baudrate */
|
|
||||||
} bd_t;
|
} bd_t;
|
||||||
|
|
||||||
/* For image.h:image_check_target_arch() */
|
/* For image.h:image_check_target_arch() */
|
||||||
|
@@ -92,7 +92,6 @@ void board_init(void)
|
|||||||
bd->bi_sramstart = CONFIG_SYS_SRAM_BASE;
|
bd->bi_sramstart = CONFIG_SYS_SRAM_BASE;
|
||||||
bd->bi_sramsize = CONFIG_SYS_SRAM_SIZE;
|
bd->bi_sramsize = CONFIG_SYS_SRAM_SIZE;
|
||||||
#endif
|
#endif
|
||||||
bd->bi_baudrate = CONFIG_BAUDRATE;
|
|
||||||
|
|
||||||
for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
|
for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
|
||||||
WATCHDOG_RESET();
|
WATCHDOG_RESET();
|
||||||
|
@@ -16,7 +16,6 @@
|
|||||||
#define _U_BOOT_H_
|
#define _U_BOOT_H_
|
||||||
|
|
||||||
typedef struct bd_info {
|
typedef struct bd_info {
|
||||||
unsigned int bi_baudrate; /* serial console baudrate */
|
|
||||||
unsigned long bi_arch_number; /* unique id for this board */
|
unsigned long bi_arch_number; /* unique id for this board */
|
||||||
unsigned long bi_boot_params; /* where this board expects params */
|
unsigned long bi_boot_params; /* where this board expects params */
|
||||||
unsigned long bi_memstart; /* start of DRAM memory */
|
unsigned long bi_memstart; /* start of DRAM memory */
|
||||||
|
@@ -84,7 +84,6 @@ void board_init(void)
|
|||||||
bd->bi_sramstart = CONFIG_SYS_SRAM_BASE;
|
bd->bi_sramstart = CONFIG_SYS_SRAM_BASE;
|
||||||
bd->bi_sramsize = CONFIG_SYS_SRAM_SIZE;
|
bd->bi_sramsize = CONFIG_SYS_SRAM_SIZE;
|
||||||
#endif
|
#endif
|
||||||
bd->bi_baudrate = CONFIG_BAUDRATE;
|
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(init_sequence); i++) {
|
for (i = 0; i < ARRAY_SIZE(init_sequence); i++) {
|
||||||
WATCHDOG_RESET();
|
WATCHDOG_RESET();
|
||||||
|
@@ -674,7 +674,7 @@ void ft_cpu_setup(void *blob, bd_t *bd)
|
|||||||
|
|
||||||
#ifdef CONFIG_CPM2
|
#ifdef CONFIG_CPM2
|
||||||
do_fixup_by_compat_u32(blob, "fsl,cpm2-scc-uart",
|
do_fixup_by_compat_u32(blob, "fsl,cpm2-scc-uart",
|
||||||
"current-speed", bd->bi_baudrate, 1);
|
"current-speed", gd->baudrate, 1);
|
||||||
|
|
||||||
do_fixup_by_compat_u32(blob, "fsl,cpm2-brg",
|
do_fixup_by_compat_u32(blob, "fsl,cpm2-brg",
|
||||||
"clock-frequency", bd->bi_brgfreq, 1);
|
"clock-frequency", bd->bi_brgfreq, 1);
|
||||||
|
@@ -64,7 +64,6 @@ typedef struct bd_info {
|
|||||||
unsigned long bi_ipbfreq; /* IPB Bus Freq, in MHz */
|
unsigned long bi_ipbfreq; /* IPB Bus Freq, in MHz */
|
||||||
unsigned long bi_pcifreq; /* PCI Bus Freq, in MHz */
|
unsigned long bi_pcifreq; /* PCI Bus Freq, in MHz */
|
||||||
#endif
|
#endif
|
||||||
unsigned int bi_baudrate; /* Console Baudrate */
|
|
||||||
#if defined(CONFIG_405) || \
|
#if defined(CONFIG_405) || \
|
||||||
defined(CONFIG_405GP) || \
|
defined(CONFIG_405GP) || \
|
||||||
defined(CONFIG_405EP) || \
|
defined(CONFIG_405EP) || \
|
||||||
|
@@ -547,7 +547,6 @@ void board_init_f(ulong bootflag)
|
|||||||
bd->bi_ipbfreq = gd->arch.ipb_clk;
|
bd->bi_ipbfreq = gd->arch.ipb_clk;
|
||||||
bd->bi_pcifreq = gd->pci_clk;
|
bd->bi_pcifreq = gd->pci_clk;
|
||||||
#endif /* CONFIG_MPC5xxx */
|
#endif /* CONFIG_MPC5xxx */
|
||||||
bd->bi_baudrate = gd->baudrate; /* Console Baudrate */
|
|
||||||
|
|
||||||
#ifdef CONFIG_SYS_EXTBDINFO
|
#ifdef CONFIG_SYS_EXTBDINFO
|
||||||
strncpy((char *) bd->bi_s_version, "1.2", sizeof(bd->bi_s_version));
|
strncpy((char *) bd->bi_s_version, "1.2", sizeof(bd->bi_s_version));
|
||||||
|
@@ -20,7 +20,6 @@ typedef struct bd_info {
|
|||||||
unsigned long bi_flashoffset; /* reserved area for startup monitor */
|
unsigned long bi_flashoffset; /* reserved area for startup monitor */
|
||||||
unsigned long bi_sramstart; /* start of SRAM memory */
|
unsigned long bi_sramstart; /* start of SRAM memory */
|
||||||
unsigned long bi_sramsize; /* size of SRAM memory */
|
unsigned long bi_sramsize; /* size of SRAM memory */
|
||||||
unsigned int bi_baudrate; /* Console Baudrate */
|
|
||||||
unsigned long bi_boot_params; /* where this board expects params */
|
unsigned long bi_boot_params; /* where this board expects params */
|
||||||
} bd_t;
|
} bd_t;
|
||||||
|
|
||||||
|
@@ -155,7 +155,6 @@ void sh_generic_init(void)
|
|||||||
bd->bi_sramstart = CONFIG_SYS_SRAM_BASE;
|
bd->bi_sramstart = CONFIG_SYS_SRAM_BASE;
|
||||||
bd->bi_sramsize = CONFIG_SYS_SRAM_SIZE;
|
bd->bi_sramsize = CONFIG_SYS_SRAM_SIZE;
|
||||||
#endif
|
#endif
|
||||||
bd->bi_baudrate = CONFIG_BAUDRATE;
|
|
||||||
|
|
||||||
for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
|
for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
|
||||||
WATCHDOG_RESET();
|
WATCHDOG_RESET();
|
||||||
|
@@ -40,7 +40,6 @@ typedef struct bd_info {
|
|||||||
unsigned short bi_ethspeed; /* Ethernet speed in Mbps */
|
unsigned short bi_ethspeed; /* Ethernet speed in Mbps */
|
||||||
unsigned long bi_intfreq; /* Internal Freq, in MHz */
|
unsigned long bi_intfreq; /* Internal Freq, in MHz */
|
||||||
unsigned long bi_busfreq; /* Bus Freq, in MHz */
|
unsigned long bi_busfreq; /* Bus Freq, in MHz */
|
||||||
unsigned int bi_baudrate; /* Console Baudrate */
|
|
||||||
} bd_t;
|
} bd_t;
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
|
@@ -173,7 +173,6 @@ void board_init_f(ulong bootflag)
|
|||||||
bd->bi_sramstart = CONFIG_SYS_SRAM_BASE;
|
bd->bi_sramstart = CONFIG_SYS_SRAM_BASE;
|
||||||
bd->bi_sramsize = CONFIG_SYS_SRAM_SIZE;
|
bd->bi_sramsize = CONFIG_SYS_SRAM_SIZE;
|
||||||
#endif
|
#endif
|
||||||
bd->bi_baudrate = CONFIG_BAUDRATE;
|
|
||||||
bd->bi_bootflags = bootflag; /* boot / reboot flag (for LynxOS) */
|
bd->bi_bootflags = bootflag; /* boot / reboot flag (for LynxOS) */
|
||||||
|
|
||||||
gd->flags |= GD_FLG_RELOC; /* tell others: relocation done */
|
gd->flags |= GD_FLG_RELOC; /* tell others: relocation done */
|
||||||
|
@@ -286,6 +286,8 @@ int board_early_init_r (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
|
#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
|
||||||
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* update "memory" property in the blob
|
* update "memory" property in the blob
|
||||||
*/
|
*/
|
||||||
@@ -314,7 +316,7 @@ void ft_blob_update (void *blob, bd_t *bd)
|
|||||||
/* baudrate */
|
/* baudrate */
|
||||||
nodeoffset = fdt_path_offset (blob, "/soc/cpm/serial");
|
nodeoffset = fdt_path_offset (blob, "/soc/cpm/serial");
|
||||||
if (nodeoffset >= 0) {
|
if (nodeoffset >= 0) {
|
||||||
speed = cpu_to_be32 (bd->bi_baudrate);
|
speed = cpu_to_be32 (gd->baudrate);
|
||||||
ret = fdt_setprop (blob, nodeoffset, "current-speed", &speed,
|
ret = fdt_setprop (blob, nodeoffset, "current-speed", &speed,
|
||||||
sizeof (unsigned long));
|
sizeof (unsigned long));
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
@@ -58,7 +58,6 @@ int checkboard (void)
|
|||||||
u32 BoardType = get_BoardType ();
|
u32 BoardType = get_BoardType ();
|
||||||
char *BoardName[2] = { "mvBlueBOX", "mvBlueLYNX" };
|
char *BoardName[2] = { "mvBlueBOX", "mvBlueLYNX" };
|
||||||
char *p;
|
char *p;
|
||||||
bd_t *bd = gd->bd;
|
|
||||||
|
|
||||||
hw_watchdog_reset ();
|
hw_watchdog_reset ();
|
||||||
|
|
||||||
@@ -71,8 +70,8 @@ int checkboard (void)
|
|||||||
if ((p = getenv ("console_nr")) != NULL) {
|
if ((p = getenv ("console_nr")) != NULL) {
|
||||||
unsigned long con_nr = simple_strtoul (p, NULL, 10) & 3;
|
unsigned long con_nr = simple_strtoul (p, NULL, 10) & 3;
|
||||||
|
|
||||||
bd->bi_baudrate &= ~3;
|
gd->baudrate &= ~3;
|
||||||
bd->bi_baudrate |= con_nr & 3;
|
gd->baudrate |= con_nr & 3;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -708,14 +708,6 @@ static int init_post(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int setup_baud_rate(void)
|
|
||||||
{
|
|
||||||
/* Ick, can we get rid of this line? */
|
|
||||||
gd->bd->bi_baudrate = gd->baudrate;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int setup_dram_config(void)
|
static int setup_dram_config(void)
|
||||||
{
|
{
|
||||||
/* Ram is board specific, so move it to board code ... */
|
/* Ram is board specific, so move it to board code ... */
|
||||||
@@ -954,7 +946,6 @@ static init_fnc_t init_sequence_f[] = {
|
|||||||
INIT_FUNC_WATCHDOG_RESET
|
INIT_FUNC_WATCHDOG_RESET
|
||||||
setup_board_part2,
|
setup_board_part2,
|
||||||
#endif
|
#endif
|
||||||
setup_baud_rate,
|
|
||||||
display_new_sp,
|
display_new_sp,
|
||||||
#ifdef CONFIG_SYS_EXTBDINFO
|
#ifdef CONFIG_SYS_EXTBDINFO
|
||||||
setup_board_extra,
|
setup_board_extra,
|
||||||
|
@@ -148,7 +148,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|||||||
print_mhz("ethspeed", bd->bi_ethspeed);
|
print_mhz("ethspeed", bd->bi_ethspeed);
|
||||||
#endif
|
#endif
|
||||||
printf("IP addr = %s\n", getenv("ipaddr"));
|
printf("IP addr = %s\n", getenv("ipaddr"));
|
||||||
printf("baudrate = %6u bps\n", bd->bi_baudrate);
|
printf("baudrate = %6u bps\n", gd->baudrate);
|
||||||
print_num("relocaddr", gd->relocaddr);
|
print_num("relocaddr", gd->relocaddr);
|
||||||
board_detail();
|
board_detail();
|
||||||
return 0;
|
return 0;
|
||||||
@@ -176,7 +176,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|||||||
printf("ip_addr = %s\n", getenv("ipaddr"));
|
printf("ip_addr = %s\n", getenv("ipaddr"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
printf("baudrate = %u bps\n", bd->bi_baudrate);
|
printf("baudrate = %u bps\n", gd->baudrate);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -198,7 +198,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|||||||
#if defined(CONFIG_CMD_NET)
|
#if defined(CONFIG_CMD_NET)
|
||||||
print_eths();
|
print_eths();
|
||||||
#endif
|
#endif
|
||||||
printf("baudrate = %u bps\n", bd->bi_baudrate);
|
printf("baudrate = %u bps\n", gd->baudrate);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -231,7 +231,7 @@ int do_bdinfo(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
|
|||||||
print_eth(0);
|
print_eth(0);
|
||||||
printf("ip_addr = %s\n", getenv("ipaddr"));
|
printf("ip_addr = %s\n", getenv("ipaddr"));
|
||||||
#endif
|
#endif
|
||||||
printf("baudrate = %6u bps\n", bd->bi_baudrate);
|
printf("baudrate = %6u bps\n", gd->baudrate);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -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"));
|
printf("ip_addr = %s\n", getenv("ipaddr"));
|
||||||
#endif
|
#endif
|
||||||
printf("baudrate = %u bps\n", bd->bi_baudrate);
|
printf("baudrate = %u bps\n", gd->baudrate);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -304,7 +304,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|||||||
|
|
||||||
print_eth(0);
|
print_eth(0);
|
||||||
printf("ip_addr = %s\n", getenv("ipaddr"));
|
printf("ip_addr = %s\n", getenv("ipaddr"));
|
||||||
printf("baudrate = %u bps\n", bd->bi_baudrate);
|
printf("baudrate = %u bps\n", gd->baudrate);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -324,7 +324,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|||||||
|
|
||||||
print_eth(0);
|
print_eth(0);
|
||||||
printf("ip_addr = %s\n", getenv("ipaddr"));
|
printf("ip_addr = %s\n", getenv("ipaddr"));
|
||||||
printf("baudrate = %u bps\n", bd->bi_baudrate);
|
printf("baudrate = %u bps\n", gd->baudrate);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -344,7 +344,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|||||||
|
|
||||||
print_eth(0);
|
print_eth(0);
|
||||||
printf("ip_addr = %s\n", getenv("ipaddr"));
|
printf("ip_addr = %s\n", getenv("ipaddr"));
|
||||||
printf("baudrate = %u bps\n", bd->bi_baudrate);
|
printf("baudrate = %u bps\n", gd->baudrate);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -368,7 +368,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|||||||
#if defined(CONFIG_CMD_NET)
|
#if defined(CONFIG_CMD_NET)
|
||||||
print_eths();
|
print_eths();
|
||||||
#endif
|
#endif
|
||||||
printf("baudrate = %u bps\n", bd->bi_baudrate);
|
printf("baudrate = %u bps\n", gd->baudrate);
|
||||||
#if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF))
|
#if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF))
|
||||||
print_num("TLB addr", gd->arch.tlb_addr);
|
print_num("TLB addr", gd->arch.tlb_addr);
|
||||||
#endif
|
#endif
|
||||||
@@ -406,7 +406,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|||||||
print_eth(0);
|
print_eth(0);
|
||||||
printf("ip_addr = %s\n", getenv("ipaddr"));
|
printf("ip_addr = %s\n", getenv("ipaddr"));
|
||||||
#endif
|
#endif
|
||||||
printf("baudrate = %u bps\n", bd->bi_baudrate);
|
printf("baudrate = %u bps\n", gd->baudrate);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -440,7 +440,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|||||||
printf("ip_addr = %s\n", getenv("ipaddr"));
|
printf("ip_addr = %s\n", getenv("ipaddr"));
|
||||||
print_mhz("ethspeed", bd->bi_ethspeed);
|
print_mhz("ethspeed", bd->bi_ethspeed);
|
||||||
#endif
|
#endif
|
||||||
printf("baudrate = %u bps\n", bd->bi_baudrate);
|
printf("baudrate = %u bps\n", gd->baudrate);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -490,7 +490,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|||||||
print_eth(0);
|
print_eth(0);
|
||||||
printf("ip_addr = %s\n", getenv("ipaddr"));
|
printf("ip_addr = %s\n", getenv("ipaddr"));
|
||||||
#endif
|
#endif
|
||||||
printf("baudrate = %u bps\n", bd->bi_baudrate);
|
printf("baudrate = %u bps\n", gd->baudrate);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -512,7 +512,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|||||||
printf("ip_addr = %s\n", getenv("ipaddr"));
|
printf("ip_addr = %s\n", getenv("ipaddr"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
printf("baudrate = %u bps\n", bd->bi_baudrate);
|
printf("baudrate = %u bps\n", gd->baudrate);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -530,7 +530,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|||||||
print_eth(0);
|
print_eth(0);
|
||||||
printf("ip_addr = %s\n", getenv("ipaddr"));
|
printf("ip_addr = %s\n", getenv("ipaddr"));
|
||||||
#endif
|
#endif
|
||||||
printf("baudrate = %d bps\n", bd->bi_baudrate);
|
printf("baudrate = %d bps\n", gd->baudrate);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -74,9 +74,6 @@ static int on_baudrate(const char *name, const char *value, enum env_op op,
|
|||||||
}
|
}
|
||||||
|
|
||||||
gd->baudrate = baudrate;
|
gd->baudrate = baudrate;
|
||||||
#if defined(CONFIG_PPC) || defined(CONFIG_MCF52x2)
|
|
||||||
gd->bd->bi_baudrate = baudrate;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
serial_setbrg();
|
serial_setbrg();
|
||||||
|
|
||||||
@@ -502,12 +499,11 @@ int uart_post_test(int flags)
|
|||||||
unsigned char c;
|
unsigned char c;
|
||||||
int ret, saved_baud, b;
|
int ret, saved_baud, b;
|
||||||
struct serial_device *saved_dev, *s;
|
struct serial_device *saved_dev, *s;
|
||||||
bd_t *bd = gd->bd;
|
|
||||||
|
|
||||||
/* Save current serial state */
|
/* Save current serial state */
|
||||||
ret = 0;
|
ret = 0;
|
||||||
saved_dev = serial_current;
|
saved_dev = serial_current;
|
||||||
saved_baud = bd->bi_baudrate;
|
saved_baud = gd->baudrate;
|
||||||
|
|
||||||
for (s = serial_devices; s; s = s->next) {
|
for (s = serial_devices; s; s = s->next) {
|
||||||
/* If this driver doesn't support loop back, skip it */
|
/* If this driver doesn't support loop back, skip it */
|
||||||
@@ -530,7 +526,7 @@ int uart_post_test(int flags)
|
|||||||
|
|
||||||
/* Test every available baud rate */
|
/* Test every available baud rate */
|
||||||
for (b = 0; b < ARRAY_SIZE(bauds); ++b) {
|
for (b = 0; b < ARRAY_SIZE(bauds); ++b) {
|
||||||
bd->bi_baudrate = bauds[b];
|
gd->baudrate = bauds[b];
|
||||||
serial_setbrg();
|
serial_setbrg();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -572,7 +568,7 @@ int uart_post_test(int flags)
|
|||||||
done:
|
done:
|
||||||
/* Restore previous serial state */
|
/* Restore previous serial state */
|
||||||
serial_current = saved_dev;
|
serial_current = saved_dev;
|
||||||
bd->bi_baudrate = saved_baud;
|
gd->baudrate = saved_baud;
|
||||||
serial_reinit_all();
|
serial_reinit_all();
|
||||||
serial_setbrg();
|
serial_setbrg();
|
||||||
|
|
||||||
|
@@ -66,7 +66,6 @@ typedef struct bd_info {
|
|||||||
unsigned long bi_ipbfreq; /* IPB Bus Freq, in MHz */
|
unsigned long bi_ipbfreq; /* IPB Bus Freq, in MHz */
|
||||||
unsigned long bi_pcifreq; /* PCI Bus Freq, in MHz */
|
unsigned long bi_pcifreq; /* PCI Bus Freq, in MHz */
|
||||||
#endif
|
#endif
|
||||||
unsigned int bi_baudrate; /* Console Baudrate */
|
|
||||||
#if defined(CONFIG_405) || \
|
#if defined(CONFIG_405) || \
|
||||||
defined(CONFIG_405GP) || \
|
defined(CONFIG_405GP) || \
|
||||||
defined(CONFIG_405EP) || \
|
defined(CONFIG_405EP) || \
|
||||||
|
Reference in New Issue
Block a user