summaryrefslogtreecommitdiffstats
path: root/bsps/arm/imxrt/start/bspstart.c
diff options
context:
space:
mode:
authorChristian Mauderer <christian.mauderer@embedded-brains.de>2023-04-12 17:34:31 +0200
committerChristian Mauderer <christian.mauderer@embedded-brains.de>2023-07-24 14:41:06 +0200
commit4a3ace7c7a464409cc5da859a04e2d3ba533b69a (patch)
tree978793787e4550ee92f97dcbacc5bbea52492d2c /bsps/arm/imxrt/start/bspstart.c
parentbsps/imsrt: Make flash config more flexible (diff)
downloadrtems-4a3ace7c7a464409cc5da859a04e2d3ba533b69a.tar.bz2
bsps/imxrt: Add imxrt1166_cm7_saltshaker BSP
The BSP is for a custom i.MXRT1166 based board. At the moment, only the cortex M7 is supported.
Diffstat (limited to 'bsps/arm/imxrt/start/bspstart.c')
-rw-r--r--bsps/arm/imxrt/start/bspstart.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/bsps/arm/imxrt/start/bspstart.c b/bsps/arm/imxrt/start/bspstart.c
index 7398ffbe73..1d583d7ca4 100644
--- a/bsps/arm/imxrt/start/bspstart.c
+++ b/bsps/arm/imxrt/start/bspstart.c
@@ -59,6 +59,13 @@ static void imxrt_disable_wait_mode(void)
* every WFI.
*/
CLOCK_SetMode(kCLOCK_ModeRun);
+#elif IMXRT_IS_MIMXRT11xx
+ /*
+ * i.MX RT11xx doesn't support disabling power saving for WFI. On the other
+ * hand it doesn't have a separate interrupt controller like the i.MX RT1050.
+ * So a power save during WFI is only annoying during debugging but doesn't
+ * hurt otherwise.
+ */
#else
#error Disabling wait mode not implemented for this chip.
#endif
@@ -129,6 +136,22 @@ uint32_t bsp_fdt_map_intr(const uint32_t *intr, size_t icells)
return intr[0];
}
+/*
+ * Clock frequencies for peripherals like SD card. These are used by libbsd
+ * drivers.
+ */
+#if IMXRT_IS_MIMXRT11xx
+uint32_t
+imx_ccm_sdhci_hz(void)
+{
+ /*
+ * We don't know which SDHCI is used. So just return the clock frequency
+ * of the first SDHCI and hope the best.
+ */
+ return CLOCK_GetRootClockFreq(kCLOCK_Root_Usdhc1);
+}
+#endif
+
/* Make sure to pull in the flash headers */
__attribute__((used)) static const void *hdr_dcd = &imxrt_dcd_data;
__attribute__((used)) static const void *hdr_ivt = &imxrt_image_vector_table;