Skip to content

scmi: Bypass set fwnode and introduce allow/block list to address devlink issue

Peng Fan (OSS) arm-scmi imx linux-arm-kernel linux-gpio lkml 2 versions – In review

Get series with b4
b4 am [email protected] change-id 20241225-scmi-fwdevlink-afb5131f19ea

Versions newest first

  1. v2 Latest4 patches 22 repliesIn review
  2. v14 patches 45 repliesSuperseded

Changes in v2 from the cover letter

- Introduce machine_allowlist and machine_blocklist
- Keep of_node for cpufreq device per Cristian
- Patch 2 is an optimization patch when fixing the devlink issue
- Link to v1: https://lore.kernel.org/r/[email protected]

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4firmware: arm_scmi: Bypass setting fwnode for scmi cpufreqdrivers/firmware/arm_scmi/bus.c+16 -17 replies
2/4firmware: arm_scmi: Add machine_allowlist and machine_blocklistdrivers/firmware/arm_scmi/bus.c include/linux/scmi_protocol.h+17 -011 replies
3/4pinctrl: freescale: scmi: Switch to use machine_allowlistdrivers/pinctrl/freescale/pinctrl-imx-scmi.c+6 -91 reply
4/4pinctrl: scmi: Switch to use machine_blocklistdrivers/pinctrl/pinctrl-scmi.c+6 -91 reply

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchLinus Walleij
SeriesA-b
1/4
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/4] scmi: Bypass set fwnode and introduce allow/block list to address devlink issue

Current scmi drivers not work well with devlink. This patchset is a retry to address the issue in [1] which was a few months ago.

Current scmi devices are not created from device tree, they are created from a scmi_device_id entry of each driver with the protocol matches with the fwnode reg value, this means there could be multiple devices created for one fwnode, but the fwnode only has one device pointer.

This patchset is to do more checking before setting the device fwnode. And Introduce machine_allowlist and machine_blocklist.

The reason to introduce machine_blocklist is for case that
if pinctrl-scmi.c probes before pinctrl-imx-scmi.c probes on i.MX platform. Need to block pinctrl-scmi.c on i.MX platform.

This may looks like hack, but seems no better way to make scmi works well with devlink.

[1]: https://lore.kernel.org/arm-scmi/CAGETcx8m48cy-EzP6_uoGN7KWsQw=CfZWQ-hNUzz_7LZ0voG8A@mail.gmail.com/

---
Changes in v2:
- Introduce machine_allowlist and machine_blocklist
- Keep of_node for cpufreq device per Cristian
- Patch 2 is an optimization patch when fixing the devlink issue
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Peng Fan (4):
firmware: arm_scmi: Bypass setting fwnode for scmi cpufreq
firmware: arm_scmi: Add machine_allowlist and machine_blocklist
pinctrl: freescale: scmi: Switch to use machine_allowlist
pinctrl: scmi: Switch to use machine_blocklist

 drivers/firmware/arm_scmi/bus.c              | 31 +++++++++++++++++++++++++++-
 drivers/pinctrl/freescale/pinctrl-imx-scmi.c | 15 ++++++--------
 drivers/pinctrl/pinctrl-scmi.c               | 15 ++++++--------
 include/linux/scmi_protocol.h                |  3 +++
 4 files changed, 45 insertions(+), 19 deletions(-)

---
base-commit: 9dff7bbdd359c73f1b44ab592bbb17e1c174fe43
change-id: 20241225-scmi-fwdevlink-afb5131f19ea

Best regards,

Signature · 1 line
Peng Fan <[email protected]>