diff options
author | Francois Retief <fgretief@spaceteq.co.za> | 2015-10-30 13:23:41 +0200 |
---|---|---|
committer | Francois Retief <fgretief@spaceteq.co.za> | 2015-12-03 13:15:48 +0200 |
commit | c2b37a0d558b169a8b2379e64329f19a4a5ee37f (patch) | |
tree | 19ef7e0ee05dc60c41c274ee546ec1994825d787 /arch/sparc | |
parent | ff0b9b77c2c86e9c6cdb572a258b29f24fcd754a (diff) | |
download | u-boot-imx-c2b37a0d558b169a8b2379e64329f19a4a5ee37f.zip u-boot-imx-c2b37a0d558b169a8b2379e64329f19a4a5ee37f.tar.gz u-boot-imx-c2b37a0d558b169a8b2379e64329f19a4a5ee37f.tar.bz2 |
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>
Diffstat (limited to 'arch/sparc')
-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 5348a78..bc6e7a1 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) { |