From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
linux-arm-msm@vger.kernel.org, linux-mtd@lists.infradead.org,
mani@kernel.org, miquel.raynal@bootlin.com,
architt@codeaurora.org, bbrezillon@kernel.org,
absahu@codeaurora.org
Cc: baruch@tkos.co.il
Subject: Re: [PATCH v2 1/2] mtd: rawnand: qcom: Fix clock sequencing in qcom_nandc_probe()
Date: Sun, 23 Jan 2022 16:32:10 +0100 [thread overview]
Message-ID: <20220123163210.3f9ce79a@xps13> (raw)
In-Reply-To: <20220123152326.529692-1-miquel.raynal@bootlin.com>
miquel.raynal@bootlin.com wrote on Sun, 23 Jan 2022 16:23:26 +0100:
> On Mon, 2022-01-03 at 03:03:15 UTC, Bryan O'Donoghue wrote:
> > Interacting with a NAND chip on an IPQ6018 I found that the qcomsmem NAND
> > partition parser was returning -EPROBE_DEFER waiting for the main smem
> > driver to load.
> >
> > This caused the board to reset. Playing about with the probe() function
> > shows that the problem lies in the core clock being switched off before the
> > nandc_unalloc() routine has completed.
> >
> > If we look at how qcom_nandc_remove() tears down allocated resources we see
> > the expected order is
> >
> > qcom_nandc_unalloc(nandc);
> >
> > clk_disable_unprepare(nandc->aon_clk);
> > clk_disable_unprepare(nandc->core_clk);
> >
> > dma_unmap_resource(&pdev->dev, nandc->base_dma, resource_size(res),
> > DMA_BIDIRECTIONAL, 0);
> >
> > Tweaking probe() to both bring up and tear-down in that order removes the
> > reset if we end up deferring elsewhere.
> >
> > Fixes: c76b78d8ec05 ("mtd: nand: Qualcomm NAND controller driver")
> > Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> > Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
>
> Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Both patches pushed to mtd/fixes, actually.
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2022-01-23 15:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-03 3:03 [PATCH v2 0/2] Two Qcom NAND related fixes Bryan O'Donoghue
2022-01-03 3:03 ` [PATCH v2 1/2] mtd: rawnand: qcom: Fix clock sequencing in qcom_nandc_probe() Bryan O'Donoghue
2022-01-03 5:51 ` Manivannan Sadhasivam
2022-01-06 17:24 ` Bryan O'Donoghue
2022-01-06 17:44 ` Greg KH
2022-01-06 18:02 ` Bryan O'Donoghue
2022-01-23 15:23 ` Miquel Raynal
2022-01-23 15:32 ` Miquel Raynal [this message]
2022-01-03 3:03 ` [PATCH v2 2/2] mtd: parsers: qcom: Don't print error message on -EPROBE_DEFER Bryan O'Donoghue
2022-01-03 5:52 ` Manivannan Sadhasivam
2022-01-23 15:23 ` Miquel Raynal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220123163210.3f9ce79a@xps13 \
--to=miquel.raynal@bootlin.com \
--cc=absahu@codeaurora.org \
--cc=architt@codeaurora.org \
--cc=baruch@tkos.co.il \
--cc=bbrezillon@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=mani@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).