This is an automated email from the ASF dual-hosted git repository.
xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 08414762396 arch: imx9: allow last CCM root index
08414762396 is described below
commit 08414762396f82e4c4d3c18d08b67235cb8ead2f
Author: Old-Ding <[email protected]>
AuthorDate: Mon Jul 6 11:17:38 2026 +0800
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 <[email protected]>
---
arch/arm/src/imx9/imx9_ccm.c | 4 ++--
arch/arm64/src/imx9/imx9_ccm.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/src/imx9/imx9_ccm.c b/arch/arm/src/imx9/imx9_ccm.c
index 6adef244fae..341af3cec13 100644
--- a/arch/arm/src/imx9/imx9_ccm.c
+++ b/arch/arm/src/imx9/imx9_ccm.c
@@ -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;
}
diff --git a/arch/arm64/src/imx9/imx9_ccm.c b/arch/arm64/src/imx9/imx9_ccm.c
index 7cb1fef9629..b0e85b9fd8a 100644
--- a/arch/arm64/src/imx9/imx9_ccm.c
+++ b/arch/arm64/src/imx9/imx9_ccm.c
@@ -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;
}