aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_subr.c
diff options
context:
space:
mode:
authorBryan O'Donoghue <[email protected]>2022-01-03 03:03:15 +0000
committerMiquel Raynal <[email protected]>2022-01-25 10:31:44 +0100
commit5c23b3f965bc9ee696bf2ed4bdc54d339dd9a455 (patch)
treec6ad4f9a11aa784a040e1e14828a9be0c31f7565 /net/lapb/lapb_subr.c
parentba1b71b008e97fd747845ff3a818420b11bbe830 (diff)
mtd: rawnand: qcom: Fix clock sequencing in qcom_nandc_probe()
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 <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
Diffstat (limited to 'net/lapb/lapb_subr.c')
0 files changed, 0 insertions, 0 deletions