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 X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 784C3C48BE0 for ; Fri, 11 Jun 2021 08:46:24 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id A91DC613B3 for ; Fri, 11 Jun 2021 08:46:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A91DC613B3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6008D8035C; Fri, 11 Jun 2021 10:45:57 +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="vHYA+wTs"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 29B40800B2; Fri, 11 Jun 2021 10:45:48 +0200 (CEST) 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 B728280092 for ; Fri, 11 Jun 2021 10:45:44 +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 7E11A613C6; Fri, 11 Jun 2021 08:45:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623401142; bh=iYBLdBDGtsgdmjZszwzvXVF6GHH1MI1Oo5d6PmAQJCs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vHYA+wTsrP4wSj4+/MFdihVGt6sFlJY8C+9ciO4ZnaojbIqkE8zK+8a0CSf3Mi1Cs 113SjRq4wkgSGToqJTembGycwGtgMsLJj47N9gB2WlNAL6MEj57NtpXxbwzV4mlLB3 L4A7ELA3QQDhU6N2D6c/Vju6GzAnSo/5LvgU61g1OFmkLHSXz02RYvbm5Ld0YXzREb ZfYQyBU0w91AcdwbXSiLxAouchalcAOYHJBJHygtNs1ttQmK158eFF5G+uJxemPE2A PBoNj4X2Xrvby9iEQlRgu24rqKM5+dxymCDcVLcytpdfcKr8sOPEt3WkSiKDYE4zXh n/NDT7kq+pcew== From: Tero Kristo To: lokeshvutla@ti.com, trini@konsulko.com, u-boot@lists.denx.de Subject: [PATCHv6 03/26] remoteproc: k3-r5: remove sysfw PM calls if not supported Date: Fri, 11 Jun 2021 11:45:04 +0300 Message-Id: <20210611084527.7048-4-kristo@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210611084527.7048-1-kristo@kernel.org> References: <20210611084527.7048-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.103.2 at phobos.denx.de X-Virus-Status: Clean From: Tero Kristo With the sysfw rearch, sysfw PM calls are no longer available from SPL level. To properly support this, remove the is_on checks and the reset assertion from the R5 remoteproc driver as these are not supported. Attempting to access unavailable services will cause the device to hang. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- drivers/remoteproc/ti_k3_r5f_rproc.c | 30 ++++++++++++++++++---------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/drivers/remoteproc/ti_k3_r5f_rproc.c b/drivers/remoteproc/ti_k3_r5f_rproc.c index 3c569a3b7b..6f3e12d915 100644 --- a/drivers/remoteproc/ti_k3_r5f_rproc.c +++ b/drivers/remoteproc/ti_k3_r5f_rproc.c @@ -804,19 +804,27 @@ static int k3_r5f_probe(struct udevice *dev) return ret; } - ret = core->tsp.sci->ops.dev_ops.is_on(core->tsp.sci, core->tsp.dev_id, - &r_state, &core->in_use); - if (ret) - return ret; + /* + * The PM functionality is not supported by the firmware during + * SPL execution with the separated DM firmware image. The following + * piece of code is not compiled in that case. + */ + if (!IS_ENABLED(CONFIG_K3_DM_FW)) { + ret = core->tsp.sci->ops.dev_ops.is_on(core->tsp.sci, + core->tsp.dev_id, + &r_state, &core->in_use); + if (ret) + return ret; - if (core->in_use) { - dev_info(dev, "Core %d is already in use. No rproc commands work\n", - core->tsp.proc_id); - return 0; - } + if (core->in_use) { + dev_info(dev, "Core %d is already in use. No rproc commands work\n", + core->tsp.proc_id); + return 0; + } - /* Make sure Local reset is asserted. Redundant? */ - reset_assert(&core->reset); + /* Make sure Local reset is asserted. Redundant? */ + reset_assert(&core->reset); + } ret = k3_r5f_rproc_configure(core); if (ret) { -- 2.17.1