mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-28 01:51:33 +00:00
sparc: leon3: Updated serial driver to use CONFIG_CONS_INDEX
Updated the LEON3 serial driver to make use of the CONFIG_CONS_INDEX option to select which serial port the console will use. Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
This commit is contained in:
parent
ff0b9b77c2
commit
c2b37a0d55
1 changed files with 5 additions and 0 deletions
|
@ -17,8 +17,13 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
/* Select which UART that will become u-boot console */
|
/* Select which UART that will become u-boot console */
|
||||||
#ifndef CONFIG_SYS_GRLIB_APBUART_INDEX
|
#ifndef CONFIG_SYS_GRLIB_APBUART_INDEX
|
||||||
|
/* Try to use CONFIG_CONS_INDEX, if available, it is numbered from 1 */
|
||||||
|
#ifdef CONFIG_CONS_INDEX
|
||||||
|
#define CONFIG_SYS_GRLIB_APBUART_INDEX (CONFIG_CONS_INDEX - 1)
|
||||||
|
#else
|
||||||
#define CONFIG_SYS_GRLIB_APBUART_INDEX 0
|
#define CONFIG_SYS_GRLIB_APBUART_INDEX 0
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
static unsigned apbuart_calc_scaler(unsigned apbuart_freq, unsigned baud)
|
static unsigned apbuart_calc_scaler(unsigned apbuart_freq, unsigned baud)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue