Attention is currently required from: Shelley Chen, Taniya Das, Paul Menzel. Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/63289 )
Change subject: soc/qualcomm/common: Make clock_configure() check for exact matches ......................................................................
Patch Set 7:
(1 comment)
File src/soc/qualcomm/sc7280/clock.c:
https://review.coreboot.org/c/coreboot/+/63289/comment/5228ba17_01812297 PS7, Line 412: mdss_clk_cfg.hz = mdss_mdp_cfg[idx].hz; This isn't enough: for the (clk_type != MDSS_CLK_MDP) clocks, we never get here. Also, since this is the <= search, hz doesn't necessarily match mdss_mdp_cfg[idx].hz.
In order to make the clock_configure() check work, hz doesn't actually have to match the real physical frequency that comes out of the hardware. All that the check tests is that clk_cfg[idx].hz == hz. So the cheap way to solve this here is to just put mdss_clk_cfg.hz = hz (outside of this if-block), like the sc7180 version already does. (That makes the test kind of pointless in this case, since clock_configure() is just comparing two fake values that you gave it, but it's an easy way to avoid the extra `strict` parameter for this one function where we actually don't have a perfect match we can find.)