From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796227159; b=D0RMUei5EeaX713ji+RVXpELnAHFRRv2slC14e9C7N5XJLp3i+EeqHmesMP0AffzQQjB jVfz3uKqz4o7utbBF846ga5pCyihrfRY2XsU7Uny6K3SiIfZQrPro7ofE6CRuvv0lQb4O YutYjt5ldaSkKig7KfJMvnoygQ8iXGz6Ok5TAjfqxqPKmrbaAgK9x9b8fpQNMXt0gwGJ9 37YRcdHrmCZN08FJZyqNNlcAjo1qgq37aDJbKi7UmdoNNovILyFSi8rTPAV8W8Vn/OijT OV1vuNM4SEnglPpjI4u8hm/PP8MMkMcJ0qLH4ShjkrTAo1WZKYfACUVpEB5vGpmxlJQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796227159; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=EWc230oeSj2swZIBTgmcWyCV9ZQHCpq1xjsscVIYRFI=; b=d4elX/EtwaBgVUxMTAwX40YpKQiSk0OxU9bEkNlJw7Bbctd9KOR4mkP+0hJC5FlyvQnD ohGJN0rF1HGo+MRdjTTgTfB8kBjdyEiH6P/rOy48bS/UPu2/g+JJZTEjyFtatOvmHmcMz KoQCOWXcQh2saAknwRkqsmAACrlkg3cRrX8Qs1qNhCwbKpwuqPcix3XC+mcmqncEO7u5X gxhRWPE+w5b6dY66LQ4eRZ5JGDERVC/13G34+Dnx9rNHYJAYJ757fyuNCWeWI6YjJ8X/Z B6JTwfxONbaqMR84ABG9qiNkrFc4/F/3LoH4Yg9rrBDOaf+ViK40nSpm+rsJ0J4xQSA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=mpxdfN3s; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D8725606A31A; Wed, 2 Dec 2026 15:59:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=mpxdfN3s 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-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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