Messages in this thread Patch in this message | | | Date | Fri, 25 Nov 2022 10:35:41 +0800 | From | Wang Honghui <> | Subject | [PATCH] clk-scpi: Modify to recall scpi_clocks_probe |
| |
Modify to recall scpi_clocks_probe and add to support Phytium FT2000/4 CPUs
Signed-off-by: Wang Honghui <honghui.wang@ucas.com.cn> --- drivers/clk/clk-scpi.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/clk-scpi.c b/drivers/clk/clk-scpi.c index a39af7616b13..fbc624c5a94a 100644 --- a/drivers/clk/clk-scpi.c +++ b/drivers/clk/clk-scpi.c @@ -268,8 +268,10 @@ static int scpi_clocks_probe(struct platform_device *pdev) struct device_node *child, *np = dev->of_node; const struct of_device_id *match; + /* Wang Honghui modified, the func will not be recalled + * if return -EIO, but will if return -EPROBE_DEFER */ if (!get_scpi_ops()) - return -ENXIO; + return -EPROBE_DEFER; for_each_available_child_of_node(np, child) { match = of_match_node(scpi_clk_match, child); @@ -299,10 +301,18 @@ static const struct of_device_id scpi_clocks_ids[] = { }; MODULE_DEVICE_TABLE(of, scpi_clocks_ids); +/* Wang Honghui add to support Phytium FT2000/4 CPUs */ +static const struct acpi_device_id scpi_cpufreq_acpi_match[] = { + { .id = "PHYT8001" }, + { } +}; +MODULE_DEVICE_TABLE(acpi, scpi_clock_acpi_match); + static struct platform_driver scpi_clocks_driver = { .driver = { .name = "scpi_clocks", .of_match_table = scpi_clocks_ids, + .acpi_match_table = scpi_cpufreq_acpi_match, }, .probe = scpi_clocks_probe, .remove = scpi_clocks_remove, -- 2.34.1
| |