Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 342424
b: refs/heads/master
c: 908b75e
h: refs/heads/master
v: v3
  • Loading branch information
Tero Kristo authored and Kevin Hilman committed Nov 5, 2012
1 parent 5a0e156 commit 84187cf
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9a1729cbaaf1a9d1fd27f80cd488ef182fe033a0
refs/heads/master: 908b75e850c4a6130b680ea7e59b00f80d4cd2d2
30 changes: 30 additions & 0 deletions trunk/arch/arm/mach-omap2/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,36 @@ static struct omap_device_pm_latency *pm_lats;
*/
int (*omap_pm_suspend)(void);

/**
* struct omap2_oscillator - Describe the board main oscillator latencies
* @startup_time: oscillator startup latency
* @shutdown_time: oscillator shutdown latency
*/
struct omap2_oscillator {
u32 startup_time;
u32 shutdown_time;
};

static struct omap2_oscillator oscillator = {
.startup_time = ULONG_MAX,
.shutdown_time = ULONG_MAX,
};

void omap_pm_setup_oscillator(u32 tstart, u32 tshut)
{
oscillator.startup_time = tstart;
oscillator.shutdown_time = tshut;
}

void omap_pm_get_oscillator(u32 *tstart, u32 *tshut)
{
if (!tstart || !tshut)
return;

*tstart = oscillator.startup_time;
*tshut = oscillator.shutdown_time;
}

static int __init _init_omap_device(char *name)
{
struct omap_hwmod *oh;
Expand Down
8 changes: 8 additions & 0 deletions trunk/arch/arm/mach-omap2/pm.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,12 @@ static inline int omap4_twl_init(void)
}
#endif

#ifdef CONFIG_PM
extern void omap_pm_setup_oscillator(u32 tstart, u32 tshut);
extern void omap_pm_get_oscillator(u32 *tstart, u32 *tshut);
#else
static inline void omap_pm_setup_oscillator(u32 tstart, u32 tshut) { }
static inline void omap_pm_get_oscillator(u32 *tstart, u32 *tshut) { }
#endif

#endif

0 comments on commit 84187cf

Please sign in to comment.