summaryrefslogtreecommitdiff
path: root/arch/sparc/cpu/leon3/serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/cpu/leon3/serial.c')
-rw-r--r--arch/sparc/cpu/leon3/serial.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/sparc/cpu/leon3/serial.c b/arch/sparc/cpu/leon3/serial.c
index f1dcab3377..c4a49ed369 100644
--- a/arch/sparc/cpu/leon3/serial.c
+++ b/arch/sparc/cpu/leon3/serial.c
@@ -14,6 +14,11 @@
DECLARE_GLOBAL_DATA_PTR;
+/* Select which UART that will become u-boot console */
+#ifndef CONFIG_SYS_GRLIB_APBUART_INDEX
+#define CONFIG_SYS_GRLIB_APBUART_INDEX 0
+#endif
+
static int leon3_serial_init(void)
{
ambapp_dev_apbuart *uart;
@@ -21,7 +26,8 @@ static int leon3_serial_init(void)
unsigned int tmp;
/* find UART */
- if (ambapp_apb_first(VENDOR_GAISLER, GAISLER_APBUART, &apbdev) != 1)
+ if (ambapp_apb_find(&ambapp_plb, VENDOR_GAISLER, GAISLER_APBUART,
+ CONFIG_SYS_GRLIB_APBUART_INDEX, &apbdev) != 1)
return -1; /* didn't find hardware */
/* found apbuart, let's init .. */