From patchwork Thu Apr 6 16:38:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 1766245 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=o1+o5EpR; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PsnLK6906z1yZF for ; Fri, 7 Apr 2023 02:40:41 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7AA4A86114; Thu, 6 Apr 2023 18:39:26 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="o1+o5EpR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D0CDD860A3; Thu, 6 Apr 2023 18:38:44 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 033F0860A3 for ; Thu, 6 Apr 2023 18:38:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=afd@ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 336GcOeZ040208; Thu, 6 Apr 2023 11:38:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680799104; bh=tLqlTLhyCGRfuHO4z0az6YWprNYXbFt8Q07/ly8SZ40=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=o1+o5EpRRo6t2rye9h0X3sXK0s+AJCHhgTkQNMSEhd875xeKX4IVMrbDQWCurFFBA HRhVgvXZ6VDY/xkov5bWyQywFD+S7gStqKkcaROyjH+CFFTV08Xr6RBfQxzLudJ8Q3 is/FpXbFaiYWRAkMqJtGxxknnOYG0bhU8aaL+KqU= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 336GcOJc028386 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 6 Apr 2023 11:38:24 -0500 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Thu, 6 Apr 2023 11:38:24 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Thu, 6 Apr 2023 11:38:24 -0500 Received: from lelv0854.itg.ti.com (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 336GcN23049417; Thu, 6 Apr 2023 11:38:23 -0500 From: Andrew Davis To: Simon Glass , Tom Rini , Christian Gmeiner , CC: Andrew Davis Subject: [PATCH v4 01/12] arm: mach-k3: Move MSMC fixup to SoC level Date: Thu, 6 Apr 2023 11:38:10 -0500 Message-ID: <20230406163821.25968-2-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230406163821.25968-1-afd@ti.com> References: <20230406163821.25968-1-afd@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean The MSMC fixup is something we do based on SoC, not based on the board. So this fixup does not belong in the board files. Move this to the mach-k3 common file so that it does not have to be done in each board that uses these SoCs. We use ft_system_setup() here instead of ft_board_setup() since it is no longer board level. Enable OF_SYSTEM_SETUP in the configurations that use this to keep functionality the same. Signed-off-by: Andrew Davis Reviewed-by: Christian Gmeiner --- arch/arm/mach-k3/common.c | 16 ++++++++++++++++ arch/arm/mach-k3/include/mach/sys_proto.h | 1 - board/siemens/iot2050/board.c | 11 +---------- board/ti/am65x/evm.c | 18 ------------------ board/ti/j721e/evm.c | 11 +---------- board/ti/j721s2/evm.c | 16 ---------------- configs/am65x_evm_a53_defconfig | 2 +- configs/am65x_hs_evm_a53_defconfig | 2 +- configs/iot2050_pg1_defconfig | 1 + configs/iot2050_pg2_defconfig | 1 + configs/j7200_evm_a72_defconfig | 1 + configs/j7200_hs_evm_a72_defconfig | 1 + configs/j721e_evm_a72_defconfig | 1 + configs/j721e_hs_evm_a72_defconfig | 1 + configs/j721s2_evm_a72_defconfig | 2 +- configs/j721s2_hs_evm_a72_defconfig | 2 +- 16 files changed, 28 insertions(+), 59 deletions(-) diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c index a2adb791f6c..6870f13c520 100644 --- a/arch/arm/mach-k3/common.c +++ b/arch/arm/mach-k3/common.c @@ -386,6 +386,22 @@ int fdt_disable_node(void *blob, char *node_path) return 0; } +#if defined(CONFIG_OF_SYSTEM_SETUP) +int ft_system_setup(void *blob, struct bd_info *bd) +{ + int ret; + + ret = fdt_fixup_msmc_ram(blob, "/bus@100000", "sram@70000000"); + if (ret < 0) + ret = fdt_fixup_msmc_ram(blob, "/interconnect@100000", + "sram@70000000"); + if (ret) + printf("%s: fixing up msmc ram failed %d\n", __func__, ret); + + return ret; +} +#endif + #endif #ifndef CONFIG_SYSRESET diff --git a/arch/arm/mach-k3/include/mach/sys_proto.h b/arch/arm/mach-k3/include/mach/sys_proto.h index 3d3d90d02d6..0b5d606eaa2 100644 --- a/arch/arm/mach-k3/include/mach/sys_proto.h +++ b/arch/arm/mach-k3/include/mach/sys_proto.h @@ -11,7 +11,6 @@ void sdelay(unsigned long loops); u32 wait_on_value(u32 read_bit_mask, u32 match_value, void *read_addr, u32 bound); struct ti_sci_handle *get_ti_sci_handle(void); -int fdt_fixup_msmc_ram(void *blob, char *parent_path, char *node_name); int do_board_detect(void); void release_resources_for_core_shutdown(void); int fdt_disable_node(void *blob, char *node_path); diff --git a/board/siemens/iot2050/board.c b/board/siemens/iot2050/board.c index df705b7c971..1ba3e90c6fc 100644 --- a/board/siemens/iot2050/board.c +++ b/board/siemens/iot2050/board.c @@ -482,19 +482,10 @@ fixup_error: int ft_board_setup(void *blob, struct bd_info *bd) { - int ret; - - ret = fdt_fixup_msmc_ram(blob, "/bus@100000", "sram@70000000"); - if (ret < 0) - ret = fdt_fixup_msmc_ram(blob, "/interconnect@100000", - "sram@70000000"); - if (ret) - pr_err("%s: fixing up msmc ram failed %d\n", __func__, ret); - if (board_is_m2()) m2_fdt_fixup(blob); - return ret; + return 0; } #endif diff --git a/board/ti/am65x/evm.c b/board/ti/am65x/evm.c index b266ccb4b82..4053b8333cf 100644 --- a/board/ti/am65x/evm.c +++ b/board/ti/am65x/evm.c @@ -101,24 +101,6 @@ int board_fit_config_name_match(const char *name) } #endif -#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) -int ft_board_setup(void *blob, struct bd_info *bd) -{ - int ret; - - ret = fdt_fixup_msmc_ram(blob, "/bus@100000", "sram@70000000"); - if (ret < 0) - ret = fdt_fixup_msmc_ram(blob, "/interconnect@100000", - "sram@70000000"); - if (ret) { - printf("%s: fixing up msmc ram failed %d\n", __func__, ret); - return ret; - } - - return 0; -} -#endif - #ifdef CONFIG_TI_I2C_BOARD_DETECT int do_board_detect(void) { diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c index d4e672a7acd..00ce009d3e8 100644 --- a/board/ti/j721e/evm.c +++ b/board/ti/j721e/evm.c @@ -144,18 +144,9 @@ void spl_perform_fixups(struct spl_image_info *spl_image) #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) int ft_board_setup(void *blob, struct bd_info *bd) { - int ret; - - ret = fdt_fixup_msmc_ram(blob, "/bus@100000", "sram@70000000"); - if (ret < 0) - ret = fdt_fixup_msmc_ram(blob, "/interconnect@100000", - "sram@70000000"); - if (ret) - printf("%s: fixing up msmc ram failed %d\n", __func__, ret); - detect_enable_hyperflash(blob); - return ret; + return 0; } #endif diff --git a/board/ti/j721s2/evm.c b/board/ti/j721s2/evm.c index c86715fa211..9b130c141ac 100644 --- a/board/ti/j721s2/evm.c +++ b/board/ti/j721s2/evm.c @@ -73,22 +73,6 @@ int dram_init_banksize(void) return 0; } -#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) -int ft_board_setup(void *blob, struct bd_info *bd) -{ - int ret; - - ret = fdt_fixup_msmc_ram(blob, "/bus@100000", "sram@70000000"); - if (ret < 0) - ret = fdt_fixup_msmc_ram(blob, "/interconnect@100000", - "sram@70000000"); - if (ret) - printf("%s: fixing up msmc ram failed %d\n", __func__, ret); - - return ret; -} -#endif - #ifdef CONFIG_TI_I2C_BOARD_DETECT /* * Functions specific to EVM and SK designs of J721S2/AM68 family. diff --git a/configs/am65x_evm_a53_defconfig b/configs/am65x_evm_a53_defconfig index bddd94ce80e..4af274e06d6 100644 --- a/configs/am65x_evm_a53_defconfig +++ b/configs/am65x_evm_a53_defconfig @@ -30,7 +30,7 @@ CONFIG_SPL_SPI=y # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 -CONFIG_OF_BOARD_SETUP=y +CONFIG_OF_SYSTEM_SETUP=y CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTCOMMAND="run findfdt; run distro_bootcmd; run init_${boot}; run boot_rprocs; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern" CONFIG_LOGLEVEL=7 diff --git a/configs/am65x_hs_evm_a53_defconfig b/configs/am65x_hs_evm_a53_defconfig index 898403aad98..bdd4b6420dd 100644 --- a/configs/am65x_hs_evm_a53_defconfig +++ b/configs/am65x_hs_evm_a53_defconfig @@ -30,7 +30,7 @@ CONFIG_SPL_SPI=y # CONFIG_PSCI_RESET is not set # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL_LOAD_FIT=y -CONFIG_OF_BOARD_SETUP=y +CONFIG_OF_SYSTEM_SETUP=y CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run get_fit_${boot}; run get_overlaystring; run run_fit" CONFIG_LOGLEVEL=7 diff --git a/configs/iot2050_pg1_defconfig b/configs/iot2050_pg1_defconfig index b02769609c7..957e3c4b2c2 100644 --- a/configs/iot2050_pg1_defconfig +++ b/configs/iot2050_pg1_defconfig @@ -28,6 +28,7 @@ CONFIG_SPL_SPI=y # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL_LOAD_FIT=y CONFIG_OF_BOARD_SETUP=y +CONFIG_OF_SYSTEM_SETUP=y CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTSTAGE=y CONFIG_SHOW_BOOT_PROGRESS=y diff --git a/configs/iot2050_pg2_defconfig b/configs/iot2050_pg2_defconfig index b20667780a3..1d221ade0d5 100644 --- a/configs/iot2050_pg2_defconfig +++ b/configs/iot2050_pg2_defconfig @@ -28,6 +28,7 @@ CONFIG_DISTRO_DEFAULTS=y # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL_LOAD_FIT=y CONFIG_OF_BOARD_SETUP=y +CONFIG_OF_SYSTEM_SETUP=y CONFIG_BOOTSTAGE=y CONFIG_SHOW_BOOT_PROGRESS=y CONFIG_SPL_SHOW_BOOT_PROGRESS=y diff --git a/configs/j7200_evm_a72_defconfig b/configs/j7200_evm_a72_defconfig index 9b6512bacba..f9299780f71 100644 --- a/configs/j7200_evm_a72_defconfig +++ b/configs/j7200_evm_a72_defconfig @@ -31,6 +31,7 @@ CONFIG_SPL_SPI=y CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 CONFIG_OF_BOARD_SETUP=y +CONFIG_OF_SYSTEM_SETUP=y CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run boot_rprocs; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern" CONFIG_LOGLEVEL=7 diff --git a/configs/j7200_hs_evm_a72_defconfig b/configs/j7200_hs_evm_a72_defconfig index cfd2e80aded..e83525bcb5e 100644 --- a/configs/j7200_hs_evm_a72_defconfig +++ b/configs/j7200_hs_evm_a72_defconfig @@ -32,6 +32,7 @@ CONFIG_SPL_SPI=y CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 CONFIG_OF_BOARD_SETUP=y +CONFIG_OF_SYSTEM_SETUP=y CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run boot_rprocs; run get_fit_${boot}; run get_overlaystring; run run_fit" CONFIG_LOGLEVEL=7 diff --git a/configs/j721e_evm_a72_defconfig b/configs/j721e_evm_a72_defconfig index 452e4b9695d..46ad1b7d1a1 100644 --- a/configs/j721e_evm_a72_defconfig +++ b/configs/j721e_evm_a72_defconfig @@ -29,6 +29,7 @@ CONFIG_SPL_SPI=y CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 CONFIG_OF_BOARD_SETUP=y +CONFIG_OF_SYSTEM_SETUP=y CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTCOMMAND="run findfdt; run distro_bootcmd; run init_${boot}; run main_cpsw0_qsgmii_phyinit; run boot_rprocs; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern" CONFIG_LOGLEVEL=7 diff --git a/configs/j721e_hs_evm_a72_defconfig b/configs/j721e_hs_evm_a72_defconfig index 651df4a4865..df4bf01daf9 100644 --- a/configs/j721e_hs_evm_a72_defconfig +++ b/configs/j721e_hs_evm_a72_defconfig @@ -30,6 +30,7 @@ CONFIG_SPL_SPI=y CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 CONFIG_OF_BOARD_SETUP=y +CONFIG_OF_SYSTEM_SETUP=y CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run main_cpsw0_qsgmii_phyinit; run boot_rprocs; run get_fit_${boot}; run get_overlay_${boot}; run run_fit" CONFIG_LOGLEVEL=7 diff --git a/configs/j721s2_evm_a72_defconfig b/configs/j721s2_evm_a72_defconfig index 3a91df71d37..9889e1bd523 100644 --- a/configs/j721s2_evm_a72_defconfig +++ b/configs/j721s2_evm_a72_defconfig @@ -28,7 +28,7 @@ CONFIG_SPL_SPI=y # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 -CONFIG_OF_BOARD_SETUP=y +CONFIG_OF_SYSTEM_SETUP=y CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run boot_rprocs; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern" CONFIG_LOGLEVEL=7 diff --git a/configs/j721s2_hs_evm_a72_defconfig b/configs/j721s2_hs_evm_a72_defconfig index 453f2aabbfc..035d87b49f1 100644 --- a/configs/j721s2_hs_evm_a72_defconfig +++ b/configs/j721s2_hs_evm_a72_defconfig @@ -31,7 +31,7 @@ CONFIG_SPL_SPI=y # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 -CONFIG_OF_BOARD_SETUP=y +CONFIG_OF_SYSTEM_SETUP=y CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run boot_rprocs; run get_fit_${boot}; run get_overlaystring; run run_fit" CONFIG_LOGLEVEL=7 From patchwork Thu Apr 6 16:38:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 1766236 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=InKD1bce; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PsnJD6zlMz1yZF for ; Fri, 7 Apr 2023 02:38:52 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F3A808608A; Thu, 6 Apr 2023 18:38:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="InKD1bce"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 420D7860A4; Thu, 6 Apr 2023 18:38:30 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E021586073 for ; Thu, 6 Apr 2023 18:38:26 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=afd@ti.com Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 336GcOLZ101111; Thu, 6 Apr 2023 11:38:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680799104; bh=sdzYKQaAaquMpI1PuM1VNabQ5OoF6YbxlFPin86yCwo=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=InKD1bcegU1LHQgbIj4tZMhTBi6M0d3atu5EyyYoJC9XHl1eQGD+FIIzgu2DRkmJi ym1/GCapBLOd66e6LBz1nZBx4o3Tju4oTlB58oa49981mIaryHq0nSLyIewaivysNG EjeML0yUEymOgrS4MBPpHAqssL4HfblM8CoI2xtA= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 336GcOXR125798 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 6 Apr 2023 11:38:24 -0500 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Thu, 6 Apr 2023 11:38:24 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Thu, 6 Apr 2023 11:38:24 -0500 Received: from lelv0854.itg.ti.com (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 336GcN24049417; Thu, 6 Apr 2023 11:38:24 -0500 From: Andrew Davis To: Simon Glass , Tom Rini , Christian Gmeiner , CC: Andrew Davis Subject: [PATCH v4 02/12] arm: mach-k3: Move J721e SoC detection out of common section Date: Thu, 6 Apr 2023 11:38:11 -0500 Message-ID: <20230406163821.25968-3-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230406163821.25968-1-afd@ti.com> References: <20230406163821.25968-1-afd@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean This belongs in the J721e specific file as it is the only place this is used. Any board level users should use the SOC driver. While here, move the J721e and J7200 SoC IDs out of sys_proto.h and into hardware.h. Use a macro borrowed from Rockchip and add the rest of the SoC IDs for completeness and later use. Signed-off-by: Andrew Davis Reviewed-by: Christian Gmeiner --- arch/arm/mach-k3/common.c | 20 ------------------ arch/arm/mach-k3/common.h | 3 --- arch/arm/mach-k3/include/mach/hardware.h | 25 +++++++++++++++++++++++ arch/arm/mach-k3/include/mach/sys_proto.h | 3 --- 4 files changed, 25 insertions(+), 26 deletions(-) diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c index 6870f13c520..6e084de692c 100644 --- a/arch/arm/mach-k3/common.c +++ b/arch/arm/mach-k3/common.c @@ -488,26 +488,6 @@ int print_cpuinfo(void) } #endif -bool soc_is_j721e(void) -{ - u32 soc; - - soc = (readl(CTRLMMR_WKUP_JTAG_ID) & - JTAG_ID_PARTNO_MASK) >> JTAG_ID_PARTNO_SHIFT; - - return soc == J721E; -} - -bool soc_is_j7200(void) -{ - u32 soc; - - soc = (readl(CTRLMMR_WKUP_JTAG_ID) & - JTAG_ID_PARTNO_MASK) >> JTAG_ID_PARTNO_SHIFT; - - return soc == J7200; -} - #ifdef CONFIG_ARM64 void board_prep_linux(struct bootm_headers *images) { diff --git a/arch/arm/mach-k3/common.h b/arch/arm/mach-k3/common.h index 8f38fcef7f0..531be0be54c 100644 --- a/arch/arm/mach-k3/common.h +++ b/arch/arm/mach-k3/common.h @@ -9,9 +9,6 @@ #include #include -#define J721E 0xbb64 -#define J7200 0xbb6d - struct fwl_data { const char *name; u16 fwl_id; diff --git a/arch/arm/mach-k3/include/mach/hardware.h b/arch/arm/mach-k3/include/mach/hardware.h index 2c60ef85432..9faf1d6ff06 100644 --- a/arch/arm/mach-k3/include/mach/hardware.h +++ b/arch/arm/mach-k3/include/mach/hardware.h @@ -6,6 +6,8 @@ #ifndef _ASM_ARCH_HARDWARE_H_ #define _ASM_ARCH_HARDWARE_H_ +#include + #ifdef CONFIG_SOC_K3_AM654 #include "am6_hardware.h" #endif @@ -36,6 +38,29 @@ #define JTAG_ID_VARIANT_MASK (0xf << 28) #define JTAG_ID_PARTNO_SHIFT 12 #define JTAG_ID_PARTNO_MASK (0xffff << 12) +#define JTAG_ID_PARTNO_AM65X 0xbb5a +#define JTAG_ID_PARTNO_J721E 0xbb64 +#define JTAG_ID_PARTNO_J7200 0xbb6d +#define JTAG_ID_PARTNO_AM64X 0xbb38 +#define JTAG_ID_PARTNO_J721S2 0xbb75 +#define JTAG_ID_PARTNO_AM62X 0xbb7e +#define JTAG_ID_PARTNO_AM62AX 0xbb8d + +#define K3_SOC_ID(id, ID) \ +static inline bool soc_is_##id(void) \ +{ \ + u32 soc = (readl(CTRLMMR_WKUP_JTAG_ID) & \ + JTAG_ID_PARTNO_MASK) >> JTAG_ID_PARTNO_SHIFT; \ + return soc == JTAG_ID_PARTNO_##ID; \ +} +K3_SOC_ID(am65x, AM65X) +K3_SOC_ID(j721e, J721E) +K3_SOC_ID(j7200, J7200) +K3_SOC_ID(am64x, AM64X) +K3_SOC_ID(j721s2, J721S2) +K3_SOC_ID(am62x, AM62X) +K3_SOC_ID(am62ax, AM62AX) + #define K3_SEC_MGR_SYS_STATUS 0x44234100 #define SYS_STATUS_DEV_TYPE_SHIFT 0 #define SYS_STATUS_DEV_TYPE_MASK (0xf) diff --git a/arch/arm/mach-k3/include/mach/sys_proto.h b/arch/arm/mach-k3/include/mach/sys_proto.h index 0b5d606eaa2..d5d4b787b7d 100644 --- a/arch/arm/mach-k3/include/mach/sys_proto.h +++ b/arch/arm/mach-k3/include/mach/sys_proto.h @@ -15,9 +15,6 @@ int do_board_detect(void); void release_resources_for_core_shutdown(void); int fdt_disable_node(void *blob, char *node_path); -bool soc_is_j721e(void); -bool soc_is_j7200(void); - void k3_spl_init(void); void k3_mem_init(void); bool check_rom_loaded_sysfw(void); From patchwork Thu Apr 6 16:38:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 1766239 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=b3mkZpmn; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PsnJz4f4Pz1yZF for ; Fri, 7 Apr 2023 02:39:31 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B7EBF860A5; Thu, 6 Apr 2023 18:38:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="b3mkZpmn"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8C26F860B3; Thu, 6 Apr 2023 18:38:37 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 342AA86081 for ; Thu, 6 Apr 2023 18:38:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=afd@ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 336GcPSr101115; Thu, 6 Apr 2023 11:38:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680799105; bh=6dIBo3TXOYhEQH1LY8F4uApyuGPd6dS5GrDFHY7KctQ=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=b3mkZpmnQefCrWfhWXBLdx7QEFGOYf31Q1DgYpKJfL0KCmRMIwCtOUu7aTdII+Sk6 9uC/Ksn0I06yWe00dnqJQRpnyksZtYe/RuIOleT3xs7po+uO27ilvdwk1ktPCdnApV TVV7NdfR1AwZr46/APLiDR3BRsewp917sQe0lfdY= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 336GcPYL094278 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 6 Apr 2023 11:38:25 -0500 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Thu, 6 Apr 2023 11:38:24 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Thu, 6 Apr 2023 11:38:24 -0500 Received: from lelv0854.itg.ti.com (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 336GcN25049417; Thu, 6 Apr 2023 11:38:24 -0500 From: Andrew Davis To: Simon Glass , Tom Rini , Christian Gmeiner , CC: Andrew Davis Subject: [PATCH v4 03/12] soc: soc_ti_k3: Use hardware.h to remove definition duplication Date: Thu, 6 Apr 2023 11:38:12 -0500 Message-ID: <20230406163821.25968-4-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230406163821.25968-1-afd@ti.com> References: <20230406163821.25968-1-afd@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean The K3 JTAG and SoC ID information is already stored in the K3 arch hardware file, include that and use its definitions here. Signed-off-by: Andrew Davis Reviewed-by: Christian Gmeiner --- drivers/soc/Kconfig | 2 +- drivers/soc/soc_ti_k3.c | 30 +++++++++--------------------- 2 files changed, 10 insertions(+), 22 deletions(-) diff --git a/drivers/soc/Kconfig b/drivers/soc/Kconfig index acf555baaec..85dac9de78a 100644 --- a/drivers/soc/Kconfig +++ b/drivers/soc/Kconfig @@ -10,7 +10,7 @@ config SOC_DEVICE specific device variant in use. config SOC_DEVICE_TI_K3 - depends on SOC_DEVICE + depends on SOC_DEVICE && ARCH_K3 bool "Enable SoC Device ID driver for TI K3 SoCs" help This allows Texas Instruments Keystone 3 SoCs to identify diff --git a/drivers/soc/soc_ti_k3.c b/drivers/soc/soc_ti_k3.c index 8af0ac70519..42430d79a7a 100644 --- a/drivers/soc/soc_ti_k3.c +++ b/drivers/soc/soc_ti_k3.c @@ -8,21 +8,9 @@ #include #include +#include #include -#define AM65X 0xbb5a -#define J721E 0xbb64 -#define J7200 0xbb6d -#define AM64X 0xbb38 -#define J721S2 0xbb75 -#define AM62X 0xbb7e -#define AM62AX 0xbb8d - -#define JTAG_ID_VARIANT_SHIFT 28 -#define JTAG_ID_VARIANT_MASK (0xf << 28) -#define JTAG_ID_PARTNO_SHIFT 12 -#define JTAG_ID_PARTNO_MASK (0xffff << 12) - struct soc_ti_k3_plat { const char *family; const char *revision; @@ -36,25 +24,25 @@ static const char *get_family_string(u32 idreg) soc = (idreg & JTAG_ID_PARTNO_MASK) >> JTAG_ID_PARTNO_SHIFT; switch (soc) { - case AM65X: + case JTAG_ID_PARTNO_AM65X: family = "AM65X"; break; - case J721E: + case JTAG_ID_PARTNO_J721E: family = "J721E"; break; - case J7200: + case JTAG_ID_PARTNO_J7200: family = "J7200"; break; - case AM64X: + case JTAG_ID_PARTNO_AM64X: family = "AM64X"; break; - case J721S2: + case JTAG_ID_PARTNO_J721S2: family = "J721S2"; break; - case AM62X: + case JTAG_ID_PARTNO_AM62X: family = "AM62X"; break; - case AM62AX: + case JTAG_ID_PARTNO_AM62AX: family = "AM62AX"; break; default: @@ -81,7 +69,7 @@ static const char *get_rev_string(u32 idreg) soc = (idreg & JTAG_ID_PARTNO_MASK) >> JTAG_ID_PARTNO_SHIFT; switch (soc) { - case J721E: + case JTAG_ID_PARTNO_J721E: if (rev > ARRAY_SIZE(j721e_rev_string_map)) goto bail; return j721e_rev_string_map[rev]; From patchwork Thu Apr 6 16:38:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 1766238 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=iOigntCJ; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PsnJm1V34z1yZF for ; Fri, 7 Apr 2023 02:39:20 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D4C77860BE; Thu, 6 Apr 2023 18:38:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="iOigntCJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DF2998609D; Thu, 6 Apr 2023 18:38:36 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A357986085 for ; Thu, 6 Apr 2023 18:38:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=afd@ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 336GcPf1101120; Thu, 6 Apr 2023 11:38:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680799105; bh=3/j6ynfRCeiQ5Y/m/G5SxQLy1UUKb87Wtd2CdTaqC+s=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=iOigntCJPW3wylJM1j+VvNQk9+v5pE9SPaOJrC+g++om46uF0QnzTkg0fVd+YoG37 ME6xDqrAinSLN3qxXrxdFY+ERK+qupW20vm829pYKWw250mQ9GqmpTr6pyfHEE9+Ns 9bfLp/ouczLGzyjNNWUiE8hf/jdZA8HgF061tMCw= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 336GcPe0028390 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 6 Apr 2023 11:38:25 -0500 Received: from DFLE106.ent.ti.com (10.64.6.27) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Thu, 6 Apr 2023 11:38:25 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE106.ent.ti.com (10.64.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Thu, 6 Apr 2023 11:38:25 -0500 Received: from lelv0854.itg.ti.com (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 336GcN26049417; Thu, 6 Apr 2023 11:38:24 -0500 From: Andrew Davis To: Simon Glass , Tom Rini , Christian Gmeiner , CC: Andrew Davis Subject: [PATCH v4 04/12] configs: j721x_evm: Remove unneeded check for SYS_K3_SPL_ATF Date: Thu, 6 Apr 2023 11:38:13 -0500 Message-ID: <20230406163821.25968-5-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230406163821.25968-1-afd@ti.com> References: <20230406163821.25968-1-afd@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean The TARGET_x_R5_EVM check is already enough to limit these defines to only the correct builds. Remove the extra outer check. Signed-off-by: Andrew Davis Reviewed-by: Christian Gmeiner --- board/ti/j721e/j721e.env | 2 -- board/ti/j721s2/j721s2.env | 2 -- 2 files changed, 4 deletions(-) diff --git a/board/ti/j721e/j721e.env b/board/ti/j721e/j721e.env index 446395adfa5..f442d155842 100644 --- a/board/ti/j721e/j721e.env +++ b/board/ti/j721e/j721e.env @@ -21,7 +21,6 @@ args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 ${mtdparts} run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr} -#if CONFIG_SYS_K3_SPL_ATF #if CONFIG_TARGET_J721E_R5_EVM addr_mcur5f0_0load=0x89000000 name_mcur5f0_0fw=/lib/firmware/j7-mcu-r5f0_0-fw @@ -29,7 +28,6 @@ name_mcur5f0_0fw=/lib/firmware/j7-mcu-r5f0_0-fw addr_mcur5f0_0load=0x89000000 name_mcur5f0_0fw=/lib/firmware/j7200-mcu-r5f0_0-fw #endif -#endif boot=mmc mmcdev=1 diff --git a/board/ti/j721s2/j721s2.env b/board/ti/j721s2/j721s2.env index 2152f8849f9..f4467770e40 100644 --- a/board/ti/j721s2/j721s2.env +++ b/board/ti/j721s2/j721s2.env @@ -25,12 +25,10 @@ boot=mmc mmcdev=1 bootpart=1:2 bootdir=/boot -#if CONFIG_SYS_K3_SPL_ATF #if CONFIG_TARGET_J721S2_R5_EVM addr_mcur5f0_0load=0x89000000 name_mcur5f0_0fw=/lib/firmware/j7-mcu-r5f0_0-fw #endif -#endif rd_spec=- init_mmc=run args_all args_mmc get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt} From patchwork Thu Apr 6 16:38:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 1766237 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=psAH58JH; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PsnJW6ynCz1yZF for ; Fri, 7 Apr 2023 02:39:07 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B9CA68609F; Thu, 6 Apr 2023 18:38:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="psAH58JH"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 585A78608A; Thu, 6 Apr 2023 18:38:34 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3C3588608A for ; Thu, 6 Apr 2023 18:38:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=afd@ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 336GcPE4011767; Thu, 6 Apr 2023 11:38:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680799105; bh=Qt8ZJ/y/7ojqefiLETauRb0yPwuI9cNbo0rzbjw38x0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=psAH58JHi1hArFFzPCMvUF7icpabdPFLUcHtqq6VZJZ9ixYnTlNSyClrGUauexbL7 obCdu6rlBQtLMlif9hNgUrqTkIFLG12dZWLnAPS7oNaBRmQ8Yhp7FX5w2qVKveN/9+ mEd6zSuQFHbY/5hXo551yF+s2xd3T//ldXLSk2d0= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 336GcP5Y094282 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 6 Apr 2023 11:38:25 -0500 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Thu, 6 Apr 2023 11:38:25 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Thu, 6 Apr 2023 11:38:25 -0500 Received: from lelv0854.itg.ti.com (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 336GcN27049417; Thu, 6 Apr 2023 11:38:25 -0500 From: Andrew Davis To: Simon Glass , Tom Rini , Christian Gmeiner , CC: Andrew Davis Subject: [PATCH v4 05/12] configs: j721s2_evm.h: Remove refrences to J7200 EVM Date: Thu, 6 Apr 2023 11:38:14 -0500 Message-ID: <20230406163821.25968-6-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230406163821.25968-1-afd@ti.com> References: <20230406163821.25968-1-afd@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean The J7200 EVM will not include this file, this J7200 checks look to be a copy/paste errora from j721e_evm.h, which J7200 *can* include. Signed-off-by: Andrew Davis Reviewed-by: Christian Gmeiner --- include/configs/j721s2_evm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/configs/j721s2_evm.h b/include/configs/j721s2_evm.h index 2fa93b79614..1e0da9f96c5 100644 --- a/include/configs/j721s2_evm.h +++ b/include/configs/j721s2_evm.h @@ -16,7 +16,7 @@ #define CFG_SYS_SDRAM_BASE1 0x880000000 /* SPL Loader Configuration */ -#if defined(CONFIG_TARGET_J721S2_A72_EVM) || defined(CONFIG_TARGET_J7200_A72_EVM) +#if defined(CONFIG_TARGET_J721S2_A72_EVM) #define CFG_SYS_UBOOT_BASE 0x50280000 /* Image load address in RAM for DFU boot*/ #else From patchwork Thu Apr 6 16:38:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 1766240 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=TMyABtyy; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PsnKD0MDDz1yZF for ; Fri, 7 Apr 2023 02:39:44 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DCDEF860B3; Thu, 6 Apr 2023 18:38:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="TMyABtyy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9C528860B6; Thu, 6 Apr 2023 18:38:40 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7B52F86087 for ; Thu, 6 Apr 2023 18:38:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=afd@ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 336GcQjc011775; Thu, 6 Apr 2023 11:38:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680799106; bh=xjGWVhbVQkUlvnikPMmTjcDYNc8aJoeasTLxBlCjLUA=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=TMyABtyy0wIuAM3ffOYG3qWPAqHF15/YOLnZDwho0Z4n/C5xEEhzG5ym/QA5mCF94 YyuUKwqbeSOPFAxz5CclgvNQBbR/npH/ivGbLEhEOjG8Gha3PVWiMptjVeVQSqWboq gAsHlyuUphbuD1xt7CeR73eBhxwengsyOQUNFDxE= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 336GcQM1028399 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 6 Apr 2023 11:38:26 -0500 Received: from DLEE107.ent.ti.com (157.170.170.37) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Thu, 6 Apr 2023 11:38:25 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Thu, 6 Apr 2023 11:38:25 -0500 Received: from lelv0854.itg.ti.com (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 336GcN28049417; Thu, 6 Apr 2023 11:38:25 -0500 From: Andrew Davis To: Simon Glass , Tom Rini , Christian Gmeiner , CC: Andrew Davis Subject: [PATCH v4 06/12] arm: mach-k3: Make release_resources_for_core_shutdown() common Date: Thu, 6 Apr 2023 11:38:15 -0500 Message-ID: <20230406163821.25968-7-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230406163821.25968-1-afd@ti.com> References: <20230406163821.25968-1-afd@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean This function is the same for each device when it needs to shutdown the R5 core. Move this to the common section and move the remaining device specific ID list to the device hardware include. Signed-off-by: Andrew Davis Reviewed-by: Christian Gmeiner --- arch/arm/mach-k3/am642_init.c | 51 ----------------- arch/arm/mach-k3/am654_init.c | 51 ----------------- arch/arm/mach-k3/common.c | 32 ++++++++++- arch/arm/mach-k3/include/mach/am62_hardware.h | 8 +++ .../arm/mach-k3/include/mach/am62a_hardware.h | 8 +++ arch/arm/mach-k3/include/mach/am64_hardware.h | 24 ++++++++ arch/arm/mach-k3/include/mach/am6_hardware.h | 19 +++++++ .../arm/mach-k3/include/mach/j721e_hardware.h | 19 +++++++ .../mach-k3/include/mach/j721s2_hardware.h | 19 +++++++ arch/arm/mach-k3/include/mach/sys_proto.h | 1 - arch/arm/mach-k3/j721e_init.c | 55 ------------------- arch/arm/mach-k3/j721s2_init.c | 54 ------------------ 12 files changed, 127 insertions(+), 214 deletions(-) diff --git a/arch/arm/mach-k3/am642_init.c b/arch/arm/mach-k3/am642_init.c index 1bf7e163cc4..86aced54646 100644 --- a/arch/arm/mach-k3/am642_init.c +++ b/arch/arm/mach-k3/am642_init.c @@ -346,54 +346,3 @@ u32 spl_boot_device(void) else return __get_backup_bootmedia(devstat); } - -#if defined(CONFIG_SYS_K3_SPL_ATF) - -#define AM64X_DEV_RTI8 127 -#define AM64X_DEV_RTI9 128 -#define AM64X_DEV_R5FSS0_CORE0 121 -#define AM64X_DEV_R5FSS0_CORE1 122 - -void release_resources_for_core_shutdown(void) -{ - struct ti_sci_handle *ti_sci = get_ti_sci_handle(); - struct ti_sci_dev_ops *dev_ops = &ti_sci->ops.dev_ops; - struct ti_sci_proc_ops *proc_ops = &ti_sci->ops.proc_ops; - int ret; - u32 i; - - const u32 put_device_ids[] = { - AM64X_DEV_RTI9, - AM64X_DEV_RTI8, - }; - - /* Iterate through list of devices to put (shutdown) */ - for (i = 0; i < ARRAY_SIZE(put_device_ids); i++) { - u32 id = put_device_ids[i]; - - ret = dev_ops->put_device(ti_sci, id); - if (ret) - panic("Failed to put device %u (%d)\n", id, ret); - } - - const u32 put_core_ids[] = { - AM64X_DEV_R5FSS0_CORE1, - AM64X_DEV_R5FSS0_CORE0, /* Handle CPU0 after CPU1 */ - }; - - /* Iterate through list of cores to put (shutdown) */ - for (i = 0; i < ARRAY_SIZE(put_core_ids); i++) { - u32 id = put_core_ids[i]; - - /* - * Queue up the core shutdown request. Note that this call - * needs to be followed up by an actual invocation of an WFE - * or WFI CPU instruction. - */ - ret = proc_ops->proc_shutdown_no_wait(ti_sci, id); - if (ret) - panic("Failed sending core %u shutdown message (%d)\n", - id, ret); - } -} -#endif diff --git a/arch/arm/mach-k3/am654_init.c b/arch/arm/mach-k3/am654_init.c index 70059edb039..abd0c0bccbc 100644 --- a/arch/arm/mach-k3/am654_init.c +++ b/arch/arm/mach-k3/am654_init.c @@ -353,54 +353,3 @@ u32 spl_boot_device(void) else return __get_backup_bootmedia(devstat); } - -#ifdef CONFIG_SYS_K3_SPL_ATF - -#define AM6_DEV_MCU_RTI0 134 -#define AM6_DEV_MCU_RTI1 135 -#define AM6_DEV_MCU_ARMSS0_CPU0 159 -#define AM6_DEV_MCU_ARMSS0_CPU1 245 - -void release_resources_for_core_shutdown(void) -{ - struct ti_sci_handle *ti_sci = get_ti_sci_handle(); - struct ti_sci_dev_ops *dev_ops = &ti_sci->ops.dev_ops; - struct ti_sci_proc_ops *proc_ops = &ti_sci->ops.proc_ops; - int ret; - u32 i; - - const u32 put_device_ids[] = { - AM6_DEV_MCU_RTI0, - AM6_DEV_MCU_RTI1, - }; - - /* Iterate through list of devices to put (shutdown) */ - for (i = 0; i < ARRAY_SIZE(put_device_ids); i++) { - u32 id = put_device_ids[i]; - - ret = dev_ops->put_device(ti_sci, id); - if (ret) - panic("Failed to put device %u (%d)\n", id, ret); - } - - const u32 put_core_ids[] = { - AM6_DEV_MCU_ARMSS0_CPU1, - AM6_DEV_MCU_ARMSS0_CPU0, /* Handle CPU0 after CPU1 */ - }; - - /* Iterate through list of cores to put (shutdown) */ - for (i = 0; i < ARRAY_SIZE(put_core_ids); i++) { - u32 id = put_core_ids[i]; - - /* - * Queue up the core shutdown request. Note that this call - * needs to be followed up by an actual invocation of an WFE - * or WFI CPU instruction. - */ - ret = proc_ops->proc_shutdown_no_wait(ti_sci, id); - if (ret) - panic("Failed sending core %u shutdown message (%d)\n", - id, ret); - } -} -#endif diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c index 6e084de692c..4f2e14c3105 100644 --- a/arch/arm/mach-k3/common.c +++ b/arch/arm/mach-k3/common.c @@ -189,9 +189,37 @@ int load_firmware(char *name_fw, char *name_loadaddr, u32 *loadaddr) return size; } -__weak void release_resources_for_core_shutdown(void) +void release_resources_for_core_shutdown(void) { - debug("%s not implemented...\n", __func__); + struct ti_sci_handle *ti_sci = get_ti_sci_handle(); + struct ti_sci_dev_ops *dev_ops = &ti_sci->ops.dev_ops; + struct ti_sci_proc_ops *proc_ops = &ti_sci->ops.proc_ops; + int ret; + u32 i; + + /* Iterate through list of devices to put (shutdown) */ + for (i = 0; i < ARRAY_SIZE(put_device_ids); i++) { + u32 id = put_device_ids[i]; + + ret = dev_ops->put_device(ti_sci, id); + if (ret) + panic("Failed to put device %u (%d)\n", id, ret); + } + + /* Iterate through list of cores to put (shutdown) */ + for (i = 0; i < ARRAY_SIZE(put_core_ids); i++) { + u32 id = put_core_ids[i]; + + /* + * Queue up the core shutdown request. Note that this call + * needs to be followed up by an actual invocation of an WFE + * or WFI CPU instruction. + */ + ret = proc_ops->proc_shutdown_no_wait(ti_sci, id); + if (ret) + panic("Failed sending core %u shutdown message (%d)\n", + id, ret); + } } void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image) diff --git a/arch/arm/mach-k3/include/mach/am62_hardware.h b/arch/arm/mach-k3/include/mach/am62_hardware.h index db4a32cd461..88d58947269 100644 --- a/arch/arm/mach-k3/include/mach/am62_hardware.h +++ b/arch/arm/mach-k3/include/mach/am62_hardware.h @@ -57,4 +57,12 @@ #define TI_SRAM_SCRATCH_BOARD_EEPROM_START 0x43c30000 +#if defined(CONFIG_SYS_K3_SPL_ATF) && !defined(__ASSEMBLY__) + +static const u32 put_device_ids[] = {}; + +static const u32 put_core_ids[] = {}; + +#endif + #endif /* __ASM_ARCH_AM62_HARDWARE_H */ diff --git a/arch/arm/mach-k3/include/mach/am62a_hardware.h b/arch/arm/mach-k3/include/mach/am62a_hardware.h index 13bf50f147b..11080801c4c 100644 --- a/arch/arm/mach-k3/include/mach/am62a_hardware.h +++ b/arch/arm/mach-k3/include/mach/am62a_hardware.h @@ -86,4 +86,12 @@ #define TI_SRAM_SCRATCH_BOARD_EEPROM_START 0x70000001 #endif /* CONFIG_CPU_V7R */ +#if defined(CONFIG_SYS_K3_SPL_ATF) && !defined(__ASSEMBLY__) + +static const u32 put_device_ids[] = {}; + +static const u32 put_core_ids[] = {}; + +#endif + #endif /* __ASM_ARCH_AM62A_HARDWARE_H */ diff --git a/arch/arm/mach-k3/include/mach/am64_hardware.h b/arch/arm/mach-k3/include/mach/am64_hardware.h index 207ef95f218..44df887d5df 100644 --- a/arch/arm/mach-k3/include/mach/am64_hardware.h +++ b/arch/arm/mach-k3/include/mach/am64_hardware.h @@ -7,6 +7,11 @@ #ifndef __ASM_ARCH_AM64_HARDWARE_H #define __ASM_ARCH_AM64_HARDWARE_H +#include +#ifndef __ASSEMBLY__ +#include +#endif + #define PADCFG_MMR1_BASE 0x000f0000 #define MCU_PADCFG_MMR1_BASE 0x04080000 #define WKUP_CTRL_MMR0_BASE 0x43000000 @@ -41,4 +46,23 @@ /* Use Last 2K as Scratch pad */ #define TI_SRAM_SCRATCH_BOARD_EEPROM_START 0x7019f800 +#if defined(CONFIG_SYS_K3_SPL_ATF) && !defined(__ASSEMBLY__) + +#define AM64X_DEV_RTI8 127 +#define AM64X_DEV_RTI9 128 +#define AM64X_DEV_R5FSS0_CORE0 121 +#define AM64X_DEV_R5FSS0_CORE1 122 + +static const u32 put_device_ids[] = { + AM64X_DEV_RTI9, + AM64X_DEV_RTI8, +}; + +static const u32 put_core_ids[] = { + AM64X_DEV_R5FSS0_CORE1, + AM64X_DEV_R5FSS0_CORE0, /* Handle CPU0 after CPU1 */ +}; + +#endif + #endif /* __ASM_ARCH_DRA8_HARDWARE_H */ diff --git a/arch/arm/mach-k3/include/mach/am6_hardware.h b/arch/arm/mach-k3/include/mach/am6_hardware.h index f9f32918f7c..029041f415c 100644 --- a/arch/arm/mach-k3/include/mach/am6_hardware.h +++ b/arch/arm/mach-k3/include/mach/am6_hardware.h @@ -39,4 +39,23 @@ #define NAVSS_NBSS_THREADMAP 0x10 +#if defined(CONFIG_SYS_K3_SPL_ATF) && !defined(__ASSEMBLY__) + +#define AM6_DEV_MCU_RTI0 134 +#define AM6_DEV_MCU_RTI1 135 +#define AM6_DEV_MCU_ARMSS0_CPU0 159 +#define AM6_DEV_MCU_ARMSS0_CPU1 245 + +static const u32 put_device_ids[] = { + AM6_DEV_MCU_RTI0, + AM6_DEV_MCU_RTI1, +}; + +static const u32 put_core_ids[] = { + AM6_DEV_MCU_ARMSS0_CPU1, + AM6_DEV_MCU_ARMSS0_CPU0, /* Handle CPU0 after CPU1 */ +}; + +#endif + #endif /* __ASM_ARCH_AM6_HARDWARE_H */ diff --git a/arch/arm/mach-k3/include/mach/j721e_hardware.h b/arch/arm/mach-k3/include/mach/j721e_hardware.h index 247dee99ce5..376db389ba1 100644 --- a/arch/arm/mach-k3/include/mach/j721e_hardware.h +++ b/arch/arm/mach-k3/include/mach/j721e_hardware.h @@ -38,4 +38,23 @@ /* MCU SCRATCHPAD usage */ #define TI_SRAM_SCRATCH_BOARD_EEPROM_START CONFIG_SYS_K3_MCU_SCRATCHPAD_BASE +#if defined(CONFIG_SYS_K3_SPL_ATF) && !defined(__ASSEMBLY__) + +#define J721E_DEV_MCU_RTI0 262 +#define J721E_DEV_MCU_RTI1 263 +#define J721E_DEV_MCU_ARMSS0_CPU0 250 +#define J721E_DEV_MCU_ARMSS0_CPU1 251 + +static const u32 put_device_ids[] = { + J721E_DEV_MCU_RTI0, + J721E_DEV_MCU_RTI1, +}; + +static const u32 put_core_ids[] = { + J721E_DEV_MCU_ARMSS0_CPU1, + J721E_DEV_MCU_ARMSS0_CPU0, /* Handle CPU0 after CPU1 */ +}; + +#endif + #endif /* __ASM_ARCH_J721E_HARDWARE_H */ diff --git a/arch/arm/mach-k3/include/mach/j721s2_hardware.h b/arch/arm/mach-k3/include/mach/j721s2_hardware.h index 2e155ed9ec4..7948bcf4789 100644 --- a/arch/arm/mach-k3/include/mach/j721s2_hardware.h +++ b/arch/arm/mach-k3/include/mach/j721s2_hardware.h @@ -38,4 +38,23 @@ /* MCU SCRATCHPAD usage */ #define TI_SRAM_SCRATCH_BOARD_EEPROM_START CONFIG_SYS_K3_MCU_SCRATCHPAD_BASE +#if defined(CONFIG_SYS_K3_SPL_ATF) && !defined(__ASSEMBLY__) + +#define J721S2_DEV_MCU_RTI0 295 +#define J721S2_DEV_MCU_RTI1 296 +#define J721S2_DEV_MCU_ARMSS0_CPU0 284 +#define J721S2_DEV_MCU_ARMSS0_CPU1 285 + +static const u32 put_device_ids[] = { + J721S2_DEV_MCU_RTI0, + J721S2_DEV_MCU_RTI1, +}; + +static const u32 put_core_ids[] = { + J721S2_DEV_MCU_ARMSS0_CPU1, + J721S2_DEV_MCU_ARMSS0_CPU0, /* Handle CPU0 after CPU1 */ +}; + +#endif + #endif /* __ASM_ARCH_J721S2_HARDWARE_H */ diff --git a/arch/arm/mach-k3/include/mach/sys_proto.h b/arch/arm/mach-k3/include/mach/sys_proto.h index d5d4b787b7d..8cc75b636b5 100644 --- a/arch/arm/mach-k3/include/mach/sys_proto.h +++ b/arch/arm/mach-k3/include/mach/sys_proto.h @@ -12,7 +12,6 @@ u32 wait_on_value(u32 read_bit_mask, u32 match_value, void *read_addr, u32 bound); struct ti_sci_handle *get_ti_sci_handle(void); int do_board_detect(void); -void release_resources_for_core_shutdown(void); int fdt_disable_node(void *blob, char *node_path); void k3_spl_init(void); diff --git a/arch/arm/mach-k3/j721e_init.c b/arch/arm/mach-k3/j721e_init.c index 9cae3ac67e9..8176ab8a499 100644 --- a/arch/arm/mach-k3/j721e_init.c +++ b/arch/arm/mach-k3/j721e_init.c @@ -378,58 +378,3 @@ u32 spl_boot_device(void) else return __get_backup_bootmedia(main_devstat); } - -#ifdef CONFIG_SYS_K3_SPL_ATF - -#define J721E_DEV_MCU_RTI0 262 -#define J721E_DEV_MCU_RTI1 263 -#define J721E_DEV_MCU_ARMSS0_CPU0 250 -#define J721E_DEV_MCU_ARMSS0_CPU1 251 - -void release_resources_for_core_shutdown(void) -{ - struct ti_sci_handle *ti_sci; - struct ti_sci_dev_ops *dev_ops; - struct ti_sci_proc_ops *proc_ops; - int ret; - u32 i; - - const u32 put_device_ids[] = { - J721E_DEV_MCU_RTI0, - J721E_DEV_MCU_RTI1, - }; - - ti_sci = get_ti_sci_handle(); - dev_ops = &ti_sci->ops.dev_ops; - proc_ops = &ti_sci->ops.proc_ops; - - /* Iterate through list of devices to put (shutdown) */ - for (i = 0; i < ARRAY_SIZE(put_device_ids); i++) { - u32 id = put_device_ids[i]; - - ret = dev_ops->put_device(ti_sci, id); - if (ret) - panic("Failed to put device %u (%d)\n", id, ret); - } - - const u32 put_core_ids[] = { - J721E_DEV_MCU_ARMSS0_CPU1, - J721E_DEV_MCU_ARMSS0_CPU0, /* Handle CPU0 after CPU1 */ - }; - - /* Iterate through list of cores to put (shutdown) */ - for (i = 0; i < ARRAY_SIZE(put_core_ids); i++) { - u32 id = put_core_ids[i]; - - /* - * Queue up the core shutdown request. Note that this call - * needs to be followed up by an actual invocation of an WFE - * or WFI CPU instruction. - */ - ret = proc_ops->proc_shutdown_no_wait(ti_sci, id); - if (ret) - panic("Failed sending core %u shutdown message (%d)\n", - id, ret); - } -} -#endif diff --git a/arch/arm/mach-k3/j721s2_init.c b/arch/arm/mach-k3/j721s2_init.c index 09e55ed4566..fb95984c1ab 100644 --- a/arch/arm/mach-k3/j721s2_init.c +++ b/arch/arm/mach-k3/j721s2_init.c @@ -264,57 +264,3 @@ u32 spl_boot_device(void) else return __get_backup_bootmedia(main_devstat); } - -#define J721S2_DEV_MCU_RTI0 295 -#define J721S2_DEV_MCU_RTI1 296 -#define J721S2_DEV_MCU_ARMSS0_CPU0 284 -#define J721S2_DEV_MCU_ARMSS0_CPU1 285 - -void release_resources_for_core_shutdown(void) -{ - if (IS_ENABLED(CONFIG_SYS_K3_SPL_ATF)) { - struct ti_sci_handle *ti_sci; - struct ti_sci_dev_ops *dev_ops; - struct ti_sci_proc_ops *proc_ops; - int ret; - u32 i; - - const u32 put_device_ids[] = { - J721S2_DEV_MCU_RTI0, - J721S2_DEV_MCU_RTI1, - }; - - ti_sci = get_ti_sci_handle(); - dev_ops = &ti_sci->ops.dev_ops; - proc_ops = &ti_sci->ops.proc_ops; - - /* Iterate through list of devices to put (shutdown) */ - for (i = 0; i < ARRAY_SIZE(put_device_ids); i++) { - u32 id = put_device_ids[i]; - - ret = dev_ops->put_device(ti_sci, id); - if (ret) - panic("Failed to put device %u (%d)\n", id, ret); - } - - const u32 put_core_ids[] = { - J721S2_DEV_MCU_ARMSS0_CPU1, - J721S2_DEV_MCU_ARMSS0_CPU0, /* Handle CPU0 after CPU1 */ - }; - - /* Iterate through list of cores to put (shutdown) */ - for (i = 0; i < ARRAY_SIZE(put_core_ids); i++) { - u32 id = put_core_ids[i]; - - /* - * Queue up the core shutdown request. Note that this call - * needs to be followed up by an actual invocation of an WFE - * or WFI CPU instruction. - */ - ret = proc_ops->proc_shutdown_no_wait(ti_sci, id); - if (ret) - panic("Failed sending core %u shutdown message (%d)\n", - id, ret); - } - } -} From patchwork Thu Apr 6 16:38:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 1766244 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=lIPf7Gne; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PsnL74lm2z1yZF for ; Fri, 7 Apr 2023 02:40:31 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4A01C860B1; Thu, 6 Apr 2023 18:39:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="lIPf7Gne"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B197D860A0; Thu, 6 Apr 2023 18:38:47 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DD25686051 for ; Thu, 6 Apr 2023 18:38:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=afd@ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 336GcQNk098129; Thu, 6 Apr 2023 11:38:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680799106; bh=FY1zWp5DgFnx59Zp4cnz4j8AhKS2tdo92CWHevrTeZg=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=lIPf7GneuPB12KxhF88yX6Rv2SPZfcL8Wb/QkFJF8TcVKEQx5sVz3IZlleAdbm1xz a5/SmGzPK2+O4LgXaiL/EKEl6AbjDjh09Nb0Bcfz04AKRp6+niTLZWTSHc19wqbkWU QXZVS0uvz2JkOY/D6DasWFqfYlwP0PN8Z56GxD2E= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 336GcQ12094288 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 6 Apr 2023 11:38:26 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Thu, 6 Apr 2023 11:38:26 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Thu, 6 Apr 2023 11:38:26 -0500 Received: from lelv0854.itg.ti.com (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 336GcN29049417; Thu, 6 Apr 2023 11:38:26 -0500 From: Andrew Davis To: Simon Glass , Tom Rini , Christian Gmeiner , CC: Andrew Davis Subject: [PATCH v4 07/12] arm: mach-k3: Move sysfw-loader.h out of mach includes Date: Thu, 6 Apr 2023 11:38:16 -0500 Message-ID: <20230406163821.25968-8-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230406163821.25968-1-afd@ti.com> References: <20230406163821.25968-1-afd@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean This header is only used locally by K3 init files, no need to have it up with the global mach includes. Move into local includes. Signed-off-by: Andrew Davis Reviewed-by: Christian Gmeiner --- arch/arm/mach-k3/am625_init.c | 2 +- arch/arm/mach-k3/am62a7_init.c | 2 +- arch/arm/mach-k3/am642_init.c | 2 +- arch/arm/mach-k3/am654_init.c | 2 +- arch/arm/mach-k3/j721e_init.c | 2 +- arch/arm/mach-k3/j721s2_init.c | 2 +- arch/arm/mach-k3/{include/mach => }/sysfw-loader.h | 0 7 files changed, 6 insertions(+), 6 deletions(-) rename arch/arm/mach-k3/{include/mach => }/sysfw-loader.h (100%) diff --git a/arch/arm/mach-k3/am625_init.c b/arch/arm/mach-k3/am625_init.c index a91c15ca4e1..026c4f9c02d 100644 --- a/arch/arm/mach-k3/am625_init.c +++ b/arch/arm/mach-k3/am625_init.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include "sysfw-loader.h" #include "common.h" #include #include diff --git a/arch/arm/mach-k3/am62a7_init.c b/arch/arm/mach-k3/am62a7_init.c index 02da24a3d6f..a89a9b4ae3a 100644 --- a/arch/arm/mach-k3/am62a7_init.c +++ b/arch/arm/mach-k3/am62a7_init.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include "sysfw-loader.h" #include "common.h" #include #include diff --git a/arch/arm/mach-k3/am642_init.c b/arch/arm/mach-k3/am642_init.c index 86aced54646..c7720cbaf35 100644 --- a/arch/arm/mach-k3/am642_init.c +++ b/arch/arm/mach-k3/am642_init.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include "sysfw-loader.h" #include #include "common.h" #include diff --git a/arch/arm/mach-k3/am654_init.c b/arch/arm/mach-k3/am654_init.c index abd0c0bccbc..12d74635cb0 100644 --- a/arch/arm/mach-k3/am654_init.c +++ b/arch/arm/mach-k3/am654_init.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include "sysfw-loader.h" #include #include "common.h" #include diff --git a/arch/arm/mach-k3/j721e_init.c b/arch/arm/mach-k3/j721e_init.c index 8176ab8a499..eec5b726b95 100644 --- a/arch/arm/mach-k3/j721e_init.c +++ b/arch/arm/mach-k3/j721e_init.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include "sysfw-loader.h" #include "common.h" #include #include diff --git a/arch/arm/mach-k3/j721s2_init.c b/arch/arm/mach-k3/j721s2_init.c index fb95984c1ab..4785a747bf3 100644 --- a/arch/arm/mach-k3/j721s2_init.c +++ b/arch/arm/mach-k3/j721s2_init.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include "sysfw-loader.h" #include "common.h" #include #include diff --git a/arch/arm/mach-k3/include/mach/sysfw-loader.h b/arch/arm/mach-k3/sysfw-loader.h similarity index 100% rename from arch/arm/mach-k3/include/mach/sysfw-loader.h rename to arch/arm/mach-k3/sysfw-loader.h From patchwork Thu Apr 6 16:38:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 1766243 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=qIhz7L7g; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PsnKw6HPKz1yZF for ; Fri, 7 Apr 2023 02:40:20 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B3CDB8610B; Thu, 6 Apr 2023 18:39:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="qIhz7L7g"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6F50386078; Thu, 6 Apr 2023 18:38:42 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1F14D8609F for ; Thu, 6 Apr 2023 18:38:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=afd@ti.com Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 336GcQhR101125; Thu, 6 Apr 2023 11:38:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680799106; bh=3eWCKtssscRBBHIO6bEZCcbdnyygo7NFr/bwNsUf7rg=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=qIhz7L7gYpiEejTQFVOuaJjSSHQE4A2en3Jkc3XcWIZG/lQGq8yecayMNFrJcCAa/ qCAAneHrajszSW9Vd+GA/r2nUzaTNwGSDVV0P3FN3s1aNwyGrhGJ39MGa3N94WDPXq lYxJtBJq45y3VD4GjnltimfQkIShTxvBqV+uTmRI= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 336GcQCc125810 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 6 Apr 2023 11:38:26 -0500 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Thu, 6 Apr 2023 11:38:26 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Thu, 6 Apr 2023 11:38:27 -0500 Received: from lelv0854.itg.ti.com (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 336GcN2A049417; Thu, 6 Apr 2023 11:38:26 -0500 From: Andrew Davis To: Simon Glass , Tom Rini , Christian Gmeiner , CC: Andrew Davis Subject: [PATCH v4 08/12] arm: mach-k3: Add weak do_board_detect() to common file Date: Thu, 6 Apr 2023 11:38:17 -0500 Message-ID: <20230406163821.25968-9-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230406163821.25968-1-afd@ti.com> References: <20230406163821.25968-1-afd@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean This matches how it was done for pre-K3 TI platforms and it allows us to move the forward declaration out of sys_proto.h. It also removes the need for K3_BOARD_DETECT as one is free to simply override the weak function in their board files as needed. Signed-off-by: Andrew Davis Reviewed-by: Christian Gmeiner --- arch/arm/mach-k3/Kconfig | 5 ----- arch/arm/mach-k3/am642_init.c | 4 ++-- arch/arm/mach-k3/am654_init.c | 4 ++-- arch/arm/mach-k3/common.c | 10 ++++++++++ arch/arm/mach-k3/common.h | 2 ++ arch/arm/mach-k3/include/mach/sys_proto.h | 2 -- arch/arm/mach-k3/j721e_init.c | 8 ++++---- board/ti/common/Kconfig | 1 - 8 files changed, 20 insertions(+), 16 deletions(-) diff --git a/arch/arm/mach-k3/Kconfig b/arch/arm/mach-k3/Kconfig index 7edbac26ccc..a8c3a593d57 100644 --- a/arch/arm/mach-k3/Kconfig +++ b/arch/arm/mach-k3/Kconfig @@ -187,11 +187,6 @@ config K3_X509_SWRV help SWRV for X509 certificate used for boot images -config K3_BOARD_DETECT - bool "Support for Board detection" - help - Support for board detection. - source "board/ti/am65x/Kconfig" source "board/ti/am64x/Kconfig" source "board/ti/am62x/Kconfig" diff --git a/arch/arm/mach-k3/am642_init.c b/arch/arm/mach-k3/am642_init.c index c7720cbaf35..ef84aad819c 100644 --- a/arch/arm/mach-k3/am642_init.c +++ b/arch/arm/mach-k3/am642_init.c @@ -100,8 +100,8 @@ void do_dt_magic(void) { int ret, rescan; - if (IS_ENABLED(CONFIG_K3_BOARD_DETECT)) - do_board_detect(); + /* Perform board detection */ + do_board_detect(); /* * Board detection has been done. diff --git a/arch/arm/mach-k3/am654_init.c b/arch/arm/mach-k3/am654_init.c index 12d74635cb0..2336da4b454 100644 --- a/arch/arm/mach-k3/am654_init.c +++ b/arch/arm/mach-k3/am654_init.c @@ -245,8 +245,8 @@ void board_init_f(ulong dummy) /* Output System Firmware version info */ k3_sysfw_print_ver(); - if (IS_ENABLED(CONFIG_K3_BOARD_DETECT)) - do_board_detect(); + /* Perform board detection */ + do_board_detect(); #if defined(CONFIG_CPU_V7R) && defined(CONFIG_K3_AVS0) ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(k3_avs), diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c index 4f2e14c3105..115f5959734 100644 --- a/arch/arm/mach-k3/common.c +++ b/arch/arm/mach-k3/common.c @@ -636,3 +636,13 @@ int misc_init_r(void) return 0; } + +/** + * do_board_detect() - Detect board description + * + * Function to detect board description. This is expected to be + * overridden in the SoC family board file where desired. + */ +void __weak do_board_detect(void) +{ +} diff --git a/arch/arm/mach-k3/common.h b/arch/arm/mach-k3/common.h index 531be0be54c..130f5021123 100644 --- a/arch/arm/mach-k3/common.h +++ b/arch/arm/mach-k3/common.h @@ -35,3 +35,5 @@ void mmr_unlock(phys_addr_t base, u32 partition); bool is_rom_loaded_sysfw(struct rom_extended_boot_data *data); enum k3_device_type get_device_type(void); void ti_secure_image_post_process(void **p_image, size_t *p_size); +struct ti_sci_handle *get_ti_sci_handle(void); +void do_board_detect(void); diff --git a/arch/arm/mach-k3/include/mach/sys_proto.h b/arch/arm/mach-k3/include/mach/sys_proto.h index 8cc75b636b5..939de0f79b4 100644 --- a/arch/arm/mach-k3/include/mach/sys_proto.h +++ b/arch/arm/mach-k3/include/mach/sys_proto.h @@ -10,8 +10,6 @@ void sdelay(unsigned long loops); u32 wait_on_value(u32 read_bit_mask, u32 match_value, void *read_addr, u32 bound); -struct ti_sci_handle *get_ti_sci_handle(void); -int do_board_detect(void); int fdt_disable_node(void *blob, char *node_path); void k3_spl_init(void); diff --git a/arch/arm/mach-k3/j721e_init.c b/arch/arm/mach-k3/j721e_init.c index eec5b726b95..31d324e2179 100644 --- a/arch/arm/mach-k3/j721e_init.c +++ b/arch/arm/mach-k3/j721e_init.c @@ -140,8 +140,8 @@ void do_dt_magic(void) int ret, rescan, mmc_dev = -1; static struct mmc *mmc; - if (IS_ENABLED(CONFIG_K3_BOARD_DETECT)) - do_board_detect(); + /* Perform board detection */ + do_board_detect(); /* * Board detection has been done. @@ -267,8 +267,8 @@ void board_init_f(ulong dummy) /* Output System Firmware version info */ k3_sysfw_print_ver(); - if (IS_ENABLED(CONFIG_K3_BOARD_DETECT)) - do_board_detect(); + /* Perform board detection */ + do_board_detect(); #if defined(CONFIG_CPU_V7R) && defined(CONFIG_K3_AVS0) ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(k3_avs), diff --git a/board/ti/common/Kconfig b/board/ti/common/Kconfig index f03357cc751..49edd98014a 100644 --- a/board/ti/common/Kconfig +++ b/board/ti/common/Kconfig @@ -1,6 +1,5 @@ config TI_I2C_BOARD_DETECT bool "Support for Board detection for TI platforms" - select K3_BOARD_DETECT if ARCH_K3 help Support for detection board information on Texas Instrument's Evaluation Boards which have I2C based EEPROM detection From patchwork Thu Apr 6 16:38:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 1766241 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=imIbOV6O; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PsnKV1WB8z1yZF for ; Fri, 7 Apr 2023 02:39:58 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 15984860D6; Thu, 6 Apr 2023 18:38:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="imIbOV6O"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D270C86073; Thu, 6 Apr 2023 18:38:40 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 854A6860A0 for ; Thu, 6 Apr 2023 18:38:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=afd@ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 336GcRNm101129; Thu, 6 Apr 2023 11:38:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680799107; bh=ioAKtA/rBppsKD1TiX0FO2yoi2fr9LXuhFbREbY/4V4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=imIbOV6OjSb6ZG0RVJphCYYMSPRbR1JlrK+hfuMOFbutV3Ayp1buBLQ4mjv89000c xSah7irGrp3KZz4IDINdt7qgqo2JxHTuJNPd284h27qDzTbD+AoRX1LHLtHGvLaBDt 86Ff8XcOd3Qx+7czHGkWnJUO9rGO/RhIG4ZmoawQ= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 336GcRmw028407 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 6 Apr 2023 11:38:27 -0500 Received: from DLEE100.ent.ti.com (157.170.170.30) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Thu, 6 Apr 2023 11:38:27 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Thu, 6 Apr 2023 11:38:27 -0500 Received: from lelv0854.itg.ti.com (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 336GcN2B049417; Thu, 6 Apr 2023 11:38:26 -0500 From: Andrew Davis To: Simon Glass , Tom Rini , Christian Gmeiner , CC: Andrew Davis Subject: [PATCH v4 09/12] arm: mach-k3: Remove unused fdt_disable_node() Date: Thu, 6 Apr 2023 11:38:18 -0500 Message-ID: <20230406163821.25968-10-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230406163821.25968-1-afd@ti.com> References: <20230406163821.25968-1-afd@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean This function is not used currently; remove it. Signed-off-by: Andrew Davis Reviewed-by: Christian Gmeiner --- arch/arm/mach-k3/common.c | 19 ------------------- arch/arm/mach-k3/include/mach/sys_proto.h | 1 - 2 files changed, 20 deletions(-) diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c index 115f5959734..9f2f5a98771 100644 --- a/arch/arm/mach-k3/common.c +++ b/arch/arm/mach-k3/common.c @@ -395,25 +395,6 @@ int fdt_fixup_msmc_ram(void *blob, char *parent_path, char *node_name) return 0; } -int fdt_disable_node(void *blob, char *node_path) -{ - int offs; - int ret; - - offs = fdt_path_offset(blob, node_path); - if (offs < 0) { - printf("Node %s not found.\n", node_path); - return offs; - } - ret = fdt_setprop_string(blob, offs, "status", "disabled"); - if (ret < 0) { - printf("Could not add status property to node %s: %s\n", - node_path, fdt_strerror(ret)); - return ret; - } - return 0; -} - #if defined(CONFIG_OF_SYSTEM_SETUP) int ft_system_setup(void *blob, struct bd_info *bd) { diff --git a/arch/arm/mach-k3/include/mach/sys_proto.h b/arch/arm/mach-k3/include/mach/sys_proto.h index 939de0f79b4..bbe57718e1a 100644 --- a/arch/arm/mach-k3/include/mach/sys_proto.h +++ b/arch/arm/mach-k3/include/mach/sys_proto.h @@ -10,7 +10,6 @@ void sdelay(unsigned long loops); u32 wait_on_value(u32 read_bit_mask, u32 match_value, void *read_addr, u32 bound); -int fdt_disable_node(void *blob, char *node_path); void k3_spl_init(void); void k3_mem_init(void); From patchwork Thu Apr 6 16:38:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 1766242 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=oxQDVEKu; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PsnKj6MDQz1yZF for ; Fri, 7 Apr 2023 02:40:09 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 03AC986087; Thu, 6 Apr 2023 18:39:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="oxQDVEKu"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C5E7786073; Thu, 6 Apr 2023 18:38:41 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C428F860A1 for ; Thu, 6 Apr 2023 18:38:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=afd@ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 336GcR1X011784; Thu, 6 Apr 2023 11:38:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680799107; bh=YdYoVEfk7o+P9ZrPNLFqihQUCMQs6U/op+Jr8GOENQs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=oxQDVEKuale+HvUcsBzmOTJXWmaty29/UrRVVvfvT73vfyD1XA+1ofImwt/R3MM/W bGSbESrjBo/2m+nz03jVhL73yYixJB/irYWR3cyebON6/Gffi9QgK0AfBrcthRmy52 b7s7Ad7B2wbXvxtGs2NNWesvkKn8F8dqpRxy0jFQ= Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 336GcRbT094292 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 6 Apr 2023 11:38:27 -0500 Received: from DLEE103.ent.ti.com (157.170.170.33) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Thu, 6 Apr 2023 11:38:27 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Thu, 6 Apr 2023 11:38:27 -0500 Received: from lelv0854.itg.ti.com (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 336GcN2C049417; Thu, 6 Apr 2023 11:38:27 -0500 From: Andrew Davis To: Simon Glass , Tom Rini , Christian Gmeiner , CC: Andrew Davis Subject: [PATCH v4 10/12] arm: mach-k3: Move sdelay() and wait_on_value() declaration Date: Thu, 6 Apr 2023 11:38:19 -0500 Message-ID: <20230406163821.25968-11-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230406163821.25968-1-afd@ti.com> References: <20230406163821.25968-1-afd@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean These probably should be in some system wide header given their use. Until then move them out of K3 sys_proto.h so we can finish cleaning that header out. Signed-off-by: Andrew Davis Reviewed-by: Christian Gmeiner --- arch/arm/mach-k3/include/mach/sys_proto.h | 4 ---- drivers/ram/k3-am654-ddrss.c | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-k3/include/mach/sys_proto.h b/arch/arm/mach-k3/include/mach/sys_proto.h index bbe57718e1a..4b4e2a5be39 100644 --- a/arch/arm/mach-k3/include/mach/sys_proto.h +++ b/arch/arm/mach-k3/include/mach/sys_proto.h @@ -7,10 +7,6 @@ #ifndef _SYS_PROTO_H_ #define _SYS_PROTO_H_ -void sdelay(unsigned long loops); -u32 wait_on_value(u32 read_bit_mask, u32 match_value, void *read_addr, - u32 bound); - void k3_spl_init(void); void k3_mem_init(void); bool check_rom_loaded_sysfw(void); diff --git a/drivers/ram/k3-am654-ddrss.c b/drivers/ram/k3-am654-ddrss.c index 4453c247b29..adac14f9464 100644 --- a/drivers/ram/k3-am654-ddrss.c +++ b/drivers/ram/k3-am654-ddrss.c @@ -18,6 +18,10 @@ #include #include "k3-am654-ddrss.h" +void sdelay(unsigned long loops); +u32 wait_on_value(u32 read_bit_mask, u32 match_value, void *read_addr, + u32 bound); + #define LDELAY 10000 /* DDRSS PHY configuration register fixed values */ From patchwork Thu Apr 6 16:38:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 1766246 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=L0LlRHDt; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PsnLX3TMmz1yZF for ; Fri, 7 Apr 2023 02:40:52 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8E0DB860B6; Thu, 6 Apr 2023 18:39:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="L0LlRHDt"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DFC96860B1; Thu, 6 Apr 2023 18:38:48 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6A893860B0 for ; Thu, 6 Apr 2023 18:38:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=afd@ti.com Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 336GcSR6040218; Thu, 6 Apr 2023 11:38:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680799108; bh=ux5RrV+7EQKBNET2yji2tV/ArYtybFOCJmvwpHH0R7w=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=L0LlRHDt84vRS06/zI7z5fWv7lS77YBMO6v/bY6cVaqaFfqKncl7mou3XnCPN3R9V ClkAzqcpkIll3eDYlzwZa3/E4WrN73N2KvAWWsm+QfImUmNnIANNKocPM2vmXcih+7 C5m4YvtPGbP/kfF+orbe4yCWZpn6jeGGxSNJ29ag= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 336GcSKt125820 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 6 Apr 2023 11:38:28 -0500 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Thu, 6 Apr 2023 11:38:27 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Thu, 6 Apr 2023 11:38:27 -0500 Received: from lelv0854.itg.ti.com (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 336GcN2D049417; Thu, 6 Apr 2023 11:38:27 -0500 From: Andrew Davis To: Simon Glass , Tom Rini , Christian Gmeiner , CC: Andrew Davis Subject: [PATCH v4 11/12] arm: mach-k3: Move J721s2 SPL init functions to mach-k3 Date: Thu, 6 Apr 2023 11:38:20 -0500 Message-ID: <20230406163821.25968-12-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230406163821.25968-1-afd@ti.com> References: <20230406163821.25968-1-afd@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean This matches AM64 and J721e and removes the need to forward declare k3_spl_init(), k3_mem_init(), and check_rom_loaded_sysfw() in sys_proto.h. Signed-off-by: Andrew Davis Reviewed-by: Christian Gmeiner --- arch/arm/mach-k3/include/mach/sys_proto.h | 3 -- arch/arm/mach-k3/j721s2_init.c | 64 +++++++++++++++++++++++ board/ti/j721s2/evm.c | 63 ---------------------- 3 files changed, 64 insertions(+), 66 deletions(-) diff --git a/arch/arm/mach-k3/include/mach/sys_proto.h b/arch/arm/mach-k3/include/mach/sys_proto.h index 4b4e2a5be39..5638c6f8c8a 100644 --- a/arch/arm/mach-k3/include/mach/sys_proto.h +++ b/arch/arm/mach-k3/include/mach/sys_proto.h @@ -7,7 +7,4 @@ #ifndef _SYS_PROTO_H_ #define _SYS_PROTO_H_ -void k3_spl_init(void); -void k3_mem_init(void); -bool check_rom_loaded_sysfw(void); #endif diff --git a/arch/arm/mach-k3/j721s2_init.c b/arch/arm/mach-k3/j721s2_init.c index 4785a747bf3..175ac4028a0 100644 --- a/arch/arm/mach-k3/j721s2_init.c +++ b/arch/arm/mach-k3/j721s2_init.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -182,6 +183,69 @@ void k3_mem_init(void) spl_enable_dcache(); } +/* Support for the various EVM / SK families */ +#if defined(CONFIG_SPL_OF_LIST) && defined(CONFIG_TI_I2C_BOARD_DETECT) +void do_dt_magic(void) +{ + int ret, rescan, mmc_dev = -1; + static struct mmc *mmc; + + do_board_detect(); + + /* + * Board detection has been done. + * Let us see if another dtb wouldn't be a better match + * for our board + */ + if (IS_ENABLED(CONFIG_CPU_V7R)) { + ret = fdtdec_resetup(&rescan); + if (!ret && rescan) { + dm_uninit(); + dm_init_and_scan(true); + } + } + + /* + * Because of multi DTB configuration, the MMC device has + * to be re-initialized after reconfiguring FDT inorder to + * boot from MMC. Do this when boot mode is MMC and ROM has + * not loaded SYSFW. + */ + switch (spl_boot_device()) { + case BOOT_DEVICE_MMC1: + mmc_dev = 0; + break; + case BOOT_DEVICE_MMC2: + case BOOT_DEVICE_MMC2_2: + mmc_dev = 1; + break; + } + + if (mmc_dev > 0 && !check_rom_loaded_sysfw()) { + ret = mmc_init_device(mmc_dev); + if (!ret) { + mmc = find_mmc_device(mmc_dev); + if (mmc) { + ret = mmc_init(mmc); + if (ret) + printf("mmc init failed with error: %d\n", ret); + } + } + } +} +#endif + +#ifdef CONFIG_SPL_BUILD +void board_init_f(ulong dummy) +{ + k3_spl_init(); +#if defined(CONFIG_SPL_OF_LIST) && defined(CONFIG_TI_I2C_BOARD_DETECT) + do_dt_magic(); +#endif + k3_mem_init(); +} +#endif + u32 spl_mmc_boot_mode(struct mmc *mmc, const u32 boot_device) { switch (boot_device) { diff --git a/board/ti/j721s2/evm.c b/board/ti/j721s2/evm.c index 9b130c141ac..d3f9a655899 100644 --- a/board/ti/j721s2/evm.c +++ b/board/ti/j721s2/evm.c @@ -192,66 +192,3 @@ int board_late_init(void) void spl_board_init(void) { } - -/* Support for the various EVM / SK families */ -#if defined(CONFIG_SPL_OF_LIST) && defined(CONFIG_TI_I2C_BOARD_DETECT) -void do_dt_magic(void) -{ - int ret, rescan, mmc_dev = -1; - static struct mmc *mmc; - - do_board_detect(); - - /* - * Board detection has been done. - * Let us see if another dtb wouldn't be a better match - * for our board - */ - if (IS_ENABLED(CONFIG_CPU_V7R)) { - ret = fdtdec_resetup(&rescan); - if (!ret && rescan) { - dm_uninit(); - dm_init_and_scan(true); - } - } - - /* - * Because of multi DTB configuration, the MMC device has - * to be re-initialized after reconfiguring FDT inorder to - * boot from MMC. Do this when boot mode is MMC and ROM has - * not loaded SYSFW. - */ - switch (spl_boot_device()) { - case BOOT_DEVICE_MMC1: - mmc_dev = 0; - break; - case BOOT_DEVICE_MMC2: - case BOOT_DEVICE_MMC2_2: - mmc_dev = 1; - break; - } - - if (mmc_dev > 0 && !check_rom_loaded_sysfw()) { - ret = mmc_init_device(mmc_dev); - if (!ret) { - mmc = find_mmc_device(mmc_dev); - if (mmc) { - ret = mmc_init(mmc); - if (ret) - printf("mmc init failed with error: %d\n", ret); - } - } - } -} -#endif - -#ifdef CONFIG_SPL_BUILD -void board_init_f(ulong dummy) -{ - k3_spl_init(); -#if defined(CONFIG_SPL_OF_LIST) && defined(CONFIG_TI_I2C_BOARD_DETECT) - do_dt_magic(); -#endif - k3_mem_init(); -} -#endif From patchwork Thu Apr 6 16:38:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 1766247 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=RC3lKlG0; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PsnLl3rTpz1yZF for ; Fri, 7 Apr 2023 02:41:03 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0657486098; Thu, 6 Apr 2023 18:39:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="RC3lKlG0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A449686085; Thu, 6 Apr 2023 18:38:49 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 88ACF860A8 for ; Thu, 6 Apr 2023 18:38:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=afd@ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 336GcSC2101134; Thu, 6 Apr 2023 11:38:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680799108; bh=bshPu4G6sZZeRm/uJgARu6qi/11ddU/dCnknA1A+dwg=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=RC3lKlG0HD2Y6HBxp2VHNSKMDIQY7NxYSpjvoAndQwtIn+LKK2rbv6TSMvqPQ3HoH Q7W//4TRo8m9eeck1tg+b/APtjIQ6FnRGCTVpoQV/Hdsvyw7Na8Hhox5xRK6DeVmFl 5CyZbvM5OTDXpiC5/x/iYpFm6i1mxmWGwOHJcpQk= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 336GcSFw094302 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 6 Apr 2023 11:38:28 -0500 Received: from DLEE108.ent.ti.com (157.170.170.38) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Thu, 6 Apr 2023 11:38:28 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Thu, 6 Apr 2023 11:38:28 -0500 Received: from lelv0854.itg.ti.com (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 336GcN2E049417; Thu, 6 Apr 2023 11:38:27 -0500 From: Andrew Davis To: Simon Glass , Tom Rini , Christian Gmeiner , CC: Andrew Davis Subject: [PATCH v4 12/12] arm: mach-k3: Remove empty sys_proto.h include Date: Thu, 6 Apr 2023 11:38:21 -0500 Message-ID: <20230406163821.25968-13-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230406163821.25968-1-afd@ti.com> References: <20230406163821.25968-1-afd@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean This header file is now empty, remove it. Signed-off-by: Andrew Davis Reviewed-by: Christian Gmeiner --- arch/arm/mach-k3/am642_init.c | 2 -- arch/arm/mach-k3/am654_init.c | 1 - arch/arm/mach-k3/common.c | 1 - arch/arm/mach-k3/include/mach/sys_proto.h | 10 ---------- arch/arm/mach-k3/j721e_init.c | 1 - arch/arm/mach-k3/j721s2_init.c | 1 - arch/arm/mach-k3/security.c | 1 - arch/arm/mach-k3/sysfw-loader.c | 1 - board/siemens/iot2050/board.c | 1 - board/ti/am62ax/evm.c | 1 - board/ti/am62x/evm.c | 1 - board/ti/am64x/evm.c | 1 - board/ti/am65x/evm.c | 2 -- board/ti/j721e/evm.c | 2 -- board/ti/j721s2/evm.c | 2 -- drivers/phy/phy-ti-am654.c | 1 - drivers/ram/k3-am654-ddrss.c | 1 - 17 files changed, 30 deletions(-) delete mode 100644 arch/arm/mach-k3/include/mach/sys_proto.h diff --git a/arch/arm/mach-k3/am642_init.c b/arch/arm/mach-k3/am642_init.c index ef84aad819c..5d53358cf26 100644 --- a/arch/arm/mach-k3/am642_init.c +++ b/arch/arm/mach-k3/am642_init.c @@ -13,9 +13,7 @@ #include #include #include "sysfw-loader.h" -#include #include "common.h" -#include #include #include #include diff --git a/arch/arm/mach-k3/am654_init.c b/arch/arm/mach-k3/am654_init.c index 2336da4b454..0d3889cde2b 100644 --- a/arch/arm/mach-k3/am654_init.c +++ b/arch/arm/mach-k3/am654_init.c @@ -14,7 +14,6 @@ #include #include #include "sysfw-loader.h" -#include #include "common.h" #include #include diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c index 9f2f5a98771..e29e51b7042 100644 --- a/arch/arm/mach-k3/common.c +++ b/arch/arm/mach-k3/common.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/arch/arm/mach-k3/include/mach/sys_proto.h b/arch/arm/mach-k3/include/mach/sys_proto.h deleted file mode 100644 index 5638c6f8c8a..00000000000 --- a/arch/arm/mach-k3/include/mach/sys_proto.h +++ /dev/null @@ -1,10 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/ - * Andreas Dannenberg - */ - -#ifndef _SYS_PROTO_H_ -#define _SYS_PROTO_H_ - -#endif diff --git a/arch/arm/mach-k3/j721e_init.c b/arch/arm/mach-k3/j721e_init.c index 31d324e2179..9bba5f79545 100644 --- a/arch/arm/mach-k3/j721e_init.c +++ b/arch/arm/mach-k3/j721e_init.c @@ -14,7 +14,6 @@ #include #include "sysfw-loader.h" #include "common.h" -#include #include #include #include diff --git a/arch/arm/mach-k3/j721s2_init.c b/arch/arm/mach-k3/j721s2_init.c index 175ac4028a0..001d9466c20 100644 --- a/arch/arm/mach-k3/j721s2_init.c +++ b/arch/arm/mach-k3/j721s2_init.c @@ -14,7 +14,6 @@ #include #include "sysfw-loader.h" #include "common.h" -#include #include #include #include diff --git a/arch/arm/mach-k3/security.c b/arch/arm/mach-k3/security.c index 092588f4b5e..6179f7373aa 100644 --- a/arch/arm/mach-k3/security.c +++ b/arch/arm/mach-k3/security.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include "common.h" diff --git a/arch/arm/mach-k3/sysfw-loader.c b/arch/arm/mach-k3/sysfw-loader.c index c4c5c371100..9be2d9eaea2 100644 --- a/arch/arm/mach-k3/sysfw-loader.c +++ b/arch/arm/mach-k3/sysfw-loader.c @@ -23,7 +23,6 @@ #include #include -#include #include "common.h" DECLARE_GLOBAL_DATA_PTR; diff --git a/board/siemens/iot2050/board.c b/board/siemens/iot2050/board.c index 1ba3e90c6fc..2653e107450 100644 --- a/board/siemens/iot2050/board.c +++ b/board/siemens/iot2050/board.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/board/ti/am62ax/evm.c b/board/ti/am62ax/evm.c index beef3f2f3da..f2dd3b4192e 100644 --- a/board/ti/am62ax/evm.c +++ b/board/ti/am62ax/evm.c @@ -7,7 +7,6 @@ */ #include -#include #include #include #include diff --git a/board/ti/am62x/evm.c b/board/ti/am62x/evm.c index 20b2a701223..034fbed3aa4 100644 --- a/board/ti/am62x/evm.c +++ b/board/ti/am62x/evm.c @@ -15,7 +15,6 @@ #include #include #include -#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/board/ti/am64x/evm.c b/board/ti/am64x/evm.c index c88139ac7ac..b63792e8888 100644 --- a/board/ti/am64x/evm.c +++ b/board/ti/am64x/evm.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include "../common/board_detect.h" diff --git a/board/ti/am65x/evm.c b/board/ti/am65x/evm.c index 4053b8333cf..706b2198183 100644 --- a/board/ti/am65x/evm.c +++ b/board/ti/am65x/evm.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -21,7 +20,6 @@ #include #include #include -#include #include "../common/board_detect.h" diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c index 00ce009d3e8..2398bead782 100644 --- a/board/ti/j721e/evm.c +++ b/board/ti/j721e/evm.c @@ -15,13 +15,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include diff --git a/board/ti/j721s2/evm.c b/board/ti/j721s2/evm.c index d3f9a655899..09d26883f19 100644 --- a/board/ti/j721s2/evm.c +++ b/board/ti/j721s2/evm.c @@ -15,12 +15,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include diff --git a/drivers/phy/phy-ti-am654.c b/drivers/phy/phy-ti-am654.c index 27a312227bc..70a746d2c92 100644 --- a/drivers/phy/phy-ti-am654.c +++ b/drivers/phy/phy-ti-am654.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/ram/k3-am654-ddrss.c b/drivers/ram/k3-am654-ddrss.c index adac14f9464..b8338f84a3d 100644 --- a/drivers/ram/k3-am654-ddrss.c +++ b/drivers/ram/k3-am654-ddrss.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include "k3-am654-ddrss.h"