summaryrefslogtreecommitdiffstats
path: root/sys/mips
diff options
context:
space:
mode:
authorsgalabov <sgalabov@FreeBSD.org>2016-04-08 15:20:58 +0000
committersgalabov <sgalabov@FreeBSD.org>2016-04-08 15:20:58 +0000
commit655f72782fe11ad2002f75c294d65778f1eef49e (patch)
treebbcd6fff1374e02fb75832a3dd151f23d91a8d3c /sys/mips
parent9c95842ec4d237ae7950fb5de2cb900e88769575 (diff)
downloadFreeBSD-src-655f72782fe11ad2002f75c294d65778f1eef49e.zip
FreeBSD-src-655f72782fe11ad2002f75c294d65778f1eef49e.tar.gz
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
Diffstat (limited to 'sys/mips')
-rw-r--r--sys/mips/mediatek/mtk_usb_phy.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/mips/mediatek/mtk_usb_phy.c b/sys/mips/mediatek/mtk_usb_phy.c
index da2acf0..d400720 100644
--- a/sys/mips/mediatek/mtk_usb_phy.c
+++ b/sys/mips/mediatek/mtk_usb_phy.c
@@ -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 mtk_usb_phy_softc *sc)
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[] = {
OpenPOWER on IntegriCloud