Message ID | 20191219150433.2785427-3-vkoul@kernel.org |
---|---|
State | Superseded |
Headers | show |
Series | phy: qcom-qmp: Fixes and updates for sm8150 | expand |
On Thu, Dec 19, 2019 at 8:05 AM Vinod Koul <vkoul@kernel.org> wrote: > > We already define register offsets so use them in register layout. > > Signed-off-by: Vinod Koul <vkoul@kernel.org> Reviewed-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com> > --- > drivers/phy/qualcomm/phy-qcom-qmp.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c b/drivers/phy/qualcomm/phy-qcom-qmp.c > index c2e800a3825a..06f971ca518e 100644 > --- a/drivers/phy/qualcomm/phy-qcom-qmp.c > +++ b/drivers/phy/qualcomm/phy-qcom-qmp.c > @@ -166,8 +166,8 @@ static const unsigned int sdm845_ufsphy_regs_layout[] = { > }; > > static const unsigned int sm8150_ufsphy_regs_layout[] = { > - [QPHY_START_CTRL] = 0x00, > - [QPHY_PCS_READY_STATUS] = 0x180, > + [QPHY_START_CTRL] = QPHY_V4_PHY_START, > + [QPHY_SW_RESET] = QPHY_V4_SW_RESET, > }; > > static const struct qmp_phy_init_tbl msm8996_pcie_serdes_tbl[] = { > -- > 2.23.0 >
On 20-12-19, 08:44, cang@codeaurora.org wrote: > On 2019-12-19 23:04, Vinod Koul wrote: > > We already define register offsets so use them in register layout. > > > > Signed-off-by: Vinod Koul <vkoul@kernel.org> > > --- > > drivers/phy/qualcomm/phy-qcom-qmp.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c > > b/drivers/phy/qualcomm/phy-qcom-qmp.c > > index c2e800a3825a..06f971ca518e 100644 > > --- a/drivers/phy/qualcomm/phy-qcom-qmp.c > > +++ b/drivers/phy/qualcomm/phy-qcom-qmp.c > > @@ -166,8 +166,8 @@ static const unsigned int > > sdm845_ufsphy_regs_layout[] = { > > }; > > > > static const unsigned int sm8150_ufsphy_regs_layout[] = { > > - [QPHY_START_CTRL] = 0x00, > > - [QPHY_PCS_READY_STATUS] = 0x180, > > + [QPHY_START_CTRL] = QPHY_V4_PHY_START, > > + [QPHY_SW_RESET] = QPHY_V4_SW_RESET, > > }; > > > > static const struct qmp_phy_init_tbl msm8996_pcie_serdes_tbl[] = { > > Why is the QPHY_PCS_READY_STATUS removed here? Then what "status" are we > polling here for UFS PHY? > > <snip> > if (cfg->type == PHY_TYPE_UFS) { > status = pcs + cfg->regs[QPHY_PCS_READY_STATUS]; > mask = PCS_READY; > ready = PCS_READY; > } else { > <snip> Good catch Can, I dont think I intended it that way. Will fix it up! Thanks -- ~Vinod
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c b/drivers/phy/qualcomm/phy-qcom-qmp.c index c2e800a3825a..06f971ca518e 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp.c @@ -166,8 +166,8 @@ static const unsigned int sdm845_ufsphy_regs_layout[] = { }; static const unsigned int sm8150_ufsphy_regs_layout[] = { - [QPHY_START_CTRL] = 0x00, - [QPHY_PCS_READY_STATUS] = 0x180, + [QPHY_START_CTRL] = QPHY_V4_PHY_START, + [QPHY_SW_RESET] = QPHY_V4_SW_RESET, }; static const struct qmp_phy_init_tbl msm8996_pcie_serdes_tbl[] = {
We already define register offsets so use them in register layout. Signed-off-by: Vinod Koul <vkoul@kernel.org> --- drivers/phy/qualcomm/phy-qcom-qmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.23.0