Skip to content

Commit

Permalink
x86: Move i8254_init() to x86_cpu_init_f()
Browse files Browse the repository at this point in the history
Right now i8254_init() is called from timer_init() in the tsc timer
driver. But actually i8254 and tsc are completely different things.
Since tsc timer has been converted to driver model, we should find
a new place that is appropriate for U-Boot to call i8254_init(),
which is now x86_cpu_init_f().

Signed-off-by: Bin Meng <[email protected]>
Acked-by: Simon Glass <[email protected]>
  • Loading branch information
lbmeng committed Dec 9, 2015
1 parent c5c5c20 commit 4932443
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
5 changes: 5 additions & 0 deletions arch/x86/cpu/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,11 @@ int x86_cpu_init_f(void)
}
}

#ifdef CONFIG_I8254_TIMER
/* Set up the i8254 timer if required */
i8254_init();
#endif

return 0;
}

Expand Down
10 changes: 0 additions & 10 deletions drivers/timer/tsc_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,16 +325,6 @@ void __udelay(unsigned long usec)
#endif
}

int timer_init(void)
{
#ifdef CONFIG_I8254_TIMER
/* Set up the i8254 timer if required */
i8254_init();
#endif

return 0;
}

static int tsc_timer_get_count(struct udevice *dev, u64 *count)
{
u64 now_tick = rdtsc();
Expand Down

0 comments on commit 4932443

Please sign in to comment.