From patchwork Tue May 11 08:30:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 1476927 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=oJHvhrQN; 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 4FfWPF4Zv5z9sW8 for ; Tue, 11 May 2021 18:32:01 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 78C8982F53; Tue, 11 May 2021 10:31:33 +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="oJHvhrQN"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E603682F3E; Tue, 11 May 2021 10:31:26 +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 B88CD82F1E for ; Tue, 11 May 2021 10:31:22 +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 EA728613C3; Tue, 11 May 2021 08:31:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620721882; bh=+LAAv/Az/bsM7svF0XUW50tiAvvGCmkujGAnGMpxuPs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oJHvhrQNoo4wdiAmyR1JgxMXpp2mVvgSQ9NK60g+v4t4XLYbufN/pQAJWvXATtcl+ 9nagR/lyIh1D2+PTm0zvWL5X5VJgZ6rfQWbUS+y7ASCpWKRmlVaKQ+31qzS0xA3W1N R8PeBXueghIveh88+z/jIjCqXrwFmSHV/GhRHZPmqgf3HRQ7f7Be+46VQDC753r/GS sx+z9VI/SNnRDr5sNj4w0BgxSv7WhaQQsiGGTQormB+AOHeqcmEyo61GqQKig57ZjS jG5rek1B3XBQ0J6/RdKk02pHXH9/h3o7QaqFmpc97WLq8NKc+DBgRWwaMxZIfy7Fg4 w2DwHiX9dQ5/w== From: Tero Kristo To: u-boot@lists.denx.de, lokeshvutla@ti.com Cc: trini@konsulko.com, praneeth@ti.com, d-gerlach@ti.com Subject: [PATCHv4 03/26] remoteproc: k3-r5: remove sysfw PM calls if not supported Date: Tue, 11 May 2021 11:30:41 +0300 Message-Id: <20210511083104.10868-4-kristo@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210511083104.10868-1-kristo@kernel.org> References: <20210511083104.10868-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 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 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/remoteproc/ti_k3_r5f_rproc.c b/drivers/remoteproc/ti_k3_r5f_rproc.c index 3c569a3b7b..c8c30b9020 100644 --- a/drivers/remoteproc/ti_k3_r5f_rproc.c +++ b/drivers/remoteproc/ti_k3_r5f_rproc.c @@ -781,7 +781,9 @@ static int k3_r5f_probe(struct udevice *dev) { struct k3_r5f_cluster *cluster = dev_get_priv(dev->parent); struct k3_r5f_core *core = dev_get_priv(dev); +#ifndef CONFIG_K3_DM_FW bool r_state; +#endif int ret; dev_dbg(dev, "%s\n", __func__); @@ -804,6 +806,12 @@ static int k3_r5f_probe(struct udevice *dev) 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. + */ +#ifndef 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) @@ -817,6 +825,7 @@ static int k3_r5f_probe(struct udevice *dev) /* Make sure Local reset is asserted. Redundant? */ reset_assert(&core->reset); +#endif ret = k3_r5f_rproc_configure(core); if (ret) {