diff options
author | Stephen Boyd <[email protected]> | 2023-08-09 14:17:47 -0700 |
---|---|---|
committer | Stephen Boyd <[email protected]> | 2023-08-09 14:17:47 -0700 |
commit | 7458ea3868dce8e37cc3d7ec1d1e633a78404ec7 (patch) | |
tree | 7847ea00a50aaadc5962c48af0acf5fb438e5843 | |
parent | 06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5 (diff) | |
parent | 075d9ca5b4e17f84fd1c744a405e69ec743be7f0 (diff) |
Merge tag 'sunxi-clk-for-6.6-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-allwinner
Pull Allwinner clk driver updates from Jernej Skrabec:
- Convert sun9i-mmc clock to use devm_platform_get_and_ioremap_resource()
- Fix function name in a comment in ccu_mmc_timing.c
* tag 'sunxi-clk-for-6.6-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
clk: sunxi-ng: Modify mismatched function name
clk: sunxi: sun9i-mmc: Use devm_platform_get_and_ioremap_resource()
-rw-r--r-- | drivers/clk/sunxi-ng/ccu_mmc_timing.c | 2 | ||||
-rw-r--r-- | drivers/clk/sunxi/clk-sun9i-mmc.c | 10 |
2 files changed, 5 insertions, 7 deletions
diff --git a/drivers/clk/sunxi-ng/ccu_mmc_timing.c b/drivers/clk/sunxi-ng/ccu_mmc_timing.c index 23a8d44e2449..78919d7843be 100644 --- a/drivers/clk/sunxi-ng/ccu_mmc_timing.c +++ b/drivers/clk/sunxi-ng/ccu_mmc_timing.c @@ -43,7 +43,7 @@ int sunxi_ccu_set_mmc_timing_mode(struct clk *clk, bool new_mode) EXPORT_SYMBOL_GPL(sunxi_ccu_set_mmc_timing_mode); /** - * sunxi_ccu_set_mmc_timing_mode: Get the current MMC clock timing mode + * sunxi_ccu_get_mmc_timing_mode: Get the current MMC clock timing mode * @clk: clock to query * * Return: %0 if the clock is in old timing mode, > %0 if it is in diff --git a/drivers/clk/sunxi/clk-sun9i-mmc.c b/drivers/clk/sunxi/clk-sun9i-mmc.c index 636bcf2439ef..0862b02b1ed4 100644 --- a/drivers/clk/sunxi/clk-sun9i-mmc.c +++ b/drivers/clk/sunxi/clk-sun9i-mmc.c @@ -108,15 +108,13 @@ static int sun9i_a80_mmc_config_clk_probe(struct platform_device *pdev) spin_lock_init(&data->lock); - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!r) - return -EINVAL; - /* one clock/reset pair per word */ - count = DIV_ROUND_UP((resource_size(r)), SUN9I_MMC_WIDTH); - data->membase = devm_ioremap_resource(&pdev->dev, r); + data->membase = devm_platform_get_and_ioremap_resource(pdev, 0, &r); if (IS_ERR(data->membase)) return PTR_ERR(data->membase); + /* one clock/reset pair per word */ + count = DIV_ROUND_UP((resource_size(r)), SUN9I_MMC_WIDTH); + clk_data = &data->clk_data; clk_data->clk_num = count; clk_data->clks = devm_kcalloc(&pdev->dev, count, sizeof(struct clk *), |