]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARMv8: enable DM in vexpress64 board
authorDavid Feng <fenghua@phytium.com.cn>
Sat, 31 Jan 2015 03:55:29 +0000 (11:55 +0800)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Fri, 27 Mar 2015 15:33:51 +0000 (16:33 +0100)
Signed-off-by: David Feng <fenghua@phytium.com.cn>
board/armltd/vexpress64/vexpress64.c
include/configs/vexpress_aemv8a.h

index de6286435d97096e064c6220546046ff31c6b77c..071d88c07d8d8322b3c782339c2d9062d9da59da 100644 (file)
 #include <asm/io.h>
 #include <linux/compiler.h>
 #include <asm/semihosting.h>
+#include <dm/platdata.h>
+#include <dm/platform_data/serial_pl01x.h>
 
 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;
index 810eef12deb107740463733f99b344c2edbc3480..047514ad19137e024788d725188b93b003c72c64 100644 (file)
@@ -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
 
 #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 */
 #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
 #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