> On 01.03.23 17:59, Renaud Barbier wrote: > > Subject: [PATCH 1/3] ARM:lib32: add architected timer > > > > In preparation for the introduction of the LS1021A support, add a > > specific timer support based on the LS1046A support so that delays can > > be used in the PBL. > > > > Signed-off-by: Renaud Barbier <renaud.barbier@xxxxxxxxxx> > > --- > > arch/arm/lib32/Makefile | 1 + > > arch/arm/lib32/pbl.c | 17 +++++++++++++++++ > > include/clock.h | 2 ++ > > 3 files changed, 20 insertions(+) > > create mode 100644 arch/arm/lib32/pbl.c > > > > diff --git a/arch/arm/lib32/Makefile b/arch/arm/lib32/Makefile index > > 82507fffc0..1be8d70c45 100644 > > --- a/arch/arm/lib32/Makefile > > +++ b/arch/arm/lib32/Makefile > > @@ -31,6 +31,7 @@ extra-y += barebox.lds > > pbl-y += lib1funcs.o > > pbl-y += ashldi3.o > > pbl-y += div0.o > > +pbl-y += pbl.o > > I think we need a CFLAGS_pbl.o := -march=armv7-a here, otherwise this would > break builds of non-ARMv7 platforms. > > See arm_architected_timer.o in drivers/clocksource. Also, perhaps you should > rename the file to arm_architected_timer.c as well? > > Would something like below makes sense in arch/arm/lib32/Makefile: pbl-$(CONFIG_CLOCKSOURCE_ARM_ARCHITECTED_TIMER) += arm_architected_timer.o ifeq ($(CONFIG_CPU_32v7),y) CFLAGS_arm_architected_timer.o := -march=armv7-a endif