#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/io.h>
-#ifdef CONFIG_COMMON_CLK
#include <linux/clk-provider.h>
-#else
-#include <linux/clk.h>
-#endif
#include <linux/delay.h>
#include <linux/err.h>
#include <linux/list.h>
static struct clockdomain *_get_clkdm(struct omap_hwmod *oh)
{
+ struct clk_hw_omap *clk;
+
if (oh->clkdm) {
return oh->clkdm;
} else if (oh->_clk) {
-#ifdef CONFIG_COMMON_CLK
- struct clk_hw_omap *clk;
-
clk = to_clk_hw_omap(__clk_get_hw(oh->_clk));
return clk->clkdm;
-#else
- return oh->_clk->clkdm;
-#endif
}
return NULL;
}
struct clk *c;
struct omap_hwmod_ocp_if *oi;
struct clockdomain *clkdm;
-#ifdef CONFIG_COMMON_CLK
struct clk_hw_omap *clk;
-#endif
if (!oh)
return NULL;
c = oi->_clk;
}
-#ifdef CONFIG_COMMON_CLK
clk = to_clk_hw_omap(__clk_get_hw(c));
clkdm = clk->clkdm;
-#else
- clkdm = c->clkdm;
-#endif
if (!clkdm)
return NULL;