* [PATCH V2] bus: ti-sysc: Fix missing AM35xx SoC matching
@ 2023-09-06 23:34 Adam Ford
2023-09-13 8:25 ` Tony Lindgren
0 siblings, 1 reply; 2+ messages in thread
From: Adam Ford @ 2023-09-06 23:34 UTC (permalink / raw)
To: linux-omap; +Cc: aford, Adam Ford, Tony Lindgren, linux-kernel
Commit feaa8baee82a ("bus: ti-sysc: Implement SoC revision handling")
created a list of SoC types searching for strings based on names
and wildcards which associates the SoC to different families.
The OMAP34xx and OMAP35xx are treated as SOC_3430 while
OMAP36xx and OMAP37xx are treated as SOC_3630, but the AM35xx
isn't listed.
The AM35xx is mostly an OMAP3430, and a later commit a12315d6d270
("bus: ti-sysc: Make omap3 gpt12 quirk handling SoC specific") looks
for the SOC type and behaves in a certain way if it's SOC_3430.
This caused a regression on the AM3517 causing it to return two
errors:
ti-sysc: probe of 48318000.target-module failed with error -16
ti-sysc: probe of 49032000.target-module failed with error -16
Fix this by treating the creating SOC_AM35 and inserting it between
the SOC_3430 and SOC_3630. If it is treaed the same way as the
SOC_3430 when checking the status of sysc_check_active_timer,
the error conditions will disappear.
Fixes: a12315d6d270 ("bus: ti-sysc: Make omap3 gpt12 quirk handling SoC specific")
Fixes: feaa8baee82a ("bus: ti-sysc: Implement SoC revision handling")
Signed-off-by: Adam Ford <aford173@gmail.com>
diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index eb4e7bee1e20..42c12df07cea 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -38,6 +38,7 @@ enum sysc_soc {
SOC_2420,
SOC_2430,
SOC_3430,
+ SOC_AM35,
SOC_3630,
SOC_4430,
SOC_4460,
@@ -1862,7 +1863,7 @@ static void sysc_pre_reset_quirk_dss(struct sysc *ddata)
dev_warn(ddata->dev, "%s: timed out %08x !+ %08x\n",
__func__, val, irq_mask);
- if (sysc_soc->soc == SOC_3430) {
+ if (sysc_soc->soc == SOC_3430 || sysc_soc->soc == SOC_AM35) {
/* Clear DSS_SDI_CONTROL */
sysc_write(ddata, 0x44, 0);
@@ -3025,6 +3026,7 @@ static void ti_sysc_idle(struct work_struct *work)
static const struct soc_device_attribute sysc_soc_match[] = {
SOC_FLAG("OMAP242*", SOC_2420),
SOC_FLAG("OMAP243*", SOC_2430),
+ SOC_FLAG("AM35*", SOC_AM35),
SOC_FLAG("OMAP3[45]*", SOC_3430),
SOC_FLAG("OMAP3[67]*", SOC_3630),
SOC_FLAG("OMAP443*", SOC_4430),
@@ -3229,7 +3231,7 @@ static int sysc_check_active_timer(struct sysc *ddata)
* can be dropped if we stop supporting old beagleboard revisions
* A to B4 at some point.
*/
- if (sysc_soc->soc == SOC_3430)
+ if (sysc_soc->soc == SOC_3430 || sysc_soc->soc == SOC_AM35)
error = -ENXIO;
else
error = -EBUSY;
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH V2] bus: ti-sysc: Fix missing AM35xx SoC matching
2023-09-06 23:34 [PATCH V2] bus: ti-sysc: Fix missing AM35xx SoC matching Adam Ford
@ 2023-09-13 8:25 ` Tony Lindgren
0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2023-09-13 8:25 UTC (permalink / raw)
To: Adam Ford; +Cc: linux-omap, aford, linux-kernel
* Adam Ford <aford173@gmail.com> [230907 02:34]:
> Commit feaa8baee82a ("bus: ti-sysc: Implement SoC revision handling")
> created a list of SoC types searching for strings based on names
> and wildcards which associates the SoC to different families.
>
> The OMAP34xx and OMAP35xx are treated as SOC_3430 while
> OMAP36xx and OMAP37xx are treated as SOC_3630, but the AM35xx
> isn't listed.
>
> The AM35xx is mostly an OMAP3430, and a later commit a12315d6d270
> ("bus: ti-sysc: Make omap3 gpt12 quirk handling SoC specific") looks
> for the SOC type and behaves in a certain way if it's SOC_3430.
>
> This caused a regression on the AM3517 causing it to return two
> errors:
>
> ti-sysc: probe of 48318000.target-module failed with error -16
> ti-sysc: probe of 49032000.target-module failed with error -16
>
> Fix this by treating the creating SOC_AM35 and inserting it between
> the SOC_3430 and SOC_3630. If it is treaed the same way as the
> SOC_3430 when checking the status of sysc_check_active_timer,
> the error conditions will disappear.
>
> Fixes: a12315d6d270 ("bus: ti-sysc: Make omap3 gpt12 quirk handling SoC specific")
> Fixes: feaa8baee82a ("bus: ti-sysc: Implement SoC revision handling")
Applied into fixes now, thanks
Tony
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-09-13 8:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-06 23:34 [PATCH V2] bus: ti-sysc: Fix missing AM35xx SoC matching Adam Ford
2023-09-13 8:25 ` Tony Lindgren
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).