summaryrefslogtreecommitdiffstats
path: root/board/ti
diff options
context:
space:
mode:
authorLokesh Vutla <lokeshvutla@ti.com>2016-05-16 11:47:29 +0530
committerTom Rini <trini@konsulko.com>2016-05-27 15:47:54 -0400
commit3d16389c909657a5fd1017e771ce5acf8aed6189 (patch)
tree460c0e357976c64a1d233fd33b6c958bdb32cfa7 /board/ti
parent73ec6960591c57838694ab4056b33438cd2b42c9 (diff)
downloadblackbird-obmc-uboot-3d16389c909657a5fd1017e771ce5acf8aed6189.tar.gz
blackbird-obmc-uboot-3d16389c909657a5fd1017e771ce5acf8aed6189.zip
board: am335x: Allow to choose serial device dynamically
Different AM335x based platforms have different serial consoles. As serial console is Kconfig option a separate defconfig has to be created for each platform. So pass the serial device dynamically. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Diffstat (limited to 'board/ti')
-rw-r--r--board/ti/am335x/board.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index ff52314bf5..56f4984f47 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <errno.h>
#include <spl.h>
+#include <serial.h>
#include <asm/arch/cpu.h>
#include <asm/arch/hardware.h>
#include <asm/arch/omap.h>
@@ -59,6 +60,16 @@ static inline int __maybe_unused read_eeprom(void)
return ti_i2c_eeprom_am_get(-1, CONFIG_SYS_I2C_EEPROM_ADDR);
}
+#ifndef CONFIG_DM_SERIAL
+struct serial_device *default_serial_console(void)
+{
+ if (board_is_icev2())
+ return &eserial4_device;
+ else
+ return &eserial1_device;
+}
+#endif
+
#ifndef CONFIG_SKIP_LOWLEVEL_INIT
static const struct ddr_data ddr2_data = {
.datardsratio0 = MT47H128M16RT25E_RD_DQS,
OpenPOWER on IntegriCloud