[PATCH 1/2] mach-snapdragon/mach-ipq40xx: fix, merge and refactoring
Robert Marko
robert.marko at sartura.hr
Fri Nov 4 12:05:58 CET 2022
On Tue, Oct 25, 2022 at 3:31 AM Andrey Volkov <andrey at volkov.fr> wrote:
>
> SoC: qcom: Add missing Qualcomm's SOCs definitions to the arch KConfig
>
> From: Andrey VOLKOV <andrey at volkov.fr>
>
> Add APQ8016/APQ8096/QCS40X decls to the KConfig, convert SDM845 declaration to the hidden one (selected by target),
> and update mach-snapdragon/Makefile accordingly.
>
> Also move 'CONFIG_ARM64' choice to the new declarations, since 'Snapdragon' contains Cortex A7A members too.
>
> Signed-off-by: Andrey VOLKOV <andrey at volkov.fr>
I like this cleanup effort, however, can you rebase this to apply on the master?
I would like to use this as a base of moving IPQ40xx to use Linux DTS
and keep it in sync.
Regards,
Robert
> ---
> arch/arm/Kconfig | 1 -
> arch/arm/mach-snapdragon/Kconfig | 23 +++++++++++++++++--
> arch/arm/mach-snapdragon/Makefile | 31 ++++++++++++++-----------
> arch/arm/mach-snapdragon/pinctrl-snapdragon.c | 2 +-
> drivers/reset/reset-qcom.c | 2 +-
> 5 files changed, 40 insertions(+), 19 deletions(-)
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 2e83394052..a25b7f6d99 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -1098,7 +1098,6 @@ config ARCH_RMOBILE
>
> config ARCH_SNAPDRAGON
> bool "Qualcomm Snapdragon SoCs"
> - select ARM64
> select DM
> select DM_GPIO
> select DM_SERIAL
> diff --git a/arch/arm/mach-snapdragon/Kconfig b/arch/arm/mach-snapdragon/Kconfig
> index 0927333306..83dd2c07a1 100644
> --- a/arch/arm/mach-snapdragon/Kconfig
> +++ b/arch/arm/mach-snapdragon/Kconfig
> @@ -9,10 +9,27 @@ config SYS_MALLOC_F_LEN
> config SPL_SYS_MALLOC_F_LEN
> default 0x2000
>
> +config APQ8016
> + bool
> + select ARM64
> + default n
> +
> +config APQ8096
> + bool
> + select ARM64
> + default n
> +
> config SDM845
> - bool "Qualcomm Snapdragon 845 SoC"
> + bool
> + select ARM64
> + select LINUX_KERNEL_IMAGE_HEADER
> default n
> +
> +config QCS40X
> + bool
> + select ARM64
> select LINUX_KERNEL_IMAGE_HEADER
> + default n
>
> config LNX_KRNL_IMG_TEXT_OFFSET_BASE
> default 0x80000000
> @@ -23,6 +40,7 @@ choice
> config TARGET_DRAGONBOARD410C
> bool "96Boards Dragonboard 410C"
> select BOARD_LATE_INIT
> + select APQ8016
> select ENABLE_ARM_SOC_BOOT0_HOOK
> help
> Support for 96Boards Dragonboard 410C. This board complies with
> @@ -37,6 +55,7 @@ config TARGET_DRAGONBOARD410C
>
> config TARGET_DRAGONBOARD820C
> bool "96Boards Dragonboard 820C"
> + select APQ8096
> help
> Support for 96Boards Dragonboard 820C. This board complies with
> 96Board Open Platform Specifications. Features:
> @@ -71,7 +90,7 @@ config TARGET_STARQLTECHN
>
> config TARGET_QCS404EVB
> bool "Qualcomm Technologies, Inc. QCS404 EVB"
> - select LINUX_KERNEL_IMAGE_HEADER
> + select QCS40X
> help
> Support for Qualcomm Technologies, Inc. QCS404 evaluation board.
> Features:
> diff --git a/arch/arm/mach-snapdragon/Makefile b/arch/arm/mach-snapdragon/Makefile
> index cbaaf23f6b..00997196ab 100644
> --- a/arch/arm/mach-snapdragon/Makefile
> +++ b/arch/arm/mach-snapdragon/Makefile
> @@ -2,20 +2,23 @@
> #
> # (C) Copyright 2015 Mateusz Kulikowski <mateusz.kulikowski at gmail.com>
>
> +obj-y += clock-snapdragon.o
> +obj-y += pinctrl-snapdragon.o
> +
> obj-$(CONFIG_SDM845) += clock-sdm845.o
> obj-$(CONFIG_SDM845) += sysmap-sdm845.o
> obj-$(CONFIG_SDM845) += init_sdm845.o
> -obj-$(CONFIG_TARGET_DRAGONBOARD820C) += clock-apq8096.o
> -obj-$(CONFIG_TARGET_DRAGONBOARD820C) += sysmap-apq8096.o
> -obj-$(CONFIG_TARGET_DRAGONBOARD410C) += clock-apq8016.o
> -obj-$(CONFIG_TARGET_DRAGONBOARD410C) += sysmap-apq8016.o
> -obj-y += misc.o
> -obj-y += clock-snapdragon.o
> -obj-y += dram.o
> -obj-y += pinctrl-snapdragon.o
> -obj-y += pinctrl-apq8016.o
> -obj-y += pinctrl-apq8096.o
> -obj-y += pinctrl-qcs404.o
> -obj-y += pinctrl-sdm845.o
> -obj-$(CONFIG_TARGET_QCS404EVB) += clock-qcs404.o
> -obj-$(CONFIG_TARGET_QCS404EVB) += sysmap-qcs404.o
> +obj-$(CONFIG_SDM845) += pinctrl-sdm845.o
> +
> +obj-$(CONFIG_APQ8096) += clock-apq8096.o
> +obj-$(CONFIG_APQ8096) += sysmap-apq8096.o
> +obj-$(CONFIG_APQ8096) += pinctrl-apq8096.o
> +
> +obj-$(CONFIG_APQ8016) += clock-apq8016.o
> +obj-$(CONFIG_APQ8016) += sysmap-apq8016.o
> +obj-$(CONFIG_APQ8016) += pinctrl-apq8016.o
> +obj-$(CONFIG_APQ8016) += misc.o dram.o
> +
> +obj-$(CONFIG_QCS40X) += clock-qcs404.o
> +obj-$(CONFIG_QCS40X) += sysmap-qcs404.o
> +obj-$(CONFIG_QCS40X) += pinctrl-qcs404.o
> diff --git a/arch/arm/mach-snapdragon/pinctrl-snapdragon.c b/arch/arm/mach-snapdragon/pinctrl-snapdragon.c
> index ab884ab6bf..4ed4ab4d4c 100644
> --- a/arch/arm/mach-snapdragon/pinctrl-snapdragon.c
> +++ b/arch/arm/mach-snapdragon/pinctrl-snapdragon.c
> @@ -149,7 +149,7 @@ static const struct udevice_id msm_pinctrl_ids[] = {
> { }
> };
>
> -U_BOOT_DRIVER(pinctrl_snapdraon) = {
> +U_BOOT_DRIVER(pinctrl_snapdragon) = {
> .name = "pinctrl_msm",
> .id = UCLASS_PINCTRL,
> .of_match = msm_pinctrl_ids,
> diff --git a/drivers/reset/reset-qcom.c b/drivers/reset/reset-qcom.c
> index 94315e76d5..2c61d6a6dc 100644
> --- a/drivers/reset/reset-qcom.c
> +++ b/drivers/reset/reset-qcom.c
> @@ -102,7 +102,7 @@ static const struct qcom_reset_map gcc_qcom_resets[] = {
> };
> #endif
>
> -#ifdef CONFIG_TARGET_QCS404EVB
> +#ifdef CONFIG_QCS40X
> #include <dt-bindings/clock/qcom,gcc-qcs404.h>
> static const struct qcom_reset_map gcc_qcom_resets[] = {
> [GCC_GENI_IR_BCR] = { 0x0F000 },
--
Robert Marko
Staff Embedded Linux Engineer
Sartura Ltd.
Lendavska ulica 16a
10000 Zagreb, Croatia
Email: robert.marko at sartura.hr
Web: www.sartura.hr
More information about the U-Boot
mailing list