u-boot/arch
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
..
arc board_f: Factor out bdinfo bi_mem{start, size} to setup_bdinfo 2020-08-06 14:26:35 -04:00
arm Xilinx changes for v2021.01 2020-09-24 08:33:47 -04:00
m68k board_f: m68k: Factor out m68k-specific bdinfo setup 2020-08-06 14:26:35 -04:00
microblaze microblaze: Add support for little/big endian in/out api's 2020-09-23 10:31:40 +02:00
mips global: Move from bi_memstart/memsize -> gd->ram_base/ram_size 2020-08-26 09:19:34 +02:00
nds32 treewide: convert bd_t to struct bd_info by coccinelle 2020-07-17 09:30:13 -04:00
nios2 cpu: Convert the methods to use a const udevice * 2020-07-25 14:46:57 -06:00
powerpc board/freescale: Remove P5020DS board support 2020-09-24 08:27:44 -04:00
riscv riscv: Rework riscv timer driver to only support S-mode 2020-09-30 08:54:45 +08:00
sandbox pci: pci-uclass: Add multi entry support for memory regions 2020-08-25 08:01:16 +02:00
sh sh: r2dplus: Add SCIF1 to the basic DT 2020-08-02 19:58:27 +02:00
x86 x86: edison: Generate an image suitable for xFSTK 2020-09-25 11:27:28 +08:00
xtensa xtensa: Remove arch_setup_bdinfo() 2020-08-26 09:19:40 +02:00
.gitignore
Kconfig arc: Kconfig: Add missing DM dependency 2020-08-27 11:26:58 -04:00
u-boot-elf.lds arch: Add explicit linker script for u-boot-elf 2020-04-03 11:52:55 -04:00