mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2024-12-29 09:13:38 +00:00
spi: meson-spicc: set SPI clock flag CLK_SET_RATE_PARENT
Add SPI clock flag CLK_SET_RATE_PARENT for using pclk as parent clock. This gives SPI more flexibility in frequency selection. Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com> Signed-off-by: Sunny Luo <sunny.luo@amlogic.com> Link: https://lore.kernel.org/r/20240524-spi_pclk_setparent-v1-1-99e0ce70b66f@amlogic.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
d4ea1d504d
commit
022bd9c520
@ -644,11 +644,13 @@ static int meson_spicc_pow2_clk_init(struct meson_spicc_device *spicc)
|
||||
snprintf(name, sizeof(name), "%s#pow2_fixed_div", dev_name(dev));
|
||||
init.name = name;
|
||||
init.ops = &clk_fixed_factor_ops;
|
||||
init.flags = 0;
|
||||
if (spicc->data->has_pclk)
|
||||
if (spicc->data->has_pclk) {
|
||||
init.flags = CLK_SET_RATE_PARENT;
|
||||
parent_data[0].hw = __clk_get_hw(spicc->pclk);
|
||||
else
|
||||
} else {
|
||||
init.flags = 0;
|
||||
parent_data[0].hw = __clk_get_hw(spicc->core);
|
||||
}
|
||||
init.num_parents = 1;
|
||||
|
||||
pow2_fixed_div->mult = 1,
|
||||
@ -708,11 +710,13 @@ static int meson_spicc_enh_clk_init(struct meson_spicc_device *spicc)
|
||||
snprintf(name, sizeof(name), "%s#enh_fixed_div", dev_name(dev));
|
||||
init.name = name;
|
||||
init.ops = &clk_fixed_factor_ops;
|
||||
init.flags = 0;
|
||||
if (spicc->data->has_pclk)
|
||||
if (spicc->data->has_pclk) {
|
||||
init.flags = CLK_SET_RATE_PARENT;
|
||||
parent_data[0].hw = __clk_get_hw(spicc->pclk);
|
||||
else
|
||||
} else {
|
||||
init.flags = 0;
|
||||
parent_data[0].hw = __clk_get_hw(spicc->core);
|
||||
}
|
||||
init.num_parents = 1;
|
||||
|
||||
enh_fixed_div->mult = 1,
|
||||
|
Loading…
Reference in New Issue
Block a user