arch: imx9: allow last CCM root index

CCM_CR_COUNT is defined as the last CCM root index in the non-SCMI tables, and CCM_CR_PALCAMESCAN also uses that value. Use a strict greater-than check so root 94 reaches the CCM register helpers.

Generated-by: OpenAI Codex
Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
This commit is contained in:
Old-Ding
2026-07-06 22:04:14 +08:00
committed by Xiang Xiao
parent 147134a3fb
commit 0841476239
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -67,7 +67,7 @@ int imx9_ccm_configure_root_clock(int root, int mux, uint32_t div)
{
uint32_t value;
if (root >= CCM_CR_COUNT || div == 0 || div > 255 || mux >= ROOT_MUX_MAX)
if (root > CCM_CR_COUNT || div == 0 || div > 255 || mux >= ROOT_MUX_MAX)
{
return -EINVAL;
}
@@ -103,7 +103,7 @@ int imx9_ccm_configure_root_clock(int root, int mux, uint32_t div)
int imx9_ccm_root_clock_on(int root, bool enabled)
{
if (root >= CCM_CR_COUNT)
if (root > CCM_CR_COUNT)
{
return -EINVAL;
}
+2 -2
View File
@@ -270,7 +270,7 @@ int imx9_ccm_configure_root_clock(int root, int src, uint32_t div)
uint32_t value;
int i;
if (root >= CCM_CR_COUNT || div == 0 || div > 255)
if (root > CCM_CR_COUNT || div == 0 || div > 255)
{
return -EINVAL;
}
@@ -321,7 +321,7 @@ int imx9_ccm_configure_root_clock(int root, int src, uint32_t div)
int imx9_ccm_root_clock_on(int root, bool enabled)
{
if (root >= CCM_CR_COUNT)
if (root > CCM_CR_COUNT)
{
return -EINVAL;
}