diff options
Diffstat (limited to 'include/linux/phy')
| -rw-r--r-- | include/linux/phy/omap_control_phy.h | 6 | ||||
| -rw-r--r-- | include/linux/phy/phy-qcom-ufs.h | 59 |
2 files changed, 62 insertions, 3 deletions
diff --git a/include/linux/phy/omap_control_phy.h b/include/linux/phy/omap_control_phy.h index e9e6cfbfbb58..eb7d4a135a9e 100644 --- a/include/linux/phy/omap_control_phy.h +++ b/include/linux/phy/omap_control_phy.h | |||
| @@ -66,7 +66,7 @@ enum omap_control_usb_mode { | |||
| 66 | #define OMAP_CTRL_PIPE3_PHY_TX_RX_POWEROFF 0x0 | 66 | #define OMAP_CTRL_PIPE3_PHY_TX_RX_POWEROFF 0x0 |
| 67 | 67 | ||
| 68 | #define OMAP_CTRL_PCIE_PCS_MASK 0xff | 68 | #define OMAP_CTRL_PCIE_PCS_MASK 0xff |
| 69 | #define OMAP_CTRL_PCIE_PCS_DELAY_COUNT_SHIFT 0x8 | 69 | #define OMAP_CTRL_PCIE_PCS_DELAY_COUNT_SHIFT 16 |
| 70 | 70 | ||
| 71 | #define OMAP_CTRL_USB2_PHY_PD BIT(28) | 71 | #define OMAP_CTRL_USB2_PHY_PD BIT(28) |
| 72 | 72 | ||
| @@ -79,7 +79,7 @@ enum omap_control_usb_mode { | |||
| 79 | void omap_control_phy_power(struct device *dev, int on); | 79 | void omap_control_phy_power(struct device *dev, int on); |
| 80 | void omap_control_usb_set_mode(struct device *dev, | 80 | void omap_control_usb_set_mode(struct device *dev, |
| 81 | enum omap_control_usb_mode mode); | 81 | enum omap_control_usb_mode mode); |
| 82 | void omap_control_pcie_pcs(struct device *dev, u8 id, u8 delay); | 82 | void omap_control_pcie_pcs(struct device *dev, u8 delay); |
| 83 | #else | 83 | #else |
| 84 | 84 | ||
| 85 | static inline void omap_control_phy_power(struct device *dev, int on) | 85 | static inline void omap_control_phy_power(struct device *dev, int on) |
| @@ -91,7 +91,7 @@ static inline void omap_control_usb_set_mode(struct device *dev, | |||
| 91 | { | 91 | { |
| 92 | } | 92 | } |
| 93 | 93 | ||
| 94 | static inline void omap_control_pcie_pcs(struct device *dev, u8 id, u8 delay) | 94 | static inline void omap_control_pcie_pcs(struct device *dev, u8 delay) |
| 95 | { | 95 | { |
| 96 | } | 96 | } |
| 97 | #endif | 97 | #endif |
diff --git a/include/linux/phy/phy-qcom-ufs.h b/include/linux/phy/phy-qcom-ufs.h new file mode 100644 index 000000000000..9d18e9f948e9 --- /dev/null +++ b/include/linux/phy/phy-qcom-ufs.h | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2013-2015, Linux Foundation. All rights reserved. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License version 2 and | ||
| 6 | * only version 2 as published by the Free Software Foundation. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | */ | ||
| 14 | |||
| 15 | #ifndef PHY_QCOM_UFS_H_ | ||
| 16 | #define PHY_QCOM_UFS_H_ | ||
| 17 | |||
| 18 | #include "phy.h" | ||
| 19 | |||
| 20 | /** | ||
| 21 | * ufs_qcom_phy_enable_ref_clk() - Enable the phy | ||
| 22 | * ref clock. | ||
| 23 | * @phy: reference to a generic phy | ||
| 24 | * | ||
| 25 | * returns 0 for success, and non-zero for error. | ||
| 26 | */ | ||
| 27 | int ufs_qcom_phy_enable_ref_clk(struct phy *phy); | ||
| 28 | |||
| 29 | /** | ||
| 30 | * ufs_qcom_phy_disable_ref_clk() - Disable the phy | ||
| 31 | * ref clock. | ||
| 32 | * @phy: reference to a generic phy. | ||
| 33 | */ | ||
| 34 | void ufs_qcom_phy_disable_ref_clk(struct phy *phy); | ||
| 35 | |||
| 36 | /** | ||
| 37 | * ufs_qcom_phy_enable_dev_ref_clk() - Enable the device | ||
| 38 | * ref clock. | ||
| 39 | * @phy: reference to a generic phy. | ||
| 40 | */ | ||
| 41 | void ufs_qcom_phy_enable_dev_ref_clk(struct phy *phy); | ||
| 42 | |||
| 43 | /** | ||
| 44 | * ufs_qcom_phy_disable_dev_ref_clk() - Disable the device | ||
| 45 | * ref clock. | ||
| 46 | * @phy: reference to a generic phy. | ||
| 47 | */ | ||
| 48 | void ufs_qcom_phy_disable_dev_ref_clk(struct phy *phy); | ||
| 49 | |||
| 50 | int ufs_qcom_phy_enable_iface_clk(struct phy *phy); | ||
| 51 | void ufs_qcom_phy_disable_iface_clk(struct phy *phy); | ||
| 52 | int ufs_qcom_phy_start_serdes(struct phy *phy); | ||
| 53 | int ufs_qcom_phy_set_tx_lane_enable(struct phy *phy, u32 tx_lanes); | ||
| 54 | int ufs_qcom_phy_calibrate_phy(struct phy *phy, bool is_rate_B); | ||
| 55 | int ufs_qcom_phy_is_pcs_ready(struct phy *phy); | ||
| 56 | void ufs_qcom_phy_save_controller_version(struct phy *phy, | ||
| 57 | u8 major, u16 minor, u16 step); | ||
| 58 | |||
| 59 | #endif /* PHY_QCOM_UFS_H_ */ | ||
