Skip to contentSkip to conversation

soundwire: amd: drop bus freq calculation and set 'max_clk_freq'

PATCH In review Vinod Koul 2 participants 4 messages Nov 29, 2023 – Dec 2, 2023 SoundWire

lore
Share & tools
lore

Vinod Koul

author maintainer
#0 lore raw

PATCH 1/1 soundwire: amd: drop bus freq calculation and set 'max_clk_freq'

max_dr_freq and curr_dr_freq is calculated and set in sdw_bus_master_add(). Setting in the driver is reduanant, so drop that. Set max_clk_freq instead.

---
 drivers/soundwire/amd_manager.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/soundwire/amd_manager.c +2 -2
index a3b1f4e6f0f9..f54bb4dd2d10 100644
@@ -950,13 +950,13 @@ static int amd_sdw_manager_probe(struct platform_device *pdev)
 
 	amd_manager->reg_mask = &sdw_manager_reg_mask_array[amd_manager->instance];
 	params = &amd_manager->bus.params;
-	params->max_dr_freq = AMD_SDW_DEFAULT_CLK_FREQ * 2;
-	params->curr_dr_freq = AMD_SDW_DEFAULT_CLK_FREQ * 2;
+
 	params->col = AMD_SDW_DEFAULT_COLUMNS;
 	params->row = AMD_SDW_DEFAULT_ROWS;
 	prop = &amd_manager->bus.prop;
 	prop->clk_freq = &amd_sdw_freq_tbl[0];
 	prop->mclk_freq = AMD_SDW_BUS_BASE_FREQ;
+	prop->max_clk_freq = AMD_SDW_DEFAULT_CLK_FREQ;
 
 	ret = sdw_bus_master_add(&amd_manager->bus, dev, dev->fwnode);
 	if (ret) {
Signature · 1 line
2.41.0
#1 lore raw
Quoted 3 lines · Vinod Koul

max_dr_freq and curr_dr_freq is calculated and set in sdw_bus_master_add(). Setting in the driver is reduanant, so drop that. Set max_clk_freq instead.

LGTM

Quoted 26 lines
---
 drivers/soundwire/amd_manager.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/soundwire/amd_manager.c +2 -2
index a3b1f4e6f0f9..f54bb4dd2d10 100644
@@ -950,13 +950,13 @@ static int amd_sdw_manager_probe(struct platform_device *pdev)
 
 	amd_manager->reg_mask = &sdw_manager_reg_mask_array[amd_manager->instance];
 	params = &amd_manager->bus.params;
-	params->max_dr_freq = AMD_SDW_DEFAULT_CLK_FREQ * 2;
-	params->curr_dr_freq = AMD_SDW_DEFAULT_CLK_FREQ * 2;
+
 	params->col = AMD_SDW_DEFAULT_COLUMNS;
 	params->row = AMD_SDW_DEFAULT_ROWS;
 	prop = &amd_manager->bus.prop;
 	prop->clk_freq = &amd_sdw_freq_tbl[0];
 	prop->mclk_freq = AMD_SDW_BUS_BASE_FREQ;
+	prop->max_clk_freq = AMD_SDW_DEFAULT_CLK_FREQ;
 
 	ret = sdw_bus_master_add(&amd_manager->bus, dev, dev->fwnode);
 	if (ret) {
author maintainer Reviewed-by Foo bar Tested-by Foo bar
#2 lore raw
Quoted 5 lines · Mukunda,Vijendar
Quoted 3 lines · Vinod Koul

max_dr_freq and curr_dr_freq is calculated and set in sdw_bus_master_add(). Setting in the driver is reduanant, so drop that. Set max_clk_freq instead.

LGTM

Right way would be add a proper tag like

or better to test the patch and update with

Signature · 1 line
~Vinod
#3 lore raw
Quoted 6 lines · Vinod Koul
Quoted 5 lines · Mukunda,Vijendar
Quoted 3 lines · Vinod Koul

max_dr_freq and curr_dr_freq is calculated and set in sdw_bus_master_add(). Setting in the driver is reduanant, so drop that. Set max_clk_freq instead.

LGTM

Verified on AMD platforms.

Quoted 6 lines

Right way would be add a proper tag like

or better to test the patch and update with