[PATCH v2 02/32] clk: at91: pmc: Move macro to header file
From: Ryan.Wanner
Date: Tue Jun 24 2025 - 11:23:06 EST
From: Ryan Wanner <Ryan.Wanner@xxxxxxxxxxxxx>
Move this macro to the header file as it is used by more than one driver
file.
Signed-off-by: Ryan Wanner <Ryan.Wanner@xxxxxxxxxxxxx>
---
drivers/clk/at91/pmc.h | 3 +++
drivers/clk/at91/sama7d65.c | 3 ---
drivers/clk/at91/sama7g5.c | 3 ---
3 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/clk/at91/pmc.h b/drivers/clk/at91/pmc.h
index 0b721a65b77f..63d4c425bed5 100644
--- a/drivers/clk/at91/pmc.h
+++ b/drivers/clk/at91/pmc.h
@@ -21,6 +21,9 @@
#define AT91_CLK_PD_HW(h) ((struct clk_parent_data){ .hw = (h) })
+/* Used to create an array entry identifying a PLL by its components. */
+#define PLL_IDS_TO_ARR_ENTRY(_id, _comp) { PLL_ID_##_id, PLL_COMPID_##_comp}
+
extern spinlock_t pmc_pcr_lock;
struct pmc_data {
diff --git a/drivers/clk/at91/sama7d65.c b/drivers/clk/at91/sama7d65.c
index a5d40df8b2f2..b74813a288a8 100644
--- a/drivers/clk/at91/sama7d65.c
+++ b/drivers/clk/at91/sama7d65.c
@@ -428,9 +428,6 @@ static struct sama7d65_pll {
},
};
-/* Used to create an array entry identifying a PLL by its components. */
-#define PLL_IDS_TO_ARR_ENTRY(_id, _comp) { PLL_ID_##_id, PLL_COMPID_##_comp}
-
/*
* Master clock (MCK[0..9]) description
* @n: clock name
diff --git a/drivers/clk/at91/sama7g5.c b/drivers/clk/at91/sama7g5.c
index 8385badc1c70..bf6092fea217 100644
--- a/drivers/clk/at91/sama7g5.c
+++ b/drivers/clk/at91/sama7g5.c
@@ -341,9 +341,6 @@ static struct sama7g5_pll {
},
};
-/* Used to create an array entry identifying a PLL by its components. */
-#define PLL_IDS_TO_ARR_ENTRY(_id, _comp) { PLL_ID_##_id, PLL_COMPID_##_comp}
-
/*
* Master clock (MCK[1..4]) description
* @n: clock name
--
2.43.0