clk: at91: mark ddr clocks as critical
authorClaudiu Beznea <claudiu.beznea@microchip.com>
Thu, 8 Dec 2022 11:45:13 +0000 (13:45 +0200)
committerClaudiu Beznea <claudiu.beznea@microchip.com>
Mon, 9 Jan 2023 12:05:41 +0000 (14:05 +0200)
Mark DDR clocks as critical for AT91 devices. These clocks are enabled
by bootloader when initializing DDR and needs to stay enabled. Up to
this patch the DDR clocks were requested from drivers/memory/atmel-sdramc.c
which does only clock request and enable. There is no need to have
a separate driver just for this, thus the atmel-sdramc.c will be deleted
in a subsequent patch.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20221208114515.35179-2-claudiu.beznea@microchip.com
15 files changed:
drivers/clk/at91/at91rm9200.c
drivers/clk/at91/at91sam9260.c
drivers/clk/at91/at91sam9g45.c
drivers/clk/at91/at91sam9n12.c
drivers/clk/at91/at91sam9rl.c
drivers/clk/at91/at91sam9x5.c
drivers/clk/at91/clk-peripheral.c
drivers/clk/at91/clk-system.c
drivers/clk/at91/dt-compat.c
drivers/clk/at91/pmc.h
drivers/clk/at91/sam9x60.c
drivers/clk/at91/sama5d2.c
drivers/clk/at91/sama5d3.c
drivers/clk/at91/sama5d4.c
drivers/clk/at91/sama7g5.c

index 16870943a13e544e22876baef6c1e14063d25a67..0b860126d589eee06376360e962b18328e043ba3 100644 (file)
@@ -183,7 +183,7 @@ static void __init at91rm9200_pmc_setup(struct device_node *np)
        for (i = 0; i < ARRAY_SIZE(at91rm9200_systemck); i++) {
                hw = at91_clk_register_system(regmap, at91rm9200_systemck[i].n,
                                              at91rm9200_systemck[i].p,
-                                             at91rm9200_systemck[i].id);
+                                             at91rm9200_systemck[i].id, 0);
                if (IS_ERR(hw))
                        goto err_free;
 
