[PATCH v3 4/8] arm: mvebu: Use CONFIG_TIMER on all MVEBU & KIRKWOOD platforms

Chris Packham judge.packham at gmail.com
Mon Nov 7 09:11:49 CET 2022


On Mon, 7 Nov 2022, 7:23 PM Stefan Roese, <sr at denx.de> wrote:

> Hi Chris,
>
> On 05.11.22 05:08, Chris Packham wrote:
> > On Sat, Nov 5, 2022 at 5:03 PM Chris Packham <judge.packham at gmail.com>
> wrote:
> >>
> >> Hi Stefan,
> >>
> >> On Fri, Sep 16, 2022 at 2:23 AM Stefan Roese <sr at denx.de> wrote:
> >>>
> >>> Now that the new timer support is available for these platforms, let's
> >>> select this IF for all these platforms. This way it's not necessary
> >>> that each board changes it's config header.
> >>>
> >>> Signed-off-by: Stefan Roese <sr at denx.de>
> >>> Tested-by: Tony Dinh <mibodhi at gmail.com>
> >>> ---
> >>> v3:
> >>> - No change
> >>>
> >>> v2:
> >>> - No change
> >>>
> >>>   arch/arm/Kconfig                          | 4 ++++
> >>>   arch/arm/mach-mvebu/include/mach/config.h | 5 -----
> >>>   2 files changed, 4 insertions(+), 5 deletions(-)
> >>>
> >>> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> >>> index 82cd456f51f1..4ed100ab0ede 100644
> >>> --- a/arch/arm/Kconfig
> >>> +++ b/arch/arm/Kconfig
> >>> @@ -618,6 +618,7 @@ config ARCH_KIRKWOOD
> >>>          select BOARD_EARLY_INIT_F
> >>>          select CPU_ARM926EJS
> >>>          select GPIO_EXTRA_HEADER
> >>> +       select TIMER
> >>>
> >>>   config ARCH_MVEBU
> >>>          bool "Marvell MVEBU family (Armada XP/375/38x/3700/7K/8K)"
> >>> @@ -629,6 +630,8 @@ config ARCH_MVEBU
> >>>          select GPIO_EXTRA_HEADER
> >>>          select SPL_DM_SPI if SPL
> >>>          select SPL_DM_SPI_FLASH if SPL
> >>> +       select SPL_TIMER if SPL
> >>> +       select TIMER
> >>>          select OF_CONTROL
> >>>          select OF_SEPARATE
> >>>          select SPI
> >>> @@ -639,6 +642,7 @@ config ARCH_ORION5X
> >>>          select CPU_ARM926EJS
> >>>          select GPIO_EXTRA_HEADER
> >>>          select SPL_SEPARATE_BSS if SPL
> >>> +       select TIMER
> >>>
> >>>   config TARGET_STV0991
> >>>          bool "Support stv0991"
> >>> diff --git a/arch/arm/mach-mvebu/include/mach/config.h
> b/arch/arm/mach-mvebu/include/mach/config.h
> >>> index 4add0d9e1030..9b5036c31dd3 100644
> >>> --- a/arch/arm/mach-mvebu/include/mach/config.h
> >>> +++ b/arch/arm/mach-mvebu/include/mach/config.h
> >>> @@ -41,9 +41,4 @@
> >>>   #endif
> >>>   #endif
> >>>
> >>> -/* Use common timer */
> >>> -#define CONFIG_SYS_TIMER_COUNTS_DOWN
> >>> -#define CONFIG_SYS_TIMER_COUNTER       (MVEBU_TIMER_BASE + 0x14)
> >>> -#define CONFIG_SYS_TIMER_RATE          25000000
> >>> -
> >>>   #endif /* __MVEBU_CONFIG_H */
> >>> --
> >>> 2.37.3
> >>>
> >>
> >> I think this may have broken the 64-bit mvebu SoCs (at least reverting
> >> it gets my AC5X series back to a working state). As far as I can tell
> >> none of them have anything that would bring in any timer driver.
> >
> > The following seems to sort things out without the need for a revert
> >
> > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > index 710f171f87..e8968d61cd 100644
> > --- a/arch/arm/Kconfig
> > +++ b/arch/arm/Kconfig
> > @@ -640,7 +640,7 @@ config ARCH_MVEBU
> >          select SPL_DM_SPI if SPL
> >          select SPL_DM_SPI_FLASH if SPL
> >          select SPL_TIMER if SPL
> > -       select TIMER
> > +       select TIMER if !ARM64
> >          select OF_CONTROL
> >          select OF_SEPARATE
> >          select SPI
> >
> > I'll include it in the series I'm about to send.
>
> Thanks. Even though I wonder a bit that no other ARM64 Marvell user
> stumbled over this yet.
>

Yeah I did wonder. I do have access to another less obscure Marvell board
at $dayjob. I'll see if I can confirm whether it needs the same change or
not.


> Thanks,
> Stefan
>


More information about the U-Boot mailing list