spi: spi-mtk-nor: initialize spi controller after resume
Subsystems (2)
PATCH 1/1 spi: spi-mtk-nor: initialize spi controller after resume
After system resumes, the registers of nor controller are initialized with default values. The nor controller will not function properly.
To handle both issues above, we add mtk_nor_init() in mtk_nor_resume after pm_runtime_force_resume().
--- drivers/spi/spi-mtk-nor.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
drivers/spi/spi-mtk-nor.c +11 -1
@@ -960,7 +960,17 @@ static int __maybe_unused mtk_nor_suspend(struct device *dev)static int __maybe_unused mtk_nor_resume (struct device *dev) { -return pm_runtime_force_resume (dev); +struct spi_controller *ctlr =dev_get_drvdata (dev); +struct mtk_nor *sp =spi_controller_get_devdata (ctlr); +int ret; + + ret =pm_runtime_force_resume (dev); +if (ret) +return ret; + +mtk_nor_init (sp); + +return 0 ; }static const struct dev_pm_ops mtk_nor_pm_ops = {
Signature · 7 lines
2.18.0 _______________________________________________ Linux-mediatek mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-mediatek
Quoted 4 lines · Allen-KH Cheng
After system resumes, the registers of nor controller are initialized with default values. The nor controller will not function properly.
Quoted 8 lines
To handle both issues above, we add
mtk_nor_init()inmtk_nor_resumeafterpm_runtime_force_resume().Fixes 3bfd9103c7af ("spi: spi-mtk-nor: Add power managementsupport")
Signed-off-by Allen-KH Cheng <[email protected]>---
Il 12/04/22 13:57, Allen-KH Cheng ha scritto:
Quoted 11 lines
After system resumes, the registers of nor controller are initialized with default values. The nor controller will not function properly.
To handle both issues above, we add
mtk_nor_init()inmtk_nor_resumeafterpm_runtime_force_resume().Fixes 3bfd9103c7af ("spi: spi-mtk-nor: Add power management support")Signed-off-by Allen-KH Cheng <[email protected]>Reviewed-by Rex-BC Chen <[email protected]>
That's just one issue, not two, so... "To handle both issues [etc]" should become something like:
"Solve this issue by reinitializing the registers right after resuming the controller"
After fixing the commit description,
Mark Brown
maintainerQuoted 8 lines · Allen-KH Cheng
After system resumes, the registers of nor controller are initialized with default values. The nor controller will not function properly.
To handle both issues above, we add
mtk_nor_init()inmtk_nor_resumeafterpm_runtime_force_resume().[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/1] spi: spi-mtk-nor: initialize spi controller after resume
commit: 317c2045618cc1f8d38beb8c93a7bdb6ad8638c6
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
Hi Mark,
Quoted 39 lines · Mark Brown
Quoted 8 lines · Allen-KH Cheng
After system resumes, the registers of nor controller are initialized with default values. The nor controller will not function properly.
To handle both issues above, we add
mtk_nor_init()inmtk_nor_resumeafterpm_runtime_force_resume().[...]
Applied to
Thanks!
[1/1] spi: spi-mtk-nor: initialize spi controller after resume
commit: 317c2045618cc1f8d38beb8c93a7bdb6ad8638c6All being well this means that it will be integrated into the linux- next
tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing patches will not be replaced.
Quoted 6 lines
Please add any relevant lists and maintainers to the CCs when replying
to this mail.Thanks,
Mark
Sorry, There is one issue I want to correct in commit message.
"To handle both issues [etc]" should become something like:
"Solve this issue by reinitializing the registers right after resuming the controller"
Do you mind help me modify commit message? or I can send a new PATCH to correst this.
I apologize for any inconvenience caused.
Thanks,
Allen
_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
Mark Brown
maintainerQuoted 8 lines · allen-kh.cheng
Sorry, There is one issue I want to correct in commit message.
"To handle both issues [etc]" should become something like:
"Solve this issue by reinitializing the registers right after resuming the controller"Do you mind help me modify commit message? or I can send a new PATCH to correst this.
Sorry, there's a merge commit after the patch so I can't easily rebase (which I don't generally do anyway) - it'll just have to stay the way it is. Not the end of the world even if it is unfortunate.