Commit 5fc453d7 authored by Danesh Petigara's avatar Danesh Petigara Committed by Felipe Balbi
Browse files

usb: bdc: Halt controller on suspend



GISB bus error kernel panics have been observed during S2 transition
tests on the 7271t platform. The errors are a result of the BDC
interrupt handler trying to access BDC register space after the
system's suspend callbacks have completed.

Adding a suspend hook to the BDC driver that halts the controller before
S2 entry thus preventing unwanted access to the BDC register space during
this transition.

Signed-off-by: default avatarDanesh Petigara <danesh.petigara@broadcom.com>
Signed-off-by: default avatarAl Cooper <alcooperx@gmail.com>
Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
parent b10d33c4
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -603,9 +603,14 @@ static int bdc_remove(struct platform_device *pdev)
static int bdc_suspend(struct device *dev)
{
	struct bdc *bdc = dev_get_drvdata(dev);
	int ret;

	/* Halt the controller */
	ret = bdc_stop(bdc);
	if (!ret)
		clk_disable_unprepare(bdc->clk);
	return 0;

	return ret;
}

static int bdc_resume(struct device *dev)