diff options
-rw-r--r-- | drivers/clk/clk.c | 5 | ||||
-rw-r--r-- | drivers/clk/sunxi/clk-sun9i-mmc.c | 12 | ||||
-rw-r--r-- | include/trace/events/clk.h | 4 |
3 files changed, 19 insertions, 2 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 647d056df88c..8a1860a36c77 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c | |||
@@ -1564,6 +1564,9 @@ static void clk_change_rate(struct clk_core *core) | |||
1564 | best_parent_rate = core->parent->rate; | 1564 | best_parent_rate = core->parent->rate; |
1565 | } | 1565 | } |
1566 | 1566 | ||
1567 | if (clk_pm_runtime_get(core)) | ||
1568 | return; | ||
1569 | |||
1567 | if (core->flags & CLK_SET_RATE_UNGATE) { | 1570 | if (core->flags & CLK_SET_RATE_UNGATE) { |
1568 | unsigned long flags; | 1571 | unsigned long flags; |
1569 | 1572 | ||
@@ -1634,6 +1637,8 @@ static void clk_change_rate(struct clk_core *core) | |||
1634 | /* handle the new child who might not be in core->children yet */ | 1637 | /* handle the new child who might not be in core->children yet */ |
1635 | if (core->new_child) | 1638 | if (core->new_child) |
1636 | clk_change_rate(core->new_child); | 1639 | clk_change_rate(core->new_child); |
1640 | |||
1641 | clk_pm_runtime_put(core); | ||
1637 | } | 1642 | } |
1638 | 1643 | ||
1639 | static int clk_core_set_rate_nolock(struct clk_core *core, | 1644 | static int clk_core_set_rate_nolock(struct clk_core *core, |
diff --git a/drivers/clk/sunxi/clk-sun9i-mmc.c b/drivers/clk/sunxi/clk-sun9i-mmc.c index a1a634253d6f..f00d8758ba24 100644 --- a/drivers/clk/sunxi/clk-sun9i-mmc.c +++ b/drivers/clk/sunxi/clk-sun9i-mmc.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <linux/clk.h> | 17 | #include <linux/clk.h> |
18 | #include <linux/clk-provider.h> | 18 | #include <linux/clk-provider.h> |
19 | #include <linux/delay.h> | ||
19 | #include <linux/init.h> | 20 | #include <linux/init.h> |
20 | #include <linux/of.h> | 21 | #include <linux/of.h> |
21 | #include <linux/of_device.h> | 22 | #include <linux/of_device.h> |
@@ -83,9 +84,20 @@ static int sun9i_mmc_reset_deassert(struct reset_controller_dev *rcdev, | |||
83 | return 0; | 84 | return 0; |
84 | } | 85 | } |
85 | 86 | ||
87 | static int sun9i_mmc_reset_reset(struct reset_controller_dev *rcdev, | ||
88 | unsigned long id) | ||
89 | { | ||
90 | sun9i_mmc_reset_assert(rcdev, id); | ||
91 | udelay(10); | ||
92 | sun9i_mmc_reset_deassert(rcdev, id); | ||
93 | |||
94 | return 0; | ||
95 | } | ||
96 | |||
86 | static const struct reset_control_ops sun9i_mmc_reset_ops = { | 97 | static const struct reset_control_ops sun9i_mmc_reset_ops = { |
87 | .assert = sun9i_mmc_reset_assert, | 98 | .assert = sun9i_mmc_reset_assert, |
88 | .deassert = sun9i_mmc_reset_deassert, | 99 | .deassert = sun9i_mmc_reset_deassert, |
100 | .reset = sun9i_mmc_reset_reset, | ||
89 | }; | 101 | }; |
90 | 102 | ||
91 | static int sun9i_a80_mmc_config_clk_probe(struct platform_device *pdev) | 103 | static int sun9i_a80_mmc_config_clk_probe(struct platform_device *pdev) |
diff --git a/include/trace/events/clk.h b/include/trace/events/clk.h index 758607226bfd..2cd449328aee 100644 --- a/include/trace/events/clk.h +++ b/include/trace/events/clk.h | |||
@@ -134,12 +134,12 @@ DECLARE_EVENT_CLASS(clk_parent, | |||
134 | 134 | ||
135 | TP_STRUCT__entry( | 135 | TP_STRUCT__entry( |
136 | __string( name, core->name ) | 136 | __string( name, core->name ) |
137 | __string( pname, parent->name ) | 137 | __string( pname, parent ? parent->name : "none" ) |
138 | ), | 138 | ), |
139 | 139 | ||
140 | TP_fast_assign( | 140 | TP_fast_assign( |
141 | __assign_str(name, core->name); | 141 | __assign_str(name, core->name); |
142 | __assign_str(pname, parent->name); | 142 | __assign_str(pname, parent ? parent->name : "none"); |
143 | ), | 143 | ), |
144 | 144 | ||
145 | TP_printk("%s %s", __get_str(name), __get_str(pname)) | 145 | TP_printk("%s %s", __get_str(name), __get_str(pname)) |