u-boot-brain/drivers
Sean Anderson c33efafaf9 riscv: Rework riscv timer driver to only support S-mode
The riscv-timer driver currently serves as a shim for several riscv timer
drivers. This is not too desirable because it bypasses the usual timer
selection via the driver model. There is no easy way to specify an
alternate timing driver, or have the tick rate depend on the cpu's
configured frequency. The timer drivers also do not have device structs,
and so have to rely on storing parameters in gd_t. Lastly, there is no
initialization call, so driver init is done in the same function which
reads the time. This can result in confusing error messages. To a user, it
looks like the driver failed when trying to read the time, whereas it may
have failed while initializing.

This patch removes the shim functionality from the riscv-timer driver, and
has it instead implement the former rdtime.c timer driver. This is because
existing u-boot users who pass in a device tree (e.g. qemu) do not create a
timer device for S-mode u-boot. The existing behavior of creating the
riscv-timer device in the riscv cpu driver must be kept. The actual reading
of the CSRs has been redone in the style of Linux's get_cycles64.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>
2020-09-30 08:54:45 +08:00
..
adc adc: Drop dm.h header file 2020-08-03 22:19:54 -04:00
ata ata: dwc-ahci: change trace level for phy errors managed by uclass 2020-09-08 08:46:32 -04:00
axi
bios_emulator
block xen: pvblock: Add initial support for para-virtualized block driver 2020-08-14 15:18:30 -04:00
board
bootcount
bus
button dm: button: add a driver for button driven by gpio 2020-07-28 19:30:39 -06:00
cache
clk Xilinx changes for v2021.01 2020-09-24 08:33:47 -04:00
core x86: acpi: Add common Intel ACPI tables 2020-09-25 11:27:18 +08:00
cpu cpu: Convert the methods to use a const udevice * 2020-07-25 14:46:57 -06:00
crypto crypto/fsl: add RNG support 2020-07-27 14:16:29 +05:30
ddr imx8m: ddrphy_utils: Improve coding style 2020-07-27 14:02:28 +02:00
demo
dfu dfu: fix dfu tftp on sandbox 2020-09-01 14:47:43 +02:00
dma treewide: convert devfdt_get_addr() to dev_read_addr() 2020-07-25 14:46:57 -06:00
fastboot fastboot: getvar: fix partition-size return value 2020-09-01 14:47:43 +02:00
firmware xilinx: drivers: Use '_' instead of '-' in driver name 2020-09-23 10:31:40 +02:00
fpga fpga: zynqmp: Protect zynqmp_loads() for SPL 2020-09-23 10:31:41 +02:00
gpio treewide: convert devfdt_get_addr_ptr() to dev_read_addr_ptr() 2020-08-22 08:53:37 -06:00
hwspinlock
i2c Merge branch 'next' of https://gitlab.denx.de/u-boot/custodians/u-boot-x86 into next 2020-09-25 09:04:01 -04:00
input
led led: led_cortina: Add CAxxx LED support 2020-08-07 22:31:32 -04:00
mailbox xilinx: drivers: Use '_' instead of '-' in driver name 2020-09-23 10:31:40 +02:00
memory memory: stm32-fmc2-ebi: add STM32 FMC2 EBI controller driver 2020-08-13 09:53:34 +02:00
misc i2c: eeprom: Use reg property instead of offset and size 2020-08-20 09:49:20 +02:00
mmc mmc: zynq: Fix incorrect indentation 2020-09-23 10:31:41 +02:00
mtd nand: Kconfig: Change dependency for NAND_ARASAN 2020-09-23 10:31:40 +02:00
net Xilinx changes for v2021.01 2020-09-24 08:33:47 -04:00
nvme
pch
pci PCI: mediatek: Release the resource when PCIe enable port fail 2020-09-10 15:32:09 -04:00
pci_endpoint Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq 2020-07-27 15:18:15 -04:00
phy Merge branch '2020-09-14-generic-phy-error-trace' into next 2020-09-21 16:44:16 -04:00
pinctrl powerpc, qe: add DTS support for parallel I/O ports 2020-09-17 06:09:53 +02:00
power power: Tidy up inclusion of regulator_common.h 2020-08-03 22:19:54 -04:00
pwm
qe net, qe: add DM support for QE UEC ethernet 2020-09-17 06:09:53 +02:00
ram ram: sifive: Remove regmap dependency 2020-09-30 08:54:38 +08:00
remoteproc remoteproc: k3-r5: Add support for J7200 R5Fs 2020-09-15 18:51:53 +05:30
reset reset: Add IPQ40xx reset controller driver 2020-09-18 16:20:47 -04:00
rng rng: stm32mp1: use log() instead of printf() 2020-09-18 22:23:58 +02:00
rtc treewide: convert devfdt_get_addr() to dev_read_addr() 2020-07-25 14:46:57 -06:00
scsi
serial serial: uartlite: Add support to work with any endianness 2020-09-23 10:31:40 +02:00
smem IPQ40xx: Add SMEM support 2020-09-18 16:20:47 -04:00
soc soc: soc_ti_k3: Add device identification for J7200 SoC 2020-08-11 20:34:46 +05:30
sound dm: acpi: Use correct GPIO polarity type in acpi_dp_add_gpio() 2020-09-25 11:27:14 +08:00
spi Xilinx changes for v2021.01 2020-09-24 08:33:47 -04:00
spmi treewide: convert devfdt_get_addr() to dev_read_addr() 2020-07-25 14:46:57 -06:00
sysreset treewide: convert devfdt_get_addr_ptr() to dev_read_addr_ptr() 2020-08-22 08:53:37 -06:00
tee drivers: tee: broadcom: add optee based bnxt fw load driver 2020-07-29 10:37:11 -04:00
thermal
timer riscv: Rework riscv timer driver to only support S-mode 2020-09-30 08:54:45 +08:00
tpm tpm: cr50: Add ACPI support 2020-09-25 11:27:21 +08:00
ufs ufs: Drop dm.h header file 2020-08-03 22:19:54 -04:00
usb Xilinx changes for v2021.01 2020-09-24 08:33:47 -04:00
video video: cfb_console.c: Use bi_dram[] values on all platforms 2020-08-26 09:19:50 +02:00
virtio virtio_blk: set log2blksz correctly 2020-08-24 14:11:31 -04:00
w1 treewide: convert devfdt_get_addr() to dev_read_addr() 2020-07-25 14:46:57 -06:00
w1-eeprom
watchdog watchdog: Add reset support for OcteonTX / TX2 2020-08-25 08:01:16 +02:00
xen xen: Code style conformity 2020-08-24 14:11:31 -04:00
Kconfig xen: pvblock: Add initial support for para-virtualized block driver 2020-08-14 15:18:30 -04:00
Makefile fpga: kconfig: Rename SPL_FPGA_SUPPORT to SPL_FPGA 2020-09-23 10:31:41 +02:00