Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'phy-fixes-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy

Pull phy fixes from Vinod Koul:

- Fix for mediatek driver warning for variable used uninitialized and
for wrong pll math

* tag 'phy-fixes-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy:
phy: mediatek: hdmi: mt8195: fix wrong pll calculus
phy: mediatek: hdmi: mt8195: fix uninitialized variable usage in pll_calc

+4 -8
+4 -8
drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c
··· 213 213 u64 tmds_clk, pixel_clk, da_hdmitx21_ref_ck, ns_hdmipll_ck, pcw; 214 214 u8 txpredivs[4] = { 2, 4, 6, 12 }; 215 215 u32 fbkdiv_low; 216 - int i, ret; 216 + int i; 217 217 218 218 pixel_clk = rate; 219 219 tmds_clk = pixel_clk; ··· 271 271 * [32,24] 9bit integer, [23,0]:24bit fraction 272 272 */ 273 273 pcw = div_u64(((u64)ns_hdmipll_ck) << PCW_DECIMAL_WIDTH, 274 - da_hdmitx21_ref_ck / PLL_FBKDIV_HS3); 274 + da_hdmitx21_ref_ck * PLL_FBKDIV_HS3); 275 275 276 276 if (pcw > GENMASK_ULL(32, 0)) 277 277 return -EINVAL; ··· 288 288 posdiv2 = 1; 289 289 290 290 /* Digital clk divider, max /32 */ 291 - digital_div = div_u64((u64)ns_hdmipll_ck, posdiv1 / posdiv2 / pixel_clk); 291 + digital_div = div_u64(ns_hdmipll_ck, posdiv1 * posdiv2 * pixel_clk); 292 292 if (!(digital_div <= 32 && digital_div >= 1)) 293 293 return -EINVAL; 294 294 295 - mtk_hdmi_pll_set_hw(hw, PLL_PREDIV, fbkdiv_high, fbkdiv_low, 295 + return mtk_hdmi_pll_set_hw(hw, PLL_PREDIV, fbkdiv_high, fbkdiv_low, 296 296 PLL_FBKDIV_HS3, posdiv1, posdiv2, txprediv, 297 297 txposdiv, digital_div); 298 - if (ret) 299 - return -EINVAL; 300 - 301 - return 0; 302 298 } 303 299 304 300 static int mtk_hdmi_pll_drv_setting(struct clk_hw *hw)