mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-19 05:31:32 +00:00
arm: Move uart_clk to arch_global_data
Move this field into arch_global_data and tidy up. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
6bb9ba7260
commit
3a1dc8f125
3 changed files with 7 additions and 7 deletions
|
@ -296,10 +296,10 @@ int get_serial_clock(void)
|
||||||
* the UART divisor is available
|
* the UART divisor is available
|
||||||
*/
|
*/
|
||||||
#ifdef CONFIG_SYS_EXT_SERIAL_CLOCK
|
#ifdef CONFIG_SYS_EXT_SERIAL_CLOCK
|
||||||
gd->uart_clk = CONFIG_SYS_EXT_SERIAL_CLOCK;
|
gd->arch.uart_clk = CONFIG_SYS_EXT_SERIAL_CLOCK;
|
||||||
#else
|
#else
|
||||||
get_sys_info(&sys_info);
|
get_sys_info(&sys_info);
|
||||||
gd->uart_clk = sys_info.freqUART / udiv;
|
gd->arch.uart_clk = sys_info.freqUART / udiv;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return clk;
|
return clk;
|
||||||
|
|
|
@ -141,7 +141,7 @@ void ft_cpu_setup(void *blob, bd_t *bd)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fixup all UART clocks for CPU internal UARTs
|
* Fixup all UART clocks for CPU internal UARTs
|
||||||
* (only these UARTs are definitely clocked by gd->uart_clk)
|
* (only these UARTs are definitely clocked by gd->arch.uart_clk)
|
||||||
*
|
*
|
||||||
* These UARTs are direct childs of /plb/opb. This code
|
* These UARTs are direct childs of /plb/opb. This code
|
||||||
* does not touch any UARTs that are connected to the ebc.
|
* does not touch any UARTs that are connected to the ebc.
|
||||||
|
@ -160,7 +160,7 @@ void ft_cpu_setup(void *blob, bd_t *bd)
|
||||||
(fdt_node_check_compatible(blob, off, "ns16550") == 0))
|
(fdt_node_check_compatible(blob, off, "ns16550") == 0))
|
||||||
fdt_setprop(blob, off,
|
fdt_setprop(blob, off,
|
||||||
"clock-frequency",
|
"clock-frequency",
|
||||||
(void*)&(gd->uart_clk), 4);
|
(void *)&gd->arch.uart_clk, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -116,6 +116,9 @@ struct arch_global_data {
|
||||||
unsigned int dp_alloc_base;
|
unsigned int dp_alloc_base;
|
||||||
unsigned int dp_alloc_top;
|
unsigned int dp_alloc_top;
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(CONFIG_4xx)
|
||||||
|
u32 uart_clk;
|
||||||
|
#endif /* CONFIG_4xx */
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -145,9 +148,6 @@ typedef struct global_data {
|
||||||
#ifdef CONFIG_PRE_CONSOLE_BUFFER
|
#ifdef CONFIG_PRE_CONSOLE_BUFFER
|
||||||
unsigned long precon_buf_idx; /* Pre-Console buffer index */
|
unsigned long precon_buf_idx; /* Pre-Console buffer index */
|
||||||
#endif
|
#endif
|
||||||
#if defined(CONFIG_4xx)
|
|
||||||
u32 uart_clk;
|
|
||||||
#endif /* CONFIG_4xx */
|
|
||||||
#if defined(CONFIG_SYS_GT_6426x)
|
#if defined(CONFIG_SYS_GT_6426x)
|
||||||
unsigned int mirror_hack[16];
|
unsigned int mirror_hack[16];
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue