scsi: ufs: disable LCC configuration

LCC configuration that is needed for optical connections, is not needed
when working with UFS devices. This values can be disable in all tx
connected lanes and in both: unipro and the device

Change-Id: I3c94600dad0aaade87eb976b6296a284d10aff93
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
[subhashj@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
This commit is contained in:
Yaniv Gardi 2013-10-25 00:53:06 +03:00 committed by David Keitel
parent 1458023d1e
commit e6aa6d8e5a

View file

@ -2864,8 +2864,30 @@ static int ufshcd_link_startup(struct ufs_hba *hba)
/* failed to get the link up... retire */
goto out;
} else {
ufshcd_dme_set(hba, UIC_ARG_MIB(TX_LCC_ENABLE), 0);
ufshcd_dme_set(hba, UIC_ARG_MIB(TX_LCC_ENABLE), 1);
int device_tx_lanes;
int hc_tx_lanes;
int i;
ufshcd_dme_get(hba,
UIC_ARG_MIB(PA_CONNECTEDTXDATALANES), &hc_tx_lanes);
ufshcd_dme_peer_get(hba,
UIC_ARG_MIB(PA_CONNECTEDTXDATALANES),
&device_tx_lanes);
for (i = 0; i < hc_tx_lanes; ++i)
ufshcd_dme_set(hba,
UIC_ARG_MIB_SEL(TX_LCC_ENABLE, i), 0);
for (i = 0; i < device_tx_lanes; ++i)
ufshcd_dme_peer_st_set(hba,
UIC_ARG_MIB_SEL(TX_LCC_ENABLE, i), 0);
/*
* some devices might need a power mode change to apply
* the above values
*/
ufshcd_uic_change_pwr_mode(hba, UNCHANGED << 4 | UNCHANGED);
}
if (hba->quirks & UFSHCD_QUIRK_BROKEN_LCC) {