diff options
author | Laura Abbott <labbott@redhat.com> | 2017-11-14 10:23:09 -0800 |
---|---|---|
committer | Laura Abbott <labbott@redhat.com> | 2017-11-14 10:28:07 -0800 |
commit | 2ef4e8028f509354fb5a339bd2f8d0d1df8f2e8d (patch) | |
tree | a8b116dc615820085e85a0f563f9143e7d811c07 /arm-exynos-fix-usb3.patch | |
parent | 0a7987e5d8ff88de051dc320f447b73c32b05a32 (diff) | |
download | kernel-2ef4e8028f509354fb5a339bd2f8d0d1df8f2e8d.tar.gz kernel-2ef4e8028f509354fb5a339bd2f8d0d1df8f2e8d.tar.xz kernel-2ef4e8028f509354fb5a339bd2f8d0d1df8f2e8d.zip |
Linux v4.14-2229-g894025f24bd0
Diffstat (limited to 'arm-exynos-fix-usb3.patch')
-rw-r--r-- | arm-exynos-fix-usb3.patch | 110 |
1 files changed, 0 insertions, 110 deletions
diff --git a/arm-exynos-fix-usb3.patch b/arm-exynos-fix-usb3.patch index cb5828acf..172fc1f7f 100644 --- a/arm-exynos-fix-usb3.patch +++ b/arm-exynos-fix-usb3.patch @@ -1,113 +1,3 @@ -From patchwork Mon Oct 9 12:00:50 2017 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [PATCHv4,1/2] drivers: phy: add calibrate method -From: Andrzej Pietrasiewicz <andrzej.p@samsung.com> -X-Patchwork-Id: 9992829 -Message-Id: <1507550451-21324-2-git-send-email-andrzej.p@samsung.com> -To: linux-samsung-soc@vger.kernel.org, linux-usb@vger.kernel.org, - linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org -Cc: Mark Rutland <mark.rutland@arm.com>, Felipe Balbi <balbi@kernel.org>, - Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>, - Greg Kroah-Hartman <gregkh@linuxfoundation.org>, - Russell King <linux@armlinux.org.uk>, - Krzysztof Kozlowski <krzk@kernel.org>, - Kishon Vijay Abraham I <kishon@ti.com>, - Rob Herring <robh+dt@kernel.org>, Kukjin Kim <kgene@kernel.org>, - Andrzej Pietrasiewicz <andrzej.p@samsung.com>, - Marek Szyprowski <m.szyprowski@samsung.com> -Date: Mon, 09 Oct 2017 14:00:50 +0200 - -Some quirky UDCs (like dwc3 on Exynos) need to have their phys calibrated e.g. -for using super speed. This patch adds a new phy_calibrate() method. -When the calibration should be used is dependent on actual chip. - -In case of dwc3 on Exynos the calibration must happen after usb_add_hcd() -(while in host mode), because certain phy parameters like Tx LOS levels -and boost levels need to be calibrated further post initialization of xHCI -controller, to get SuperSpeed operations working. But an hcd must be -prepared first in order to pass it to usb_add_hcd(), so, in particular, dwc3 -registers must be available first, and in order for the latter to happen -the phys must be initialized. This poses a chicken and egg problem if -the calibration were to be performed in phy_init(). To break the circular -dependency a separate method is added which can be called at a desired -moment after phy intialization. - -Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> ---- - drivers/phy/phy-core.c | 15 +++++++++++++++ - include/linux/phy/phy.h | 10 ++++++++++ - 2 files changed, 25 insertions(+) - -diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c -index a268f4d..b4964b0 100644 ---- a/drivers/phy/phy-core.c -+++ b/drivers/phy/phy-core.c -@@ -372,6 +372,21 @@ int phy_reset(struct phy *phy) - } - EXPORT_SYMBOL_GPL(phy_reset); - -+int phy_calibrate(struct phy *phy) -+{ -+ int ret; -+ -+ if (!phy || !phy->ops->calibrate) -+ return 0; -+ -+ mutex_lock(&phy->mutex); -+ ret = phy->ops->calibrate(phy); -+ mutex_unlock(&phy->mutex); -+ -+ return ret; -+} -+EXPORT_SYMBOL_GPL(phy_calibrate); -+ - /** - * _of_phy_get() - lookup and obtain a reference to a phy by phandle - * @np: device_node for which to get the phy -diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h -index e694d40..87580c8 100644 ---- a/include/linux/phy/phy.h -+++ b/include/linux/phy/phy.h -@@ -39,6 +39,7 @@ enum phy_mode { - * @power_off: powering off the phy - * @set_mode: set the mode of the phy - * @reset: resetting the phy -+ * @calibrate: calibrate the phy - * @owner: the module owner containing the ops - */ - struct phy_ops { -@@ -48,6 +49,7 @@ struct phy_ops { - int (*power_off)(struct phy *phy); - int (*set_mode)(struct phy *phy, enum phy_mode mode); - int (*reset)(struct phy *phy); -+ int (*calibrate)(struct phy *phy); - struct module *owner; - }; - -@@ -141,6 +143,7 @@ static inline void *phy_get_drvdata(struct phy *phy) - int phy_power_off(struct phy *phy); - int phy_set_mode(struct phy *phy, enum phy_mode mode); - int phy_reset(struct phy *phy); -+int phy_calibrate(struct phy *phy); - static inline int phy_get_bus_width(struct phy *phy) - { - return phy->attrs.bus_width; -@@ -262,6 +265,13 @@ static inline int phy_reset(struct phy *phy) - return -ENOSYS; - } - -+static inline int phy_calibrate(struct phy *phy) -+{ -+ if (!phy) -+ return 0; -+ return -ENOSYS; -+} -+ - static inline int phy_get_bus_width(struct phy *phy) - { - return -ENOSYS; From patchwork Mon Oct 9 12:00:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 |