From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 58AB8606A32A for ; Wed, 2 Dec 2026 17:30:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=mdxsKgCK; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=mpxdfN3s DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=EWc230oeSj2swZIBTgmcWyCV9ZQHCpq1xjsscVIYRFI=; b=mdxsKgCKK5c4WWhqYt0H8ufF3l 5Q7Xr7x++W5rNmeRvuk3YHV4EYmoTmXcJV0t6GrCQGbr8XLPbY1tFRIyzpFFIvCvWrPDjVk+6W424 +zd9+R7ZfX5qX0SKZvtO6+ShGalXq644374MFGcVGTd41Qi2MryGjyk4cYkkcS1ZTpqFCJ1GNae0+ u+Mjns3EoUtoclFtP7+Qf8VBnKiySPcGZFtuP/LFrOaUkPRwbWKq4YfqQGkLeIVELanN4oR1jyRze 8mA0PxptvJuZatT5QXDqQ3OP3z86zR4z5Sz/quIIN6uKm8sJS+LWgHAxun85HWS82H+4Mm1HetSdB TFQFILLw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYmjp-0000000C4BE-2Woh; Wed, 02 Dec 2026 15:59:21 +0000 Received: from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYmjo-0000000C4B8-2CKF for linux-arm-kernel@lists.infradead.org; Wed, 02 Dec 2026 15:59:20 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 000C460A57; Wed, 2 Dec 2026 15:59:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA0FD1F00897; Wed, 2 Dec 2026 15:59:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796227159; bh=EWc230oeSj2swZIBTgmcWyCV9ZQHCpq1xjsscVIYRFI=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=mpxdfN3szowvvqJrwqayfoyR5OtNyqZClSylau1Q/pBeQt7F/X0GF4tAjFWSuy5pC yBB76y/fbgFKPdaDoOMtbf26/aoNFbFt8vutZIR9H8BsE5zG/uB0MtS4GdAA8bX1MI /9J3up3zu8tSbh2B88Z+E8QezOoUToKyWdKRzdfd31aKklsIOtf52Fi3bhOps919P9 f5JSTAQQbfUDFnr1P6vLOjBGJpb77hvszDgk8bB9F45Uyt+QuGyrix1A4VHoKBc1u0 ParJCXVgz3uLyQZQwsq5n/P1Vo8C3QJu7rg+BhyxB+K6U5eSgcm98y9n1XQzAyHYI+ Nkg33zaTlTamw== Date: Wed, 2 Dec 2026 15:59:15 +0000 From: Lee Jones To: Patrice CHOTARD Cc: Krzysztof Kozlowski , Maxime Coquelin , Alexandre Torgue , Christophe Kerello , linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, stable@vger.kernel.org Subject: Re: [PATCH 3/8] memory: stm32_omm: Depopulate child devices before disabling clocks Message-ID: <20261202155915.GG43081@kernel.org> References: X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-15.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Wed, 02 Dec 2026, Patrice CHOTARD wrote: > > > On 12/2/26 10:33, Lee Jones wrote: > > stm32_omm_probe() registers child OSPI devices via > > devm_of_platform_populate(), whose devres cleanup runs after > > stm32_omm_remove() returns. When CR_MUXEN is set, stm32_omm_remove() > > disables the OSPI child clocks while the child drivers are still bound > > and may access their hardware during removal. > > > > Populate child devices with of_platform_populate() and explicitly call > > of_platform_depopulate() on partial population failure and at the start > > of stm32_omm_remove() before disabling the child clocks. > > > > Fixes: 8181d061dcff ("memory: Add STM32 Octo Memory Manager driver") > > Closes: https://sashiko.dev/#/bug/linux-24c34b63-4c84-4d67-8ee1-eb7964079c44 > > Cc: stable@vger.kernel.org > > Signed-off-by: Lee Jones > > --- > > drivers/memory/stm32_omm.c | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/memory/stm32_omm.c b/drivers/memory/stm32_omm.c > > index 3599683ab04a..5ff63870421f 100644 > > --- a/drivers/memory/stm32_omm.c > > +++ b/drivers/memory/stm32_omm.c > > @@ -368,8 +368,9 @@ static int stm32_omm_probe(struct platform_device *pdev) > > return ret; > > } > > > > - ret = devm_of_platform_populate(dev); > > + ret = of_platform_populate(dev->of_node, NULL, NULL, dev); > > if (ret) { > > + of_platform_depopulate(dev); > > if (omm->cr & CR_MUXEN) > > stm32_omm_toggle_child_clock(&pdev->dev, false); > > > > @@ -383,6 +384,8 @@ static void stm32_omm_remove(struct platform_device *pdev) > > { > > struct stm32_omm *omm = platform_get_drvdata(pdev); > > > > + of_platform_depopulate(&pdev->dev); > > + > > if (omm->cr & CR_MUXEN) > > stm32_omm_toggle_child_clock(&pdev->dev, false); > > } > > Hi Lee Hey bud. I hope that you are well. > Reviewed-by: Patrice Chotard Thanks for these. -- Lee Jones