ARM: tegra: emc: Derating support
authorAlex Waterman <alexw@nvidia.com>
Wed, 3 Jul 2013 21:55:14 +0000 (14:55 -0700)
committerDan Willemsen <dwillemsen@nvidia.com>
Sat, 14 Sep 2013 20:39:20 +0000 (13:39 -0700)
commitc91b6211385d982a2de6838b20fdc026a924ca6e
treecb2c0f7879b6a2b43d7a1b57ed59ed49654fadb8
parent7bf34674c9e2828dabb851962e9611a03c24ecd7
ARM: tegra: emc: Derating support

Add support for derating via keeping two separate sets of EMC tables.
One set is nominal, the other set is derated. Based on the temperature
reported by the DRAM the EMC thermal driver can specify which set of
tables the EMC driver should use when swapping frequencies.

This patch also adds support for a more graduated response to rising
temperature. The DRAM reports 3 levels of refresh and derating
requirements:

  0x4: Refresh x2
  0x5: Refresh x4
  0x6: Refresh x4 + derating

The particular combination of refresh modification and derating is now
picked based on the particular level of throttling necessary.

This feature is not imlpemented in older chips. The old approach is
maintained - just a 4x refresh timing for all temperature throttle
states.

Reviewed-on: http://git-master/r/252624
(cherry picked from commit 5073cf9a13344c7e9c35475bce17539615ec4956)
Change-Id: I16f0477a0b0eadc194c9f1f48a66a0bf098b0df3
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/257646
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
arch/arm/mach-tegra/tegra11_emc.c
arch/arm/mach-tegra/tegra14_emc.c
arch/arm/mach-tegra/tegra3_emc.c
arch/arm/mach-tegra/tegra_emc.h
arch/arm/mach-tegra/tegra_emc_therm.c
include/linux/platform_data/tegra_emc.h