diff mbox

[U-Boot] nios2: add memory to board info

Message ID 1445851172-23473-1-git-send-email-thomas@wytron.com.tw
State Changes Requested
Delegated to: Marek Vasut
Headers show

Commit Message

Thomas Chou Oct. 26, 2015, 9:19 a.m. UTC
Run setup_board_part1/2 and add memory information to board info
structure. So that it can display correct values in bdinfo command.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
---
 common/board_f.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Marek Vasut Oct. 26, 2015, 8:24 p.m. UTC | #1
On Monday, October 26, 2015 at 10:19:32 AM, Thomas Chou wrote:
> Run setup_board_part1/2 and add memory information to board info
> structure. So that it can display correct values in bdinfo command.
> 
> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
> ---
>  common/board_f.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/common/board_f.c b/common/board_f.c
> index d88ada3..6ab74d9 100644
> --- a/common/board_f.c
> +++ b/common/board_f.c
> @@ -551,7 +551,7 @@ static int display_new_sp(void)
>  	return 0;
>  }
> 
> -#if defined(CONFIG_PPC) || defined(CONFIG_M68K)
> +#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_NIOS2)

This looks like some ancient code, due to the fact that it's used on
PPC and M68K only, but not on ARM for example.

>  static int setup_board_part1(void)
>  {
>  	bd_t *bd = gd->bd;
> @@ -933,7 +933,7 @@ static init_fnc_t init_sequence_f[] = {
>  	reserve_stacks,
>  	setup_dram_config,
>  	show_dram_config,
> -#if defined(CONFIG_PPC) || defined(CONFIG_M68K)
> +#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_NIOS2)
>  	setup_board_part1,
>  	INIT_FUNC_WATCHDOG_RESET
>  	setup_board_part2,

Best regards,
Marek Vasut
Thomas Chou Oct. 27, 2015, 12:43 a.m. UTC | #2
Hi Marek,

On 10/27/2015 04:24 AM, Marek Vasut wrote:
> On Monday, October 26, 2015 at 10:19:32 AM, Thomas Chou wrote:
>> Run setup_board_part1/2 and add memory information to board info
>> structure. So that it can display correct values in bdinfo command.
>>
>> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
>> ---
>>   common/board_f.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/common/board_f.c b/common/board_f.c
>> index d88ada3..6ab74d9 100644
>> --- a/common/board_f.c
>> +++ b/common/board_f.c
>> @@ -551,7 +551,7 @@ static int display_new_sp(void)
>>   	return 0;
>>   }
>>
>> -#if defined(CONFIG_PPC) || defined(CONFIG_M68K)
>> +#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_NIOS2)
>
> This looks like some ancient code, due to the fact that it's used on
> PPC and M68K only, but not on ARM for example.
>

Thanks for the review. I will try to follow ARM's.

Best regards,
Thomas
diff mbox

Patch

diff --git a/common/board_f.c b/common/board_f.c
index d88ada3..6ab74d9 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -551,7 +551,7 @@  static int display_new_sp(void)
 	return 0;
 }
 
-#if defined(CONFIG_PPC) || defined(CONFIG_M68K)
+#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_NIOS2)
 static int setup_board_part1(void)
 {
 	bd_t *bd = gd->bd;
@@ -933,7 +933,7 @@  static init_fnc_t init_sequence_f[] = {
 	reserve_stacks,
 	setup_dram_config,
 	show_dram_config,
-#if defined(CONFIG_PPC) || defined(CONFIG_M68K)
+#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_NIOS2)
 	setup_board_part1,
 	INIT_FUNC_WATCHDOG_RESET
 	setup_board_part2,