summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@freescale.com>2014-06-05 16:54:31 +0800
committerShawn Guo <shawn.guo@freescale.com>2014-06-25 21:17:21 +0800
commit099d34405499db6bd44371b1166619f8d8b3896e (patch)
tree32bfc68966c207668eeb62db1cef4c10d0dce60d /include
parent0bec46131d88842ed862765239a6bab0971ed43b (diff)
ENGR00318063-9: clk: do not allow parent switching with another mux being child
When switching parent clock with another basic mux clock being its child, a glitch might be generated and propagated to downstream clocks through this child mux. The patch adds a flag CLK_IS_BASIC_MUX to identify the basic mux clocks, and prohibit the parent switching when the clock itself is the parent of any basic mux clock. With this check, the parent switching of a clock has to happen before the child mux switches to this clock path. Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/clk-provider.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 4e9f36a15033..0c71babde4a7 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -28,6 +28,12 @@
#define CLK_IS_BASIC BIT(5) /* Basic clk, can't do a to_clk_foo() */
#define CLK_GET_RATE_NOCACHE BIT(6) /* do not use the cached clk rate */
#define CLK_SET_RATE_NO_REPARENT BIT(7) /* don't re-parent on rate change */
+/*
+ * Basic mux clk, can't switch parent while there is another basic mux clk
+ * being its child. Otherwise, a glitch might be propagated to downstream
+ * clocks through this child mux.
+ */
+#define CLK_IS_BASIC_MUX BIT(8)
struct clk_hw;