From 068feb9b86d991283c43b56e36094f4e6f484d04 Mon Sep 17 00:00:00 2001 From: Rick Chen Date: Tue, 26 Dec 2017 13:55:58 +0800 Subject: riscv: Modify generic codes to support RISC-V Support common commands bdinfo and image format, also modify common generic flow for RISC-V. Signed-off-by: Rick Chen Signed-off-by: Rick Chen Signed-off-by: Greentime Hu Reviewed-by: Tom Rini --- common/board_f.c | 2 +- common/board_r.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'common') diff --git a/common/board_f.c b/common/board_f.c index e46eceda7d..0bdce64ca5 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -218,7 +218,7 @@ static int setup_mon_len(void) gd->mon_len = (ulong)&_end - (ulong)_init; #elif defined(CONFIG_NIOS2) || defined(CONFIG_XTENSA) gd->mon_len = CONFIG_SYS_MONITOR_LEN; -#elif defined(CONFIG_NDS32) || defined(CONFIG_SH) +#elif defined(CONFIG_NDS32) || defined(CONFIG_SH) || defined(CONFIG_RISCV) gd->mon_len = (ulong)(&__bss_end) - (ulong)(&_start); #elif defined(CONFIG_SYS_MONITOR_BASE) /* TODO: use (ulong)&__bss_end - (ulong)&__text_start; ? */ diff --git a/common/board_r.c b/common/board_r.c index 09167c13cc..2a9df6b716 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -126,7 +126,7 @@ static int initr_reloc_global_data(void) { #ifdef __ARM__ monitor_flash_len = _end - __image_copy_start; -#elif defined(CONFIG_NDS32) +#elif defined(CONFIG_NDS32) || defined(CONFIG_RISCV) monitor_flash_len = (ulong)&_end - (ulong)&_start; #elif !defined(CONFIG_SANDBOX) && !defined(CONFIG_NIOS2) monitor_flash_len = (ulong)&__init_end - gd->relocaddr; @@ -704,7 +704,7 @@ static init_fnc_t init_sequence_r[] = { #ifdef CONFIG_DM initr_dm, #endif -#if defined(CONFIG_ARM) || defined(CONFIG_NDS32) +#if defined(CONFIG_ARM) || defined(CONFIG_NDS32) || defined(CONFIG_RISCV) board_init, /* Setup chipselects */ #endif /* -- cgit v1.2.3