Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

bus: ti-sysc: Move check for no-reset-on-init

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 move
the check to the init code in preparation for adding reset control support
in the future.

Note that this change is not needed as a fix as there are no known issues
caused by it currently.

Signed-off-by: Tony Lindgren <tony@atomide.com>

+8 -7
+8 -7
drivers/bus/ti-sysc.c
··· 2145 2145 sysc_offset = ddata->offsets[SYSC_SYSCONFIG]; 2146 2146 2147 2147 if (ddata->legacy_mode || 2148 - ddata->cap->regbits->srst_shift < 0 || 2149 - ddata->cfg.quirks & SYSC_QUIRK_NO_RESET_ON_INIT) 2148 + ddata->cap->regbits->srst_shift < 0) 2150 2149 return 0; 2151 2150 2152 2151 sysc_mask = BIT(ddata->cap->regbits->srst_shift); ··· 2239 2240 goto err_main_clocks; 2240 2241 } 2241 2242 2242 - error = sysc_reset(ddata); 2243 - if (error) 2244 - dev_err(ddata->dev, "Reset failed with %d\n", error); 2243 + if (!(ddata->cfg.quirks & SYSC_QUIRK_NO_RESET_ON_INIT)) { 2244 + error = sysc_reset(ddata); 2245 + if (error) 2246 + dev_err(ddata->dev, "Reset failed with %d\n", error); 2245 2247 2246 - if (error && !ddata->legacy_mode) 2247 - sysc_disable_module(ddata->dev); 2248 + if (error && !ddata->legacy_mode) 2249 + sysc_disable_module(ddata->dev); 2250 + } 2248 2251 2249 2252 err_main_clocks: 2250 2253 if (error)