diff mbox

[U-Boot,v6,2/3] timer: start a new TIMER after relocation

Message ID 1444353477-31595-2-git-send-email-thomas@wytron.com.tw
State Superseded
Delegated to: Thomas Chou
Headers show

Commit Message

Thomas Chou Oct. 9, 2015, 1:17 a.m. UTC
Start a new TIMER after relocation, just in case the
timer has been used in per-relocation.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Simon Glass <sjg@chromium.org>
---
v6
  rename to CONFIG_TIMER as Simon suggested.

 common/board_r.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Bin Meng Oct. 9, 2015, 1:32 a.m. UTC | #1
Hi Thomas,

On Fri, Oct 9, 2015 at 9:17 AM, Thomas Chou <thomas@wytron.com.tw> wrote:
> Start a new TIMER after relocation, just in case the
> timer has been used in per-relocation.
>
> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
> Acked-by: Simon Glass <sjg@chromium.org>
> ---
> v6
>   rename to CONFIG_TIMER as Simon suggested.
>
>  common/board_r.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/common/board_r.c b/common/board_r.c
> index f8c1baa..3b193b5 100644
> --- a/common/board_r.c
> +++ b/common/board_r.c
> @@ -290,6 +290,9 @@ static int initr_dm(void)
>         /* Save the pre-reloc driver model and start a new one */
>         gd->dm_root_f = gd->dm_root;
>         gd->dm_root = NULL;
> +#ifdef CONFIG_TIMER
> +       gd->TIMER = NULL;

Sorry for jumping in so late. But why is this TIMER all capital letters?

> +#endif
>         return dm_init_and_scan(false);
>  }
>  #endif
> --

Regards,
Bin
Thomas Chou Oct. 9, 2015, 5:26 a.m. UTC | #2
Hi Bin,

On 10/09/2015 09:32 AM, Bin Meng wrote:
>> +#ifdef CONFIG_TIMER
>> +       gd->TIMER = NULL;
>
> Sorry for jumping in so late. But why is this TIMER all capital letters?

Thanks for reminding. I made wrong string replacement.

Best regards,
Thomas Chou
diff mbox

Patch

diff --git a/common/board_r.c b/common/board_r.c
index f8c1baa..3b193b5 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -290,6 +290,9 @@  static int initr_dm(void)
 	/* Save the pre-reloc driver model and start a new one */
 	gd->dm_root_f = gd->dm_root;
 	gd->dm_root = NULL;
+#ifdef CONFIG_TIMER
+	gd->TIMER = NULL;
+#endif
 	return dm_init_and_scan(false);
 }
 #endif