From: Tony Lindgren <tony@atomide.com>
To: linux-omap@vger.kernel.org
Cc: Dhruva Gole <d-gole@ti.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH 1/5] bus: ti-sysc: Move check for no-reset-on-init
Date: Wed, 27 Mar 2024 10:15:04 +0200 [thread overview]
Message-ID: <20240327081508.36747-2-tony@atomide.com> (raw)
In-Reply-To: <20240327081508.36747-1-tony@atomide.com>
We are wrongly checking SYSC_QUIRK_NO_RESET_ON_INIT flag in sysc_reset(),
it can be called also after init from sysc_reinit_module(). Let's fix the
issue by moving the check to the init code.
Fixes: 6a52bc2b81fa ("bus: ti-sysc: Add quirk handling for reset on re-init")
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
drivers/bus/ti-sysc.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -2145,8 +2145,7 @@ static int sysc_reset(struct sysc *ddata)
sysc_offset = ddata->offsets[SYSC_SYSCONFIG];
if (ddata->legacy_mode ||
- ddata->cap->regbits->srst_shift < 0 ||
- ddata->cfg.quirks & SYSC_QUIRK_NO_RESET_ON_INIT)
+ ddata->cap->regbits->srst_shift < 0)
return 0;
sysc_mask = BIT(ddata->cap->regbits->srst_shift);
@@ -2240,12 +2239,14 @@ static int sysc_init_module(struct sysc *ddata)
goto err_main_clocks;
}
- error = sysc_reset(ddata);
- if (error)
- dev_err(ddata->dev, "Reset failed with %d\n", error);
+ if (!(ddata->cfg.quirks & SYSC_QUIRK_NO_RESET_ON_INIT)) {
+ error = sysc_reset(ddata);
+ if (error)
+ dev_err(ddata->dev, "Reset failed with %d\n", error);
- if (error && !ddata->legacy_mode)
- sysc_disable_module(ddata->dev);
+ if (error && !ddata->legacy_mode)
+ sysc_disable_module(ddata->dev);
+ }
err_main_clocks:
if (error)
--
2.44.0
next prev parent reply other threads:[~2024-03-27 8:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-27 8:15 [PATCH 0/5] Updates for ti-sysc interconnect target driver Tony Lindgren
2024-03-27 8:15 ` Tony Lindgren [this message]
2024-03-27 8:15 ` [PATCH 2/5] bus: ti-sysc: Add a description and copyrights Tony Lindgren
2024-03-28 11:19 ` Dhruva Gole
2024-03-28 11:36 ` Greg Kroah-Hartman
2024-03-28 11:47 ` Dhruva Gole
2024-03-28 11:38 ` Tony Lindgren
2024-03-27 8:15 ` [PATCH 3/5] bus: ti-sysc: Drop legacy quirk handling for uarts Tony Lindgren
2024-03-27 8:15 ` [PATCH 4/5] bus: ti-sysc: Drop legacy quirk handling for smartreflex Tony Lindgren
2024-03-28 11:23 ` Dhruva Gole
2024-03-28 11:34 ` Tony Lindgren
2024-03-27 8:15 ` [PATCH 5/5] bus: ti-sysc: Drop legacy idle quirk handling Tony Lindgren
2024-03-28 11:28 ` Dhruva Gole
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=20240327081508.36747-2-tony@atomide.com \
--to=tony@atomide.com \
--cc=d-gole@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.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