From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CF9AEC433EF for ; Tue, 21 Dec 2021 11:21:19 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C7153832FC; Tue, 21 Dec 2021 12:20:59 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="ec91Q7ws"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8C34E8348F; Tue, 21 Dec 2021 12:20:48 +0100 (CET) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (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 9191382FB4 for ; Tue, 21 Dec 2021 12:20:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 33178B81598; Tue, 21 Dec 2021 11:20:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D363BC36AE9; Tue, 21 Dec 2021 11:20:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1640085643; bh=tKW76qDQhdYKQb88Ih7zzggST8XEq3mxxCjgk6Dl920=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ec91Q7wsJAxxoKQlsN2XG26Eamfi8h85jZnhJ46BAiGqw+Q4TQnwHsNrrV+zLJXgi pzIjNbO/jyAOyW0GptclRk8gqH5SWJvB8XrYsusmkysIr+8HdtagTrR2OOherbG2ay KsPJxt3wcsYge2Jpl6N0oSWCYINDf3+yCA20F4VRXzjLA74cALbXABaYZooOaCe5lw hxXJU4RwfEOq35FDULJoY8qRw07q+t7bQm6T9snTGjjxHV5QCEb7tTce24+vB/vZLb 6n39pKJGUILcn9FnTDPIE3gGCxbVPdYdryz2t46ZP9df9R7uELUlpHSdCQmstaYm9p ZYmEFSQDQ6BLA== Received: by pali.im (Postfix) id AC287284D; Tue, 21 Dec 2021 12:20:40 +0100 (CET) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Stefan Roese , Dirk Eibach , Mario Six , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Chris Packham Cc: u-boot@lists.denx.de Subject: [PATCH u-boot-marvell 1/9] arm: mvebu: Convert board_pex_config() to CONFIG_SPL_BOARD_INIT Date: Tue, 21 Dec 2021 12:20:11 +0100 Message-Id: <20211221112019.15088-2-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20211221112019.15088-1-pali@kernel.org> References: <20211221112019.15088-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 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.2 at phobos.denx.de X-Virus-Status: Clean The only user of board_pex_config() weak function is A385 controlcenterdc board. It looks like that code in its board_pex_config() function needs to be executed after PCIe link is up. Therefore put this code into spl_board_init() function which is called after a38x serdes initialization, and therefore it is after the serdes hws_pex_config() function finishes (which is the state before this change). With this change completely remove board_pex_config() function as it is not used anymore. Signed-off-by: Pali Rohár --- arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c | 7 ------- arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.h | 1 - board/gdsys/a38x/controlcenterdc.c | 2 +- configs/controlcenterdc_defconfig | 1 + 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c b/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c index 55c3f9ca390b..b3cbddf6a2f0 100644 --- a/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c +++ b/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c @@ -14,11 +14,6 @@ #include "ctrl_pex.h" #include "sys_env_lib.h" -__weak void board_pex_config(void) -{ - /* nothing in this weak default implementation */ -} - int hws_pex_config(const struct serdes_map *serdes_map, u8 count) { enum serdes_type serdes_type; @@ -58,7 +53,5 @@ int hws_pex_config(const struct serdes_map *serdes_map, u8 count) reg_write(SOC_CONTROL_REG1, tmp); - board_pex_config(); - return MV_OK; } diff --git a/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.h b/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.h index 64193d528886..abdbe3c66045 100644 --- a/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.h +++ b/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.h @@ -23,6 +23,5 @@ #define PCIE4_ENABLE_MASK (0x1 << PCIE3_ENABLE_OFFS) int hws_pex_config(const struct serdes_map *serdes_map, u8 count); -void board_pex_config(void); #endif diff --git a/board/gdsys/a38x/controlcenterdc.c b/board/gdsys/a38x/controlcenterdc.c index dc424f271c5e..243d02232667 100644 --- a/board/gdsys/a38x/controlcenterdc.c +++ b/board/gdsys/a38x/controlcenterdc.c @@ -94,7 +94,7 @@ int hws_board_topology_load(struct serdes_map **serdes_map_array, u8 *count) return 0; } -void board_pex_config(void) +void spl_board_init(void) { #ifdef CONFIG_SPL_BUILD uint k; diff --git a/configs/controlcenterdc_defconfig b/configs/controlcenterdc_defconfig index 44db3110916c..87ad273a5131 100644 --- a/configs/controlcenterdc_defconfig +++ b/configs/controlcenterdc_defconfig @@ -33,6 +33,7 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_BOARD_LATE_INIT=y CONFIG_LAST_STAGE_INIT=y +CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_I2C=y CONFIG_HUSH_PARSER=y -- 2.20.1