aboutsummaryrefslogtreecommitdiff
path: root/include/clk.h
diff options
context:
space:
mode:
authorPatrice Chotard2017-07-25 13:24:45 +0200
committerMarek Vasut2017-07-28 23:34:46 +0200
commitb108d8a0de3ddc6fe8aae55bc54e3edc69b4778b (patch)
treec29d26cc338509987683a9b7ce90b7174f724311 /include/clk.h
parentd38a8ea19c1d82296619557069618aaefc1ad977 (diff)
clk: fix compilation errors for poplar platform
Move clk_release_all() prototype and definition inside OF_CONTROL flag to avoid following compilation error for poplar platform: aarch64: + poplar +drivers/usb/host/built-in.o: In function `ehci_usb_remove': +drivers/usb/host/ehci-generic.c:159: undefined reference to `clk_release_all' +drivers/usb/host/built-in.o: In function `ehci_usb_probe': +drivers/usb/host/ehci-generic.c:133: undefined reference to `clk_release_all' +make[1]: *** [u-boot] Error 139 +make: *** [sub-make] Error 2 Introduced by 4e542c4 clk: add clk_release_all() Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Diffstat (limited to 'include/clk.h')
-rw-r--r--include/clk.h35
1 files changed, 21 insertions, 14 deletions
diff --git a/include/clk.h b/include/clk.h
index a905a4143fa..c5988f78a8f 100644
--- a/include/clk.h
+++ b/include/clk.h
@@ -98,6 +98,21 @@ int clk_get_by_index(struct udevice *dev, int index, struct clk *clk);
* @return 0 if OK, or a negative error code.
*/
int clk_get_by_name(struct udevice *dev, const char *name, struct clk *clk);
+
+/**
+ * clk_release_all() - Disable (turn off)/Free an array of previously
+ * requested clocks.
+ *
+ * For each clock contained in the clock array, this function will check if
+ * clock has been previously requested and then will disable and free it.
+ *
+ * @clk: A clock struct array that was previously successfully
+ * requested by clk_request/get_by_*().
+ * @count Number of clock contained in the array
+ * @return zero on success, or -ve error code.
+ */
+int clk_release_all(struct clk *clk, int count);
+
#else
static inline int clk_get_by_index(struct udevice *dev, int index,
struct clk *clk)
@@ -110,6 +125,12 @@ static inline int clk_get_by_name(struct udevice *dev, const char *name,
{
return -ENOSYS;
}
+
+static inline int clk_release_all(struct clk *clk, int count)
+{
+ return -ENOSYS;
+}
+
#endif
/**
@@ -174,20 +195,6 @@ int clk_enable(struct clk *clk);
*/
int clk_disable(struct clk *clk);
-/**
- * clk_release_all() - Disable (turn off)/Free an array of previously
- * requested clocks.
- *
- * For each clock contained in the clock array, this function will check if
- * clock has been previously requested and then will disable and free it.
- *
- * @clk: A clock struct array that was previously successfully
- * requested by clk_request/get_by_*().
- * @count Number of clock contained in the array
- * @return zero on success, or -ve error code.
- */
-int clk_release_all(struct clk *clk, int count);
-
int soc_clk_dump(void);
#endif