From owner-svn-src-head@freebsd.org Fri Apr 8 15:21:00 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00D8FB08700; Fri, 8 Apr 2016 15:21:00 +0000 (UTC) (envelope-from sgalabov@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA03C12C7; Fri, 8 Apr 2016 15:20:59 +0000 (UTC) (envelope-from sgalabov@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u38FKwBN059611; Fri, 8 Apr 2016 15:20:58 GMT (envelope-from sgalabov@FreeBSD.org) Received: (from sgalabov@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u38FKw5i059610; Fri, 8 Apr 2016 15:20:58 GMT (envelope-from sgalabov@FreeBSD.org) Message-Id: <201604081520.u38FKw5i059610@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sgalabov set sender to sgalabov@FreeBSD.org using -f From: Stanislav Galabov Date: Fri, 8 Apr 2016 15:20:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297715 - head/sys/mips/mediatek X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Apr 2016 15:21:00 -0000 Author: sgalabov Date: Fri Apr 8 15:20:58 2016 New Revision: 297715 URL: https://svnweb.freebsd.org/changeset/base/297715 Log: Disable USB PHY slew rate calibration for Mediatek SoCs for now USB on both MT7621 and MT7688 seems to work much better without doing slew rate calibration. These are the only two SoCs, apart from MT7628, which actually make use of the slew rate calibration routines implemented in the mtk_usb_phy driver. Since MT7628 is actually a superset of MT7688 things should be the same for it as well. We do not remove the code, we simply define it out. Approved by: adrian (mentor) Sponsored by: Smartcom - Bulgaria AD Differential Revision: https://reviews.freebsd.org/D5884 Modified: head/sys/mips/mediatek/mtk_usb_phy.c Modified: head/sys/mips/mediatek/mtk_usb_phy.c ============================================================================== --- head/sys/mips/mediatek/mtk_usb_phy.c Fri Apr 8 15:13:38 2016 (r297714) +++ head/sys/mips/mediatek/mtk_usb_phy.c Fri Apr 8 15:20:58 2016 (r297715) @@ -206,6 +206,11 @@ mtk_usb_phy_detach(device_t dev) return (0); } +/* + * Things currently seem to work a lot better without slew rate calibration + * both on MT7621 and MT7688, so we leave it out for now. + */ +#ifdef notyet static void mtk_usb_phy_slew_rate_calibration(struct mtk_usb_phy_softc *sc) { @@ -250,10 +255,12 @@ mtk_usb_phy_slew_rate_calibration(struct USB_PHY_BARRIER(sc); } } +#endif static void mtk_usb_phy_mt7621_init(device_t dev) { +#ifdef notyet struct mtk_usb_phy_softc *sc = device_get_softc(dev); /* Slew rate calibration only, but for 2 ports */ @@ -261,6 +268,7 @@ mtk_usb_phy_mt7621_init(device_t dev) sc->u2_base = MT7621_U2_BASE_P1; mtk_usb_phy_slew_rate_calibration(sc); +#endif } static void @@ -286,8 +294,10 @@ mtk_usb_phy_mt7628_init(device_t dev) USB_PHY_WRITE_U2(sc, U2_PHY_DTM0, 0x02000000); USB_PHY_BARRIER(sc); +#ifdef notyet /* Slew rate calibration */ - //mtk_usb_phy_slew_rate_calibration(sc); + mtk_usb_phy_slew_rate_calibration(sc); +#endif } static device_method_t mtk_usb_phy_methods[] = {