linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/11] phy: qcom-qmp: more fixes and cleanups
@ 2022-09-16 10:23 Johan Hovold
  2022-09-16 10:23 ` [PATCH v2 01/11] phy: qcom-qmp-pcie: add pcs_misc sanity check Johan Hovold
                   ` (11 more replies)
  0 siblings, 12 replies; 15+ messages in thread
From: Johan Hovold @ 2022-09-16 10:23 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Dmitry Baryshkov, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, linux-arm-msm, linux-phy, linux-kernel,
	Johan Hovold

Here's the next set of QMP PHY cleanups including some non-critical
fixes of tiny memory leaks on probe deferral (I didn't add a stable tag
for any of them on purpose).

Note that the UFS PHY driver does not use the pcs_misc region either
currently, but I decided to leave the register mapping code in as,
unlike for msm8996, the bindings do include this region.

These apply on top of the previous clean up series, which has been
reviewed by Dmitry and is ready to be merged (apart from possibly a tiny
fixup of the last patch):

	https://lore.kernel.org/all/20220907110728.19092-1-johan+linaro@kernel.org/

As mentioned in the individual commit messages, the memleak fixes
switches to using exclusive mappings for the device registers. When
reviewing the mainline devicetree I found four instances of incorrect
serdes region sizes which I've now fixed up. I don't think we need to
add workarounds for booting older malformed dtbs in this case, at least
not until someone complains.

As I also reported in a reply to v1:

	https://lore.kernel.org/lkml/YyRJuCnuUE+bF7RP@hovoldconsulting.com/

we do however have two USB PHY bindings that currently rely on
overlapping regions which would require some more work to be fixed up.

Specifically, the USB PHY driver uses two separate PCS regions but the
binding treats them as one and the driver ends up mapping everything in
between. This sort of works on all platforms but two where the TX and RX
regions lie in between.

The binding and driver should probably be fixed up to define this
PCS_USB region explicitly, but that work is left for another day.

Meanwhile, I've implemented a workaround that fall back to using
non-exclusive mappings for these platforms.

Johan


Changes in v2
 - fallback to non-exclusive mappings for the two USB bindings that
   currently rely on it (patch 6/11)


Johan Hovold (11):
  phy: qcom-qmp-pcie: add pcs_misc sanity check
  phy: qcom-qmp-pcie: fix memleak on probe deferral
  phy: qcom-qmp-pcie-msm8996: fix memleak on probe deferral
  phy: qcom-qmp-combo: fix memleak on probe deferral
  phy: qcom-qmp-ufs: fix memleak on probe deferral
  phy: qcom-qmp-usb: fix memleak on probe deferral
  phy: qcom-qmp-pcie-msm8996: drop unused pcs_misc handling
  phy: qcom-qmp-pcie: drop unused legacy DT workaround
  phy: qcom-qmp-combo: drop unused legacy DT workaround
  phy: qcom-qmp-ufs: drop legacy DT workaround
  phy: qcom-qmp-usb: drop legacy DT workaround

 drivers/phy/qualcomm/phy-qcom-qmp-combo.c     | 53 +++++-------
 .../phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c  | 33 +++-----
 drivers/phy/qualcomm/phy-qcom-qmp-pcie.c      | 59 ++++++--------
 drivers/phy/qualcomm/phy-qcom-qmp-ufs.c       | 53 +++++-------
 drivers/phy/qualcomm/phy-qcom-qmp-usb.c       | 80 +++++++++++--------
 5 files changed, 117 insertions(+), 161 deletions(-)

-- 
2.35.1


^ permalink raw reply	[flat|nested] 15+ messages in thread
* [PATCH v2 00/11] phy: qcom-qmp: more fixes and cleanups
@ 2022-09-29  9:29 Johan Hovold
  2022-09-29  9:47 ` Johan Hovold
  0 siblings, 1 reply; 15+ messages in thread
From: Johan Hovold @ 2022-09-29  9:29 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, Neil Armstrong,
	linux-arm-msm, linux-phy, linux-kernel, Johan Hovold

Here's the next batch of QMP driver fixes and cleanups.

Dmitry suggested that the register layout structs could all be using
per-IP version defines, which in principle sounds like a good idea. It
is a separate change though, and one which would require some more work
as it is not always clear which IP version a specific SoC uses (e.g.
some of the IPQ platforms appear to mix and match currently).

As such a change shouldn't block these clean ups, I've dropped the
merging of the IPQ SDM845 PCIe layout structs in v2.

I've also moved the bogus register update last in case it turns out that
that one needs more discussion.

Johan


Changes in v2
 - drop the two patches that dropped the IPC and SDM845 PCIe layout
   structs
 - move the bogus register fix last in case this one needs some more
   discussion


Johan Hovold (11):
  phy: qcom-qmp: fix obsolete lane comments
  phy: qcom-qmp-combo: drop unused UFS reset
  phy: qcom-qmp-pcie: drop unused common-block registers
  phy: qcom-qmp-pcie: clean up power-down handling
  phy: qcom-qmp-pcie: move power-down update
  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
  phy: qcom-qmp-pcie: clean up clock lists
  phy: qcom-qmp-pcie: drop bogus register update

 drivers/phy/qualcomm/phy-qcom-qmp-combo.c     | 30 +++---------
 .../phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c  | 12 ++---
 drivers/phy/qualcomm/phy-qcom-qmp-pcie.c      | 49 +++++--------------
 drivers/phy/qualcomm/phy-qcom-qmp-ufs.c       | 24 ++++-----
 drivers/phy/qualcomm/phy-qcom-qmp-usb.c       | 22 +++------
 5 files changed, 38 insertions(+), 99 deletions(-)

-- 
2.35.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-09-29  9:49 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-16 10:23 [PATCH v2 00/11] phy: qcom-qmp: more fixes and cleanups Johan Hovold
2022-09-16 10:23 ` [PATCH v2 01/11] phy: qcom-qmp-pcie: add pcs_misc sanity check Johan Hovold
2022-09-16 10:23 ` [PATCH v2 02/11] phy: qcom-qmp-pcie: fix memleak on probe deferral Johan Hovold
2022-09-16 10:23 ` [PATCH v2 03/11] phy: qcom-qmp-pcie-msm8996: " Johan Hovold
2022-09-16 10:23 ` [PATCH v2 04/11] phy: qcom-qmp-combo: " Johan Hovold
2022-09-16 10:23 ` [PATCH v2 05/11] phy: qcom-qmp-ufs: " Johan Hovold
2022-09-16 10:23 ` [PATCH v2 06/11] phy: qcom-qmp-usb: " Johan Hovold
2022-09-16 10:23 ` [PATCH v2 07/11] phy: qcom-qmp-pcie-msm8996: drop unused pcs_misc handling Johan Hovold
2022-09-16 10:23 ` [PATCH v2 08/11] phy: qcom-qmp-pcie: drop unused legacy DT workaround Johan Hovold
2022-09-16 10:23 ` [PATCH v2 09/11] phy: qcom-qmp-combo: " Johan Hovold
2022-09-16 10:23 ` [PATCH v2 10/11] phy: qcom-qmp-ufs: drop " Johan Hovold
2022-09-16 10:23 ` [PATCH v2 11/11] phy: qcom-qmp-usb: " Johan Hovold
2022-09-20  6:01 ` [PATCH v2 00/11] phy: qcom-qmp: more fixes and cleanups Vinod Koul
  -- strict thread matches above, loose matches on Subject: below --
2022-09-29  9:29 Johan Hovold
2022-09-29  9:47 ` Johan Hovold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).