[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200221195256.54016-4-tony@atomide.com>
Date: Fri, 21 Feb 2020 11:52:52 -0800
From: Tony Lindgren <tony@...mide.com>
To: linux-omap@...r.kernel.org
Cc: "Andrew F . Davis" <afd@...com>, Dave Gerlach <d-gerlach@...com>,
Faiz Abbas <faiz_abbas@...com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Keerthy <j-keerthy@...com>, Nishanth Menon <nm@...com>,
Peter Ujfalusi <peter.ujfalusi@...com>,
Roger Quadros <rogerq@...com>, Suman Anna <s-anna@...com>,
Tero Kristo <t-kristo@...com>, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
Adam Ford <aford173@...il.com>,
André Hentschel <nerv@...ncrow.de>,
"H. Nikolaus Schaller" <hns@...delico.com>
Subject: [PATCH 3/7] ti-sysc: Improve reset to work with modules with no sysconfig
At least display susbsystem (DSS) has modules with no sysconfig registers
and rely on custom function for module reset handling. Let's make reset
work with that too.
Signed-off-by: Tony Lindgren <tony@...mide.com>
---
drivers/bus/ti-sysc.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 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
@@ -1571,7 +1571,7 @@ static int sysc_reset(struct sysc *ddata)
sysc_offset = ddata->offsets[SYSC_SYSCONFIG];
syss_offset = ddata->offsets[SYSC_SYSSTATUS];
- if (ddata->legacy_mode || sysc_offset < 0 ||
+ if (ddata->legacy_mode ||
ddata->cap->regbits->srst_shift < 0 ||
ddata->cfg.quirks & SYSC_QUIRK_NO_RESET_ON_INIT)
return 0;
@@ -1586,9 +1586,11 @@ static int sysc_reset(struct sysc *ddata)
if (ddata->pre_reset_quirk)
ddata->pre_reset_quirk(ddata);
- sysc_val = sysc_read_sysconfig(ddata);
- sysc_val |= sysc_mask;
- sysc_write(ddata, sysc_offset, sysc_val);
+ if (sysc_offset >= 0) {
+ sysc_val = sysc_read_sysconfig(ddata);
+ sysc_val |= sysc_mask;
+ sysc_write(ddata, sysc_offset, sysc_val);
+ }
if (ddata->cfg.srst_udelay)
usleep_range(ddata->cfg.srst_udelay,
--
2.25.1
Powered by blists - more mailing lists