From d8bafe1310487ba0e0785997726b4792072178d3 Mon Sep 17 00:00:00 2001 From: David Feng Date: Sat, 31 Jan 2015 11:55:29 +0800 Subject: [PATCH] ARMv8: enable DM in vexpress64 board Signed-off-by: David Feng --- board/armltd/vexpress64/vexpress64.c | 13 +++++++++++++ include/configs/vexpress_aemv8a.h | 13 ++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/board/armltd/vexpress64/vexpress64.c b/board/armltd/vexpress64/vexpress64.c index de6286435d..071d88c07d 100644 --- a/board/armltd/vexpress64/vexpress64.c +++ b/board/armltd/vexpress64/vexpress64.c @@ -12,9 +12,22 @@ #include #include #include +#include +#include DECLARE_GLOBAL_DATA_PTR; +static const struct pl01x_serial_platdata serial_platdata = { + .base = V2M_UART0, + .type = TYPE_PL011, + .clock = 2400 * 1000, +}; + +U_BOOT_DEVICE(vexpress_serials) = { + .name = "serial_pl01x", + .platdata = &serial_platdata, +}; + int board_init(void) { return 0; diff --git a/include/configs/vexpress_aemv8a.h b/include/configs/vexpress_aemv8a.h index 810eef12de..047514ad19 100644 --- a/include/configs/vexpress_aemv8a.h +++ b/include/configs/vexpress_aemv8a.h @@ -8,6 +8,8 @@ #ifndef __VEXPRESS_AEMV8A_H #define __VEXPRESS_AEMV8A_H +#define CONFIG_DM + /* We use generic board for v8 Versatile Express */ #define CONFIG_SYS_GENERIC_BOARD @@ -127,6 +129,7 @@ #define CONFIG_SYS_MEMTEST_END (V2M_BASE + 0x80000000) /* Size of malloc() pool */ +#define CONFIG_SYS_MALLOC_F_LEN 0x2000 #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (8 << 20)) /* Ethernet Configuration */ @@ -142,6 +145,14 @@ #endif /* PL011 Serial Configuration */ +#define CONFIG_BAUDRATE 115200 +#ifdef CONFIG_DM +#define CONFIG_DM_SERIAL +#define CONFIG_PL01X_SERIAL +#else +#define CONFIG_SYS_SERIAL0 V2M_UART0 +#define CONFIG_SYS_SERIAL1 V2M_UART1 +#define CONFIG_CONS_INDEX 0 #define CONFIG_PL011_SERIAL #ifdef CONFIG_TARGET_VEXPRESS64_JUNO #define CONFIG_PL011_CLOCK 7273800 @@ -150,7 +161,7 @@ #endif #define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0, \ (void *)CONFIG_SYS_SERIAL1} -#define CONFIG_CONS_INDEX 0 +#endif #define CONFIG_BAUDRATE 115200 #define CONFIG_SYS_SERIAL0 V2M_UART0 -- 2.25.1