index 11550e50cd9f5826b96463624cc1bf6dcb8538e0..b521f470428ff205f627a6ca4c69cafddecdb019 100644 (file)
@@ -460,7 +460,7 @@ static void __init at91sam926x_pmc_setup(struct device_node *np,
        for (i = 0; i < data->num_sck; i++) {
                hw = at91_clk_register_system(regmap, data->sck[i].n,
                                              data->sck[i].p,
-                                             data->sck[i].id);
+                                             data->sck[i].id, 0);
                if (IS_ERR(hw))
                        goto err_free;
 
index 8c9344451f4659b4e86bd10ead809b6dc27156e0..5099669ddcbd49c9e1ecf7328f0773f5e0c20cb4 100644 (file)
@@ -40,9 +40,14 @@ static const struct clk_pll_characteristics plla_characteristics = {
 static const struct {
        char *n;
        char *p;
+       unsigned long flags;
        u8 id;
 } at91sam9g45_systemck[] = {
-       { .n = "ddrck", .p = "masterck_div", .id = 2 },
+       /*
+        * ddrck feeds DDR controller and is enabled by bootloader thus we need
+        * to keep it enabled in case there is no Linux consumer for it.
+        */
+       { .n = "ddrck", .p = "masterck_div", .id = 2, .flags = CLK_IS_CRITICAL },
        { .n = "uhpck", .p = "usbck",        .id = 6 },
        { .n = "pck0",  .p = "prog0",        .id = 8 },
        { .n = "pck1",  .p = "prog1",        .id = 9 },
@@ -198,7 +203,8 @@ static void __init at91sam9g45_pmc_setup(struct device_node *np)
        for (i = 0; i < ARRAY_SIZE(at91sam9g45_systemck); i++) {
                hw = at91_clk_register_system(regmap, at91sam9g45_systemck[i].n,
                                              at91sam9g45_systemck[i].p,
-                                             at91sam9g45_systemck[i].id);
+                                             at91sam9g45_systemck[i].id,
+                                             at91sam9g45_systemck[i].flags);
                if (IS_ERR(hw))
                        goto err_free;
 
index 0bb19400d1992dde99f7a242cdfc52f4cc7788bb..08a10e12d08dfc22c2a3acd7bb450014a63eb48c 100644 (file)
@@ -54,9 +54,14 @@ static const struct clk_pll_characteristics pllb_characteristics = {
 static const struct {
        char *n;
        char *p;
+       unsigned long flags;
        u8 id;
 } at91sam9n12_systemck[] = {
-       { .n = "ddrck", .p = "masterck_div", .id = 2 },
+       /*
+        * ddrck feeds DDR controller and is enabled by bootloader thus we need
+        * to keep it enabled in case there is no Linux consumer for it.
+        */
+       { .n = "ddrck", .p = "masterck_div", .id = 2, .flags = CLK_IS_CRITICAL },
        { .n = "lcdck", .p = "masterck_div", .id = 3 },
        { .n = "uhpck", .p = "usbck",        .id = 6 },
        { .n = "udpck", .p = "usbck",        .id = 7 },
@@ -223,7 +228,8 @@ static void __init at91sam9n12_pmc_setup(struct device_node *np)
        for (i = 0; i < ARRAY_SIZE(at91sam9n12_systemck); i++) {
                hw = at91_clk_register_system(regmap, at91sam9n12_systemck[i].n,
                                              at91sam9n12_systemck[i].p,
-                                             at91sam9n12_systemck[i].id);
+                                             at91sam9n12_systemck[i].id,
+                                             at91sam9n12_systemck[i].flags);
                if (IS_ERR(hw))
                        goto err_free;
 
@@ -236,7 +242,7 @@ static void __init at91sam9n12_pmc_setup(struct device_node *np)
                                                         at91sam9n12_periphck[i].n,
                                                         "masterck_div",
                                                         at91sam9n12_periphck[i].id,
-                                                        &range, INT_MIN);
+                                                        &range, INT_MIN, 0);
                if (IS_ERR(hw))
                        goto err_free;
 
index b992137bab02a931650e46ad6c77e8c1ac1796d1..1a1b6b2bb0e35aa810a0835ae1a38d50193c0a30 100644 (file)
@@ -160,7 +160,7 @@ static void __init at91sam9rl_pmc_setup(struct device_node *np)
        for (i = 0; i < ARRAY_SIZE(at91sam9rl_systemck); i++) {
                hw = at91_clk_register_system(regmap, at91sam9rl_systemck[i].n,
                                              at91sam9rl_systemck[i].p,
-                                             at91sam9rl_systemck[i].id);
+                                             at91sam9rl_systemck[i].id, 0);
                if (IS_ERR(hw))
                        goto err_free;
 
index 3857db2e144bf513bd587a08f70481d8810d00a3..13e589c9590704474b41e95a8d3a611e97e3aebc 100644 (file)
@@ -41,9 +41,14 @@ static const struct clk_pll_characteristics plla_characteristics = {
 static const struct {
        char *n;
        char *p;
+       unsigned long flags;
        u8 id;
 } at91sam9x5_systemck[] = {
-       { .n = "ddrck", .p = "masterck_div", .id = 2 },
+       /*
+        * ddrck feeds DDR controller and is enabled by bootloader thus we need
+        * to keep it enabled in case there is no Linux consumer for it.
+        */
+       { .n = "ddrck", .p = "masterck_div", .id = 2, .flags = CLK_IS_CRITICAL },
        { .n = "smdck", .p = "smdclk",   .id = 4 },
        { .n = "uhpck", .p = "usbck",    .id = 6 },
        { .n = "udpck", .p = "usbck",    .id = 7 },
@@ -248,7 +253,8 @@ static void __init at91sam9x5_pmc_setup(struct device_node *np,
        for (i = 0; i < ARRAY_SIZE(at91sam9x5_systemck); i++) {
                hw = at91_clk_register_system(regmap, at91sam9x5_systemck[i].n,
                                              at91sam9x5_systemck[i].p,
-                                             at91sam9x5_systemck[i].id);
+                                             at91sam9x5_systemck[i].id,
+                                             at91sam9x5_systemck[i].flags);
                if (IS_ERR(hw))
                        goto err_free;
 
@@ -256,7 +262,8 @@ static void __init at91sam9x5_pmc_setup(struct device_node *np,
        }
 
        if (has_lcdck) {
-               hw = at91_clk_register_system(regmap, "lcdck", "masterck_div", 3);
+               hw = at91_clk_register_system(regmap, "lcdck", "masterck_div",
+                                             3, 0);
                if (IS_ERR(hw))
                        goto err_free;
 
@@ -269,7 +276,7 @@ static void __init at91sam9x5_pmc_setup(struct device_node *np,
                                                         at91sam9x5_periphck[i].n,
                                                         "masterck_div",
                                                         at91sam9x5_periphck[i].id,
-                                                        &range, INT_MIN);
+                                                        &range, INT_MIN, 0);
                if (IS_ERR(hw))
                        goto err_free;
 
@@ -282,7 +289,7 @@ static void __init at91sam9x5_pmc_setup(struct device_node *np,
                                                         extra_pcks[i].n,
                                                         "masterck_div",
                                                         extra_pcks[i].id,
-                                                        &range, INT_MIN);
+                                                        &range, INT_MIN, 0);
                if (IS_ERR(hw))
                        goto err_free;
 
index 5104d4025484c825e5a58857e78012d704d41638..93ea685e27f679dd4067579236c0c8660ee34e68 100644 (file)
@@ -445,7 +445,7 @@ at91_clk_register_sam9x5_peripheral(struct regmap *regmap, spinlock_t *lock,
                                    const struct clk_pcr_layout *layout,
                                    const char *name, const char *parent_name,
                                    u32 id, const struct clk_range *range,
-                                   int chg_pid)
+                                   int chg_pid, unsigned long flags)
 {
        struct clk_sam9x5_peripheral *periph;
        struct clk_init_data init;
@@ -462,12 +462,12 @@ at91_clk_register_sam9x5_peripheral(struct regmap *regmap, spinlock_t *lock,
        init.name = name;
        init.parent_names = &parent_name;
        init.num_parents = 1;
+       init.flags = flags;
        if (chg_pid < 0) {
-               init.flags = 0;
                init.ops = &sam9x5_peripheral_ops;
        } else {
-               init.flags = CLK_SET_RATE_GATE | CLK_SET_PARENT_GATE |
-                            CLK_SET_RATE_PARENT;
+               init.flags |= CLK_SET_RATE_GATE | CLK_SET_PARENT_GATE |
+                             CLK_SET_RATE_PARENT;
                init.ops = &sam9x5_peripheral_chg_ops;
        }
 
index 80720fd1a9cfd3f33987da64bef3b2bef3923804..10193650429eb6d908cc850b31ffcefb123f5718 100644 (file)
@@ -105,7 +105,7 @@ static const struct clk_ops system_ops = {
 
 struct clk_hw * __init
 at91_clk_register_system(struct regmap *regmap, const char *name,
-                        const char *parent_name, u8 id)
+                        const char *parent_name, u8 id, unsigned long flags)
 {
        struct clk_system *sys;
        struct clk_hw *hw;
@@ -123,7 +123,7 @@ at91_clk_register_system(struct regmap *regmap, const char *name,
        init.ops = &system_ops;
        init.parent_names = &parent_name;
        init.num_parents = 1;
-       init.flags = CLK_SET_RATE_PARENT;
+       init.flags = CLK_SET_RATE_PARENT | flags;
 
        sys->id = id;
        sys->hw.init = &init;
index 85a964cb2d89ee7a19a7318b3d9435cb323c00cb..97f67e23ef80b363b9108e2f4fb4fdd4879b31fc 100644 (file)
@@ -493,18 +493,28 @@ of_at91_clk_periph_setup(struct device_node *np, u8 type)
                                                          parent_name, id);
                } else {
                        struct clk_range range = CLK_RANGE(0, 0);
+                       unsigned long flags = 0;
 
                        of_at91_get_clk_range(periphclknp,
                                              "atmel,clk-output-range",
                                              &range);
 
+                       /*
+                        * mpddr_clk feed DDR controller and is enabled by
+                        * bootloader thus we need to keep it enabled in case
+                        * there is no Linux consumer for it.
+                        */
+                       if (!strcmp(periphclknp->name, "mpddr_clk"))
+                               flags = CLK_IS_CRITICAL;
+
                        hw = at91_clk_register_sam9x5_peripheral(regmap,
                                                                 &pmc_pcr_lock,
                                                                 &dt_pcr_layout,
                                                                 name,
                                                                 parent_name,
                                                                 id, &range,
-                                                                INT_MIN);
+                                                                INT_MIN,
+                                                                flags);
                }
 
                if (IS_ERR(hw))
@@ -879,6 +889,8 @@ static void __init of_at91rm9200_clk_sys_setup(struct device_node *np)
                return;
 
        for_each_child_of_node(np, sysclknp) {
+               unsigned long flags = 0;
+
                if (of_property_read_u32(sysclknp, "reg", &id))
                        continue;
 
@@ -887,7 +899,16 @@ static void __init of_at91rm9200_clk_sys_setup(struct device_node *np)
 
                parent_name = of_clk_get_parent_name(sysclknp, 0);
 
-               hw = at91_clk_register_system(regmap, name, parent_name, id);
+               /*
+                * ddrck feeds DDR controller and is enabled by bootloader thus
+                * we need to keep it enabled in case there is no Linux consumer
+                * for it.
+                */
+               if (!strcmp(sysclknp->name, "ddrck"))
+                       flags = CLK_IS_CRITICAL;
+
+               hw = at91_clk_register_system(regmap, name, parent_name, id,
+                                             flags);
                if (IS_ERR(hw))
                        continue;
 
index efe4975bddc3b9800cd96373c4c250953dfba1f0..1b3ca7dd9b57dcb859096ea8125a6c4d260495e0 100644 (file)
@@ -199,7 +199,7 @@ at91_clk_register_sam9x5_peripheral(struct regmap *regmap, spinlock_t *lock,
                                    const struct clk_pcr_layout *layout,
                                    const char *name, const char *parent_name,
                                    u32 id, const struct clk_range *range,
-                                   int chg_pid);
+                                   int chg_pid, unsigned long flags);
 
 struct clk_hw * __init
 at91_clk_register_pll(struct regmap *regmap, const char *name,
@@ -242,7 +242,7 @@ at91sam9x5_clk_register_smd(struct regmap *regmap, const char *name,
 
 struct clk_hw * __init
 at91_clk_register_system(struct regmap *regmap, const char *name,
-                        const char *parent_name, u8 id);
+                        const char *parent_name, u8 id, unsigned long flags);
 
 struct clk_hw * __init
 at91sam9x5_clk_register_usb(struct regmap *regmap, const char *name,
index 9ea4ce501badee30111760c9997ee1808d63714c..ac070db58195e196cf02950a19ad48797d27d8f8 100644 (file)
@@ -75,9 +75,14 @@ static const struct clk_pcr_layout sam9x60_pcr_layout = {
 static const struct {
        char *n;
        char *p;
+       unsigned long flags;
        u8 id;
 } sam9x60_systemck[] = {
-       { .n = "ddrck",  .p = "masterck_div", .id = 2 },
+       /*
+        * ddrck feeds DDR controller and is enabled by bootloader thus we need
+        * to keep it enabled in case there is no Linux consumer for it.
+        */
+       { .n = "ddrck",  .p = "masterck_div", .id = 2, .flags = CLK_IS_CRITICAL },
        { .n = "uhpck",  .p = "usbck",    .id = 6 },
        { .n = "pck0",   .p = "prog0",    .id = 8 },
        { .n = "pck1",   .p = "prog1",    .id = 9 },
@@ -86,6 +91,7 @@ static const struct {
 
 static const struct {
        char *n;
+       unsigned long flags;
        u8 id;
 } sam9x60_periphck[] = {
        { .n = "pioA_clk",   .id = 2, },
@@ -132,7 +138,11 @@ static const struct {
        { .n = "pioD_clk",   .id = 44, },
        { .n = "tcb1_clk",   .id = 45, },
        { .n = "dbgu_clk",   .id = 47, },
-       { .n = "mpddr_clk",  .id = 49, },
+       /*
+        * mpddr_clk feeds DDR controller and is enabled by bootloader thus we
+        * need to keep it enabled in case there is no Linux consumer for it.
+        */
+       { .n = "mpddr_clk",  .id = 49, .flags = CLK_IS_CRITICAL },
 };
 
 static const struct {
@@ -315,7 +325,8 @@ static void __init sam9x60_pmc_setup(struct device_node *np)
        for (i = 0; i < ARRAY_SIZE(sam9x60_systemck); i++) {
                hw = at91_clk_register_system(regmap, sam9x60_systemck[i].n,
                                              sam9x60_systemck[i].p,
-                                             sam9x60_systemck[i].id);
+                                             sam9x60_systemck[i].id,
+                                             sam9x60_systemck[i].flags);
                if (IS_ERR(hw))
                        goto err_free;
 
@@ -328,7 +339,8 @@ static void __init sam9x60_pmc_setup(struct device_node *np)
                                                         sam9x60_periphck[i].n,
                                                         "masterck_div",
                                                         sam9x60_periphck[i].id,
-                                                        &range, INT_MIN);
+                                                        &range, INT_MIN,
+                                                        sam9x60_periphck[i].flags);
                if (IS_ERR(hw))
                        goto err_free;
 
index 84156dc52bff53f1f3a0a41e4b6d51ac5cb342ec..c0e3e1a4bbf3d7dd50ea0659330259c9fe4a4136 100644 (file)
@@ -40,9 +40,14 @@ static const struct clk_pcr_layout sama5d2_pcr_layout = {
 static const struct {
        char *n;
        char *p;
+       unsigned long flags;
        u8 id;
 } sama5d2_systemck[] = {
-       { .n = "ddrck", .p = "masterck_div", .id = 2 },
+       /*
+        * ddrck feeds DDR controller and is enabled by bootloader thus we need
+        * to keep it enabled in case there is no Linux consumer for it.
+        */
+       { .n = "ddrck", .p = "masterck_div", .id = 2, .flags = CLK_IS_CRITICAL },
        { .n = "lcdck", .p = "masterck_div", .id = 3 },
        { .n = "uhpck", .p = "usbck",        .id = 6 },
        { .n = "udpck", .p = "usbck",        .id = 7 },
@@ -97,6 +102,7 @@ static const struct {
 
 static const struct {
        char *n;
+       unsigned long flags;
        u8 id;
 } sama5d2_periphck[] = {
        { .n = "dma0_clk",    .id = 6, },
@@ -104,7 +110,11 @@ static const struct {
        { .n = "aes_clk",     .id = 9, },
        { .n = "aesb_clk",    .id = 10, },
        { .n = "sha_clk",     .id = 12, },
-       { .n = "mpddr_clk",   .id = 13, },
+       /*
+        * mpddr_clk feeds DDR controller and is enabled by bootloader thus we
+        * need to keep it enabled in case there is no Linux consumer for it.
+        */
+       { .n = "mpddr_clk",   .id = 13, .flags = CLK_IS_CRITICAL },
        { .n = "matrix0_clk", .id = 15, },
        { .n = "sdmmc0_hclk", .id = 31, },
        { .n = "sdmmc1_hclk", .id = 32, },
@@ -302,7 +312,8 @@ static void __init sama5d2_pmc_setup(struct device_node *np)
        for (i = 0; i < ARRAY_SIZE(sama5d2_systemck); i++) {
                hw = at91_clk_register_system(regmap, sama5d2_systemck[i].n,
                                              sama5d2_systemck[i].p,
-                                             sama5d2_systemck[i].id);
+                                             sama5d2_systemck[i].id,
+                                             sama5d2_systemck[i].flags);
                if (IS_ERR(hw))
                        goto err_free;
 
@@ -315,7 +326,8 @@ static void __init sama5d2_pmc_setup(struct device_node *np)
                                                         sama5d2_periphck[i].n,
                                                         "masterck_div",
                                                         sama5d2_periphck[i].id,
-                                                        &range, INT_MIN);
+                                                        &range, INT_MIN,
+                                                        sama5d2_periphck[i].flags);
                if (IS_ERR(hw))
                        goto err_free;
 
@@ -329,7 +341,7 @@ static void __init sama5d2_pmc_setup(struct device_node *np)
                                                         "h32mxck",
                                                         sama5d2_periph32ck[i].id,
                                                         &sama5d2_periph32ck[i].r,
-                                                        INT_MIN);
+                                                        INT_MIN, 0);
                if (IS_ERR(hw))
                        goto err_free;
 
index 7e93c6edf30559c0429bc8e6a58f0f6941aa510f..ad6068b884de430c9145bb614f6a1a343ede4c3d 100644 (file)
@@ -40,9 +40,14 @@ static const struct clk_pcr_layout sama5d3_pcr_layout = {
 static const struct {
        char *n;
        char *p;
+       unsigned long flags;
        u8 id;
 } sama5d3_systemck[] = {
-       { .n = "ddrck", .p = "masterck_div", .id = 2 },
+       /*
+        * ddrck feeds DDR controller and is enabled by bootloader thus we need
+        * to keep it enabled in case there is no Linux consumer for it.
+        */
+       { .n = "ddrck", .p = "masterck_div", .id = 2, .flags = CLK_IS_CRITICAL },
        { .n = "lcdck", .p = "masterck_div", .id = 3 },
        { .n = "smdck", .p = "smdclk",       .id = 4 },
        { .n = "uhpck", .p = "usbck",        .id = 6 },
@@ -56,6 +61,7 @@ static const struct {
        char *n;
        u8 id;
        struct clk_range r;
+       unsigned long flags;
 } sama5d3_periphck[] = {
        { .n = "dbgu_clk", .id = 2, },
        { .n = "hsmc_clk", .id = 5, },
@@ -99,7 +105,11 @@ static const struct {
        { .n = "tdes_clk", .id = 44, },
        { .n = "trng_clk", .id = 45, },
        { .n = "fuse_clk", .id = 48, },
-       { .n = "mpddr_clk", .id = 49, },
+       /*
+        * mpddr_clk feeds DDR controller and is enabled by bootloader thus we
+        * need to keep it enabled in case there is no Linux consumer for it.
+        */
+       { .n = "mpddr_clk", .id = 49, .flags = CLK_IS_CRITICAL },
 };
 
 static void __init sama5d3_pmc_setup(struct device_node *np)
@@ -222,7 +232,8 @@ static void __init sama5d3_pmc_setup(struct device_node *np)
        for (i = 0; i < ARRAY_SIZE(sama5d3_systemck); i++) {
                hw = at91_clk_register_system(regmap, sama5d3_systemck[i].n,
                                              sama5d3_systemck[i].p,
-                                             sama5d3_systemck[i].id);
+                                             sama5d3_systemck[i].id,
+                                             sama5d3_systemck[i].flags);
                if (IS_ERR(hw))
                        goto err_free;
 
@@ -236,7 +247,8 @@ static void __init sama5d3_pmc_setup(struct device_node *np)
                                                         "masterck_div",
                                                         sama5d3_periphck[i].id,
                                                         &sama5d3_periphck[i].r,
-                                                        INT_MIN);
+                                                        INT_MIN,
+                                                        sama5d3_periphck[i].flags);
                if (IS_ERR(hw))
                        goto err_free;
 
index 1a14a9bce30879103e03170b460e2c18c7db9e04..e876ec971a39c97fc9514098de2e40d8ae573053 100644 (file)
@@ -39,9 +39,14 @@ static const struct clk_pcr_layout sama5d4_pcr_layout = {
 static const struct {
        char *n;
        char *p;
+       unsigned long flags;
        u8 id;
 } sama5d4_systemck[] = {
-       { .n = "ddrck", .p = "masterck_div", .id = 2 },
+       /*
+        * ddrck feeds DDR controller and is enabled by bootloader thus we need
+        * to keep it enabled in case there is no Linux consumer for it.
+        */
+       { .n = "ddrck", .p = "masterck_div", .id = 2, .flags = CLK_IS_CRITICAL },
        { .n = "lcdck", .p = "masterck_div", .id = 3 },
        { .n = "smdck", .p = "smdclk",       .id = 4 },
        { .n = "uhpck", .p = "usbck",        .id = 6 },
@@ -103,12 +108,17 @@ static const struct {
 
 static const struct {
        char *n;
+       unsigned long flags;
        u8 id;
 } sama5d4_periphck[] = {
        { .n = "dma0_clk", .id = 8 },
        { .n = "cpkcc_clk", .id = 10 },
        { .n = "aesb_clk", .id = 13 },
-       { .n = "mpddr_clk", .id = 16 },
+       /*
+        * mpddr_clk feeds DDR controller and is enabled by bootloader thus we
+        * need to keep it enabled in case there is no Linux consumer for it.
+        */
+       { .n = "mpddr_clk", .id = 16, .flags = CLK_IS_CRITICAL },
        { .n = "matrix0_clk", .id = 18 },
        { .n = "vdec_clk", .id = 19 },
        { .n = "dma1_clk", .id = 50 },
@@ -245,7 +255,8 @@ static void __init sama5d4_pmc_setup(struct device_node *np)
        for (i = 0; i < ARRAY_SIZE(sama5d4_systemck); i++) {
                hw = at91_clk_register_system(regmap, sama5d4_systemck[i].n,
                                              sama5d4_systemck[i].p,
-                                             sama5d4_systemck[i].id);
+                                             sama5d4_systemck[i].id,
+                                             sama5d4_systemck[i].flags);
                if (IS_ERR(hw))
                        goto err_free;
 
@@ -258,7 +269,8 @@ static void __init sama5d4_pmc_setup(struct device_node *np)
                                                         sama5d4_periphck[i].n,
                                                         "masterck_div",
                                                         sama5d4_periphck[i].id,
-                                                        &range, INT_MIN);
+                                                        &range, INT_MIN,
+                                                        sama5d4_periphck[i].flags);
                if (IS_ERR(hw))
                        goto err_free;
 
@@ -271,7 +283,7 @@ static void __init sama5d4_pmc_setup(struct device_node *np)
                                                         sama5d4_periph32ck[i].n,
                                                         "h32mxck",
                                                         sama5d4_periph32ck[i].id,
-                                                        &range, INT_MIN);
+                                                        &range, INT_MIN, 0);
                if (IS_ERR(hw))
                        goto err_free;
 
index 9a213ba9e58b0a28fed2cdcc4de8c316f765433c..f135b662f1ffd92687c4f766781f932fe07b9230 100644 (file)
@@ -1068,7 +1068,7 @@ static void __init sama7g5_pmc_setup(struct device_node *np)
        for (i = 0; i < ARRAY_SIZE(sama7g5_systemck); i++) {
                hw = at91_clk_register_system(regmap, sama7g5_systemck[i].n,
                                              sama7g5_systemck[i].p,
-                                             sama7g5_systemck[i].id);
+                                             sama7g5_systemck[i].id, 0);
                if (IS_ERR(hw))
                        goto err_free;
 
@@ -1083,7 +1083,7 @@ static void __init sama7g5_pmc_setup(struct device_node *np)
                                                sama7g5_periphck[i].id,
                                                &sama7g5_periphck[i].r,
                                                sama7g5_periphck[i].chgp ? 0 :
-                                               INT_MIN);
+                                               INT_MIN, 0);
                if (IS_ERR(hw))
                        goto err_free;