summaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx/imx9/scmi/common.h
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2025-10-06 13:20:24 -0600
committerTom Rini <trini@konsulko.com>2025-10-06 13:20:24 -0600
commit0eaa4b337336dbbe93395d1f2ccc18937eaafea2 (patch)
treec01e661d69181dceca68f56a4849a9bd04608521 /arch/arm/mach-imx/imx9/scmi/common.h
parente50b1e8715011def8aff1588081a2649a2c6cd47 (diff)
parent4e4a9de31de2a5f395ee25c59e4026422fbcb27e (diff)
Merge branch 'next'
Merge the outstanding changes from the 'next' branch to master.
Diffstat (limited to 'arch/arm/mach-imx/imx9/scmi/common.h')
-rw-r--r--arch/arm/mach-imx/imx9/scmi/common.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/imx9/scmi/common.h b/arch/arm/mach-imx/imx9/scmi/common.h
new file mode 100644
index 00000000000..dd4675402c7
--- /dev/null
+++ b/arch/arm/mach-imx/imx9/scmi/common.h
@@ -0,0 +1,41 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2025 NXP
+ */
+
+#ifndef _SCMI_CLOCK_COMMON_H_
+#define _SCMI_CLOCK_COMMON_H_
+
+#ifdef CONFIG_IMX94
+#define IMX_PLAT 94
+#include <imx94-clock.h>
+#include <imx94-power.h>
+
+#define IMX94_CLK_FLEXSPI1 IMX94_CLK_XSPI1
+#endif
+
+#ifdef CONFIG_IMX95
+#define IMX_PLAT 95
+#include <imx95-clock.h>
+#include <imx95-power.h>
+
+#define IMX95_PD_M70 IMX95_PD_M7
+#endif
+
+#define IMX_PLAT_STR__(plat) # plat
+#define IMX_PLAT_STR_(IMX_PLAT) IMX_PLAT_STR__(IMX_PLAT)
+#define IMX_PLAT_STR IMX_PLAT_STR_(IMX_PLAT)
+
+#define SCMI_CLK__(plat, clk) IMX ## plat ## _CLK_ ## clk
+#define SCMI_CLK_(plat, clk) SCMI_CLK__(plat, clk)
+#define SCMI_CLK(clk) SCMI_CLK_(IMX_PLAT, clk)
+
+#define SCMI_PD__(plat, pd) IMX ## plat ## _PD_ ## pd
+#define SCMI_PD_(plat, pd) SCMI_PD__(plat, pd)
+#define SCMI_PD(pd) SCMI_PD_(IMX_PLAT, pd)
+
+#define SCMI_CPU__(plat) MXC_CPU_IMX ## plat
+#define SCMI_CPU_(plat) SCMI_CPU__(plat)
+#define SCMI_CPU SCMI_CPU_(IMX_PLAT)
+
+#endif