ARM: tegra: clock: Add Tegra3 EMC activity monitor support
authorAlex Frid <afrid@nvidia.com>
Sun, 12 Jun 2011 06:29:55 +0000 (23:29 -0700)
committerDan Willemsen <dwillemsen@nvidia.com>
Thu, 1 Dec 2011 05:47:11 +0000 (21:47 -0800)
commit01e3b43a8dcfcf48f8f6fef42c4673194f8fef4b
treeb8162d4399cb294953a526a5ef0bc186a72729a7
parentd21b89daf5e816d00855133f5e31cd40ce104d9b
ARM: tegra: clock: Add Tegra3 EMC activity monitor support

Added EMC clock control using Tegra3 activity monitoring device.
The target EMC frequency floor is set based on average activity
and short term boost. Average EMC activity is obtained directly
from monitoring h/w featuring 1st order IIR activity filter. The
boost frequency is calculated by s/w - exponentially increasing/
decreasing when sampled EMC activity has crossed upper/lower boost
watermarks.

The implementation is interrupt driven - periodic sampling is hidden
by h/w. The tune-able debugfs parameters are:

/sys/kernel/debug/tegra_actmon/emc/boost_step - boost rate increase
step (% of max EMC frequency)
/sys/kernel/debug/tegra_actmon/emc/boost_rate_inc - boost rate
increase factor (%)
/sys/kernel/debug/tegra_actmon/emc/boost_rate_dec - boost rate
decrease factor (%)

/sys/kernel/debug/tegra_actmon/emc/boost_threshold_up - upper
activity watermark for boost increase (% of current EMC frequency)
/sys/kernel/debug/tegra_actmon/emc/boost_threshold_dn - lower
activity watermark for boost decrease (% of current EMC frequency)

Original-Change-Id: I385c6e0a75da42dada792db6b4018b68fea8f23b
Reviewed-on: http://git-master/r/36790
Reviewed-by: Niket Sirsi <nsirsi@nvidia.com>
Tested-by: Niket Sirsi <nsirsi@nvidia.com>

Rebase-Id: R0ac50b162b8e86237986885e115996f755b1e00a
arch/arm/mach-tegra/Makefile
arch/arm/mach-tegra/include/mach/iomap.h
arch/arm/mach-tegra/tegra3_actmon.c [new file with mode: 0644]
arch/arm/mach-tegra/tegra3_clocks.c