aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorKun-Hua Huang <kunhua@andestech.com>2015-08-24 14:52:35 +0800
committerTom Rini <trini@konsulko.com>2015-08-28 11:46:35 -0400
commit2e88bb28d8061286d2f1cabcac224df15b941b82 (patch)
treef61379fd60c3a45e33c2fbae96df449daf7294db /common
parent14006a5671058bfe2f323beeec66448fce228adb (diff)
downloadu-boot-2e88bb28d8061286d2f1cabcac224df15b941b82.zip
u-boot-2e88bb28d8061286d2f1cabcac224df15b941b82.tar.gz
u-boot-2e88bb28d8061286d2f1cabcac224df15b941b82.tar.bz2
NDS32: Generic Board Support and Unsupport
Add nds32 ag101p generic board support. Signed-off-by: Kun-Hua Huang <kunhua@andestech.com>
Diffstat (limited to 'common')
-rw-r--r--common/board_f.c8
-rw-r--r--common/board_r.c4
-rw-r--r--common/command.c2
3 files changed, 10 insertions, 4 deletions
diff --git a/common/board_f.c b/common/board_f.c
index fe75656..613332e 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -272,6 +272,8 @@ static int setup_mon_len(void)
gd->mon_len = (ulong)&_end - (ulong)_init;
#elif defined(CONFIG_BLACKFIN) || defined(CONFIG_NIOS2)
gd->mon_len = CONFIG_SYS_MONITOR_LEN;
+#elif defined(CONFIG_NDS32)
+ gd->mon_len = (ulong)(&__bss_end) - (ulong)(&_start);
#else
/* TODO: use (ulong)&__bss_end - (ulong)&__text_start; ? */
gd->mon_len = (ulong)&__bss_end - CONFIG_SYS_MONITOR_BASE;
@@ -792,7 +794,8 @@ static init_fnc_t init_sequence_f[] = {
/* TODO: can we rename this to timer_init()? */
init_timebase,
#endif
-#if defined(CONFIG_ARM) || defined(CONFIG_MIPS) || defined(CONFIG_BLACKFIN)
+#if defined(CONFIG_ARM) || defined(CONFIG_MIPS) || \
+ defined(CONFIG_BLACKFIN) || defined(CONFIG_NDS32)
timer_init, /* initialize timer */
#endif
#ifdef CONFIG_SYS_ALLOC_DPRAM
@@ -858,7 +861,8 @@ static init_fnc_t init_sequence_f[] = {
#endif
announce_dram_init,
/* TODO: unify all these dram functions? */
-#if defined(CONFIG_ARM) || defined(CONFIG_X86) || defined(CONFIG_MICROBLAZE) || defined(CONFIG_AVR32)
+#if defined(CONFIG_ARM) || defined(CONFIG_X86) || defined(CONFIG_NDS32) || \
+ defined(CONFIG_MICROBLAZE) || defined(CONFIG_AVR32)
dram_init, /* configure available RAM banks */
#endif
#if defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_M68K)
diff --git a/common/board_r.c b/common/board_r.c
index bf6c725..f8c1baa 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -132,6 +132,8 @@ static int initr_reloc_global_data(void)
{
#ifdef __ARM__
monitor_flash_len = _end - __image_copy_start;
+#elif defined(CONFIG_NDS32)
+ monitor_flash_len = (ulong)&_end - (ulong)&_start;
#elif !defined(CONFIG_SANDBOX) && !defined(CONFIG_NIOS2)
monitor_flash_len = (ulong)&__init_end - gd->relocaddr;
#endif
@@ -711,7 +713,7 @@ init_fnc_t init_sequence_r[] = {
#ifdef CONFIG_DM
initr_dm,
#endif
-#ifdef CONFIG_ARM
+#if defined(CONFIG_ARM) || defined(CONFIG_NDS32)
board_init, /* Setup chipselects */
#endif
/*
diff --git a/common/command.c b/common/command.c
index 381e6a2..972ae28 100644
--- a/common/command.c
+++ b/common/command.c
@@ -445,7 +445,7 @@ void fixup_cmdtable(cmd_tbl_t *cmdtp, int size)
ulong addr;
addr = (ulong)(cmdtp->cmd) + gd->reloc_off;
-#if DEBUG_COMMANDS
+#ifdef DEBUG_COMMANDS
printf("Command \"%s\": 0x%08lx => 0x%08lx\n",
cmdtp->name, (ulong)(cmdtp->cmd), addr);
#endif