Merge git://git.denx.de/u-boot-x86

This commit is contained in:
Tom Rini
2018-10-22 13:56:10 -04:00
13 changed files with 111 additions and 45 deletions

View File

@@ -30,6 +30,9 @@ config TPL_TIMER
config TIMER_EARLY
bool "Allow timer to be used early in U-Boot"
depends on TIMER
# initr_bootstage() requires a timer and is called before initr_dm()
# so only the early timer is available
default y if X86 && BOOTSTAGE
help
In some cases the timer must be accessible before driver model is
active. Examples include when using CONFIG_TRACE to trace U-Boot's
@@ -79,6 +82,16 @@ config X86_TSC_TIMER
help
Select this to enable Time-Stamp Counter (TSC) timer for x86.
config X86_TSC_TIMER_EARLY_FREQ
int "x86 TSC timer frequency in MHz when used as the early timer"
depends on X86_TSC_TIMER
default 1000
help
Sets the estimated CPU frequency in MHz when TSC is used as the
early timer and the frequency can neither be calibrated via some
hardware ways, nor got from device tree at the time when device
tree is not available yet.
config OMAP_TIMER
bool "Omap timer support"
depends on TIMER

View File

@@ -341,7 +341,7 @@ static int tsc_timer_get_count(struct udevice *dev, u64 *count)
return 0;
}
static void tsc_timer_ensure_setup(bool stop)
static void tsc_timer_ensure_setup(bool early)
{
if (gd->arch.tsc_base)
return;
@@ -362,8 +362,8 @@ static void tsc_timer_ensure_setup(bool stop)
if (fast_calibrate)
goto done;
if (stop)
panic("TSC frequency is ZERO");
if (early)
fast_calibrate = CONFIG_X86_TSC_TIMER_EARLY_FREQ;
else
return;