Skip to content

Commit bacf743

Browse files
Aidan MacDonaldbebarino
authored andcommitted
clk: ingenic: Allow specifying common clock flags
Provide a flags field for clocks under the ingenic-cgu driver, which can be used to set generic common clock framework flags on the created clocks. For example, the CLK_IS_CRITICAL flag is needed for some clocks (such as CPU or memory) to stop them being automatically disabled. Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com> Reviewed-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20220428164454.17908-2-aidanmacdonald.0x0@gmail.com Tested-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com> # On X1000 and X1830 Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent 3123109 commit bacf743

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

drivers/clk/ingenic/cgu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ static int ingenic_register_clock(struct ingenic_cgu *cgu, unsigned idx)
660660
ingenic_clk->idx = idx;
661661

662662
clk_init.name = clk_info->name;
663-
clk_init.flags = 0;
663+
clk_init.flags = clk_info->flags;
664664
clk_init.parent_names = parent_names;
665665

666666
caps = clk_info->type;

drivers/clk/ingenic/cgu.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ struct ingenic_cgu_custom_info {
136136
* struct ingenic_cgu_clk_info - information about a clock
137137
* @name: name of the clock
138138
* @type: a bitmask formed from CGU_CLK_* values
139+
* @flags: common clock flags to set on this clock
139140
* @parents: an array of the indices of potential parents of this clock
140141
* within the clock_info array of the CGU, or -1 in entries
141142
* which correspond to no valid parent
@@ -161,6 +162,8 @@ struct ingenic_cgu_clk_info {
161162
CGU_CLK_CUSTOM = BIT(7),
162163
} type;
163164

165+
unsigned long flags;
166+
164167
int parents[4];
165168

166169
union {

0 commit comments

Comments
 (0)