diff mbox

[U-Boot] nios2: convert do_reset to use dm cpu data

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

Commit Message

Thomas Chou Oct. 5, 2015, 3 a.m. UTC
Convert do_reset to use dm cpu data.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
---
 arch/nios2/cpu/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Simon Glass Oct. 6, 2015, 2:18 p.m. UTC | #1
Hi Thomas,

On 5 October 2015 at 04:00, Thomas Chou <thomas@wytron.com.tw> wrote:
> Convert do_reset to use dm cpu data.
>
> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
> ---
>  arch/nios2/cpu/cpu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

BTW if you are interested, you can implement a reset driver UCLASS_RESET.

Regards,
Simon
Thomas Chou Oct. 13, 2015, 1:14 p.m. UTC | #2
On 10/05/2015 11:00 AM, Thomas Chou wrote:
> Convert do_reset to use dm cpu data.
>
> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
> ---
>   arch/nios2/cpu/cpu.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>

Applied to u-boot-nios.

> diff --git a/arch/nios2/cpu/cpu.c b/arch/nios2/cpu/cpu.c
> index 106f0bf..229a07b 100644
> --- a/arch/nios2/cpu/cpu.c
> +++ b/arch/nios2/cpu/cpu.c
> @@ -25,7 +25,7 @@ int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
>   {
>   	disable_interrupts();
>   	/* indirect call to go beyond 256MB limitation of toolchain */
> -	nios2_callr(CONFIG_SYS_RESET_ADDR);
> +	nios2_callr(gd->arch.reset_addr);
>   	return 0;
>   }
>
>
diff mbox

Patch

diff --git a/arch/nios2/cpu/cpu.c b/arch/nios2/cpu/cpu.c
index 106f0bf..229a07b 100644
--- a/arch/nios2/cpu/cpu.c
+++ b/arch/nios2/cpu/cpu.c
@@ -25,7 +25,7 @@  int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	disable_interrupts();
 	/* indirect call to go beyond 256MB limitation of toolchain */
-	nios2_callr(CONFIG_SYS_RESET_ADDR);
+	nios2_callr(gd->arch.reset_addr);
 	return 0;
 }