[PATCH v2 11/16] LoongArch: Generic CPU type

Tom Rini trini at konsulko.com
Wed Jul 1 19:55:03 CEST 2026


On Wed, Jul 01, 2026 at 11:18:03AM +0000, Yao Zi wrote:
> From: Jiaxun Yang <jiaxun.yang at flygoat.com>
> 
> Provide a generic CPU type with some common routines
> that expected to be implemented at CPU level.
> 
> Signed-off-by: Jiaxun Yang <jiaxun.yang at flygoat.com>
> Signed-off-by: Yao Zi <me at ziyao.cc>
> ---
> 
> (No changes from v1)
> 
>  arch/loongarch/Kconfig              |  1 +
>  arch/loongarch/cpu/generic/Kconfig  | 13 +++++++++++++
>  arch/loongarch/cpu/generic/Makefile |  7 +++++++
>  arch/loongarch/cpu/generic/cpu.c    | 22 ++++++++++++++++++++++
>  arch/loongarch/cpu/generic/dram.c   | 21 +++++++++++++++++++++
>  5 files changed, 64 insertions(+)
>  create mode 100644 arch/loongarch/cpu/generic/Kconfig
>  create mode 100644 arch/loongarch/cpu/generic/Makefile
>  create mode 100644 arch/loongarch/cpu/generic/cpu.c
>  create mode 100644 arch/loongarch/cpu/generic/dram.c
> 
> diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
> index 109d37d8e2c7..5254afb2cd05 100644
> --- a/arch/loongarch/Kconfig
> +++ b/arch/loongarch/Kconfig
> @@ -12,6 +12,7 @@ endchoice
>  # board-specific options below
>  
>  # platform-specific options below
> +source "arch/loongarch/cpu/generic/Kconfig"
>  
>  # architecture-specific options below
>  choice
> diff --git a/arch/loongarch/cpu/generic/Kconfig b/arch/loongarch/cpu/generic/Kconfig
> new file mode 100644
> index 000000000000..ac7556d6d4d0
> --- /dev/null
> +++ b/arch/loongarch/cpu/generic/Kconfig
> @@ -0,0 +1,13 @@
> +# SPDX-License-Identifier: GPL-2.0+
> +#
> +# Copyright (C) 2024 Jiaxun yang <jiaxun.yang at flygoat.com>
> +#
> +
> +config GENERIC_LOONGARCH
> +	bool
> +	select SYS_CACHE_SHIFT_6
> +	imply CPU
> +	imply CPU_LOONGARCH
> +	imply LOONGARCH_TIMER
> +	imply CMD_CPU

Which of these "imply" values can ever really be turned off? CMD_CPU?
Yes, others, I don't know.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260701/593e4270/attachment.sig>


More information about the U-Boot mailing list