Skip to contentSkip to conversation

bus: ti-sysc: Fix bogus resetdone warning on enable for cpsw

PATCH In review Tony Lindgren 2 participants 2 messages Nov 10, 2020 – Nov 11, 2020 OMAP2+ support

lore
Share & tools
lore

Tony Lindgren

author maintainer
#0 lore raw

PATCH v2 1/1 bus: ti-sysc: Fix bogus resetdone warning on enable for cpsw

Bail out early from sysc_wait_softreset() just like we do in sysc_reset() if there's no sysstatus srst_shift to fix a bogus resetdone warning on enable as suggested by Grygorii Strashko <[email protected]>.

We do not currently handle resets for modules that need writing to the sysstatus register. If we at some point add that, we also need to add SYSS_QUIRK_RESETDONE_INVERTED flag for cpsw as the sysstatus bit is low when reset is done as described in the am335x TRM "Table 14-202 SOFT_RESET Register Field Descriptions"

Fixes d46f9fbec719 ("bus: ti-sysc: Use optional clocks on for enable and wait for softreset bit")

---

Changes since v1:
- Drop quirk handling and use fix suggested by Grygorii

---
 drivers/bus/ti-sysc.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/bus/ti-sysc.c +3 -0
@@ -227,6 +227,9 @@ static int sysc_wait_softreset(struct sysc *ddata)
 	u32 sysc_mask, syss_done, rstval;
 	int syss_offset, error = 0;
 
+	if (ddata->cap->regbits->srst_shift < 0)
+		return 0;
+
 	syss_offset = ddata->offsets[SYSC_SYSSTATUS];
 	sysc_mask = BIT(ddata->cap->regbits->srst_shift);
 
Signature · 1 line
2.29.2
Acked-by on v2 1/1
#1 lore raw
Quoted 10 lines · Tony Lindgren

Bail out early from sysc_wait_softreset() just like we do in sysc_reset() if there's no sysstatus srst_shift to fix a bogus resetdone warning on enable as suggested by Grygorii Strashko <[email protected]>.

We do not currently handle resets for modules that need writing to the sysstatus register. If we at some point add that, we also need to add SYSS_QUIRK_RESETDONE_INVERTED flag for cpsw as the sysstatus bit is low when reset is done as described in the am335x TRM "Table 14-202 SOFT_RESET Register Field Descriptions"

Quoted 4 lines
Fixes d46f9fbec719 ("bus: ti-sysc: Use optional clocks on for enable and wait for softreset bit")

---

Quoted 22 lines

Changes since v1:
- Drop quirk handling and use fix suggested by Grygorii

---
  drivers/bus/ti-sysc.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/bus/ti-sysc.c +3 -0
@@ -227,6 +227,9 @@ static int sysc_wait_softreset(struct sysc *ddata)
  	u32 sysc_mask, syss_done, rstval;
  	int syss_offset, error = 0;
 
+	if (ddata->cap->regbits->srst_shift < 0)
+		return 0;
+
  	syss_offset = ddata->offsets[SYSC_SYSSTATUS];
  	sysc_mask = BIT(ddata->cap->regbits->srst_shift);
 
Signature · 2 lines
Best regards,
grygorii