From 744b57b8a688342cc98b4179ab19151c46f32506 Mon Sep 17 00:00:00 2001 From: Thomas Chou Date: Tue, 27 Oct 2015 10:21:06 +0800 Subject: nios2: use dram bank in board info Use dram bank in board info, so that it displays correct memory values in bdinfo command. Signed-off-by: Thomas Chou Acked-by: Marek Vasut --- include/configs/nios2-generic.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/configs/nios2-generic.h b/include/configs/nios2-generic.h index b38513e99b0..53a9f10f4ff 100644 --- a/include/configs/nios2-generic.h +++ b/include/configs/nios2-generic.h @@ -77,6 +77,7 @@ */ #define CONFIG_SYS_SDRAM_BASE 0xD0000000 #define CONFIG_SYS_SDRAM_SIZE 0x08000000 +#define CONFIG_NR_DRAM_BANKS 1 #define CONFIG_MONITOR_IS_IN_RAM #define CONFIG_SYS_MONITOR_LEN 0x40000 /* Reserve 256k */ #define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_SDRAM_BASE + \ -- cgit v1.3.1 From e07eee3957bd7a108f7621791a2eafca989575c8 Mon Sep 17 00:00:00 2001 From: Thomas Chou Date: Thu, 29 Oct 2015 16:43:46 +0800 Subject: nios2: clean up macros that do not need a value in board header Clean up macros that do not need a value as suggested by Marek. Signed-off-by: Thomas Chou Tested-by: Marek Vasut Acked-by: Marek Vasut --- include/configs/nios2-generic.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/configs/nios2-generic.h b/include/configs/nios2-generic.h index 53a9f10f4ff..84faa4cb64b 100644 --- a/include/configs/nios2-generic.h +++ b/include/configs/nios2-generic.h @@ -36,10 +36,10 @@ /* * MII/PHY */ -#define CONFIG_CMD_MII 1 -#define CONFIG_PHY_GIGE 1 -#define CONFIG_SYS_FAULT_ECHO_LINK_DOWN 1 -#define CONFIG_PHY_MARVELL 1 +#define CONFIG_CMD_MII +#define CONFIG_PHY_GIGE +#define CONFIG_SYS_FAULT_ECHO_LINK_DOWN +#define CONFIG_PHY_MARVELL /* * BOOTP options -- cgit v1.3.1 From 92ae05cfc70c07642983438a180184e98bcc3249 Mon Sep 17 00:00:00 2001 From: Thomas Chou Date: Tue, 3 Nov 2015 13:31:09 +0800 Subject: nios2: remove CONFIG_SYS_MALLOC_BASE macro Remove CONFIG_SYS_MALLOC_BASE macro, as it is not used by the generic board. Signed-off-by: Thomas Chou Reviewed-by: Chin Liang See --- include/configs/nios2-generic.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include') diff --git a/include/configs/nios2-generic.h b/include/configs/nios2-generic.h index 84faa4cb64b..74c715d2033 100644 --- a/include/configs/nios2-generic.h +++ b/include/configs/nios2-generic.h @@ -84,8 +84,6 @@ CONFIG_SYS_SDRAM_SIZE - \ CONFIG_SYS_MONITOR_LEN) #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 0x20000) -#define CONFIG_SYS_MALLOC_BASE (CONFIG_SYS_MONITOR_BASE - \ - CONFIG_SYS_MALLOC_LEN) #define CONFIG_SYS_INIT_SP CONFIG_SYS_MALLOC_BASE /* -- cgit v1.3.1 From 65af9f69716ca0a765eebb8c14d851f89e2196d3 Mon Sep 17 00:00:00 2001 From: Thomas Chou Date: Tue, 3 Nov 2015 13:47:02 +0800 Subject: nios2: remove CONFIG_SYS_INIT_SP macro Remove CONFIG_SYS_INIT_SP macro, as the initial stack is set to below the u-boot code. Signed-off-by: Thomas Chou Reviewed-by: Marek Vasut Reviewed-by: Chin Liang See --- arch/nios2/cpu/start.S | 3 +-- include/configs/nios2-generic.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'include') diff --git a/arch/nios2/cpu/start.S b/arch/nios2/cpu/start.S index 8758e7e847a..bb86bbf40c4 100644 --- a/arch/nios2/cpu/start.S +++ b/arch/nios2/cpu/start.S @@ -81,6 +81,7 @@ _cur: movhi r5, %hi(_cur - _start) mov r8, r4 movhi r5, %hi(_start) ori r5, r5, %lo(_start) /* r5 <- linked _start */ + mov sp, r5 /* initial stack below u-boot code */ beq r4, r5, 3f movhi r6, %hi(CONFIG_SYS_MONITOR_LEN) @@ -100,8 +101,6 @@ _cur: movhi r5, %hi(_cur - _start) _reloc: /* STACK INIT -- zero top two words for call back chain. */ - movhi sp, %hi(CONFIG_SYS_INIT_SP) - ori sp, sp, %lo(CONFIG_SYS_INIT_SP) addi sp, sp, -8 stw r0, 0(sp) stw r0, 4(sp) diff --git a/include/configs/nios2-generic.h b/include/configs/nios2-generic.h index 74c715d2033..3a559f15fc4 100644 --- a/include/configs/nios2-generic.h +++ b/include/configs/nios2-generic.h @@ -84,7 +84,6 @@ CONFIG_SYS_SDRAM_SIZE - \ CONFIG_SYS_MONITOR_LEN) #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 0x20000) -#define CONFIG_SYS_INIT_SP CONFIG_SYS_MALLOC_BASE /* * MISC -- cgit v1.3.1 From 2925e2b9ee324f2060fa6c01e4fc54b5967ed85f Mon Sep 17 00:00:00 2001 From: Thomas Chou Date: Wed, 4 Nov 2015 13:28:29 +0800 Subject: nios2: trim CONFIG_SYS_MALLOC_LEN Trim CONFIG_SYS_MALLOC_LEN size, because CONFIG_ENV_SIZE is included to total memory allocation in common.h, Signed-off-by: Thomas Chou Reviewed-by: Chin Liang See --- include/configs/nios2-generic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/nios2-generic.h b/include/configs/nios2-generic.h index 3a559f15fc4..f6871708dcb 100644 --- a/include/configs/nios2-generic.h +++ b/include/configs/nios2-generic.h @@ -83,7 +83,7 @@ #define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_SDRAM_BASE + \ CONFIG_SYS_SDRAM_SIZE - \ CONFIG_SYS_MONITOR_LEN) -#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 0x20000) +#define CONFIG_SYS_MALLOC_LEN 0x20000 /* * MISC -- cgit v1.3.1 From 540bb5422c8c31e3499d9c81594b26666e7f41a4 Mon Sep 17 00:00:00 2001 From: Thomas Chou Date: Wed, 4 Nov 2015 13:25:20 +0800 Subject: nios2: trim CONFIG_SYS_MEMTEST_END Trim CONFIG_SYS_MEMTEST_END location. CONFIG_SYS_MONITOR_LEN Reserving 256k for U-Boot at: d7fc0000 CONFIG_ENV_SIZE CONFIG_SYS_MALLOC_LEN Reserving 256k for malloc() at: d7f80000 0x10000 for the rest Reserving 68 Bytes for Board Info at: d7f7ffbc Reserving 208 Bytes for Global Data at: d7f7feec Reserving 12000 Bytes for FDT at: d7f7d00c Stack Signed-off-by: Thomas Chou --- include/configs/nios2-generic.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/nios2-generic.h b/include/configs/nios2-generic.h index f6871708dcb..dbd39d6a58c 100644 --- a/include/configs/nios2-generic.h +++ b/include/configs/nios2-generic.h @@ -97,7 +97,10 @@ 16) /* Print buf size */ #define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_SDRAM_BASE #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE -#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_INIT_SP - 0x20000) +#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MONITOR_BASE - \ + CONFIG_ENV_SIZE - \ + CONFIG_SYS_MALLOC_LEN - \ + 0x10000) #define CONFIG_CMDLINE_EDITING #define CONFIG_CMD_GPIO -- cgit v1.3.1