[PATCH 3/3] pbl: introduce HAS_PBL_CLOCKSOURCE marker
Sascha Hauer
s.hauer at pengutronix.de
Wed Jan 22 00:12:17 PST 2025
On Tue, Jan 21, 2025 at 05:49:28PM +0100, Stefan Kerkmann wrote:
> This finally enables the usage of the polled timeout functions in the
> barebox pbl with real timeouts for supported architectures. Currently
> only ARMv7 and ARMv8 are enabled.
>
> Signed-off-by: Stefan Kerkmann <s.kerkmann at pengutronix.de>
> ---
> arch/arm/cpu/Kconfig | 2 ++
> arch/arm/lib32/Makefile | 2 +-
> include/linux/iopoll.h | 8 ++++----
> pbl/Kconfig | 3 +++
> 4 files changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/cpu/Kconfig b/arch/arm/cpu/Kconfig
> index 84fe770b6da892723528eeea89ae2b0eda122d07..3569f3d3483a6289d7a6eca3d1715e06144df8d4 100644
> --- a/arch/arm/cpu/Kconfig
> +++ b/arch/arm/cpu/Kconfig
> @@ -84,6 +84,7 @@ config CPU_V6
> config CPU_V7
> bool
> select CPU_32v7
> + select HAS_PBL_CLOCKSOURCE
Having ARMv7 support enabled doesn't necessarily mean that you are
running on ARMv7.
If you want to got this path then you have to provide a get_time_ns()
symbol for all Arm architetures and decide during runtime if you can use
the architected timer.
Alternatively playing tricks like this might work:
select HAS_PBL_CLOCKSOURCE if !CPU_32v4T && !CPU_32v5 && !CPU_32v6
(Although this of course gives you timer functionality only when all non
v7 architectures are disabled.
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list