soundwire fixes for v6.1

This contains two qcom driver fixes for broadcast completion reinit and
 check for outanding writes. Lone Intel driver fix for clock stop timeout
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE+vs47OPLdNbVcHzyfBQHDyUjg0cFAmNsxxUACgkQfBQHDyUj
 g0e5LhAAvRjhbkuFXn5NMSltWPKdDb8Gt8d8X2uKClr/1MK/tKu5dDkllY3eVn23
 HboWeOObJZE5bBhpyOtKBUZbbOis5BPgUisF+7lIrVlVnkDVsLoE6svwrWokbRSr
 QtsSULfWTWOge1lNZx1DCyxpoAQoznYFSJ2cDfb8O1yeWCWGmiaNbQfs1ZPb4UKB
 VYQsvLfjDkI9PY4y1IQAQMpvPSqFLTadiKgpZRzMBAyy+5oH9dqxmhMDVAg1g3sa
 kOMJPHwv5nXPeWciRwUiKyeEj4Hd792qHSFZD73CQRXbmq8zB+PtGnFGr/CkH8n9
 mu9u8TlSGJ3wGG4m/Sdx4ulihrQZFmbwsQlYZqwTH2aOQvZnJRobn6SX8qZu3nQJ
 u/yClRn4ELw/ABuHKAMaRb1YJFRm0Qh9/KyKKSomOgFUTPs99Cs9CkO+rQrLOSrv
 xbzVVrqvom+r1k7Nw5qpeNwtLg/6pnW1NoY1bImKFEUoNDWejv/k61MErhpdrMdV
 gBJbLPgVxjOU3RTsUsaafzJ3iNHCVGOrzu+X6QWki63yIEC/WimiVFIsu2fjbyer
 vdD5Ue8K/3tXMs63VjNaQlG/mhFWofQsQfT85wT6NuyFeHDsJeyo0yBWMdVB/BOO
 x+6roGY7dID2h7NUr6tmTfEXGcE15wGsQA//dEnKN/AXLMdufXs=
 =rEvh
 -----END PGP SIGNATURE-----

Merge tag 'soundwire-6.1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire

Pull soundwire fixes from Vinod Koul:
 "Two qcom driver fixes for broadcast completion reinit and check for
  outanding writes. And a lone Intel driver fix for clock stop timeout"

* tag 'soundwire-6.1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire:
  soundwire: qcom: check for outanding writes before doing a read
  soundwire: qcom: reinit broadcast completion
  soundwire: intel: Initialize clock stop timeout
This commit is contained in:
Linus Torvalds 2022-11-10 08:42:59 -08:00
commit f014699cca
2 changed files with 10 additions and 0 deletions

View File

@ -1513,6 +1513,7 @@ static int intel_link_probe(struct auxiliary_device *auxdev,
bus->link_id = auxdev->id;
bus->dev_num_ida_min = INTEL_DEV_NUM_IDA_MIN;
bus->clk_stop_timeout = 1;
sdw_cdns_probe(cdns);

View File

@ -344,6 +344,9 @@ static int qcom_swrm_cmd_fifo_wr_cmd(struct qcom_swrm_ctrl *swrm, u8 cmd_data,
if (swrm_wait_for_wr_fifo_avail(swrm))
return SDW_CMD_FAIL_OTHER;
if (cmd_id == SWR_BROADCAST_CMD_ID)
reinit_completion(&swrm->broadcast);
/* Its assumed that write is okay as we do not get any status back */
swrm->reg_write(swrm, SWRM_CMD_FIFO_WR_CMD, val);
@ -377,6 +380,12 @@ static int qcom_swrm_cmd_fifo_rd_cmd(struct qcom_swrm_ctrl *swrm,
val = swrm_get_packed_reg_val(&swrm->rcmd_id, len, dev_addr, reg_addr);
/*
* Check for outstanding cmd wrt. write fifo depth to avoid
* overflow as read will also increase write fifo cnt.
*/
swrm_wait_for_wr_fifo_avail(swrm);
/* wait for FIFO RD to complete to avoid overflow */
usleep_range(100, 105);
swrm->reg_write(swrm, SWRM_CMD_FIFO_RD_CMD, val);