Message ID | 20241225-scmi-fwdevlink-v1-0-e9a3a5341362@nxp.com (mailing list archive) |
---|---|
Headers | show |
Series | scmi: Bypass set fwnode to address devlink issue | expand |
On Wed, Dec 25, 2024 at 9:21 AM Peng Fan (OSS) <peng.fan@oss.nxp.com> wrote: > 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. > > 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/ Please drive any devlink-related patches by Saravana Kannan, he's pretty much the only person I trust to know how to do devlinks right. Yours, Linus Walleij
On Fri, Dec 27, 2024 at 06:06:24PM +0100, Linus Walleij wrote: >On Wed, Dec 25, 2024 at 9:21 AM Peng Fan (OSS) <peng.fan@oss.nxp.com> wrote: > >> 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. >> >> 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/ > >Please drive any devlink-related patches by Saravana Kannan, he's pretty >much the only person I trust to know how to do devlinks right. Quote Saravana's conclution[1] here: "The best fw_devlink could do is just not enforce any dependencies if there is more than one device instantiated for a given supplier DT node." So I think for systems using scmi could not rely on devlink to build supplier/consumer to make driver probe in order. [1]https://lore.kernel.org/arm-scmi/CAGETcx8m48cy-EzP6_uoGN7KWsQw=CfZWQ-hNUzz_7LZ0voG8A@mail.gmail.com/ Thanks, Peng > >Yours, >Linus Walleij
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. 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/ Cc: Signed-off-by: Peng Fan <peng.fan@nxp.com> --- Peng Fan (4): firmware: arm_scmi: bus: Bypass setting fwnode for scmi cpufreq firmware: arm_scmi: bus: Bypass setting fwnode for pinctrl pinctrl: scmi: Check fwnode instead of machine compatible pinctrl: freescale: scmi: Check fwnode instead of machine compatible drivers/firmware/arm_scmi/bus.c | 29 +++++++++++++++++++++++++++- drivers/pinctrl/freescale/pinctrl-imx-scmi.c | 7 +------ drivers/pinctrl/pinctrl-scmi.c | 7 +------ 3 files changed, 30 insertions(+), 13 deletions(-) --- base-commit: 8155b4ef3466f0e289e8fcc9e6e62f3f4dceeac2 change-id: 20241225-scmi-fwdevlink-afb5131f19ea Best regards,