From patchwork Wed May 5 17:55:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 1474505 X-Patchwork-Delegate: lokeshvutla@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=HfFsR51a; 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 RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Fb4GY56l4z9s1l for ; Thu, 6 May 2021 03:59:17 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 48EE982D29; Wed, 5 May 2021 19:56:58 +0200 (CEST) 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="HfFsR51a"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BE7F282D05; Wed, 5 May 2021 19:56: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.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (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 0983082CF1 for ; Wed, 5 May 2021 19:56:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kristo@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id 20F7E613EC; Wed, 5 May 2021 17:56:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620237385; bh=EXZnQ6Gad5QoWkW42AaUlrKltgWJO6tqp2nNoWTgQbE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HfFsR51aVzPdmsggz+EthbzzOH6ene47ASEABTraLGEsr84saYRIysO9ApjkSxUjv 4H8lIe/k0KcYV/j9zVDV2fPZ1/qtnCgt/n+lE5k1jcfDSf/cxaUcGW3l2D+O9qgzQg LX2Oo4TqVuJE4YZJVrEmApYr3jpV4XoEoWaNfs8gdQoM7bSkNma0GHNwIyFbq0iJoY vfwrn5qhh6jPk0BKNjULGDOWz87nS9zihjphUqbUI+9ZZH9IJ6yUYqFcd1Q/xpCNSy zOLQptsUYIaGAN1fw7QREAQ90ph9/5SRmcmNY5PLJATs9oIHhnd4iTowoZEfBVviKD Fw2o8TD0sw/6g== From: Tero Kristo To: u-boot@lists.denx.de, trini@konsulko.com, lokeshvutla@ti.com, d-gerlach@ti.com Cc: praneeth@ti.com, Tero Kristo Subject: [PATCHv3 19/26] arm: mach-k3: do board config for PM and RM only if supported Date: Wed, 5 May 2021 20:55:33 +0300 Message-Id: <20210505175540.15006-20-kristo@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210505175540.15006-1-kristo@kernel.org> References: <20210505175540.15006-1-kristo@kernel.org> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.4 at phobos.denx.de X-Virus-Status: Clean From: Tero Kristo If the raw PM support is built in, we are operating in the split firmware approach mode where RM and PM support is not available. In this case, skip the board config for these two. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- arch/arm/mach-k3/sysfw-loader.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/mach-k3/sysfw-loader.c b/arch/arm/mach-k3/sysfw-loader.c index 0bacfc4d07..64472353c4 100644 --- a/arch/arm/mach-k3/sysfw-loader.c +++ b/arch/arm/mach-k3/sysfw-loader.c @@ -159,11 +159,13 @@ static void k3_sysfw_configure_using_fit(void *fit, ret); /* Apply power/clock (PM) specific configuration to SYSFW */ +#ifndef CONFIG_K3_DM_FW ret = board_ops->board_config_pm(ti_sci, (u64)(u32)cfg_fragment_addr, (u32)cfg_fragment_size); if (ret) panic("Failed to set board PM configuration (%d)\n", ret); +#endif /* Extract resource management (RM) specific configuration from FIT */ ret = fit_get_data_by_name(fit, images, SYSFW_CFG_RM, @@ -172,12 +174,14 @@ static void k3_sysfw_configure_using_fit(void *fit, panic("Error accessing %s node in FIT (%d)\n", SYSFW_CFG_RM, ret); +#ifndef CONFIG_K3_DM_FW /* Apply resource management (RM) configuration to SYSFW */ ret = board_ops->board_config_rm(ti_sci, (u64)(u32)cfg_fragment_addr, (u32)cfg_fragment_size); if (ret) panic("Failed to set board RM configuration (%d)\n", ret); +#endif /* Extract security specific configuration from FIT */ ret = fit_get_data_by_name(fit, images, SYSFW_CFG_SEC,