scsi: ufs-msm: disable using generic PHY framework

This change disables the use of the generic PHY framework API and
callbacks.
This change is only temporary and eventually UFS will use the
updated generic PHY framework API.

The reason for temporary disabling the use of the generic PHY framework,
is due to generic PHY changes in the upstream that are required to be
merged and would result into many conflicts.

In this change, calling to devm_phy_get_by_index() is removed.
Following, the API itself will be removed from the generic PHY framework,
and changes from the upstream will be cherry-picked.

Also, hooking resume, suspend and advertise_quirks is temporary removed
to avoid compilation errors.
After merging all generic PHY framework changes from the upstream,
the UFS driver will call the updated API in order to get its correct
generic PHY and will hook the local implementation of resume, suspend
and advertise_quirks into the correct hooks.

Change-Id: I2bf1007ecf079bc82f472a17538a17dc452ea447
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
This commit is contained in:
Yaniv Gardi 2014-07-28 22:25:34 +03:00 committed by David Keitel
parent ad23ac52aa
commit 1a66630ba5
3 changed files with 10 additions and 15 deletions

View file

@ -158,7 +158,8 @@ static int ufs_msm_phy_qmp_20nm_is_pcs_ready(struct ufs_msm_phy *phy_common)
return err;
}
static void ufs_msm_phy_qmp_20nm_advertise_quirks(struct phy *generic_phy)
static void __maybe_unused
ufs_msm_phy_qmp_20nm_advertise_quirks(struct phy *generic_phy)
{
struct ufs_msm_phy_qmp_20nm *phy = phy_get_drvdata(generic_phy);
struct ufs_msm_phy *phy_common = &(phy->common_cfg);
@ -172,7 +173,6 @@ struct phy_ops ufs_msm_phy_qmp_20nm_phy_ops = {
.exit = ufs_msm_phy_exit,
.power_on = ufs_msm_phy_power_on,
.power_off = ufs_msm_phy_power_off,
.advertise_quirks = ufs_msm_phy_qmp_20nm_advertise_quirks,
.owner = THIS_MODULE,
};

View file

@ -209,7 +209,8 @@ ufs_msm_phy_qmp_28nm_write_attr(struct phy *generic_phy, u32 attr, u32 val)
writel_relaxed(0x00, phy_common->mmio + UFS_PHY_RMMI_ATTR_CTRL);
}
static void ufs_msm_phy_qmp_28nm_restore_attrs(struct phy *generic_phy)
static void __maybe_unused
ufs_msm_phy_qmp_28nm_restore_attrs(struct phy *generic_phy)
{
int i;
@ -233,7 +234,8 @@ static int ufs_msm_phy_qmp_28nm_is_pcs_ready(struct ufs_msm_phy *phy_common)
}
static
void ufs_msm_phy_qmp_28nm_advertise_quirks(struct phy *generic_phy)
void __maybe_unused
ufs_msm_phy_qmp_28nm_advertise_quirks(struct phy *generic_phy)
{
struct ufs_msm_phy_qmp_28nm *phy = phy_get_drvdata(generic_phy);
struct ufs_msm_phy *phy_common = &(phy->common_cfg);
@ -242,7 +244,7 @@ void ufs_msm_phy_qmp_28nm_advertise_quirks(struct phy *generic_phy)
| MSM_UFS_PHY_DIS_SIGDET_BEFORE_PWR_COLLAPSE;
}
static int ufs_msm_phy_qmp_28nm_suspend(struct phy *generic_phy)
static int __maybe_unused ufs_msm_phy_qmp_28nm_suspend(struct phy *generic_phy)
{
struct ufs_msm_phy_qmp_28nm *phy = phy_get_drvdata(generic_phy);
struct ufs_msm_phy *phy_common = &(phy->common_cfg);
@ -256,7 +258,7 @@ static int ufs_msm_phy_qmp_28nm_suspend(struct phy *generic_phy)
return 0;
}
static int ufs_msm_phy_qmp_28nm_resume(struct phy *generic_phy)
static int __maybe_unused ufs_msm_phy_qmp_28nm_resume(struct phy *generic_phy)
{
struct ufs_msm_phy_qmp_28nm *phy = phy_get_drvdata(generic_phy);
struct ufs_msm_phy *phy_common = &phy->common_cfg;
@ -279,9 +281,6 @@ struct phy_ops ufs_msm_phy_qmp_28nm_phy_ops = {
.exit = ufs_msm_phy_exit,
.power_on = ufs_msm_phy_power_on,
.power_off = ufs_msm_phy_power_off,
.advertise_quirks = ufs_msm_phy_qmp_28nm_advertise_quirks,
.suspend = ufs_msm_phy_qmp_28nm_suspend,
.resume = ufs_msm_phy_qmp_28nm_resume,
.owner = THIS_MODULE,
};

View file

@ -496,8 +496,6 @@ static int ufs_msm_resume(struct ufs_hba *hba, enum ufs_pm_op pm_op)
* voltage, current to settle down before starting serdes.
*/
usleep_range(1000, 1100);
err = phy_resume(host->generic_phy);
}
hba->is_sys_suspended = false;
@ -787,7 +785,7 @@ out:
*/
static void ufs_msm_advertise_quirks(struct ufs_hba *hba)
{
struct ufs_msm_host *host = hba->priv;
struct ufs_msm_host __maybe_unused *host = hba->priv;
u8 major;
u16 minor, step;
@ -802,8 +800,6 @@ static void ufs_msm_advertise_quirks(struct ufs_hba *hba)
hba->quirks |= (UFSHCD_QUIRK_DELAY_BEFORE_DME_CMDS
| UFSHCD_QUIRK_BROKEN_PA_RXHSUNTERMCAP
| UFSHCD_QUIRK_BROKEN_LCC);
phy_advertise_quirks(host->generic_phy);
}
static int ufs_msm_get_bus_vote(struct ufs_msm_host *host,
@ -1033,7 +1029,7 @@ static int ufs_msm_init(struct ufs_hba *hba)
}
host->hba = hba;
host->generic_phy = devm_phy_get_by_index(dev, 0);
host->generic_phy = NULL;
if (IS_ERR(host->generic_phy)) {
err = PTR_ERR(host->generic_phy);