clock: mcux_ccm: add gpt ipg clock
GPT IPG clock is using GPTx_CLK_ROOT. Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
This commit is contained in:
parent
6a9407ede4
commit
46ce8741bd
|
@ -292,6 +292,17 @@ static int mcux_ccm_get_subsys_rate(const struct device *dev,
|
|||
case IMX_CCM_GPT_CLK:
|
||||
*rate = CLOCK_GetFreq(kCLOCK_PerClk);
|
||||
break;
|
||||
#ifdef CONFIG_SOC_SERIES_IMX8M
|
||||
case IMX_CCM_GPT_IPG_CLK:
|
||||
{
|
||||
uint32_t mux = CLOCK_GetRootMux(kCLOCK_RootGpt1);
|
||||
|
||||
if (mux == 0)
|
||||
*rate = OSC24M_CLK_FREQ;
|
||||
else
|
||||
*rate = 0;
|
||||
} break;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_COUNTER_MCUX_QTMR
|
||||
|
|
|
@ -70,4 +70,6 @@
|
|||
#define IMX_CCM_ECSPI2_CLK 0x1201UL
|
||||
#define IMX_CCM_ECSPI3_CLK 0x1202UL
|
||||
|
||||
#define IMX_CCM_GPT_IPG_CLK 0x1300UL
|
||||
|
||||
#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_CLOCK_IMX_CCM_H_ */
|
||||
|
|
Loading…
Reference in New Issue