Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 339931
b: refs/heads/master
c: b153883
h: refs/heads/master
i:
  339929: b5fac64
  339927: 1fcc561
v: v3
  • Loading branch information
Jon Hunter committed Nov 12, 2012
1 parent d8a3f1f commit 3ed3483
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 25 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d7aba5540d3f1aa2d7248d2f81506d994b25b327
refs/heads/master: b1538832191d59e29b1077e64cf416a7617b45bc
9 changes: 4 additions & 5 deletions trunk/arch/arm/mach-omap2/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,7 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
oh_name = name;
}

omap_hwmod_setup_one(oh_name);
oh = omap_hwmod_lookup(oh_name);

if (!oh)
return -ENODEV;

Expand Down Expand Up @@ -306,8 +304,6 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
if (IS_ERR(timer->fclk))
return -ENODEV;

omap_hwmod_enable(oh);

/* FIXME: Need to remove hard-coded test on timer ID */
if (gptimer_id != 12) {
struct clk *src;
Expand All @@ -316,13 +312,16 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
if (IS_ERR(src)) {
res = -EINVAL;
} else {
res = __omap_dm_timer_set_source(timer->fclk, src);
res = clk_set_parent(timer->fclk, src);
if (IS_ERR_VALUE(res))
pr_warn("%s: %s cannot set source\n",
__func__, oh->name);
clk_put(src);
}
}

omap_hwmod_setup_one(oh_name);
omap_hwmod_enable(oh);
__omap_dm_timer_init_regs(timer);

if (posted)
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/plat-omap/dmtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
* 675 Mass Ave, Cambridge, MA 02139, USA.
*/

#include <linux/clk.h>
#include <linux/module.h>
#include <linux/io.h>
#include <linux/device.h>
Expand Down
19 changes: 0 additions & 19 deletions trunk/arch/arm/plat-omap/include/plat/dmtimer.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
* 675 Mass Ave, Cambridge, MA 02139, USA.
*/

#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/platform_device.h>
Expand Down Expand Up @@ -397,24 +396,6 @@ static inline void __omap_dm_timer_override_errata(struct omap_dm_timer *timer,
timer->errata &= ~errata;
}

static inline int __omap_dm_timer_set_source(struct clk *timer_fck,
struct clk *parent)
{
int ret;

clk_disable(timer_fck);
ret = clk_set_parent(timer_fck, parent);
clk_enable(timer_fck);

/*
* When the functional clock disappears, too quick writes seem
* to cause an abort. XXX Is this still necessary?
*/
__delay(300000);

return ret;
}

static inline void __omap_dm_timer_stop(struct omap_dm_timer *timer,
int posted, unsigned long rate)
{
Expand Down

0 comments on commit 3ed3483

Please sign in to comment.