|
@@ -389,59 +389,6 @@ static void __init omap4_timer_init(void)
|
|
|
OMAP_SYS_TIMER(4)
|
|
|
#endif
|
|
|
|
|
|
-/**
|
|
|
- * omap2_dm_timer_set_src - change the timer input clock source
|
|
|
- * @pdev: timer platform device pointer
|
|
|
- * @source: array index of parent clock source
|
|
|
- */
|
|
|
-static int omap2_dm_timer_set_src(struct platform_device *pdev, int source)
|
|
|
-{
|
|
|
- int ret;
|
|
|
- struct clk *fclk, *parent;
|
|
|
- char *parent_name = NULL;
|
|
|
-
|
|
|
- fclk = clk_get(&pdev->dev, "fck");
|
|
|
- if (IS_ERR_OR_NULL(fclk)) {
|
|
|
- dev_err(&pdev->dev, "%s: %d: clk_get() FAILED\n",
|
|
|
- __func__, __LINE__);
|
|
|
- return -EINVAL;
|
|
|
- }
|
|
|
-
|
|
|
- switch (source) {
|
|
|
- case OMAP_TIMER_SRC_SYS_CLK:
|
|
|
- parent_name = "sys_ck";
|
|
|
- break;
|
|
|
-
|
|
|
- case OMAP_TIMER_SRC_32_KHZ:
|
|
|
- parent_name = "32k_ck";
|
|
|
- break;
|
|
|
-
|
|
|
- case OMAP_TIMER_SRC_EXT_CLK:
|
|
|
- parent_name = "alt_ck";
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
- parent = clk_get(&pdev->dev, parent_name);
|
|
|
- if (IS_ERR_OR_NULL(parent)) {
|
|
|
- dev_err(&pdev->dev, "%s: %d: clk_get() %s FAILED\n",
|
|
|
- __func__, __LINE__, parent_name);
|
|
|
- clk_put(fclk);
|
|
|
- return -EINVAL;
|
|
|
- }
|
|
|
-
|
|
|
- ret = clk_set_parent(fclk, parent);
|
|
|
- if (IS_ERR_VALUE(ret)) {
|
|
|
- dev_err(&pdev->dev, "%s: clk_set_parent() to %s FAILED\n",
|
|
|
- __func__, parent_name);
|
|
|
- ret = -EINVAL;
|
|
|
- }
|
|
|
-
|
|
|
- clk_put(parent);
|
|
|
- clk_put(fclk);
|
|
|
-
|
|
|
- return ret;
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
* omap_timer_init - build and register timer device with an
|
|
|
* associated timer hwmod
|
|
@@ -489,8 +436,6 @@ static int __init omap_timer_init(struct omap_hwmod *oh, void *unused)
|
|
|
*/
|
|
|
sscanf(oh->name, "timer%2d", &id);
|
|
|
|
|
|
- pdata->set_timer_src = omap2_dm_timer_set_src;
|
|
|
-
|
|
|
if (timer_dev_attr)
|
|
|
pdata->timer_capability = timer_dev_attr->timer_capability;
|
|
|
|