usb: phy: qmp: Remove both phy_clk_scheme based init functionality

Currently QMP PHY driver expects to have both se_clk and diff_clk
based PHY initialization sequence from devicetree. This change
removes need of both phy_clk_scheme based init sequence as on newer
platform QMP PHY only uses one of phy_clk_scheme.

Signed-off-by: Mayank Rana <mrana@codeaurora.org>
This commit is contained in:
Mayank Rana 2016-03-16 21:38:29 -07:00 committed by David Keitel
parent b174de9558
commit 07be828dfe
2 changed files with 5 additions and 9 deletions

View file

@ -115,8 +115,8 @@ Optional properties:
the USB PHY and the controller must rely on external VBUS notification in the USB PHY and the controller must rely on external VBUS notification in
order to manually relay the notification to the SSPHY. order to manually relay the notification to the SSPHY.
- qcom,emulation: Indicates that we are running on emulation platform. - qcom,emulation: Indicates that we are running on emulation platform.
- qcom,qmp-phy-init-seq: QMP PHY initialization sequence with reg, diff clk - qcom,qmp-phy-init-seq: QMP PHY initialization sequence with reg offset, its
value, single ended clk value, delay after register write. value, delay after register write.
- qcom,qmp-phy-reg-offset: If present stores phy register offsets in an order - qcom,qmp-phy-reg-offset: If present stores phy register offsets in an order
defined in the phy driver. defined in the phy driver.

View file

@ -83,11 +83,10 @@ unsigned int qmp_phy_rev2[] = {
[USB3_PHY_START] = 0x608, [USB3_PHY_START] = 0x608,
}; };
/* reg values to write based on the phy clk scheme selected */ /* reg values to write */
struct qmp_reg_val { struct qmp_reg_val {
u32 offset; u32 offset;
u32 diff_clk_sel_val; u32 val;
u32 se_clk_sel_val;
u32 delay; u32 delay;
}; };
@ -487,7 +486,6 @@ static int configure_phy_regs(struct usb_phy *uphy,
{ {
struct msm_ssphy_qmp *phy = container_of(uphy, struct msm_ssphy_qmp, struct msm_ssphy_qmp *phy = container_of(uphy, struct msm_ssphy_qmp,
phy); phy);
bool diff_clk_sel = true;
if (!reg) { if (!reg) {
dev_err(uphy->dev, "NULL PHY configuration\n"); dev_err(uphy->dev, "NULL PHY configuration\n");
@ -495,9 +493,7 @@ static int configure_phy_regs(struct usb_phy *uphy,
} }
while (reg->offset != -1) { while (reg->offset != -1) {
writel_relaxed(diff_clk_sel ? writel_relaxed(reg->val, phy->base + reg->offset);
reg->diff_clk_sel_val : reg->se_clk_sel_val,
phy->base + reg->offset);
if (reg->delay) if (reg->delay)
usleep_range(reg->delay, reg->delay + 10); usleep_range(reg->delay, reg->delay + 10);
reg++; reg++;