diff mbox

[U-Boot,8/8] x86: Move timer_init() call a bit earlier

Message ID 1445564355-19911-9-git-send-email-bmeng.cn@gmail.com
State Superseded
Headers show

Commit Message

Bin Meng Oct. 23, 2015, 1:39 a.m. UTC
Currently timer_init() is called in board_r.c which is quite late.
Some vgabios execution requires we set up the i8254 timer correctly,
but video initialization comes before timer_init(). Move the call
to board_f.c.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>

---

 common/board_f.c | 2 +-
 common/board_r.c | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

Comments

Simon Glass Oct. 23, 2015, 1:47 a.m. UTC | #1
On 22 October 2015 at 19:39, Bin Meng <bmeng.cn@gmail.com> wrote:
> Currently timer_init() is called in board_r.c which is quite late.
> Some vgabios execution requires we set up the i8254 timer correctly,
> but video initialization comes before timer_init(). Move the call
> to board_f.c.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>
> ---
>
>  common/board_f.c | 2 +-
>  common/board_r.c | 3 +--
>  2 files changed, 2 insertions(+), 3 deletions(-)

At some point we might consider using driver model for this (when the
uclass is merged).

Acked-by: Simon Glass <sjg@chromium.org>
diff mbox

Patch

diff --git a/common/board_f.c b/common/board_f.c
index 613332e..357b71e 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -794,7 +794,7 @@  static init_fnc_t init_sequence_f[] = {
 	/* TODO: can we rename this to timer_init()? */
 	init_timebase,
 #endif
-#if defined(CONFIG_ARM) || defined(CONFIG_MIPS) || \
+#if defined(CONFIG_X86) || defined(CONFIG_ARM) || defined(CONFIG_MIPS) || \
 		defined(CONFIG_BLACKFIN) || defined(CONFIG_NDS32)
 	timer_init,		/* initialize timer */
 #endif
diff --git a/common/board_r.c b/common/board_r.c
index f8c1baa..7651c06 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -828,8 +828,7 @@  init_fnc_t init_sequence_r[] = {
 #if defined(CONFIG_ARM) || defined(CONFIG_AVR32)
 	initr_enable_interrupts,
 #endif
-#if defined(CONFIG_X86) || defined(CONFIG_MICROBLAZE) || defined(CONFIG_AVR32) \
-	|| defined(CONFIG_M68K)
+#if defined(CONFIG_MICROBLAZE) || defined(CONFIG_AVR32) || defined(CONFIG_M68K)
 	timer_init,		/* initialize timer */
 #endif
 #if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT)