Commit ab4d309d authored by Tony Lindgren's avatar Tony Lindgren

bus: 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: default avatarTony Lindgren <tony@atomide.com>
parent e64c021f
...@@ -1571,7 +1571,7 @@ static int sysc_reset(struct sysc *ddata) ...@@ -1571,7 +1571,7 @@ static int sysc_reset(struct sysc *ddata)
sysc_offset = ddata->offsets[SYSC_SYSCONFIG]; sysc_offset = ddata->offsets[SYSC_SYSCONFIG];
syss_offset = ddata->offsets[SYSC_SYSSTATUS]; syss_offset = ddata->offsets[SYSC_SYSSTATUS];
if (ddata->legacy_mode || sysc_offset < 0 || if (ddata->legacy_mode ||
ddata->cap->regbits->srst_shift < 0 || ddata->cap->regbits->srst_shift < 0 ||
ddata->cfg.quirks & SYSC_QUIRK_NO_RESET_ON_INIT) ddata->cfg.quirks & SYSC_QUIRK_NO_RESET_ON_INIT)
return 0; return 0;
...@@ -1586,9 +1586,11 @@ static int sysc_reset(struct sysc *ddata) ...@@ -1586,9 +1586,11 @@ static int sysc_reset(struct sysc *ddata)
if (ddata->pre_reset_quirk) if (ddata->pre_reset_quirk)
ddata->pre_reset_quirk(ddata); ddata->pre_reset_quirk(ddata);
sysc_val = sysc_read_sysconfig(ddata); if (sysc_offset >= 0) {
sysc_val |= sysc_mask; sysc_val = sysc_read_sysconfig(ddata);
sysc_write(ddata, sysc_offset, sysc_val); sysc_val |= sysc_mask;
sysc_write(ddata, sysc_offset, sysc_val);
}
if (ddata->cfg.srst_udelay) if (ddata->cfg.srst_udelay)
usleep_range(ddata->cfg.srst_udelay, usleep_range(ddata->cfg.srst_udelay,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment