u-boot-brain/drivers
Simon Glass 97d20f69f5 Enable CONFIG_TIMER_EARLY with bootstage
In initr_bootstage() we call bootstage_mark_name() which ends up calling
timer_get_us(). This call happens before initr_dm(), which inits driver
model.

On x86 we set gd->timer to NULL in the transition from board_init_f()
to board_init_r(). See board_init_f_r() for this assignment. So U-Boot
knows there is no timer available in the period immediately after
relocation.

On x86 the timer_get_us() call is implemented as calls to get_ticks() and
get_tbclk(). Both of these call dm_timer_init() to set up the timer, if
gd->timer is NULL and the early timer is not available.

However dm_timer_init() cannot succeed before initr_dm() is called.

So it seems that on x86 if we want to use CONFIG_BOOTSTAGE we must enable
CONFIG_TIMER_EARLY. Update the Kconfig to handle this.

Note: On most architectures we can rely on the pre-relocation memory still
being available, so that gd->timer pointers to a valid timer device and
everything works correctly. Admittedly this is not strictly correct since
the timer device is set up by pre-relocation U-Boot, but normally this is
fine. On x86 the 'CAR' (cache-as-RAM) memory used by pre-relocation U-Boot
disappears in board_init_f_r() and any attempt to access it will hang.
This is the reason why we must mark the timer as invalid when we get to
board_init_f_r().

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2018-10-22 17:51:45 +08:00
..
adc adc: Add driver for STM32 ADC 2018-08-03 19:53:10 -04:00
ata Switch to driver model for eSDHC on Layerscape SoCs including LS1021A, 2018-09-29 11:47:32 -04:00
axi axi: Add AXI sandbox driver and simple emulator 2018-08-11 08:09:39 +02:00
bios_emulator bios_emulator: remove assignment without effect 2018-07-23 14:33:21 -04:00
block blk: Support block drivers in TPL 2018-10-09 04:40:27 -06:00
board test: Add tests for board uclass 2018-09-29 11:49:35 -06:00
bootcount bootcount: Make bootcount magic configurable 2018-10-19 14:16:43 -04:00
clk clk: Add support for Arm's Versatile Express OSC clock generators 2018-09-30 13:00:34 -04:00
core fdt: Allow indicating a node is for U-Boot proper only 2018-10-09 04:40:27 -06:00
cpu cpu: Add MPC83xx CPU driver 2018-09-18 08:12:21 -06:00
crypto SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ddr socfpga: stratix10: fix sdram_calculate_size 2018-09-15 03:17:01 +02:00
demo SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
dfu dfu: Provide more verbose error message 2018-08-08 22:22:08 +02:00
dma SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
fastboot Kconfig: sandbox: enable cmd_avb and dependencies 2018-10-07 13:34:19 -04:00
firmware dm: test: Add "/firmware" node scan test 2018-09-29 11:49:35 -06:00
fpga fpga: zynqmp: Modify PL bitstream loading sequence 2018-09-26 10:15:00 +02:00
gpio gpio: da8xx: Push generic defines of gpio.h out of mach-davinci 2018-10-10 13:35:03 -04:00
i2c i2c: fix: Add support for the Arm's Versatile Express I2C controller 2018-10-12 07:25:39 +02:00
input spl: input: Allow input in SPL and TPL 2018-10-09 04:40:27 -06:00
led dm: led: move default state support in led uclass 2018-08-10 10:27:32 -04:00
mailbox spl: Allow mailbox drivers to be used within SPL 2018-09-11 08:32:55 -04:00
memory SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
misc cros_ec: Add support for v3 messages on LPC 2018-10-09 04:40:27 -06:00
mmc arm64: versal: Add support for new Xilinx Versal ACAPs 2018-10-16 16:53:21 +02:00
mtd Convert CONFIG_FLASH_CFI_DRIVER et al to Kconfig 2018-10-19 19:19:50 -04:00
net net: gem: Do not setup any clock for Xilinx SoC Versal 2018-10-16 16:53:24 +02:00
nvme SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
pch SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
pci pci: Support parsing PCI controller DT subnodes 2018-10-20 15:23:38 -04:00
pcmcia SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
phy phy: rcar: Add R-Car Gen3 PHY driver 2018-10-03 12:56:13 +02:00
pinctrl pinctrl: sandbox: add gpio onewire w1 group 2018-09-28 20:22:37 -04:00
power regulator: pbias: Add additional compatible flags 2018-09-11 21:38:37 -04:00
pwm test: panel: Add a test for the panel uclass 2018-10-09 04:40:27 -06:00
qe drivers: qe: Move CONFIG_U_QE to Kconfig 2018-09-27 10:01:27 -07:00
ram ram: Add driver for MPC83xx 2018-09-18 00:01:18 -06:00
remoteproc spl: Allow remoteproc drivers to be used within SPL 2018-09-11 08:32:55 -04:00
reset reset: Introduce TI System Control Interface (TI SCI) reset driver 2018-09-11 08:32:55 -04:00
rtc Test improvements to tidy up output and drop duplicate tests 2018-10-10 13:35:17 -04:00
scsi Remove <inttypes.h> includes and PRI* usages in printf() entirely 2018-09-10 20:48:17 -04:00
serial serial: Allow serial to be absent in TPL 2018-10-09 04:40:27 -06:00
smem drivers: smem: sandbox 2018-07-19 16:31:38 -04:00
soc SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sound SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
spi arm64: versal: Add support for new Xilinx Versal ACAPs 2018-10-16 16:53:21 +02:00
spmi SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sysreset sysreset: Add a way to find the last reset 2018-10-09 04:40:27 -06:00
tee tee: add sandbox driver 2018-10-07 11:04:01 -04:00
thermal SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
timer Enable CONFIG_TIMER_EARLY with bootstage 2018-10-22 17:51:45 +08:00
tpm tpm: Use livetree and allow children 2018-10-09 04:40:27 -06:00
usb net.h: Include linux/if_ether.h to avoid duplication 2018-10-10 12:28:52 -05:00
video video: at91: Adjust vidconsole_position_cursor() to use char pos 2018-10-09 04:40:27 -06:00
w1 w1: identify devices with w1-eeprom uclass 2018-09-28 20:22:35 -04:00
w1-eeprom W1-EEPROM: add sandbox driver 2018-09-28 20:22:36 -04:00
watchdog watchdog: mx25: use the imx_watchdog driver for mx25 2018-09-04 08:47:23 +02:00
Kconfig Add UCLASS_TEE for Trusted Execution Environment 2018-10-07 10:47:38 -04:00
Makefile Add UCLASS_TEE for Trusted Execution Environment 2018-10-07 10:47:38 -04:00