summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Cooper <al.cooper@broadcom.com>2017-12-27 14:28:51 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-21 12:05:48 +0100
commit5fb7cf9b1ca0fa06cc63a514bf639529fbd95d49 (patch)
tree24a9fecae803eb698bc76d2d471f39cab2f5eaab
parent048fd682b2b8a43c50a0efa7108bab644cdcdabb (diff)
phy: phy-brcm-usb-init: DRD mode can cause crash on startup
commit 0aa0c12262fd848c48448c39ff6c1c097be00dd4 upstream. This is caused by a bug in the BDC core. When the BDC core comes out of reset and it's not selected, it gets a backup clock. When the BDC core is selected, it get's the main clock. If HOST mode is then selected the BDC core has the main clock shut off but the backup clock is not restored. The failure scenario and cause are as follows: - DRD mode is active - Device mode is selected first in bootloader - When host mode is now selected, the clock to the BDC is cut off. - BDC registers are inaccessible and therefore the BDC driver crashes upon Linux boot. The fix is to have the phy driver always force a BDC reset on startup. Fixes: 49859e55e364 ("phy: usb: phy-brcm-usb: Add Broadcom STB USB phy driver") Signed-off-by: Al Cooper <alcooperx@gmail.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/phy/broadcom/phy-brcm-usb-init.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/phy/broadcom/phy-brcm-usb-init.c b/drivers/phy/broadcom/phy-brcm-usb-init.c
index 69ea47945292..4890cade650e 100644
--- a/drivers/phy/broadcom/phy-brcm-usb-init.c
+++ b/drivers/phy/broadcom/phy-brcm-usb-init.c
@@ -917,6 +917,7 @@ void brcm_usb_init_common(struct brcm_usb_init_params *params)
USB_CTRL_UNSET_FAMILY(params, USB_PM, BDC_SOFT_RESETB);
break;
default:
+ USB_CTRL_UNSET_FAMILY(params, USB_PM, BDC_SOFT_RESETB);
USB_CTRL_SET_FAMILY(params, USB_PM, BDC_SOFT_RESETB);
break;
}