mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 01:10:04 +00:00
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>
This commit is contained in:
parent
3123109284
commit
bacf743e92
2 changed files with 4 additions and 1 deletions
|
@ -660,7 +660,7 @@ static int ingenic_register_clock(struct ingenic_cgu *cgu, unsigned idx)
|
||||||
ingenic_clk->idx = idx;
|
ingenic_clk->idx = idx;
|
||||||
|
|
||||||
clk_init.name = clk_info->name;
|
clk_init.name = clk_info->name;
|
||||||
clk_init.flags = 0;
|
clk_init.flags = clk_info->flags;
|
||||||
clk_init.parent_names = parent_names;
|
clk_init.parent_names = parent_names;
|
||||||
|
|
||||||
caps = clk_info->type;
|
caps = clk_info->type;
|
||||||
|
|
|
@ -136,6 +136,7 @@ struct ingenic_cgu_custom_info {
|
||||||
* struct ingenic_cgu_clk_info - information about a clock
|
* struct ingenic_cgu_clk_info - information about a clock
|
||||||
* @name: name of the clock
|
* @name: name of the clock
|
||||||
* @type: a bitmask formed from CGU_CLK_* values
|
* @type: a bitmask formed from CGU_CLK_* values
|
||||||
|
* @flags: common clock flags to set on this clock
|
||||||
* @parents: an array of the indices of potential parents of this clock
|
* @parents: an array of the indices of potential parents of this clock
|
||||||
* within the clock_info array of the CGU, or -1 in entries
|
* within the clock_info array of the CGU, or -1 in entries
|
||||||
* which correspond to no valid parent
|
* which correspond to no valid parent
|
||||||
|
@ -161,6 +162,8 @@ struct ingenic_cgu_clk_info {
|
||||||
CGU_CLK_CUSTOM = BIT(7),
|
CGU_CLK_CUSTOM = BIT(7),
|
||||||
} type;
|
} type;
|
||||||
|
|
||||||
|
unsigned long flags;
|
||||||
|
|
||||||
int parents[4];
|
int parents[4];
|
||||||
|
|
||||||
union {
|
union {
|
||||||
|
|
Loading…
Reference in a new issue