mbox series

[00/18] phy: qcom-qmp: rework register layout tables

Message ID 20220928231014.455201-1-dmitry.baryshkov@linaro.org
Headers show
Series phy: qcom-qmp: rework register layout tables | expand

Message

Dmitry Baryshkov Sept. 28, 2022, 11:09 p.m. UTC
This is an alternative implementation of the QMP PHY driver cleanup
proposed by Johan at [1]. This patchset changes register layout tables
to use symbolic names instead of bare values and attempts to tie the reg
layout with the version of the QMP PHY.

[1] https://lore.kernel.org/linux-phy/20220928152822.30687-1-johan+linaro@kernel.org

Dmitry Baryshkov (12):
  phy: qcom-qmp-pcie: rework regs layout arrays
  phy: qcom-qmp-pcie: rename regs layout arrays
  phy: qcom-qmp-ufs: split UFS-specific v2 PCS registers to a separate
    header
  phy: qcom-qmp-ufs: rework regs layout arrays
  phy: qcom-qmp-ufs: rename regs layout arrays
  phy: qcom-qmp-usb: remove QPHY_PCS_LFPS_RXTERM_IRQ_STATUS reg
  phy: qcom-qmp-usb: remove QPHY_PCS_MISC_TYPEC_CTRL reg
  phy: qcom-qmp-usb: rework regs layout arrays
  phy: qcom-qmp-pcie-msm8996: rework regs layout arrays
  phy: qcom-qmp-combo: remove QPHY_PCS_LFPS_RXTERM_IRQ_STATUS reg
  phy: qcom-qmp-usb: rework regs layout arrays
  phy: qcom-qmp: move type-specific headers to particular driver

Johan Hovold (6):
  phy: qcom-qmp-pcie: drop unused common-block registers
  phy: qcom-qmp-pcie: clean up power-down handling
  phy: qcom-qmp-pcie-msm8996: clean up power-down handling
  phy: qcom-qmp-combo: clean up power-down handling
  phy: qcom-qmp-ufs: clean up power-down handling
  phy: qcom-qmp-usb: clean up power-down handling

 drivers/phy/qualcomm/phy-qcom-qmp-combo.c     | 49 ++++------
 .../phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c  | 16 +---
 drivers/phy/qualcomm/phy-qcom-qmp-pcie.c      | 91 ++++++++-----------
 .../phy/qualcomm/phy-qcom-qmp-pcs-ufs-v2.h    | 25 +++++
 .../phy/qualcomm/phy-qcom-qmp-pcs-ufs-v3.h    |  3 +
 .../phy/qualcomm/phy-qcom-qmp-pcs-ufs-v5.h    |  4 +
 drivers/phy/qualcomm/phy-qcom-qmp-pcs-v2.h    | 19 ++--
 drivers/phy/qualcomm/phy-qcom-qmp-ufs.c       | 81 ++++++++---------
 drivers/phy/qualcomm/phy-qcom-qmp-usb.c       | 82 +++++++----------
 drivers/phy/qualcomm/phy-qcom-qmp.h           | 13 ---
 10 files changed, 175 insertions(+), 208 deletions(-)
 create mode 100644 drivers/phy/qualcomm/phy-qcom-qmp-pcs-ufs-v2.h

Comments

Dmitry Baryshkov Sept. 29, 2022, 10:06 a.m. UTC | #1
On Thu, 29 Sept 2022 at 12:44, Johan Hovold <johan@kernel.org> wrote:
>
> On Thu, Sep 29, 2022 at 02:09:56AM +0300, Dmitry Baryshkov wrote:
> > This is an alternative implementation of the QMP PHY driver cleanup
> > proposed by Johan at [1]. This patchset changes register layout tables
> > to use symbolic names instead of bare values and attempts to tie the reg
> > layout with the version of the QMP PHY.
>
> I wouldn't call this an alternative, but rather a separate change on
> top. Using separate per-IP version "register-layout" structs is in
> principle a good idea. It does require a bit of extra work though, as
> it's not always clear what version of the IP each platform is using (e.g.
> IPQ).
>
> I've respun the clean up series that triggered Dimitry to send this
> series:
>
>         https://lore.kernel.org/lkml/20220929092916.23068-1-johan+linaro@kernel.org/
>
> and dropped the two patches merging the IPQ and SDM845 structs.
>
> The register layout work can be rebased on top (trivially).
>
> I'm not so fond of the whole splitting of header files into atoms as you
> lose the overview. But I guess that's a separate discussion.

It was done so to ease merging new platforms, where we have tons of
similar headers. It is much easier to compare downstream header to the
single-version qmp header rather than finding a spot in a monolithic
header which fits the one you have. And also as a result it is also
much easier to spot the actual difference between e.g. v2 and v3.

> > [1] https://lore.kernel.org/linux-phy/20220928152822.30687-1-johan+linaro@kernel.org
>
> > Dmitry Baryshkov (12):
> >   phy: qcom-qmp-pcie: rework regs layout arrays
> >   phy: qcom-qmp-pcie: rename regs layout arrays
> >   phy: qcom-qmp-ufs: split UFS-specific v2 PCS registers to a separate
> >     header
> >   phy: qcom-qmp-ufs: rework regs layout arrays
> >   phy: qcom-qmp-ufs: rename regs layout arrays
> >   phy: qcom-qmp-usb: remove QPHY_PCS_LFPS_RXTERM_IRQ_STATUS reg
> >   phy: qcom-qmp-usb: remove QPHY_PCS_MISC_TYPEC_CTRL reg
> >   phy: qcom-qmp-usb: rework regs layout arrays
> >   phy: qcom-qmp-pcie-msm8996: rework regs layout arrays
> >   phy: qcom-qmp-combo: remove QPHY_PCS_LFPS_RXTERM_IRQ_STATUS reg
> >   phy: qcom-qmp-usb: rework regs layout arrays
> >   phy: qcom-qmp: move type-specific headers to particular driver
> >
> > Johan Hovold (6):
> >   phy: qcom-qmp-pcie: drop unused common-block registers
> >   phy: qcom-qmp-pcie: clean up power-down handling
> >   phy: qcom-qmp-pcie-msm8996: clean up power-down handling
> >   phy: qcom-qmp-combo: clean up power-down handling
> >   phy: qcom-qmp-ufs: clean up power-down handling
> >   phy: qcom-qmp-usb: clean up power-down handling
>
> Johan