|
@@ -36,6 +36,7 @@
|
|
*/
|
|
*/
|
|
|
|
|
|
#include <linux/clk.h>
|
|
#include <linux/clk.h>
|
|
|
|
+#include <linux/clk-provider.h>
|
|
#include <linux/module.h>
|
|
#include <linux/module.h>
|
|
#include <linux/io.h>
|
|
#include <linux/io.h>
|
|
#include <linux/device.h>
|
|
#include <linux/device.h>
|
|
@@ -533,6 +534,12 @@ int omap_dm_timer_set_source(struct omap_dm_timer *timer, int source)
|
|
if (IS_ERR(timer->fclk))
|
|
if (IS_ERR(timer->fclk))
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
|
|
+#if defined(CONFIG_COMMON_CLK)
|
|
|
|
+ /* Check if the clock has configurable parents */
|
|
|
|
+ if (clk_hw_get_num_parents(__clk_get_hw(timer->fclk)) < 2)
|
|
|
|
+ return 0;
|
|
|
|
+#endif
|
|
|
|
+
|
|
switch (source) {
|
|
switch (source) {
|
|
case OMAP_TIMER_SRC_SYS_CLK:
|
|
case OMAP_TIMER_SRC_SYS_CLK:
|
|
parent_name = "timer_sys_ck";
|
|
parent_name = "timer_sys_ck";
|