[U-Boot] [PATCH v2 0/6] rockchip: rk3368: remove secure timer usage and use DM timer
Philipp Tomsich
philipp.tomsich at theobroma-systems.com
Wed Aug 2 20:39:56 UTC 2017
Although this was originally inteded as a RFC to test out a concept,
it's not become the tail-end of the RK3368 SPL/TPL enablement series.
So here's v2 with everyone's requests integrated.
Trying to answer Simon's question whether the address of the secure
timer (for initialising stimer1 and starting up the ARMv8 generic
timer) can be obtained from the DTS, here's a series that tries to
give an answer.
To summarise this answer in plain English:
- The answer to the original question is: "no, but..."
- The "but" is what's implemented here: we don't need the ARMv8
generic timer ticking in U-Boot, so we won't have to initialise it
at all (this removing the need to obtain the address for stimer1).
- We also have a "however": the size of the TPL binary increases by
approx. 800 bytes (AArch64 code), as we need the DM timer support.
This series is based on-top-of my RK3368 enablement series and will
remove the secure timer initialisation.
Support for the Rk3399 should be added in the next iteration.
Changes in v2:
- marks blob as maybe_unused (to accomodate the OF_CONTROL case w/o
warnings)
- remove the DEBUG (missed this initially, as there were no debug()
calls in the file anyway)
- rework the reload_value code for improved readability
- pull the uc_priv->clock_rate init into the OF_PLATDATA block
- add 'clock-frequency' prop to timer in the -u-boot.dtsi
Philipp Tomsich (6):
timer: add OF_PLATDATA support for timer-uclass
dm: timer: normalise SPL and TPL support
rockchip: timer: add device-model timer driver for RK3368 (and
similar)
dts: rk3368: make timer0 accessible for SPL and TPL
rockchip: lion-rk3368: defconfig: enable DM timer for all stages
rockchip: rk3368: remove setup of secure timer from TPL/SPL
arch/arm/cpu/armv8/Makefile | 2 +
arch/arm/dts/rk3368-lion-u-boot.dtsi | 5 ++
arch/arm/dts/rk3368.dtsi | 2 +-
arch/arm/mach-rockchip/rk3368-board-spl.c | 20 ------
arch/arm/mach-rockchip/rk3368-board-tpl.c | 19 ------
common/spl/Kconfig | 8 ---
configs/chromebook_link64_defconfig | 2 +-
configs/lion-rk3368_defconfig | 4 ++
configs/qemu-x86_64_defconfig | 2 +-
drivers/Makefile | 3 +-
drivers/timer/Kconfig | 25 +++++++
drivers/timer/Makefile | 3 +-
drivers/timer/rockchip_timer.c | 107 ++++++++++++++++++++++++++++++
drivers/timer/timer-uclass.c | 8 ++-
14 files changed, 155 insertions(+), 55 deletions(-)
create mode 100644 drivers/timer/rockchip_timer.c
--
2.1.4
More information about the U-Boot
mailing list