From: Felipe Balbi Date: Thu, 26 Feb 2015 17:01:03 +0000 (-0600) Subject: usb: musb: dsps: check for the single bit X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f860f0b1ea76b9f15d24db8fa98823eb15273afb;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git usb: musb: dsps: check for the single bit We want to check if that particular bit is set. It could very well be that bootloader (or romcode) has fiddled with MUSB before us which could leave other bits set in this register. Tested-by: Bin Liu Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 8f96e79dd069..e210b75fb6f2 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c @@ -475,7 +475,7 @@ static int dsps_musb_init(struct musb *musb) * logic enabled. */ val = dsps_readb(musb->mregs, MUSB_BABBLE_CTL); - if (val == MUSB_BABBLE_RCV_DISABLE) { + if (val & MUSB_BABBLE_RCV_DISABLE) { glue->sw_babble_enabled = true; val |= MUSB_BABBLE_SW_SESSION_CTRL; dsps_writeb(musb->mregs, MUSB_BABBLE_CTL, val);