diff options
| author | Tom Rini <[email protected]> | 2025-10-09 14:30:02 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-10-09 14:30:02 -0600 |
| commit | ecdc3872a767fb045be3296d4317ae978a14b022 (patch) | |
| tree | daae7d6bc1c9e3aceab832198bc5b42b66b34594 /drivers/clk | |
| parent | 8cc77c78b0bc44aab44aa00e9a0ceab14ffe2017 (diff) | |
| parent | 7828597f5430431281071b60289e46afed74ef94 (diff) | |
Merge patch series "firmware: scmi: various update"
Peng Fan (OSS) <[email protected]> says:
Misc update on firmware scmi:
- Typo fix
- Use io helpers
- Use PAGE_SIZE for arm64
- Add IN_USE error code
- Add more error info
- Support scmi max rx timeout in mailbox
- Add myself as scmi maintainer, AKASHI contributed most code, but
seems he is not invovled in the developement anymore, I volunteer to
help here.
Some items on list that I am thinking to add:
- align with linux kernel to use cpu_to_le32 and le32_to_cpu, but have not find
a good way to use the helpers.
- Add SCMI version negotiation as Linux Kernel
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/clk')
| -rw-r--r-- | drivers/clk/clk_scmi.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/drivers/clk/clk_scmi.c b/drivers/clk/clk_scmi.c index 0c9a81cabcc..a7d89f32cd7 100644 --- a/drivers/clk/clk_scmi.c +++ b/drivers/clk/clk_scmi.c @@ -7,6 +7,7 @@ #include <clk-uclass.h> #include <dm.h> +#include <dm/device_compat.h> #include <scmi_agent.h> #include <scmi_agent-uclass.h> #include <scmi_protocols.h> @@ -41,19 +42,21 @@ static int scmi_clk_get_permissions(struct udevice *dev, int clkid, u32 *perm) }; if (priv->version < CLOCK_PROTOCOL_VERSION_3_0) { - log_debug("%s: SCMI clock management protocol version is less than 3.0.\n", __func__); + dev_dbg(dev, + "%s: SCMI clock management protocol version is less than 3.0.\n", __func__); return -EINVAL; } ret = devm_scmi_process_msg(dev, &msg); if (ret) { - log_debug("%s: get SCMI clock management protocol permissions failed\n", __func__); + dev_dbg(dev, + "%s: get SCMI clock management protocol permissions failed\n", __func__); return ret; } ret = scmi_to_linux_errno(out.status); if (ret < 0) { - log_debug("%s: the status code of getting permissions: %d\n", __func__, ret); + dev_dbg(dev, "%s: the status code of getting permissions: %d\n", __func__, ret); return ret; } @@ -167,7 +170,7 @@ static int scmi_clk_enable(struct clk *clk) return scmi_clk_gate(clk, 1); /* Following Linux drivers/clk/clk-scmi.c, directly return 0 if agent has no permission. */ - log_debug("%s: SCMI CLOCK: the clock cannot be enabled by the agent.\n", __func__); + dev_dbg(clk->dev, "%s: SCMI CLOCK: the clock cannot be enabled by the agent.\n", __func__); return 0; } @@ -190,7 +193,8 @@ static int scmi_clk_disable(struct clk *clk) return scmi_clk_gate(clk, 0); /* Following Linux drivers/clk/clk-scmi.c, directly return 0 if agent has no permission. */ - log_debug("%s: SCMI CLOCK: the clock cannot be disabled by the agent.\n", __func__); + dev_dbg(clk->dev, + "%s: SCMI CLOCK: the clock cannot be disabled by the agent.\n", __func__); return 0; } @@ -260,7 +264,8 @@ static ulong scmi_clk_set_rate(struct clk *clk, ulong rate) return __scmi_clk_set_rate(clk, rate); /* Following Linux drivers/clk/clk-scmi.c, directly return 0 if agent has no permission. */ - log_debug("%s: SCMI CLOCK: the clock rate cannot be changed by the agent.\n", __func__); + dev_dbg(clk->dev, + "%s: SCMI CLOCK: the clock rate cannot be changed by the agent.\n", __func__); return 0; } @@ -291,7 +296,7 @@ static int scmi_clk_probe(struct udevice *dev) ret = scmi_generic_protocol_version(dev, SCMI_PROTOCOL_ID_CLOCK, &priv->version); if (ret) { - log_debug("%s: get SCMI clock management protocol version failed\n", __func__); + dev_dbg(dev, "%s: get SCMI clock management protocol version failed\n", __func__); return ret; } @@ -371,7 +376,8 @@ static int scmi_clk_set_parent(struct clk *clk, struct clk *parent) return __scmi_clk_set_parent(clk, parent); /* Following Linux drivers/clk/clk-scmi.c, directly return 0 if agent has no permission. */ - log_debug("%s: SCMI CLOCK: the clock's parent cannot be changed by the agent.\n", __func__); + dev_dbg(clk->dev, + "%s: SCMI CLOCK: the clock's parent cannot be changed by the agent.\n", __func__); return 0; } |
