mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 23:28:29 +08:00
arch/arm/imx9: clockconfig: preparatory cleanup for i.MX93 support.
- Guard imx9_gpc.h inclusion with CONFIG_IMX9_WFI_AWAKES_AT_SYSTICK to avoid a GPC dependency on chips that lack GPC - Add depends on ARCH_CHIP_IMX95_M7 to IMX9_WFI_AWAKES_AT_SYSTICK since GPC wake configuration is i.MX95-specific - Move XTAL_FREQ and ROOT_CLOCK_OFFSET defines to imx95_clock.h - Make imx9_sm_setrootclock() and imx9_sm_getipfreq() static; they are not referenced outside this translation unit Signed-off-by: Maarten Zanders <maarten@zanders.be>
This commit is contained in:
committed by
Xiang Xiao
parent
de29af83f8
commit
6f859b56c7
@@ -49,6 +49,7 @@ endif
|
||||
config IMX9_WFI_AWAKES_AT_SYSTICK
|
||||
bool "WFI awakes at systick interrupts"
|
||||
default y
|
||||
depends on ARCH_CHIP_IMX95_M7
|
||||
---help---
|
||||
Configure the GPC to wake up from systick interrupts at WFI
|
||||
instruction
|
||||
|
||||
@@ -37,6 +37,9 @@
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define XTAL_FREQ 24000000u
|
||||
#define ROOT_CLOCK_OFFSET 41
|
||||
|
||||
typedef enum
|
||||
{
|
||||
EXT_CLK = 0,
|
||||
|
||||
@@ -37,7 +37,11 @@
|
||||
#include <arch/barriers.h>
|
||||
|
||||
#include "arm_internal.h"
|
||||
|
||||
#ifdef CONFIG_IMX9_WFI_AWAKES_AT_SYSTICK
|
||||
#include "hardware/imx9_gpc.h"
|
||||
#endif
|
||||
|
||||
#include "imx9_clockconfig.h"
|
||||
#include "imx9_scmi.h"
|
||||
|
||||
@@ -45,12 +49,6 @@
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* The base oscillator frequency is 24MHz */
|
||||
|
||||
#define XTAL_FREQ 24000000u
|
||||
|
||||
#define ROOT_CLOCK_OFFSET 41
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
@@ -87,7 +85,7 @@ void imx9_clockconfig(void)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IMX9_CLK_OVER_SCMI
|
||||
int imx9_sm_setrootclock(sm_clock_t *sm_clk)
|
||||
static int imx9_sm_setrootclock(sm_clock_t *sm_clk)
|
||||
{
|
||||
scmi_clock_rate_t rate = /* clang-format off */
|
||||
{
|
||||
@@ -156,7 +154,7 @@ int imx9_sm_setrootclock(sm_clock_t *sm_clk)
|
||||
return OK;
|
||||
}
|
||||
|
||||
int imx9_sm_getipfreq(sm_clock_t *sm_clk)
|
||||
static int imx9_sm_getipfreq(sm_clock_t *sm_clk)
|
||||
{
|
||||
scmi_clock_rate_t rate = /* clang-format off */
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user