mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 16:44:58 +02:00
Samsung SoC clock drivers changes for 6.11
1. exynos-clkout: Remove usage of of_device_id table as .of_match_table,
because the driver is instantiated as MFD cell, not as standalone
platform driver. Populated .of_match_table confused people few times
to convert the code to device_get_match_data(), which broke the
driver.
2. Mark one of UFS clocks as critical, because having it off stops the
system from shutdown.
3. Cleanup: Use kmemdup_array() when applicable.
-----BEGIN PGP SIGNATURE-----
iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmaDno0QHGtyemtAa2Vy
bmVsLm9yZwAKCRDBN2bmhouD19vLD/0VykNlgDBQ71B9NjblBNqla0IuxTaoTO9r
AL+Dgg4HnTVxsvCrchmyrdAlVJy32LXox+YqWnnMaQ1cuRoKm7+v2NWCGGkfhbAO
1NvhQsVlM44OU+RemaxqOQVoTBEEfgqcPGUSX2uzZxq857MFLVF5et7Jg1hWaWHq
bOIegrgkCTlj2fsJZ+p0JHeku50wZ4bGe39uw7H3y9+563etOjjDHjgWZ1gRtujz
koWeBYwvTV1K+g0OhiLBYpWwzWq9KJoSyE3d8jhSmVQHEEU6AG1UE+ZeUhjUEAjR
bLxi94nH0SYNwBECBv4lojjjxPInr1G4bDoIG2ZH70Gx/IZfLf8d5/LiqVv0GAzv
oZo8HzsFA04cH7dzVSEl8pdh70j0SLzZSjBRrrKrO6EV7nWf6X4DFVuVaQDxPDJb
eaED1gxeX5Uxa1ZKpykRPTUpVmJZkg5dfr1h9lrC/C9BHsRqrtUYOMsLkFMZbx3P
E/ScDPACnaqNUWraUBnINXTRr3vMlGaAyZi2Bao3i7lR2G4msdeZzZFBUTJb7z7y
kQmD48WQLcDswTmgL/kSa65Shovf7sv7a6dlsJCiJ3bxOqGURwcZ5YH4kFLYo1WY
Xidp9jhpbXp2zAESfYQqFfFc6epEW1s+d/My7ssY4qM7jKIrVyrxYpDXukD/Qst5
rmwLFTWFGw==
=wBXG
-----END PGP SIGNATURE-----
Merge tag 'samsung-clk-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into clk-samsung
Pull Samsung SoC clk drivers updates from Krzysztof Kozlowski:
- exynos-clkout: Remove usage of of_device_id table as .of_match_table,
because the driver is instantiated as MFD cell, not as standalone
platform driver. Populated .of_match_table confused people few times
to convert the code to device_get_match_data(), which broke the
driver.
- Mark one of UFS clocks as critical, because having it off stops the
system from shutdown
- Use kmemdup_array() when applicable
* tag 'samsung-clk-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
clk: samsung: gs101: mark gout_hsi2_ufs_embd_i_clk_unipro as critical
clk: samsung: Switch to use kmemdup_array()
clk: samsung: exynos-clkout: Remove misleading of_match_table/MODULE_DEVICE_TABLE
This commit is contained in:
commit
b1da66d28a
|
|
@ -689,8 +689,8 @@ static int __init exynos_register_cpu_clock(struct samsung_clk_provider *ctx,
|
|||
for (num_cfgs = 0; clk_data->cfg[num_cfgs].prate != 0; )
|
||||
num_cfgs++;
|
||||
|
||||
cpuclk->cfg = kmemdup(clk_data->cfg, sizeof(*clk_data->cfg) * num_cfgs,
|
||||
GFP_KERNEL);
|
||||
cpuclk->cfg = kmemdup_array(clk_data->cfg, num_cfgs, sizeof(*cpuclk->cfg),
|
||||
GFP_KERNEL);
|
||||
if (!cpuclk->cfg) {
|
||||
ret = -ENOMEM;
|
||||
goto unregister_clk_nb;
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@
|
|||
#include <linux/platform_device.h>
|
||||
#include <linux/pm.h>
|
||||
|
||||
#define DRV_NAME "exynos-clkout"
|
||||
|
||||
#define EXYNOS_CLKOUT_NR_CLKS 1
|
||||
#define EXYNOS_CLKOUT_PARENTS 32
|
||||
|
||||
|
|
@ -75,7 +77,6 @@ static const struct of_device_id exynos_clkout_ids[] = {
|
|||
.data = &exynos_clkout_exynos5,
|
||||
}, { }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, exynos_clkout_ids);
|
||||
|
||||
/*
|
||||
* Device will be instantiated as child of PMU device without its own
|
||||
|
|
@ -236,8 +237,7 @@ static SIMPLE_DEV_PM_OPS(exynos_clkout_pm_ops, exynos_clkout_suspend,
|
|||
|
||||
static struct platform_driver exynos_clkout_driver = {
|
||||
.driver = {
|
||||
.name = "exynos-clkout",
|
||||
.of_match_table = exynos_clkout_ids,
|
||||
.name = DRV_NAME,
|
||||
.pm = &exynos_clkout_pm_ops,
|
||||
},
|
||||
.probe = exynos_clkout_probe,
|
||||
|
|
@ -248,4 +248,5 @@ module_platform_driver(exynos_clkout_driver);
|
|||
MODULE_AUTHOR("Krzysztof Kozlowski <krzk@kernel.org>");
|
||||
MODULE_AUTHOR("Tomasz Figa <tomasz.figa@gmail.com>");
|
||||
MODULE_DESCRIPTION("Samsung Exynos clock output driver");
|
||||
MODULE_ALIAS("platform:" DRV_NAME);
|
||||
MODULE_LICENSE("GPL");
|
||||
|
|
|
|||
|
|
@ -2846,7 +2846,7 @@ static const struct samsung_gate_clock hsi2_gate_clks[] __initconst = {
|
|||
GATE(CLK_GOUT_HSI2_UFS_EMBD_I_CLK_UNIPRO,
|
||||
"gout_hsi2_ufs_embd_i_clk_unipro", "mout_hsi2_ufs_embd_user",
|
||||
CLK_CON_GAT_GOUT_BLK_HSI2_UID_UFS_EMBD_IPCLKPORT_I_CLK_UNIPRO,
|
||||
21, 0, 0),
|
||||
21, CLK_IS_CRITICAL, 0),
|
||||
GATE(CLK_GOUT_HSI2_UFS_EMBD_I_FMP_CLK,
|
||||
"gout_hsi2_ufs_embd_i_fmp_clk", "mout_hsi2_bus_user",
|
||||
CLK_CON_GAT_GOUT_BLK_HSI2_UID_UFS_EMBD_IPCLKPORT_I_FMP_CLK,
|
||||
|
|
|
|||
|
|
@ -1286,10 +1286,10 @@ static void __init _samsung_clk_register_pll(struct samsung_clk_provider *ctx,
|
|||
len++;
|
||||
|
||||
pll->rate_count = len;
|
||||
pll->rate_table = kmemdup(pll_clk->rate_table,
|
||||
pll->rate_count *
|
||||
sizeof(struct samsung_pll_rate_table),
|
||||
GFP_KERNEL);
|
||||
pll->rate_table = kmemdup_array(pll_clk->rate_table,
|
||||
pll->rate_count,
|
||||
sizeof(*pll->rate_table),
|
||||
GFP_KERNEL);
|
||||
WARN(!pll->rate_table,
|
||||
"%s: could not allocate rate table for %s\n",
|
||||
__func__, pll_clk->name);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user