Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 313373
b: refs/heads/master
c: 6615975
h: refs/heads/master
i:
  313371: b5f9318
v: v3
  • Loading branch information
Jon Hunter authored and Tony Lindgren committed Jun 14, 2012
1 parent 7854f29 commit bd5cd28
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 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: 0b30ec1cb7f1b0134b16670f886baaf3521b083c
refs/heads/master: 6615975bc58a1234bd401a7ff231dae85631fd58
4 changes: 2 additions & 2 deletions trunk/arch/arm/mach-omap1/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ static int __init omap1_dm_timer_init(void)
}

pdata->set_timer_src = omap1_dm_timer_set_src;
pdata->needs_manual_reset = 1;
pdata->timer_capability = OMAP_TIMER_ALWON;
pdata->timer_capability = OMAP_TIMER_ALWON |
OMAP_TIMER_NEEDS_RESET;

ret = platform_device_add_data(pdev, pdata, sizeof(*pdata));
if (ret) {
Expand Down
9 changes: 3 additions & 6 deletions trunk/arch/arm/plat-omap/dmtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ static void omap_dm_timer_reset(struct omap_dm_timer *timer)

int omap_dm_timer_prepare(struct omap_dm_timer *timer)
{
struct dmtimer_platform_data *pdata = timer->pdev->dev.platform_data;
int ret;

timer->fclk = clk_get(&timer->pdev->dev, "fck");
Expand All @@ -145,7 +144,7 @@ int omap_dm_timer_prepare(struct omap_dm_timer *timer)
return -EINVAL;
}

if (pdata->needs_manual_reset)
if (timer->capability & OMAP_TIMER_NEEDS_RESET)
omap_dm_timer_reset(timer);

ret = omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_32_KHZ);
Expand Down Expand Up @@ -363,13 +362,11 @@ EXPORT_SYMBOL_GPL(omap_dm_timer_start);
int omap_dm_timer_stop(struct omap_dm_timer *timer)
{
unsigned long rate = 0;
struct dmtimer_platform_data *pdata;

if (unlikely(!timer))
return -EINVAL;

pdata = timer->pdev->dev.platform_data;
if (!pdata->needs_manual_reset)
if (!(timer->capability & OMAP_TIMER_NEEDS_RESET))
rate = clk_get_rate(timer->fclk);

__omap_dm_timer_stop(timer, timer->posted, rate);
Expand Down Expand Up @@ -694,7 +691,7 @@ static int __devinit omap_dm_timer_probe(struct platform_device *pdev)
timer->capability = pdata->timer_capability;

/* Skip pm_runtime_enable for OMAP1 */
if (!pdata->needs_manual_reset) {
if (!(timer->capability & OMAP_TIMER_NEEDS_RESET)) {
pm_runtime_enable(&pdev->dev);
pm_runtime_irq_safe(&pdev->dev);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/plat-omap/include/plat/dmtimer.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
#define OMAP_TIMER_SECURE 0x80000000
#define OMAP_TIMER_ALWON 0x40000000
#define OMAP_TIMER_HAS_PWM 0x20000000
#define OMAP_TIMER_NEEDS_RESET 0x10000000

struct omap_timer_capability_dev_attr {
u32 timer_capability;
Expand Down Expand Up @@ -90,7 +91,6 @@ struct timer_regs {

struct dmtimer_platform_data {
int (*set_timer_src)(struct platform_device *pdev, int source);
u32 needs_manual_reset:1;
u32 timer_capability;
};

Expand Down

0 comments on commit bd5cd28

Please sign in to comment.