Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175630
b: refs/heads/master
c: a16b1f7
h: refs/heads/master
v: v3
  • Loading branch information
Paul Walmsley authored and paul committed Dec 12, 2009
1 parent cba5f3b commit 7b27e1f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 84 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: 718bfd76932c566f79eb55083693ef0b68071bf8
refs/heads/master: a16b1f7f8692163e0c6b4741d8980837dfca75f1
88 changes: 5 additions & 83 deletions trunk/arch/arm/mach-omap2/omap_hwmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,11 @@ static void _sysc_enable(struct omap_hwmod *oh)

/* XXX OCP ENAWAKEUP bit? */

/*
* XXX The clock framework should handle this, by
* calling into this code. But this must wait until the
* clock structures are tagged with omap_hwmod entries
*/
if (oh->flags & HWMOD_SET_DEFAULT_CLOCKACT &&
oh->sysconfig->sysc_flags & SYSC_HAS_CLOCKACTIVITY)
_set_clockactivity(oh, oh->sysconfig->clockact, &v);
Expand Down Expand Up @@ -913,33 +918,6 @@ static int _shutdown(struct omap_hwmod *oh)
return 0;
}

/**
* _write_clockact_lock - set the module's clockactivity bits
* @oh: struct omap_hwmod *
* @clockact: CLOCKACTIVITY field bits
*
* Writes the CLOCKACTIVITY bits @clockact to the hwmod @oh
* OCP_SYSCONFIG register. Returns -EINVAL if the hwmod is in the
* wrong state or returns 0.
*/
static int _write_clockact_lock(struct omap_hwmod *oh, u8 clockact)
{
u32 v;

if (!oh->sysconfig ||
!(oh->sysconfig->sysc_flags & SYSC_HAS_CLOCKACTIVITY))
return -EINVAL;

mutex_lock(&omap_hwmod_mutex);
v = oh->_sysc_cache;
_set_clockactivity(oh, clockact, &v);
_write_sysconfig(v, oh);
mutex_unlock(&omap_hwmod_mutex);

return 0;
}


/**
* _setup - do initial configuration of omap_hwmod
* @oh: struct omap_hwmod *
Expand Down Expand Up @@ -1492,62 +1470,6 @@ int omap_hwmod_del_initiator_dep(struct omap_hwmod *oh,
return _del_initiator_dep(oh, init_oh);
}

/**
* omap_hwmod_set_clockact_none - set clockactivity test to BOTH
* @oh: struct omap_hwmod *
*
* On some modules, this function can affect the wakeup latency vs.
* power consumption balance. Intended to be called by the
* omap_device layer. Passes along the return value from
* _write_clockact_lock().
*/
int omap_hwmod_set_clockact_both(struct omap_hwmod *oh)
{
return _write_clockact_lock(oh, CLOCKACT_TEST_BOTH);
}

/**
* omap_hwmod_set_clockact_none - set clockactivity test to MAIN
* @oh: struct omap_hwmod *
*
* On some modules, this function can affect the wakeup latency vs.
* power consumption balance. Intended to be called by the
* omap_device layer. Passes along the return value from
* _write_clockact_lock().
*/
int omap_hwmod_set_clockact_main(struct omap_hwmod *oh)
{
return _write_clockact_lock(oh, CLOCKACT_TEST_MAIN);
}

/**
* omap_hwmod_set_clockact_none - set clockactivity test to ICLK
* @oh: struct omap_hwmod *
*
* On some modules, this function can affect the wakeup latency vs.
* power consumption balance. Intended to be called by the
* omap_device layer. Passes along the return value from
* _write_clockact_lock().
*/
int omap_hwmod_set_clockact_iclk(struct omap_hwmod *oh)
{
return _write_clockact_lock(oh, CLOCKACT_TEST_ICLK);
}

/**
* omap_hwmod_set_clockact_none - set clockactivity test to NONE
* @oh: struct omap_hwmod *
*
* On some modules, this function can affect the wakeup latency vs.
* power consumption balance. Intended to be called by the
* omap_device layer. Passes along the return value from
* _write_clockact_lock().
*/
int omap_hwmod_set_clockact_none(struct omap_hwmod *oh)
{
return _write_clockact_lock(oh, CLOCKACT_TEST_NONE);
}

/**
* omap_hwmod_enable_wakeup - allow device to wake up the system
* @oh: struct omap_hwmod *
Expand Down

0 comments on commit 7b27e1f

Please sign in to comment.