diff options
Diffstat (limited to 'arch/sparc/cpu/leon3')
-rw-r--r-- | arch/sparc/cpu/leon3/serial.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/sparc/cpu/leon3/serial.c b/arch/sparc/cpu/leon3/serial.c index 5348a78303..bc6e7a172e 100644 --- a/arch/sparc/cpu/leon3/serial.c +++ b/arch/sparc/cpu/leon3/serial.c @@ -17,8 +17,13 @@ DECLARE_GLOBAL_DATA_PTR; /* Select which UART that will become u-boot console */ #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 #endif +#endif static unsigned apbuart_calc_scaler(unsigned apbuart_freq, unsigned baud) { |