* [U-Boot] [PATCH] dm: timer: Avoid using timer before it is ready
@ 2015-11-29 5:16 Simon Glass
2015-11-29 6:28 ` Thomas Chou
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Simon Glass @ 2015-11-29 5:16 UTC (permalink / raw)
To: u-boot
At present bootstage will try to read the timer very early after relocation.
When driver model it used to provide the timer, we cannot read it until
driver model is ready. Correct this by adding a separate stage for the
post-relocation bootstage init.
This fixes booting on chromebook_link.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
common/board_r.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/common/board_r.c b/common/board_r.c
index f7118e8..a41fb54 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -109,7 +109,6 @@ static int initr_reloc(void)
{
/* tell others: relocation done */
gd->flags |= GD_FLG_RELOC | GD_FLG_FULL_MALLOC_INIT;
- bootstage_mark_name(BOOTSTAGE_ID_START_UBOOT_R, "board_init_r");
return 0;
}
@@ -310,6 +309,14 @@ static int initr_dm(void)
}
#endif
+static int initr_bootstage(void)
+{
+ /* We cannot do this before initr_dm() */
+ bootstage_mark_name(BOOTSTAGE_ID_START_UBOOT_R, "board_init_r");
+
+ return 0;
+}
+
__weak int power_init_board(void)
{
return 0;
@@ -748,6 +755,7 @@ init_fnc_t init_sequence_r[] = {
#ifdef CONFIG_DM
initr_dm,
#endif
+ initr_bootstage,
#if defined(CONFIG_ARM) || defined(CONFIG_NDS32)
board_init, /* Setup chipselects */
#endif
--
2.6.0.rc2.230.g3dd15c0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] dm: timer: Avoid using timer before it is ready
2015-11-29 5:16 [U-Boot] [PATCH] dm: timer: Avoid using timer before it is ready Simon Glass
@ 2015-11-29 6:28 ` Thomas Chou
2015-11-29 8:57 ` Bin Meng
2015-11-30 5:41 ` Mugunthan V N
2 siblings, 0 replies; 5+ messages in thread
From: Thomas Chou @ 2015-11-29 6:28 UTC (permalink / raw)
To: u-boot
Hi Simon,
On 2015?11?29? 13:16, Simon Glass wrote:
> At present bootstage will try to read the timer very early after relocation.
> When driver model it used to provide the timer, we cannot read it until
> driver model is ready. Correct this by adding a separate stage for the
> post-relocation bootstage init.
>
> This fixes booting on chromebook_link.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> common/board_r.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
Acked-by: Thomas Chou <thomas@wytron.com.tw>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] dm: timer: Avoid using timer before it is ready
2015-11-29 5:16 [U-Boot] [PATCH] dm: timer: Avoid using timer before it is ready Simon Glass
2015-11-29 6:28 ` Thomas Chou
@ 2015-11-29 8:57 ` Bin Meng
2015-11-30 5:41 ` Mugunthan V N
2 siblings, 0 replies; 5+ messages in thread
From: Bin Meng @ 2015-11-29 8:57 UTC (permalink / raw)
To: u-boot
Hi Simon,
On Sun, Nov 29, 2015 at 1:16 PM, Simon Glass <sjg@chromium.org> wrote:
> At present bootstage will try to read the timer very early after relocation.
> When driver model it used to provide the timer, we cannot read it until
When driver model is
> driver model is ready. Correct this by adding a separate stage for the
> post-relocation bootstage init.
>
> This fixes booting on chromebook_link.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
> common/board_r.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/common/board_r.c b/common/board_r.c
> index f7118e8..a41fb54 100644
> --- a/common/board_r.c
> +++ b/common/board_r.c
> @@ -109,7 +109,6 @@ static int initr_reloc(void)
> {
> /* tell others: relocation done */
> gd->flags |= GD_FLG_RELOC | GD_FLG_FULL_MALLOC_INIT;
> - bootstage_mark_name(BOOTSTAGE_ID_START_UBOOT_R, "board_init_r");
>
> return 0;
> }
> @@ -310,6 +309,14 @@ static int initr_dm(void)
> }
> #endif
>
> +static int initr_bootstage(void)
> +{
> + /* We cannot do this before initr_dm() */
> + bootstage_mark_name(BOOTSTAGE_ID_START_UBOOT_R, "board_init_r");
> +
> + return 0;
> +}
> +
> __weak int power_init_board(void)
> {
> return 0;
> @@ -748,6 +755,7 @@ init_fnc_t init_sequence_r[] = {
> #ifdef CONFIG_DM
> initr_dm,
> #endif
> + initr_bootstage,
> #if defined(CONFIG_ARM) || defined(CONFIG_NDS32)
> board_init, /* Setup chipselects */
> #endif
> --
Regards,
Bin
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] dm: timer: Avoid using timer before it is ready
2015-11-29 5:16 [U-Boot] [PATCH] dm: timer: Avoid using timer before it is ready Simon Glass
2015-11-29 6:28 ` Thomas Chou
2015-11-29 8:57 ` Bin Meng
@ 2015-11-30 5:41 ` Mugunthan V N
2015-12-01 13:24 ` Simon Glass
2 siblings, 1 reply; 5+ messages in thread
From: Mugunthan V N @ 2015-11-30 5:41 UTC (permalink / raw)
To: u-boot
On Sunday 29 November 2015 10:46 AM, Simon Glass wrote:
> At present bootstage will try to read the timer very early after relocation.
> When driver model it used to provide the timer, we cannot read it until
> driver model is ready. Correct this by adding a separate stage for the
> post-relocation bootstage init.
>
> This fixes booting on chromebook_link.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
Reviewed-by: Mugunthan V N <mugunthanvnm@ti.com>
Regards
Mugunthan V N
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] dm: timer: Avoid using timer before it is ready
2015-11-30 5:41 ` Mugunthan V N
@ 2015-12-01 13:24 ` Simon Glass
0 siblings, 0 replies; 5+ messages in thread
From: Simon Glass @ 2015-12-01 13:24 UTC (permalink / raw)
To: u-boot
On 29 November 2015 at 21:41, Mugunthan V N <mugunthanvnm@ti.com> wrote:
> On Sunday 29 November 2015 10:46 AM, Simon Glass wrote:
>> At present bootstage will try to read the timer very early after relocation.
>> When driver model it used to provide the timer, we cannot read it until
>> driver model is ready. Correct this by adding a separate stage for the
>> post-relocation bootstage init.
>>
>> This fixes booting on chromebook_link.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>> ---
>
> Reviewed-by: Mugunthan V N <mugunthanvnm@ti.com>
>
> Regards
> Mugunthan V N
Applied to u-boot-dm.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-12-01 13:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-29 5:16 [U-Boot] [PATCH] dm: timer: Avoid using timer before it is ready Simon Glass
2015-11-29 6:28 ` Thomas Chou
2015-11-29 8:57 ` Bin Meng
2015-11-30 5:41 ` Mugunthan V N
2015-12-01 13:24 ` Simon Glass
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox