diff mbox

[U-Boot] nios2: use common sequence for reserve_uboot

Message ID 1445916250-19321-1-git-send-email-thomas@wytron.com.tw
State Accepted, archived
Delegated to: Thomas Chou
Headers show

Commit Message

Thomas Chou Oct. 27, 2015, 3:24 a.m. UTC
Use common sequence for reserve_uboot, as the result is
the same.

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. 27, 2015, 9:07 a.m. UTC | #1
On Tuesday, October 27, 2015 at 04:24:10 AM, Thomas Chou wrote:
> Use common sequence for reserve_uboot, as the result is
> the same.
> 
> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>

Shouldn't we just implement relocation properly ?

Best regards,
Marek Vasut
Thomas Chou Oct. 27, 2015, 1:15 p.m. UTC | #2
Hi Marek,

On 10/27/2015 05:07 PM, Marek Vasut wrote:
> On Tuesday, October 27, 2015 at 04:24:10 AM, Thomas Chou wrote:
>> Use common sequence for reserve_uboot, as the result is
>> the same.
>>
>> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
>
> Shouldn't we just implement relocation properly ?

This patch is not quite related to relocation. It just says that nios2 
can use the same order (early or late) of init sequence about the 
reserve_uboot() call as most other archs. Only blackfin is special in this.

I did look into the relocation of nios2 a little. And realized that 
nios2 does not have the relative call instruction like ARM's "bl". It 
will be almost impossible to do relocation without support from 
compiler, eg, emulate the relative call. ><

Best regards,
Thomas
Marek Vasut Oct. 27, 2015, 1:28 p.m. UTC | #3
On Tuesday, October 27, 2015 at 02:15:24 PM, Thomas Chou wrote:
> Hi Marek,

Hi,

> On 10/27/2015 05:07 PM, Marek Vasut wrote:
> > On Tuesday, October 27, 2015 at 04:24:10 AM, Thomas Chou wrote:
> >> Use common sequence for reserve_uboot, as the result is
> >> the same.
> >> 
> >> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
> > 
> > Shouldn't we just implement relocation properly ?
> 
> This patch is not quite related to relocation. It just says that nios2
> can use the same order (early or late) of init sequence about the
> reserve_uboot() call as most other archs. Only blackfin is special in this.
> 
> I did look into the relocation of nios2 a little. And realized that
> nios2 does not have the relative call instruction like ARM's "bl". It
> will be almost impossible to do relocation without support from
> compiler, eg, emulate the relative call. ><

Ccing Albert, so he can comment on this.

Best regards,
Marek Vasut
Thomas Chou Nov. 3, 2015, 5:16 a.m. UTC | #4
On 2015年10月27日 11:24, Thomas Chou wrote:
> Use common sequence for reserve_uboot, as the result is
> the same.
>
> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
> ---
>   common/board_f.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>

Applied to u-boot-nios.

> diff --git a/common/board_f.c b/common/board_f.c
> index d88ada3..64c33b3 100644
> --- a/common/board_f.c
> +++ b/common/board_f.c
> @@ -894,7 +894,7 @@ static init_fnc_t init_sequence_f[] = {
>   	 *  - board info struct
>   	 */
>   	setup_dest_addr,
> -#if defined(CONFIG_BLACKFIN) || defined(CONFIG_NIOS2)
> +#if defined(CONFIG_BLACKFIN)
>   	/* Blackfin u-boot monitor should be on top of the ram */
>   	reserve_uboot,
>   #endif
> @@ -919,7 +919,7 @@ static init_fnc_t init_sequence_f[] = {
>   		!defined(CONFIG_BLACKFIN) && !defined(CONFIG_M68K)
>   	reserve_video,
>   #endif
> -#if !defined(CONFIG_BLACKFIN) && !defined(CONFIG_NIOS2)
> +#if !defined(CONFIG_BLACKFIN)
>   	reserve_uboot,
>   #endif
>   #ifndef CONFIG_SPL_BUILD
>
diff mbox

Patch

diff --git a/common/board_f.c b/common/board_f.c
index d88ada3..64c33b3 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -894,7 +894,7 @@  static init_fnc_t init_sequence_f[] = {
 	 *  - board info struct
 	 */
 	setup_dest_addr,
-#if defined(CONFIG_BLACKFIN) || defined(CONFIG_NIOS2)
+#if defined(CONFIG_BLACKFIN)
 	/* Blackfin u-boot monitor should be on top of the ram */
 	reserve_uboot,
 #endif
@@ -919,7 +919,7 @@  static init_fnc_t init_sequence_f[] = {
 		!defined(CONFIG_BLACKFIN) && !defined(CONFIG_M68K)
 	reserve_video,
 #endif
-#if !defined(CONFIG_BLACKFIN) && !defined(CONFIG_NIOS2)
+#if !defined(CONFIG_BLACKFIN)
 	reserve_uboot,
 #endif
 #ifndef CONFIG_SPL_BUILD