]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
arm: imx9: Fix LPCG number in ccm_reg structure
authorYe Li <ye.li@nxp.com>
Fri, 19 Sep 2025 06:58:34 +0000 (14:58 +0800)
committerFabio Estevam <festevam@gmail.com>
Sun, 21 Sep 2025 12:08:50 +0000 (09:08 -0300)
The LPCG number on iMX93 and iMX91 is 127 not 122. The wrong
value is used in ccm_reg structure and Coverity reports several
issues as out-of-bounds write.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
arch/arm/include/asm/arch-imx9/clock.h

index ffaf6b5f7d81d73af1702dff64cf9b15ea521ad9..ddc84d2c9ed92e7ee730cd589b417e9787a940ce 100644 (file)
@@ -111,7 +111,7 @@ struct ccm_reg {
        u32 reserved_3[192];
        struct ccm_lpcg_oscpll clk_oscplls[19]; /* 0x5000 */
        u32 reserved_4[2768];
-       struct ccm_lpcg_oscpll clk_lpcgs[122]; /* 0x8000 */
+       struct ccm_lpcg_oscpll clk_lpcgs[127]; /* 0x8000 */
 };
 
 struct ana_pll_reg_elem {