mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 11:37:06 +02:00
clk: qcom: Add QCOM_CLK_BOOT_CRITICAL flag
Some clks are critical and required to be on during probe to sync-state, and also later needs to controlled by consumers. Add QCOM_CLK_BOOT_CRITICAL flag to achieve turning on clk during probe and also register wih clk framework so consumers can control after boot. Change-Id: I7465828ede6cea5614cada6b49f428f84780e995 Signed-off-by: Vivek Aknurwar <viveka@codeaurora.org>
This commit is contained in:
parent
f0e9ac4de0
commit
cc59dbb6d2
|
|
@ -288,12 +288,13 @@ int devm_clk_register_regmap(struct device *dev, struct clk_regmap *rclk)
|
|||
else if (dev && dev->parent)
|
||||
rclk->regmap = dev_get_regmap(dev->parent, NULL);
|
||||
|
||||
if (rclk->flags & QCOM_CLK_IS_CRITICAL) {
|
||||
if (rclk->flags & QCOM_CLK_IS_CRITICAL || rclk->flags & QCOM_CLK_BOOT_CRITICAL) {
|
||||
ops = rclk->hw.init->ops;
|
||||
if (ops && ops->enable)
|
||||
ops->enable(&rclk->hw);
|
||||
|
||||
return 0;
|
||||
if (rclk->flags & QCOM_CLK_IS_CRITICAL)
|
||||
return 0;
|
||||
}
|
||||
|
||||
ret = devm_clk_hw_register(dev, &rclk->hw);
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ struct clk_regmap {
|
|||
struct list_head list_node;
|
||||
struct device *dev;
|
||||
#define QCOM_CLK_IS_CRITICAL BIT(0)
|
||||
#define QCOM_CLK_BOOT_CRITICAL BIT(1)
|
||||
unsigned long flags;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user