From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D4FC7340D95; Mon, 18 Aug 2025 13:21:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755523289; cv=none; b=Dt7MVyoZ8NDijzV5rGRqTCkr7ynyOKjmZCXYE+QATdzK///spDG2PjxR+l6uraAQ0ktv+1lf8Zf8GyQw/e2uqo6OGOSQXwiBu1bOJEePuD5o4umiiNN7+ybLv2n0O8vaEPZD81MoCZHNAMjsHEySIz7NmyIuGbtHy0oV7NHUpHA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755523289; c=relaxed/simple; bh=8lUAC6DGc74juM/ZfCRWb85eTYM0ToSSsQkD4NEX954=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EU3RAJEngqRJeCJWkeZQumyycjkq19zkkIjtFeSN/ryWrMaITHmRTlWTQ6mYHpSN7G1m4CFfos/EPoBXDCDJ3r0hd5grXdv3aJ7yml9Lt1bwuYPaeiSCEL9hp7iIGLWrEJP2XbRZ7szhgu/VnW+a97FqGtNfhk8dFscCqXw5IIg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=EpvZjxXS; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="EpvZjxXS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06023C4CEF1; Mon, 18 Aug 2025 13:21:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755523289; bh=8lUAC6DGc74juM/ZfCRWb85eTYM0ToSSsQkD4NEX954=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EpvZjxXS25DnLZFR2cYrilyr3g+neRju21DMHPdO1Yj/sfV5ypa9205Wcen9NPxOu wxfR9zyqW8CV4Hr/FS3t7jzeZtaXp4q/y/uquGBfVup97TxDRBOAI56vlSjvWOz8A4 8FOq05Bx7rpKyj46NsG5Iq3GMkWaBZhgIjZ30v2s= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Peng Fan , Ulf Hansson , Hiago De Franco , Mathieu Poirier , Sasha Levin Subject: [PATCH 6.15 126/515] remoteproc: imx_rproc: skip clock enable when M-core is managed by the SCU Date: Mon, 18 Aug 2025 14:41:52 +0200 Message-ID: <20250818124503.241454095@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250818124458.334548733@linuxfoundation.org> References: <20250818124458.334548733@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Hiago De Franco [ Upstream commit 496deecb020d14ba89ba7084fbc3024f91687023 ] For the i.MX8X and i.MX8 family SoCs, when the Cortex-M core is powered up and started by the Cortex-A core using the bootloader (e.g., via the U-Boot bootaux command), both M-core and Linux run within the same SCFW (System Controller Firmware) partition. With that, Linux has permission to control the M-core. But once the M-core is started by the bootloader, the SCFW automatically enables its clock and sets the clock rate. If Linux later attempts to enable the same clock via clk_prepare_enable(), the SCFW returns a 'LOCKED' error, as the clock is already configured by the SCFW. This causes the probe function in imx_rproc.c to fail, leading to the M-core power domain being shut down while the core is still running. This results in a fault from the SCU (System Controller Unit) and triggers a system reset. To address this issue, ignore handling the clk for i.MX8X and i.MX8 M-core, as SCFW already takes care of enabling and configuring the clock. Suggested-by: Peng Fan Reviewed-by: Ulf Hansson Reviewed-by: Peng Fan Signed-off-by: Hiago De Franco Acked-by: Mathieu Poirier Link: https://lore.kernel.org/r/20250629172512.14857-3-hiagofranco@gmail.com Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin --- drivers/remoteproc/imx_rproc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 74299af1d7f1..627e57a88db2 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -1029,8 +1029,8 @@ static int imx_rproc_clk_enable(struct imx_rproc *priv) struct device *dev = priv->dev; int ret; - /* Remote core is not under control of Linux */ - if (dcfg->method == IMX_RPROC_NONE) + /* Remote core is not under control of Linux or it is managed by SCU API */ + if (dcfg->method == IMX_RPROC_NONE || dcfg->method == IMX_RPROC_SCU_API) return 0; priv->clk = devm_clk_get(dev, NULL); -- 2.39.5