mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-11-29 14:41:26 +01:00
serial/serial_arc: set registers address during compilation
Being global variable with 0 value it falls into .bss area which we may only use after relocation to RAM. And right afetr relocation we zero .bss - effectively cleaing register address set for early console. Now with pre-set value "regs" variable is no longer in .bss and this way safely survives relocation. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
This commit is contained in:
parent
8a5c9ca4d0
commit
36d68668e3
@ -28,7 +28,7 @@ struct arc_serial_regs {
|
|||||||
#define UART_OVERFLOW_ERR (1 << 1)
|
#define UART_OVERFLOW_ERR (1 << 1)
|
||||||
#define UART_TXEMPTY (1 << 7)
|
#define UART_TXEMPTY (1 << 7)
|
||||||
|
|
||||||
struct arc_serial_regs *regs;
|
struct arc_serial_regs *regs = (struct arc_serial_regs *)CONFIG_ARC_UART_BASE;
|
||||||
|
|
||||||
static void arc_serial_setbrg(void)
|
static void arc_serial_setbrg(void)
|
||||||
{
|
{
|
||||||
@ -60,7 +60,6 @@ static void arc_serial_setbrg(void)
|
|||||||
|
|
||||||
static int arc_serial_init(void)
|
static int arc_serial_init(void)
|
||||||
{
|
{
|
||||||
regs = (struct arc_serial_regs *)CONFIG_ARC_UART_BASE;
|
|
||||||
serial_setbrg();
|
serial_setbrg();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user