* [PATCH] spi: meson-spicc: set SPI clock flag CLK_SET_RATE_PARENT
@ 2024-05-24 6:35 Xianwei Zhao via B4 Relay
2024-06-10 21:44 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Xianwei Zhao via B4 Relay @ 2024-05-24 6:35 UTC (permalink / raw)
To: Mark Brown, Neil Armstrong, Kevin Hilman, Jerome Brunet,
Martin Blumenstingl
Cc: linux-spi, linux-arm-kernel, linux-amlogic, linux-kernel,
Xianwei Zhao, Sunny Luo
From: Xianwei Zhao <xianwei.zhao@amlogic.com>
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>
---
drivers/spi/spi-meson-spicc.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/spi/spi-meson-spicc.c b/drivers/spi/spi-meson-spicc.c
index fc75492e50ff..8a4a8ba9dfed 100644
--- a/drivers/spi/spi-meson-spicc.c
+++ b/drivers/spi/spi-meson-spicc.c
@@ -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,
---
base-commit: 3aac9f4885922ad0fc01b86f85903768219475a3
change-id: 20240524-spi_pclk_setparent-6da29325c113
Best regards,
--
Xianwei Zhao <xianwei.zhao@amlogic.com>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] spi: meson-spicc: set SPI clock flag CLK_SET_RATE_PARENT
2024-05-24 6:35 [PATCH] spi: meson-spicc: set SPI clock flag CLK_SET_RATE_PARENT Xianwei Zhao via B4 Relay
@ 2024-06-10 21:44 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2024-06-10 21:44 UTC (permalink / raw)
To: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Xianwei Zhao
Cc: linux-spi, linux-arm-kernel, linux-amlogic, linux-kernel,
Sunny Luo
On Fri, 24 May 2024 14:35:09 +0800, Xianwei Zhao wrote:
> Add SPI clock flag CLK_SET_RATE_PARENT for using pclk as parent clock.
> This gives SPI more flexibility in frequency selection.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/1] spi: meson-spicc: set SPI clock flag CLK_SET_RATE_PARENT
commit: 022bd9c520d8f9dd51f29326eb369b8ec958f687
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-06-10 21:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-24 6:35 [PATCH] spi: meson-spicc: set SPI clock flag CLK_SET_RATE_PARENT Xianwei Zhao via B4 Relay
2024-06-10 21:44 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).