Commit df4f3459 authored by Tero Kristo's avatar Tero Kristo Committed by Tony Lindgren
Browse files

bus: ti-sysc: drop the extra hardreset during init



There seems to be unnecessary extra hardreset line toggling applied
during module init. This is unnecessary, as the reset lines are already
asserted during boot, and it can cause certain modules to hang (iommus,
remoteprocs.) Remove the extra hardreset toggle, and remove the now
redundant function to handle this also.

Signed-off-by: default avatarTero Kristo <t-kristo@ti.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent bf59ebbe
Loading
Loading
Loading
Loading
+1 −36
Original line number Diff line number Diff line
@@ -1522,37 +1522,6 @@ static int sysc_legacy_init(struct sysc *ddata)
	return error;
}

/**
 * sysc_rstctrl_reset_deassert - deassert rstctrl reset
 * @ddata: device driver data
 * @reset: reset before deassert
 *
 * A module can have both OCP softreset control and external rstctrl.
 * If more complicated rstctrl resets are needed, please handle these
 * directly from the child device driver and map only the module reset
 * for the parent interconnect target module device.
 *
 * Automatic reset of the module on init can be skipped with the
 * "ti,no-reset-on-init" device tree property.
 */
static int sysc_rstctrl_reset_deassert(struct sysc *ddata, bool reset)
{
	int error;

	if (!ddata->rsts)
		return 0;

	if (reset) {
		error = reset_control_assert(ddata->rsts);
		if (error)
			return error;
	}

	reset_control_deassert(ddata->rsts);

	return 0;
}

/*
 * Note that the caller must ensure the interconnect target module is enabled
 * before calling reset. Otherwise reset will not complete.
@@ -1617,10 +1586,6 @@ static int sysc_init_module(struct sysc *ddata)
	int error = 0;
	bool manage_clocks = true;

	error = sysc_rstctrl_reset_deassert(ddata, false);
	if (error)
		return error;

	if (ddata->cfg.quirks &
	    (SYSC_QUIRK_NO_IDLE | SYSC_QUIRK_NO_IDLE_ON_INIT))
		manage_clocks = false;
@@ -1644,7 +1609,7 @@ static int sysc_init_module(struct sysc *ddata)
		goto err_opt_clocks;

	if (!(ddata->cfg.quirks & SYSC_QUIRK_NO_RESET_ON_INIT)) {
		error = sysc_rstctrl_reset_deassert(ddata, true);
		error = reset_control_deassert(ddata->rsts);
		if (error)
			goto err_main_clocks;
	}