]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
clk: ti: clk-k3: use IS_ENABLED macro and fix the clock-data order
authorJayesh Choudhary <j-choudhary@ti.com>
Wed, 12 Jun 2024 09:11:13 +0000 (14:41 +0530)
committerTom Rini <trini@konsulko.com>
Wed, 19 Jun 2024 18:07:43 +0000 (12:07 -0600)
Use IS_ENABLED macro for the platform clock-data list and add them
in alphabetical order.

Reviewed-by: Bryan Brattlof <bb@ti.com>
Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
drivers/clk/ti/clk-k3.c

index 41e5022ea0cd1cdc6f6bfdd1e59894e76dcf8114..9e17755c2467ce1213d8a253fb62c01ea119740c 100644 (file)
@@ -59,6 +59,24 @@ static void clk_add_map(struct ti_clk_data *data, struct clk *clk,
 }
 
 static const struct soc_attr ti_k3_soc_clk_data[] = {
+#if IS_ENABLED(CONFIG_SOC_K3_AM625)
+       {
+               .family = "AM62X",
+               .data = &am62x_clk_platdata,
+       },
+#endif
+#if IS_ENABLED(CONFIG_SOC_K3_AM62A7)
+       {
+               .family = "AM62AX",
+               .data = &am62ax_clk_platdata,
+       },
+#endif
+#if IS_ENABLED(CONFIG_SOC_K3_AM62P5)
+       {
+               .family = "AM62PX",
+               .data = &am62px_clk_platdata,
+       },
+#endif
 #if IS_ENABLED(CONFIG_SOC_K3_J721E)
        {
                .family = "J721E",
@@ -68,35 +86,18 @@ static const struct soc_attr ti_k3_soc_clk_data[] = {
                .family = "J7200",
                .data = &j7200_clk_platdata,
        },
-#elif CONFIG_SOC_K3_J721S2
+#endif
+#if IS_ENABLED(CONFIG_SOC_K3_J721S2)
        {
                .family = "J721S2",
                .data = &j721s2_clk_platdata,
        },
 #endif
-#ifdef CONFIG_SOC_K3_AM625
-       {
-               .family = "AM62X",
-               .data = &am62x_clk_platdata,
-       },
-#endif
-#ifdef CONFIG_SOC_K3_AM62A7
-       {
-               .family = "AM62AX",
-               .data = &am62ax_clk_platdata,
-       },
-#endif
-#ifdef CONFIG_SOC_K3_J784S4
+#if IS_ENABLED(CONFIG_SOC_K3_J784S4)
        {
                .family = "J784S4",
                .data = &j784s4_clk_platdata,
        },
-#endif
-#ifdef CONFIG_SOC_K3_AM62P5
-       {
-               .family = "AM62PX",
-               .data = &am62px_clk_platdata,
-       },
 #endif
        { /* sentinel */ }
 };