mirror of
https://github.com/brain-hackers/linux-brain.git
synced 2024-06-09 23:36:23 +09:00
usb: bdc: Halt controller on suspend
[ Upstream commit 5fc453d7de3d0c345812453823a3a56783c5f82c ] 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: Danesh Petigara <danesh.petigara@broadcom.com> Signed-off-by: Al Cooper <alcooperx@gmail.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Felipe Balbi <balbi@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
296184490e
commit
8fb05790b5
|
@ -605,9 +605,14 @@ static int bdc_remove(struct platform_device *pdev)
|
||||||
static int bdc_suspend(struct device *dev)
|
static int bdc_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
struct bdc *bdc = dev_get_drvdata(dev);
|
struct bdc *bdc = dev_get_drvdata(dev);
|
||||||
|
int ret;
|
||||||
|
|
||||||
clk_disable_unprepare(bdc->clk);
|
/* Halt the controller */
|
||||||
return 0;
|
ret = bdc_stop(bdc);
|
||||||
|
if (!ret)
|
||||||
|
clk_disable_unprepare(bdc->clk);
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int bdc_resume(struct device *dev)
|
static int bdc_resume(struct device *dev)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user