]> git.karo-electronics.de Git - linux-beck.git/commitdiff
usb: mtu3: enable auto switch from U3 to U2
authorChunfeng Yun <chunfeng.yun@mediatek.com>
Wed, 7 Dec 2016 07:24:13 +0000 (15:24 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Dec 2016 08:37:24 +0000 (09:37 +0100)
inform mac2 to build U2 link automatically after U3 detect
fail without software setting soft_connect.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/mtu3/mtu3_core.c

index 603b7f84d31e494a1a6e9c9542086d8d64e98d43..c0efc07ef4a5b875b0129b73df135a7a5ec63a82 100644 (file)
@@ -575,6 +575,8 @@ static void mtu3_regs_init(struct mtu3 *mtu)
                                SW_U1_REQUEST_ENABLE | SW_U2_REQUEST_ENABLE);
                /* device responses to u3_exit from host automatically */
                mtu3_clrbits(mbase, U3D_LTSSM_CTRL, SOFT_U3_EXIT_EN);
+               /* automatically build U2 link when U3 detect fail */
+               mtu3_setbits(mbase, U3D_USB2_TEST_MODE, U2U3_AUTO_SWITCH);
        }
 
        mtu3_set_speed(mtu);