5 years agoARM: tegra: power: Limit CPU rate on system EDP alarm
Alex Frid [Thu, 6 Oct 2011 04:20:21 +0000]
ARM: tegra: power: Limit CPU rate on system EDP alarm

System electrical design point (EDP) alarm is generated when system
power source (battery) over-current is detected.

Part of the system EDP management is CPU frequency capping added by
this commit. Maximum CPU clock frequency is pre-determined depending
on number of CPU cores on-line. It is combined with CPU regulator EDP
limit and applied to final CPU rate; CPU voltage is scaled down by
DVFS, respectively. The system EDP limit of CPU rate is removed after
alarm is canceled.

EDP event can be emulated via debugfs entry /d/cpu-tegra/edp_alarm.

(cherry picked from commit fa673d27766ff9513139e94a498e4c24827d7c57)

arm: tegra: power: Removed erroneous ';'

(cherry picked from commit b4b404381b2d1823b7c127858950f853428fe3b5)

Change-Id: I60ec0e87f9442b698a8824895aac0a1f955565b4
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/67823
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

Rebase-Id: R6a004bea8dfc99cd965f94035481907007bd1e32

5 years agoarm: tegra: power: Added EDP table for Tegra3 xL
Diwakar Tundlam [Mon, 5 Dec 2011 23:17:01 +0000]
arm: tegra: power: Added EDP table for Tegra3 xL

Bug 844268

Change-Id: Iddffd445401318fb0e64d6739dbf833da7daede9
Signed-off-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-on: http://git-master/r/68313
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

Rebase-Id: Rc62624a34cb15039023c46f53c1c07119dbed007

5 years agoarm: tegra: Enabled TEGRA_THERMAL_SYSFS by default
Joshua Primero [Sat, 3 Dec 2011 00:02:04 +0000]
arm: tegra: Enabled TEGRA_THERMAL_SYSFS by default

Use the Linux thermal sysfs framework by default now
which provides hysteresis and clear distinction between
thermal and cooling devices.

bug 877359

Change-Id: I3ef3e9079a8bfb500efae0b2165afd4025e5b075
Signed-off-by: Joshua Primero <jprimero@nvidia.com>
Reviewed-on: http://git-master/r/68032
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

Rebase-Id: R3aac623e10d6484e7a0bfa64e2d81f6bdf4f480c

5 years agoarm: tegra: thermal: Thermal cleanup
Joshua Primero [Tue, 22 Nov 2011 22:37:06 +0000]
arm: tegra: thermal: Thermal cleanup

Added tc1, tc2, and passive delay to thermal framework

Made thermal offsets more explicit and clean.

In throttling code, instead of using one 10 second 640000 entry,
split this into five 2 second entries.  This will give better
temperature stability.

bug 877359

Change-Id: Idc463ab18bdabb7a0472f4f6572195bf76067bd4
Signed-off-by: Joshua Primero <jprimero@nvidia.com>
Reviewed-on: http://git-master/r/68029
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>

Rebase-Id: R68a2bb662fe81636defdaa88da75cffb11712cf7

5 years agoarm: tegra: power: Updated EDP table to 9/12/2011 spec
Peter Boonstoppel [Mon, 10 Oct 2011 18:48:14 +0000]
arm: tegra: power: Updated EDP table to 9/12/2011 spec

(see bug for Excel with the new spec)

Bug 844268

(cherry picked from commit 036969082d6571a26572cfe80f62144be87e732b)

Change-Id: Iacc9081ace5629588b7634d2927d9ea5a7c8c91b
Reviewed-on: http://git-master/r/57095
Signed-off-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
Reviewed-on: http://git-master/r/68257
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>

Rebase-Id: R1d5a65cedf5c222b5368c9e883543210ae161406

5 years agotegra: treewide: Remove unused gpio-names.h includes
Dan Willemsen [Thu, 1 Dec 2011 22:28:44 +0000]
tegra: treewide: Remove unused gpio-names.h includes

Most places shouldn't be using these macros, they should get the gpio
information from the board files. Either way, all of these instances
were unused.

Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
Change-Id: Ifb76704dccb24e5e6eab4c06c79bc8e97802c6d3
Reviewed-on: http://git-master/r/68481
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

Rebase-Id: R400744dd961661a38cea2ec1afde4a6db357e644

5 years agoARM: tegra: clock: Enforce Tegra3 cbus parent assignments
Alex Frid [Fri, 18 Nov 2011 21:03:46 +0000]
ARM: tegra: clock: Enforce Tegra3 cbus parent assignments

Tegra3 graphics bus (cbus) modules do not use PLLM as a clock source
after boot. Explicitly enforced this policy now by failing set parent
API if PLLM is selected as a target for any cbus clock.

Bug 884419

Signed-off-by: Alex Frid <afrid@nvidia.com>

(cherry picked from commit eb2662b7d90af77ee01202e57afa3ed46d4f9053)

Change-Id: Ia17972c8c711d3498541ad62aef3961656433665
Reviewed-on: http://git-master/r/67832
Tested-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

Rebase-Id: R85790fb62aae8f3b7dfc5754a5c359a45a36556a

5 years agoarm: tegra: Set G-CPU L2 cache latency to 0x442/552.
Krishna Reddy [Thu, 1 Dec 2011 23:32:36 +0000]
arm: tegra: Set G-CPU L2 cache latency to 0x442/552.

also restore the L2 cache latency values after exit from LP2.
Bug 909628

Change-Id: Ia113d3511255f77ba5f5bfbfafebe43ba247818f
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/67767
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: R83fa076e3f91fbca3da82ee180a8b24dc60ec7a0

5 years agoarm: tegra: power: Tegra Thermal refactoring
Joshua Primero [Fri, 14 Oct 2011 00:49:20 +0000]
arm: tegra: power: Tegra Thermal refactoring

Refactored Thermal module so that thermal device
drivers themselves are agnostic of the thermal
framework.  Also separated throttle limit constraints
from EDP table.

Reviewed-on: http://git-master/r/57990
Reviewed-on: http://git-master/r/63338

Cherry-picked from 8d0610bdd03c3490b718f11bc2108f45cd868533.

Change-Id: I4f87889c9cdc88daac1e6173043bab1f2e7cebfd
Signed-off-by: Joshua Primero <jprimero@nvidia.com>
Reviewed-on: http://git-master/r/66551
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>

Rebase-Id: R37100c974463886fa01da5daa768e35d24c125fd

5 years agoarm: tegra: power: Device agnostic thermal driver
Joshua Primero [Tue, 4 Oct 2011 05:23:53 +0000]
arm: tegra: power: Device agnostic thermal driver

Added a thermal driver which is agonistic to the device driver
which will make it easier to port thermal devices to android

Reviewed-on: http://git-master/r/55883
Reviewed-on: http://git-master/r/59471
(cherry picked from commit b89dbb5a64bcb3124794f644e71658de83a4ab71)

Change-Id: Ib3c7100144ea0a98ac7c15e404d4d9e7737018e5
Signed-off-by: Joshua Primero <jprimero@nvidia.com>
Reviewed-on: http://git-master/r/66548
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>

Rebase-Id: R44a3c17d5434d83357c55e776ff216ba0d97992e

5 years agoARM: tegra: Pad client list of TEGRA_POWERGATE_HEG
Terje Bergstrom [Thu, 3 Nov 2011 11:58:22 +0000]
ARM: tegra: Pad client list of TEGRA_POWERGATE_HEG

Client list for TEGRA_POWERGATE_HEG was not padded with MC_CLIENT_LAST,
which causes an infinite loop if HEG is power gated.

Bug 855755

Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/62129
(cherry picked from commit b36a3ef9584ceb23bd0ed97ba662a12ec08ce957)
Change-Id: Id6ad765db682ee153c7a271e01e3c40e462db6c4
Reviewed-on: http://git-master/r/67126
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: Rcc760672dbf2cc139a5637bb12e4d02393533e4e

5 years agoARM: tegra: power: Fix-up return value
Shridhar Rasal [Wed, 23 Nov 2011 08:58:18 +0000]
ARM: tegra: power: Fix-up return value

Fixes the return value for tegra_powergate_set () when new status
to be set and current status are same.

Change-Id: Iffbc4fac239c4ea21f3026cbf33fe4fb7941aa2d
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: http://git-master/r/66404
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

Rebase-Id: Rbdab9a71478fde0902191c85ac6340b74907d70d

5 years agoARM: tegra: iommu: Clean up checkpatch and CodingStyle errors
Hiroshi DOYU [Fri, 11 Nov 2011 11:15:03 +0000]
ARM: tegra: iommu: Clean up checkpatch and CodingStyle errors

- Fixed checkpatch.pl --strict errors.
- Inserted one space around binary operators
    From Documentation/CodingStyle "3.1: Spaces".
- Removed a file path line in the head of file.
- Updated Copyright year
- Removed duplicated header inclusions

Change-Id: I750e31cf6e90a9f36e707a6278da6137e1a8ba05
Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com>
Reviewed-on: http://git-master/r/66351
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>

Rebase-Id: Rf17092562772408c52346481dbb32dec48fc3a9c

5 years agoARM: Tegra: power: Tegra3 T33 set EDP limits correctly
Diwakar Tundlam [Tue, 29 Nov 2011 01:04:23 +0000]
ARM: Tegra: power: Tegra3 T33 set EDP limits correctly

bugid 844268

Use correct regulator current value obtained from bootloader
Signed-off-by: Diwakar Tundlam <dtundlam@nvidia.com>

Change-Id: I9059a5e83c88c6fc0e933acd3c4ab6e6b9c35078
Reviewed-on: http://git-master/r/67025
Tested-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com>

Rebase-Id: Rce035e804a189df47a5b5c2a03f418d88cd9147a

5 years agoARM: tegra: dvfs: Update Tegra3 xL speedo/nominal voltage
Alex Frid [Sat, 19 Nov 2011 06:46:04 +0000]
ARM: tegra: dvfs: Update Tegra3 xL speedo/nominal voltage

Updated Tegra3 xL core speedo and nominal voltage settings.
Re-factored nominal voltage selection, since new data introduced
dependency of core voltage on both CPU and core speedo id.

Bug 841336

Signed-off-by: Alex Frid <afrid@nvidia.com>
(cherry picked from commit 3330ce743434866502fd6b33d7d1718ec4ab4675)
(cherry picked from commit a9fb4cbc865e78706c72186ebac286506cd5b301)

Change-Id: I244df08153a6a275a2fe331c72e03d03f18a8ea1
Reviewed-on: http://git-master/r/67014
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
Tested-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

Rebase-Id: Rd35cb9ac1fbcb424548e05d10d5622744394e796

5 years agoARM: tegra: dvfs: Make EMC voltage scaling board dependent
Alex Frid [Sat, 5 Nov 2011 04:06:52 +0000]
ARM: tegra: dvfs: Make EMC voltage scaling board dependent

Added minimum voltage field to Tegra3 EMC frequency scaling table.
Adjusted default (common) EMC DVFS mapping, respectively, when EMC
frequency table for the particular board/dram chip combination is

Bug 895245

Signed-off-by: Alex Frid <afrid@nvidia.com>
(cherry picked from commit 1fe4d12c4abdd08abd45eb755d3d50780cafb19c)
(cherry picked from commit 4020c6aacfd5ec3c7106cc05e720bc4c356ac58d)

Change-Id: Ia10183001996aee37259efdb533640ebf72d552a
Reviewed-on: http://git-master/r/67012
Tested-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

Rebase-Id: Rb1cb3a849c9c870b0c338a5a0a7e9cb9a7572674

5 years agoARM: tegra: clock: Update Tegra3 cbus operations
Alex Frid [Sun, 13 Nov 2011 03:16:50 +0000]
ARM: tegra: clock: Update Tegra3 cbus operations

- Doubled PLLC (cbus parent) rate to make sure that cbus clients always
  have only even dividers.

- Added new shared bus user mode - SHARED_AUTO for user (like Host1x)
  that just follow the bus, but by itself does not require bus rate
  above the minimum.

Bug 895245

Signed-off-by: Alex Frid <afrid@nvidia.com>
(cherry picked from commit e95329c67d4efc424d3408b363e092c02c066ef7)
(cherry picked from commit 773e089f2ab676e9ea8afd7aaa0458654a3772d9)

Change-Id: Ie1488f38e3cb948d69738c2eef4ae9cd7ae0b47d
Reviewed-on: http://git-master/r/67011
Tested-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

Rebase-Id: Rdd00a21fc2f58efdfeec5733c0307627da1fb430

5 years agotegra: NOR: Add NOR platform device
Manoj Chourasia [Wed, 19 Oct 2011 17:55:32 +0000]
tegra: NOR: Add NOR platform device

Added NOR platform device for Tegra.

Reviewed-on: http://git-master/r/56895
(cherry picked from commit 6b93835cef6321f286b8efcd032a1a1cc7a6ae9d)

Change-Id: Ie0219f1b7534f140a1da924f4f97a52f50d59ad2
Signed-off-by: Manoj Chourasia <mchourasia@nvidia.com>
Reviewed-on: http://git-master/r/66705
Tested-by: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>

Rebase-Id: R8ca0f2697a54ee48996c57af936bcc69c942db46

5 years agoarm: tegra: timer: Fix compiler warning
Scott Williams [Wed, 23 Nov 2011 20:48:07 +0000]
arm: tegra: timer: Fix compiler warning

Fix compiler warning when PM_SLEEP and HOTPLUG_CPU are not configured.

Change-Id: I6e9e7aaf9c63752d0c33363b1cced75b4437d82d
Signed-off-by: Scott Williams <scwilliams@nvidia.com>
Reviewed-on: http://git-master/r/66508
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Gerrit_Virtual_Submit

Rebase-Id: R5687b9e034e004907ba01263948bf839544adb1b

5 years agoARM: tegra: clock: Update EMC clock change procedure
Alex Frid [Tue, 15 Nov 2011 03:25:18 +0000]
ARM: tegra: clock: Update EMC clock change procedure

Set MC arbiter limits before EMC clock change on Tegra3.

Bug 896654

Signed-off-by: Alex Frid <afrid@nvidia.com>
(cherry picked from commit 16f545012457a04ba38f4f8bf80646b18a74cb2f)
(cherry picked from commit bd29cb18f1d26cc3a0fdc8933a08158d623fed58)

Change-Id: I080f21030007909bece5272ccdb93f8a85d4b13b
Reviewed-on: http://git-master/r/66515
Tested-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>

Rebase-Id: R0561570b37cdff800f0a7f71558eef16eb82cc59

5 years agoARM: tegra: clock: Support restricted PLLM usage
Alex Frid [Sat, 12 Nov 2011 02:19:16 +0000]
ARM: tegra: clock: Support restricted PLLM usage

Added configuration option TEGRA_PLLM_RESTRICTED - when enabled,
PLLM - memory PLL - usage may be restricted to modules with dividers
capable of dividing maximum PLLM frequency at minimum voltage. When
disabled, PLLM is available as a clock source with no restrictions
(current configuration), which may effectively increase lower limit
for core voltage if high grade SDRAM is used.

Implemented PLLM restrictions in Tegra3 clock framework and DVFS, but
keep them disabled by default.

Bug 884419

Signed-off-by: Alex Frid <afrid@nvidia.com>
(cherry picked from commit 5313ebcae92839146870d5865bc0f4cd08b35c61)
(cherry picked from commit 634647a9d2a8c1e03c8d98d0b2199950c947acc3)

Change-Id: I012452d92830ad6b63ec407350568b8c316b3caa
Reviewed-on: http://git-master/r/66512
Reviewed-by: Lokesh Pathak <lpathak@nvidia.com>
Tested-by: Lokesh Pathak <lpathak@nvidia.com>

Rebase-Id: Re70df2b753de37d6873609c121440337fc3ac626

5 years agoarm: tegra: edp: add config to use internal tsensor
Bitan Biswas [Fri, 2 Sep 2011 18:20:18 +0000]
arm: tegra: edp: add config to use internal tsensor

Introduced kernel config variable to enable internal tsensor
EDP and throttling support feature -

bug 848755

Reviewed-on: http://git-master/r/53822
(cherry picked from commit bacc6c8c7fc150db8d678281fd9cd1536d18d2bb)

Reviewed-on: http://git-master/r/65451
(cherry picked from commit 2793d55e3d50bb8d76e1191f8a0f53f822fbd875)

Change-Id: Ia15d13e670192b6656f20f29b5348aa995d95749
Reviewed-on: http://git-master/r/66444
Reviewed-by: Lokesh Pathak <lpathak@nvidia.com>
Tested-by: Lokesh Pathak <lpathak@nvidia.com>

Rebase-Id: R3ed1f0cbdd9bc1ba52b7d37930df4ab2d81e6598

5 years agoARM: Tegra: power: Tegra3 T33S updated EDP limits
Dan Willemsen [Mon, 2 Sep 2013 23:01:45 +0000]
ARM: Tegra: power: Tegra3 T33S updated EDP limits

bugid 844268

Reviewed-on: http://git-master/r/65547
Signed-off-by: Diwakar Tundlam <dtundlam@nvidia.com>
(cherry picked from commit 72d41cc5200454175d8dc04c761c983405e4d901)

Change-Id: Ica5aaf0bedb02bff3485cdcb76e81da80896a309
Reviewed-on: http://git-master/r/66520
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
Tested-by: Diwakar Tundlam <dtundlam@nvidia.com>

Rebase-Id: R7ed6a74e13a6900490c83a15f5adc00c5163d663

5 years agoARM: tegra: power: Correct EMC_ADR_CFG mask
Daniel Solomon [Mon, 21 Nov 2011 22:12:38 +0000]
ARM: tegra: power: Correct EMC_ADR_CFG mask

The mask used to check bit EMEM_NUMDEV in register EMC_ADR_CFG is
wrong for T30. Correct it.

Change-Id: I3deb1229cb27081049de1a4f2fd69e21507fa853
Reviewed-on: http://git-master/r/65927
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: R328e76d0f107d1b2fe1f27a81c1fab82dc4808d6

5 years agoarm: tegra: power: lp0 wake enable modified
Bitan Biswas [Tue, 15 Nov 2011 09:09:02 +0000]
arm: tegra: power: lp0 wake enable modified

GPIO based lp0 wakeup needed to support search for its irq
as well as GPIO bank irq in table. This is implemented
in this change.

lp0 wakeup irq enable using enable_irq_wake needs to be
called in specific drivers. Additionally, in some cases
wake irq needs to be updated in tegra wakeup table.

bug 890309
bug 902114

Change-Id: I983318172ffb020f565763cfe2bb29018223dcd0
Reviewed-on: http://git-master/r/64395
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: Rffcadeee341a73f2ea6d62e31d507e9a8dce5a0e

5 years agoARM: tegra: power: L2 cache sync only for CPU0 LP2
Prashant Gaikwad [Mon, 14 Nov 2011 12:25:55 +0000]
ARM: tegra: power: L2 cache sync only for CPU0 LP2

Bug 901430
Bug 905813

Change-Id: Id57f870262eebe6a2017b808d1a66624f903989d
Reviewed-on: http://git-master/r/64103
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: Rc3cad5fafa9e62fa10099bc4dc1281954a04b8f5

5 years agoARM: tegra: power: omit L2 flush for LP2
Antti P Miettinen [Mon, 24 Oct 2011 08:20:33 +0000]
ARM: tegra: power: omit L2 flush for LP2

The L2 cache RAM is preserved over LP2 so omit the L2 cache flush
in tegra_idle_lp2_last().

Bug 880338

Change-Id: I6aa30c712b6e467bd48e9c1959da2a69453a8f43
Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com>
Reviewed-on: http://git-master/r/59892
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: R6eee47d009d45d0e20254a97df919bf2fc34e6cd

5 years agoARM: tegra: dvfs: Fix dvfs over-voltage error handling
Alex Frid [Fri, 4 Nov 2011 03:06:10 +0000]
ARM: tegra: dvfs: Fix dvfs over-voltage error handling

Record dvfs client voltage rate request only after over-voltage error
is checked (otherwise, after over-voltage error rail goes above the
limit when another client requests voltage change).

(cherry picked from commit 9151f77b545dc5b898ad16ceb695cc57764f94e0)

Signed-off-by: Alex Frid <afrid@nvidia.com>
(cherry picked from commit 40243988e73a13a5c94db410cb0335fa8a9b1e42)

Change-Id: I70769b2ffd7303db6e54bfc3e07b47ea3e67b7b8
Reviewed-on: http://git-master/r/64767
Tested-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

Rebase-Id: Re82214f06084d58eed67edb35443f7a72ac4d112

5 years agoARM: tegra: clock: Add Tegra3 emergency throttling
Alex Frid [Fri, 14 Oct 2011 02:12:55 +0000]
ARM: tegra: clock: Add Tegra3 emergency throttling

Add Tegra3 emergency throttling API to directly control G-CPU super
clock skipper underneath clock framework, dvfs, and cpufreq driver
s/w layers. To be used by system power supply over-current ISR.

(cherry picked from commit fca2a12e90684526b2b7aeeb3af31de4254ad939)

Signed-off-by: Alex Frid <afrid@nvidia.com>
(cherry picked from commit b30bf0b313131037baffed7b6467eb1e0f021d19)

Change-Id: Ice064326d46f868a9d59d2e1f53930d644fdfc02
Reviewed-on: http://git-master/r/64766
Reviewed-by: Lokesh Pathak <lpathak@nvidia.com>
Tested-by: Lokesh Pathak <lpathak@nvidia.com>

Rebase-Id: Rf42ae930ba90de1c40843b5565251e4c1c92a642

5 years agoARM: tegra: dvfs: Update Tegra3 EMC DVFS
Alex Frid [Fri, 4 Nov 2011 04:07:03 +0000]
ARM: tegra: dvfs: Update Tegra3 EMC DVFS

- Moved validation of EMC maximum rate against nominal core voltage
from common dvfs initialization to board specific EMC scaling table
setup (a logical place to do it, since EMC DVFS is board dependent)

- Used current rate as rounded EMC rate if no EMC scaling table is
provided (instead of maximum EMC rate - no sense in attempt to set
maximum rate, or any rate, for that matter, if there is no table).

- Cleaned EMC initialization procedure

(cherry picked from commit 4f655077e09c0dc4abc50d190d82c91473e2e81c)

Signed-off-by: Alex Frid <afrid@nvidia.com>
(cherry picked from commit a213668b4f54b8ea7603a6d1e71f8b4ab1998bf7)

Change-Id: Id61f33e42556a6415e45b014bcadace600dd86d5
Reviewed-on: http://git-master/r/64765
Tested-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

Rebase-Id: R697e04b6140eb0084bdb341febe3acdf91d93535

5 years agoARM: Tegra: power: Tegra3 AP33 SKU updated EDP table
Diwakar Tundlam [Tue, 1 Nov 2011 23:30:31 +0000]
ARM: Tegra: power: Tegra3 AP33 SKU updated EDP table

bugid 844268

Reviewed-on: http://git-master/r/64185
(cherry picked from commit a27e20a84ce1bab8a1d37f12f7f9260d9d32dbfe)
Signed-off-by: Diwakar Tundlam <dtundlam@nvidia.com>

Change-Id: I88b108fd44719828e11499606ab7ef754f76ebac
Reviewed-on: http://git-master/r/65290
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
Tested-by: Diwakar Tundlam <dtundlam@nvidia.com>

Rebase-Id: R557e282e415fd4bed871ea1ed8c056ae79731311

5 years agoARM: tegra: clock: Enable EMC scaling for AP25
Prashant Gaikwad [Tue, 15 Nov 2011 14:29:47 +0000]
ARM: tegra: clock: Enable EMC scaling for AP25

Workaround added to enable EMC scaling for AP25.
PLL switching support added for 300MHz EMC scaling step.

Bug 892505

Reviewed-on: http://git-master/r/#change,41718
Reviewed-on: http://git-master/r/#change,41720
Reviewed-on: http://git-master/r/#change,60861

Change-Id: I885b8dc4e3b6124ebed572c06cea773de6c83471
Reviewed-on: http://git-master/r/64465
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

Rebase-Id: Rb8e58cfa7fe1106978030c8aea292e95a7a5da2b

5 years agoarm: tegra: enterprise: add platform data for bt voice call
Nikesh Oswal [Wed, 9 Nov 2011 09:57:37 +0000]
arm: tegra: enterprise: add platform data for bt voice call

Bug: 862023

Change-Id: I826bf1b2de5681bd999b989ab74f86f26155f421
Signed-off-by: Nikesh Oswal <noswal@nvidia.com>
Reviewed-on: http://git-master/r/63248
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

Rebase-Id: Rec26d539061cdcd8895a539416f05111605b56b0

5 years agoarm: tegra: enterprise: add platform data for voice call
Nikesh Oswal [Sun, 6 Nov 2011 04:02:36 +0000]
arm: tegra: enterprise: add platform data for voice call

add platform data structures for codec i2s port connections
and baseband parameters

Bug: 862023

Change-Id: I52cc25e623474f6d5dd070cf4aedc1f108980595
Signed-off-by: Nikesh Oswal <noswal@nvidia.com>
Reviewed-on: http://git-master/r/62618
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

Rebase-Id: Rbe96cc2c99342de04590101d96c09616e72c6a41

5 years agoARM: Tegra: power: T33 SKU EDP table for 10A regulator
Diwakar Tundlam [Tue, 25 Oct 2011 01:20:08 +0000]
ARM: Tegra: power: T33 SKU EDP table for 10A regulator

bug 841336

Reviewed-on: http://git-master/r/62766
(cherry picked from commit c27e091be2ec3899fbb0bdbfe199784063f24be1)

Change-Id: I40277cea7f48cc15e074123ee73287b25389c0e6
Signed-off-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-on: http://git-master/r/64211

Rebase-Id: Reef8906240656bfee07dbf9ba8f581677bad8e5f

5 years agoarm: tegra: Add HDA support
Sumit Bhattacharya [Fri, 21 Oct 2011 06:28:36 +0000]
arm: tegra: Add HDA support

Modify HDA device names to be inline with Intel HDA driver. Also
add entries for both HDA controller memory base address and HDA
controller PCI base address.
Also modify the dev_id and con_id of HDA related clocks so that
they can be used by HDA driver.

Bug 872652

Change-Id: Ifa05fe7d3d524e9ae310594a0e582c297dc52ef7
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/59506
Reviewed-by: Scott Peterson <speterson@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>

Rebase-Id: R098f861d94a78a1401841b71b8c591b902b7b0bc

5 years agoARM: Tegra: dvfs: T33 SKU EDP table
Diwakar Tundlam [Fri, 12 Aug 2011 00:22:57 +0000]
ARM: Tegra: dvfs: T33 SKU EDP table

Bug 841336

Reviewed-on: http://git-master/r/60779
(cherry picked from commit 4d3f017e2715f50aaca6c7e8dc61e880947f7550)

Change-Id: Ib1eeb8729a91162d39fc952eeb7494d8863a03c7
Reviewed-on: http://git-master/r/64204
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
Tested-by: Diwakar Tundlam <dtundlam@nvidia.com>

Rebase-Id: Rcfa5f6c11e831c4f08e956609ea8f9d98a6111f8

5 years agoarm: tegra: power: add TEGRA_THERMAL_SYSFS option
Joshua Primero [Tue, 4 Oct 2011 00:43:53 +0000]
arm: tegra: power: add TEGRA_THERMAL_SYSFS option

Added option to enable the use of the Linux Thermal
Sysfs infrastructure within the tegra thermal

Change-Id: I4306d173173a162dce18d864c46a9601523cdd09
Reviewed-on: http://git-master/r/59472
Reviewed-on: http://git-master/r/62574
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: Rbb6b3261fbdf2aa997f47eb254634fc6eff3ffb9

5 years agoARM: tegra: power: add combined power req processing
Joshua Cha [Mon, 14 Nov 2011 01:37:31 +0000]
ARM: tegra: power: add combined power req processing

For platforms where the core & CPU power requests are combined
as a single request to the PMU, we need separate processing to
enable its suspend/resume operation.

Bug 862504

Change-Id: If66282a7b069d35568147e2d64f14371e1692bfd
Reviewed-on: http://git-master/r/64011
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Tested-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>

Rebase-Id: R21b966a438be03b11b80ce7deb70e3036b80dab2

5 years agoarm: tegra: power: Add throttle as a cooling dev
Joshua Primero [Tue, 4 Oct 2011 00:34:55 +0000]
arm: tegra: power: Add throttle as a cooling dev

Added cooling device hooks into the throttling module
to be used with the linux thermal sysfs infrastructure.

Reviewed-on: http://git-master/r/59470
(cherry picked from commit a7d0c2d23ae32cd074dc667f1ace6083273b1870)

Change-Id: I8ca4d94d838a00ea7c10423ab120329bf1b2343f
Reviewed-on: http://git-master/r/62573
Reviewed-by: Joshua Primero <jprimero@nvidia.com>
Tested-by: Joshua Primero <jprimero@nvidia.com>
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>

Rebase-Id: R1bb4b36226f8a7c13166162feabeced9a1d469ee

5 years agoArm: Tegra: Cardhu: Set slew rise/fall rates properly
Pavan Kunapuli [Wed, 14 Sep 2011 13:40:53 +0000]
Arm: Tegra: Cardhu: Set slew rise/fall rates properly

Setting the slewrise and slewfall rates properly.

Bug 811303

Reviewed-on: http://git-master/r/52367
(cherry picked from commit 337b90b5a359c4f320f58f5026fa511dca5d8031)

Change-Id: I518b4dcdad8ac338cf03d4fb6c634b0747a82836
Reviewed-on: http://git-master/r/62326
(cherry picked from commit 7a04424fb0b8c1f36f28c99f73a313cd192360e9)
Reviewed-on: http://git-master/r/63813
Tested-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>

Rebase-Id: Racfd777be42f83018a9e295e1c7048ebb02f7f9e

5 years agoARM: tegra: power: Update CPU rate after mode switch
Alex Frid [Sun, 30 Oct 2011 04:12:44 +0000]
ARM: tegra: power: Update CPU rate after mode switch

Update Tegra3 CPU clock rate after G=>LP mode switch is completed to
synchronize with cpufreq target rate.

(cherry picked from commit 870d21e5e23eff476cdd841b4ce2605393d638ef)
(cherry picked from commit 11b20d7d6206c557f00e3f7a40dec1d498345d79)

Change-Id: I62237b8d34be23a8d903937f2ebb2d395c5db1b9
Reviewed-on: http://git-master/r/63359
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: Rdd1548389896521fddb2e239d6236706eb102f73

5 years agoARM: tegra: dvfs: Optimize Tegra3 VDD_CPU control in LP mode
Alex Frid [Wed, 26 Oct 2011 06:36:26 +0000]
ARM: tegra: dvfs: Optimize Tegra3 VDD_CPU control in LP mode

Optimized Tegra3 VDD_CPU control when VDD_CPU target is set to zero,
which could happen only while CPU is in LP mode (and CPU regulator
output is turned off by side-band signal, anyway):

- Ignore VDD_CPU dependency on VDD_CORE while VDD_CPU target is zero
- Allow VDD_CPU one step change to zero (i.e., to minimum voltage set
by constraints) after entry to LP mode
- Allow VDD_CPU one step change to the predicted G mode target before
exit from LP mode

(cherry picked from commit 5826f3e28867207b5dad1c50795de8275d1af872)
(cherry picked from commit 79c531421dfc65e27af657fd12b64c4187c67827)

Change-Id: I3c469132034a431d2e9b8727d11d604c306122f1
Reviewed-on: http://git-master/r/63357
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: R4c4f6e79decddb778f58cb5eef853a4c9d52ca94

5 years agoARM: tegra: clock: Add DSR field to Tegra3 EMC DFS table
Alex Frid [Wed, 2 Nov 2011 02:39:15 +0000]
ARM: tegra: clock: Add DSR field to Tegra3 EMC DFS table

Added dynamic self-refresh (DSR) field to Tegra3 EMC DFS table. This
field will be supported starting with table revision to 3.2, and it
will allow to enable/disable DSR for each table entry independently.

Bug 853990

(cherry picked from commit 6e225af7334d789ffac72542602913a0028d5eac)
(cherry picked from commit c7ebe73da695206a992088a4ba5a6cd7643ea333)

Change-Id: I212d5992067baffaaf5b2e1de25b103c7b1fb56a
Reviewed-on: http://git-master/r/63356
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: R7261d49b023634a783ab2bd55f494112d0bac2a1

5 years agoARM: tegra: gpio: Add range check for gpio enable/disable
Chaitanya Bandi [Thu, 3 Nov 2011 10:43:18 +0000]
ARM: tegra: gpio: Add range check for gpio enable/disable

Added the range check into tegra_gpio_enable and tegra_gpio_disable

Bug 897387

Reviewed-on: http://git-master/r/62641
(cherry picked from commit 091b3906b2dd64cd58221e7e61a24a57dabad16c)

Change-Id: I9be8129397a1dccbea4a04f6b6ed7d4529bf45c3
Reviewed-on: http://git-master/r/63174
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: Rfaf0efdbc60208a56e4e4f073e3661ad1511694c

5 years agoarm: tegra: power: set throttling temperature = 85C
Diwakar Tundlam [Fri, 2 Sep 2011 17:38:24 +0000]
arm: tegra: power: set throttling temperature = 85C

Earlier value of 75 had unnecessary double guardbanding.
Changed 90C row in EDP table down to 85C to get throttling alert.

Bug 862301

Reviewed-on: http://git-master/r/50544
(cherry picked from commit 9f2693a80274bcd9eb8e7424bca87f34cc190741)

Change-Id: If7204150013e7894fc310a2f7e8fd46baf11d869
Reviewed-on: http://git-master/r/62773
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: R6dacf9402de8edbb02bddb08b138808628b7eb15

5 years agoARM: tegra: uart: Restore FCR in uart resume
Pradeep Goudagunta [Fri, 4 Nov 2011 10:25:01 +0000]
ARM: tegra: uart: Restore FCR in uart resume

Restore FCR while resuming debug uart, to enable RX and TX FIFOs with
trigger levels configured during initialisation of debug uart port.

Bug 867063

Change-Id: I9665ff29a53c3e2e6c78a3037e20e7362a642f77
Reviewed-on: http://git-master/r/62411
Tested-by: Pradeep Goudagunta <pgoudagunta@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

Rebase-Id: Ra3b9858456b952ab539a36019a55863077094054

5 years agoARM: tegra: power: Correct PL310 virt addr calculation
Puneet Saxena [Thu, 3 Nov 2011 10:01:23 +0000]
ARM: tegra: power: Correct PL310 virt addr calculation

PL310 virtual address was calculated using PPSB virtual/phy address.
It should be done using CPU virtual/phy address. This causes
TEGRA_PL310_VIRT value to get overlapped with virtual kerenl memory map's
Vmalloc region on whistler.

Bug 881831
Bug 867094

Change-Id: Ifaeeb9291553af59453f0041ad7cb1fe9d27979b
Signed-off-by: Puneet Saxena <puneets@nvidia.com>
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-on: http://git-master/r/62097
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>

Rebase-Id: Ra5a6165c8a02f0ac130bbaac4a477b901ceea62f

5 years agoARM: tegra: temp sensor: fix error handler
Colin Patrick McCabe [Wed, 26 Oct 2011 23:08:40 +0000]
ARM: tegra: temp sensor: fix error handler

Change-Id: Ie730ad7ec74927ef63722f4038db00e5f5d31154
Signed-off-by: Colin Patrick McCabe <cmccabe@nvidia.com>
Reviewed-on: http://git-master/r/60558
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>

Rebase-Id: Rad06124e61bdf95cb0307dd2204f2bf4bb92e718

5 years agoarm: tegra: Rename tegra2/3-throttle to tegra2/3_throttle.
Tom Cherry [Fri, 30 Sep 2011 23:11:48 +0000]
arm: tegra: Rename tegra2/3-throttle to tegra2/3_throttle.

This is to keep consistency with tegra* files all of which use
underscores instead of dashes

Reviewed-on: http://git-master/r/55582
(cherry picked from commit 401f0018a27a18aafb9eac7d0bed6990c99c73cc)

Change-Id: I1a7066e6ac86f5876126ae54cee84f64fbc509f1
Reviewed-on: http://git-master/r/62251
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: Rd08530c8b72d63d3ed1c8557f1c47f481ed49044

5 years agoARM: tegra: dvfs: Enable EMC bridge if rail is disabled
Alex Frid [Sat, 22 Oct 2011 05:02:53 +0000]
ARM: tegra: dvfs: Enable EMC bridge if rail is disabled

When core rail is disabled it is set to nominal voltage underneath
clock framework. On Tegra3 DDR3 platforms low EMC rates are not safe
at high voltage that exceeds EMC bridge minimum level. Enable EMC
bridge explicitly in this case to set safe floor for EMC. Similarly
need to enable EMC bridge when CPU rail is disabled and pushing core
voltage (cpu-to-core voltage dependency) over bridge minimum level.

(cherry picked from commit bff814b2e46e67defde178b72bd379003b5429c2)
(cherry picked from commit e5567cb8dafcbd30797237e7bb91d77ce57de66a)

Change-Id: Ibb8dad5132f69e3325d793658b3dcc8b887974bf
Reviewed-on: http://git-master/r/62031
Tested-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>

Rebase-Id: R56f360c3b1ee25bf2dae4b886399b83e357f0225

5 years agoARM: tegra: power: Enable Tegra3 EMC bridge in suspend
Alex Frid [Sun, 23 Oct 2011 02:06:33 +0000]
ARM: tegra: power: Enable Tegra3 EMC bridge in suspend

When dvfs is suspended core rail is set to nominal voltage underneath
clock framework. On Tegra3 DDR3 platforms low EMC rates are not safe
at high voltage that exceeds EMC bridge minimum level. Enabling EMC
bridge during suspend for Tegra3 DDR3 platforms guarantees safe EMC
operations at high voltage.

(cherry picked from commit 677c01d3d9edaf7e91f09de5025e7864b6a288d8)
(cherry picked from commit 75710c173caa46f2e3cd24e48cc82f030cdb52d9)

Change-Id: I1e300c18867295b1394184da39eeffcab43de4c7
Reviewed-on: http://git-master/r/62030
Tested-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>

Rebase-Id: R2a3a91b370d2517e89e1d30f27f9fd41a9a81267

5 years agoARM: tegra: clock: Update Tegra3 EMC clock configuration
Alex Frid [Sat, 22 Oct 2011 04:47:36 +0000]
ARM: tegra: clock: Update Tegra3 EMC clock configuration

- Moved initialization of Tegra3 dram configuration variables from
EMC DVFS setup to EMC clock initialization, so that these variables
can be used independently of DVFS.

- Added graceful exit from EMC DVFS setup in case of empty DVFS table

- Applied EMC minimum rate to direct EMC clock round rate operations
(currently applied only to shared EMC bus update).

(cherry picked from commit c6b3f6e0eb0b6e3485d02fc5306a1c09cbacf914)
(cherry picked from commit cbf09d55bb9fa9c9ade7bb472859b4808f47b615)

Change-Id: I84bbdc05ff7a0670ec9d088b98a9df25683db4df
Reviewed-on: http://git-master/r/62029
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: R0fb03ff9903aa51aa922b4a49eed96aad0e97a06

5 years agoARM: tegra: gpio: Set a gpio to tristate or normal
Chaitanya Bandi [Mon, 19 Sep 2011 11:15:28 +0000]
ARM: tegra: gpio: Set a gpio to tristate or normal

Create mapping from gpio to pingroup and set gpio to
normal or tristate

Bug 866633

Reviewed-on: http://git-master/r/56557
(cherry picked from commit 321ded98d41170b9e32d60177c6808492ccdf115)

Change-Id: I3d1b979717f1c6b208af3df0a7dfe603e5272d21
Reviewed-on: http://git-master/r/61120
Tested-by: Bandi Krishna Chaitanya <bandik@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

Rebase-Id: R5991c2cbc11aa35345fde7f08c0bfeb306e85e1e

5 years agovideo: tegra: dsi: Adjust two CSI registers in DSI module.
Kevin Huang [Tue, 6 Sep 2011 18:04:55 +0000]
video: tegra: dsi: Adjust two CSI registers in DSI module.

Bug 829327

Reviewed-on: http://git-master/r/50871
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
(cherry picked from commit 8d9aa14595348a2daa408710927471169447e73c)

Change-Id: Ib3e335dab5329ef29842354dc9934f8213ae3d58
Reviewed-on: http://git-master/r/61603
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: R01a1fe72b19f49e3845459d4da8949b1a97089c9

5 years agoARM: tegra: Add interface to read/write vi/csi module.
Kevin Huang [Fri, 2 Sep 2011 20:30:37 +0000]
ARM: tegra: Add interface to read/write vi/csi module.

Bug 829327

Reviewed-on: http://git-master/r/50351
Reviewed-by: Kevin Huang (Eng-SW) <kevinh@nvidia.com>
Tested-by: Kevin Huang (Eng-SW) <kevinh@nvidia.com>
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
(cherry picked from commit 43d66ead107fc584068e8b894ef0ccf067b78f35)

Change-Id: I466f8300ae8c8ade5f7ab2783baabe5e744da18a
Reviewed-on: http://git-master/r/61601
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: R4aa7bd08edad8ad1cb81e5b04961d873e9d01b1a

5 years agoARM: tegra: power: Restore Tegra3 MC registers after LP0
Alex Frid [Thu, 15 Sep 2011 05:27:07 +0000]
ARM: tegra: power: Restore Tegra3 MC registers after LP0

On exit from deep sleep (LP0) restore from SDRAM Tegra3 MC registers
that are not saved in PMC scratch file for boot-rom restoration. Since
SDRAM after LP0 is running at boot rate, MC registers are saved only
once during initialization.

Bug 874351

(ported from commit 99966c242920978a92f3f51e5957ada30afc4b1d)

Change-Id: I9bf06ddb83fa6435a4f5bd29ec58bb195a189678
Reviewed-on: http://git-master/r/61045
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: R272136c877818d44b0cf28f8b5f720af71623301

5 years agoARM: tegra: power Limit CPU complex speed through sysfs
Alex Frid [Fri, 7 Oct 2011 06:38:21 +0000]
ARM: tegra: power Limit CPU complex speed through sysfs

Added sysfs node /sys/module/cpu_tegra/parameters/cpu_user_cap to set
maximum CPU rate from user space. Unlike per-cpu frequency governor
limit (scaling_max_freq), this cap is applied directly to common CPU
complex frequency underneath per-cpu governors.

(cherry picked from commit 5fbd5b19ddb43a03391957000f23b729f394b05b)
(cherry picked from commit bf81c8efc2c98e5008527ce019669dc57718f44b)

Change-Id: Ic2f152e1fd58f2f0062489309c0cffd32a2462ae
Reviewed-on: http://git-master/r/61711
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: R800c2a4d5e097bdd29fa1b0b901264a2723abff0

5 years agoARM: tegra: clock: Order memory and cpu clock updates
Alex Frid [Tue, 27 Sep 2011 05:47:02 +0000]
ARM: tegra: clock: Order memory and cpu clock updates

When voting on memory frequency based on cpu frequency, update memory
frequency before cpu frequency if cpu rate is increasing, and after cpu
frequency if cpu rate is decreasing (current code updates memory first

(cherry picked from commit 9284039a4d86c22ee72e11d6c173b24a5b4f720e)
(cherry picked from commit 3cd676121913b1cd9eddff06d6966817dcd9de94)

Change-Id: I91b81f1eab91d575959a2fd9af3a8798f7ca6cf6
Reviewed-on: http://git-master/r/61707
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: R64d5597f8360ca151ba5e017cb94915c63699aca

5 years agoarm: tegra: Add dummy platform driver for BT and BB
Sumit Bhattacharya [Tue, 1 Nov 2011 13:32:15 +0000]
arm: tegra: Add dummy platform driver for BT and BB

Use dummy spdif-dit platform driver for bluetooth and baseband
platform driver.

Bug 872652
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>

Change-Id: I111e1f16d545d19b37c2a49c212160a210eea9f4
Reviewed-on: http://git-master/r/61503
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: R058f68adf8951ba33dccdcaf6760875650de761e

5 years agoarm: tegra: Correct DAS base address
Sumit Bhattacharya [Mon, 31 Oct 2011 16:33:35 +0000]
arm: tegra: Correct DAS base address

Bug 872652
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>

Change-Id: I27911d144c5636ce8be26c6c3830dea09b4a2cde
Reviewed-on: http://git-master/r/61234
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: Rb361a4da4573ba22c418a5c12fb820c9135292bb

5 years agoarm: tegra: add dam to devices.h
Nikesh Oswal [Thu, 13 Oct 2011 15:09:47 +0000]
arm: tegra: add dam to devices.h

Bug: 862023
Change-Id: I135529efcb8bf4518802d950a07e6923690419b0
Signed-off-by: Nikesh Oswal <noswal@nvidia.com>
Reviewed-on: http://git-master/r/57881
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Scott Peterson <speterson@nvidia.com>

Rebase-Id: R6c2419452e13142b07963e65a256e9da1e181ab2

5 years agoarm: tegra: Add support for vpr heap.
Krishna Reddy [Wed, 5 Oct 2011 19:23:37 +0000]
arm: tegra: Add support for vpr heap.

Bug 875847

Change-Id: Ieb237b3415f0861dfa13371fdbb7b3dbdac197b1
Reviewed-on: http://git-master/r/61246
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Tested-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

Rebase-Id: Rbed707e8bcba433aaed18fe9119c10902d4e618b

5 years agoARM: tegra: power: Add Tegra3 balanced throttling
Alex Frid [Fri, 12 Aug 2011 03:54:33 +0000]
ARM: tegra: power: Add Tegra3 balanced throttling

Balanced CPU and core domains thermal throttling on Tegra3. When
throttling is enabled the new algorithm caps core bus frequencies
(EMC, cbus and sbus) along with CPU rate. The throttling steps, and
time spent on each step are pre-defined based on characterization

(cherry picked from commit 0fa05e9904f369e201cad0c9be2b15e141d3624e)
(cherry picked from commit 977e6bf94297347d8979b19877cf228325377d8f)

Change-Id: I62bfcda7b5d6ba7b621e813f5d20ded7334a080f
Reviewed-on: http://git-master/r/61024
Tested-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

Rebase-Id: R0e65df5536ed7153a4a11dd299c5cd383b51c190

5 years agoARM: tegra: power: Lock force_policy_max update
Alex Frid [Fri, 7 Oct 2011 04:19:40 +0000]
ARM: tegra: power: Lock force_policy_max update

(cherry picked from commit dc2f416df4664f5ddeba6f14f41cd6bcd717abab)
(cherry picked from commit caa79c7d6219231d02260ae91876eff4f411dee8)

Change-Id: I29eb42c73a7e3cd3f401e8b5d44bcf3f06478c2c
Reviewed-on: http://git-master/r/61021
Tested-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

Rebase-Id: Ref5015bb8336d8106c80fa390911ff0371b3ec57

5 years agoARM: tegra: power: Enforce cpufreq policy maximum
Alex Frid [Sun, 11 Sep 2011 01:33:28 +0000]
ARM: tegra: power: Enforce cpufreq policy maximum

Tegra cpu complex frequency is set by cpufreq driver to the maximum
of per-cpu target frequencies specified by the respective governors
running on each cpu core. It guarantees that final frequency is above
all per-cpu policy low limits, but policy high limit set on one core,
may be exceeded if the other core has higher target.

This commit implements complementary mode in cpufreq driver that set
final cpu frequency below all per-cpu maximum policy limits. The new
mode is disabled by default, and can be activated via


(cherry picked from commit d52a93527778b13efd2e4b783ce0707513f53f26)
(cherry picked from commit bc1450eedb97fd2f37544e07dae15946d209866c)

Change-Id: I2b51738a50312e0b3ba747747e6fa68efddc6038
Reviewed-on: http://git-master/r/61020
Tested-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

Rebase-Id: R2fa76e42f800220db708c8720a3fe6b1792e5c59

5 years agoARM: tegra: power: Fix LP2/LP3 states accounting on Tegra3
Alex Frid [Thu, 29 Sep 2011 03:41:30 +0000]
ARM: tegra: power: Fix LP2/LP3 states accounting on Tegra3

- Made sure LP3 state is reported as last entered state to cpuidle
governor in case when LP3 is entered as a fall back from LP2 path.

- Accumulate idle time designated to LP2 state by cpuidle governor
and time actually spent in LP2 by each CPU separately. Update LP2
statistic output.

Change-Id: I55b461e94925ba7a41112756ed958f81fc0bc882
Reviewed-on: http://git-master/r/60381
Tested-by: Aleksandr Frid <afrid@nvidia.com>
Tested-by: Gerrit_Virtual_Submit
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>

Rebase-Id: R240873bd1de225696d392ac5ba2c3d517c59d86e

5 years agoARM tegra: gpio: Correct gpio interrupt init sequence
Daehyoung Ko [Sat, 1 Oct 2011 00:42:49 +0000]
ARM tegra: gpio: Correct gpio interrupt init sequence

It is possible for GPIO interrupt to occur when registering handler
since set_irq_chained_handler enables GPIO interrupt. Thus
all relevant variables are required to be initialized
before calling set_irq_chained_handler.

Also add initialization of interrupt status register.

Bug 884569

Reviewed-on: http://git-master/r/58218
(cherry picked from commit e03fe4cc1bf06fa6c32c0520e2ba31f009f9301d)

Change-Id: Ic76f95215b61d6e091ae1cfa11522f8af9c3eecd
Reviewed-on: http://git-master/r/60475
Reviewed-by: Daehyoung Ko <dko@nvidia.com>
Tested-by: Daehyoung Ko <dko@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

Rebase-Id: R5340918dccc1a8b1d95c5b629cc985f44d45fb67

5 years agoarm: tegra: baseband: add USB modem power management support
Steve Lin [Tue, 25 Oct 2011 21:49:11 +0000]
arm: tegra: baseband: add USB modem power management support

This platform driver enables the generic USB modem power management support
for out-of_band remote wakeup, selective suspend and system suspend/resume.

Bug 854339

Reviewed-on: http://git-master/r/44911
(cherry picked from commit f737bc30ee9509a79e499c975b61c5f58bb19bb3)

Change-Id: Ibf38afb593fd8097e6152197c816e95e8f457659
Reviewed-on: http://git-master/r/60313
Reviewed-by: Sheshagiri Shenoy <sshenoy@nvidia.com>
Reviewed-by: Steve Lin <stlin@nvidia.com>
Tested-by: Steve Lin <stlin@nvidia.com>

Rebase-Id: R2bc754d319b388ce477ab7f987352d7f307d11c3

5 years agovideo: tegra: support display board PM313
Hyungwoo Yang [Mon, 24 Oct 2011 22:06:17 +0000]
video: tegra: support display board PM313

This change supports PM313 with 19X12 panel.
The change uses PM313 in "Single input to Dual output" mode

Bug ID : 822980
Reviewed-on: http://git-master/r/50215
(cherry picked from commit b83e795747fa860b5b7fb66b2067ebe4f15bcfd0)

Change-Id: Iabf707ded2976e9877481c215d0b1f1940781f14
Reviewed-on: http://git-master/r/60085
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: Rfd752366b937526a13b755a13edaa5986c681665

5 years agoarm: tegra: use non-blocking api to cancel work from mc error isr
Nitin Kumbhar [Fri, 21 Oct 2011 12:50:13 +0000]
arm: tegra: use non-blocking api to cancel work from mc error isr

An api (del_timer_sync), which can sleep, should not be used in
hardirq context. This gives warnings for potential deadlock. Use
non-sleeping api to cancel the work instead. In this case, if the
work is already running, it would unthrottle mc error prints.

BUG 889717

Change-Id: I4c0205766d82a45a04d1c0125bb8ed5927757456
Reviewed-on: http://git-master/r/59604
Tested-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: Prajakta Gudadhe <pgudadhe@nvidia.com>

Rebase-Id: R713c536217d0169f395ffb199ec2a97b274b9914

5 years agoarm: tegra: Handler for parsing kernel command max_cpu_curr
Laxman Dewangan [Sat, 15 Oct 2011 10:14:04 +0000]
arm: tegra: Handler for parsing kernel command max_cpu_curr

Adding handler for parsing the kernel command max_cpu_curr and api
for retruning the max_cpu_current.

bug 888679

Reviewed-on: http://git-master/r/58626
(cherry picked from commit 4d2da03c37a1a1401b4ef87b888f487a99b175b7)

Change-Id: Ic5a53fe4e41317f48b986867081f3e7d96103f0d
Reviewed-on: http://git-master/r/59290
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>

Rebase-Id: Ra426e2b10268bc7eadbe394c107528378f043e15

5 years agoARM: tegra: power: Force FW bit when SMP is enabled.
Alex Frid [Tue, 11 Oct 2011 03:32:49 +0000]
ARM: tegra: power: Force FW bit when SMP is enabled.

Set FW bit in CP15 auxiliary control register after LP=>G CPU mode
switch if SMP bit in the same register is set. On Tegra3 in LP mode
FW bit is always zero, even though SMP bit is retained. Hence, this
change recovers FW bit on return from LP to G-mode.

Change-Id: I9f0021ab90866cb8686d73eb6ad5bbedbb2ceb90
Reviewed-on: http://git-master/r/57203
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Tested-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Antti Miettinen <amiettinen@nvidia.com>
Tested-by: Antti Miettinen <amiettinen@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

Rebase-Id: R37dbe2079eafcfb47babaf41b53818a9130d2bbe

5 years agoARM: tegra: power: Do not switch Tegra3 to PLLP
Alex Frid [Sat, 1 Oct 2011 01:38:59 +0000]
ARM: tegra: power: Do not switch Tegra3 to PLLP

Do not switch Tegra3 to PLLP on sleep entry: no need - unlike Tegra2
PLLX on Tegra3 is not disabled when CPU is rail gated; also G/LP mode
switch clock configuration is set by mode switch prolog and should not
be overwritten at the last moment.

Change-Id: I9aa8463c6b1c04c0a70e70c1e2cd4113a679e100
Reviewed-on: http://git-master/r/57202
Tested-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

Rebase-Id: R9a8d78a363c261d45e48832fcbed7fa2854f7da8

5 years agoarm: tegra: cardhu: Initialize gpio pins mode
Laxman Dewangan [Tue, 4 Oct 2011 12:58:57 +0000]
arm: tegra: cardhu: Initialize gpio pins mode

Initializing the pins which is used in gpio to their inital state.

bug 876305

Reviewed-on: http://git-master/r/57516
(cherry picked from commit 3f33cb777295669e71e291bb05651d3c6c4b37d5)

Change-Id: Ie05862e5184bb95c85cf7aa96ce2eca497c01c93
Reviewed-on: http://git-master/r/57817
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: R3886fa24fc77365529b86eef67f10a428764aee4

5 years agoarm: tegra: Avoid negative number parsing for debug port
Laxman Dewangan [Wed, 28 Sep 2011 09:12:49 +0000]
arm: tegra: Avoid negative number parsing for debug port

Avoiding negative number parsing for debug port id.

bug 854995

Reviewed-on: http://git-master/r/57328
(cherry picked from commit 81ce6594db0a2b9131e3a1317ef1f10e8310aad5)
Change-Id: I38e9e545c06a61b79d292c86dcbf8c595d2eddca
Reviewed-on: http://git-master/r/57787
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: R2fe0b743db9f2b87f0a0715aeda12e7c00b041a7

5 years agoarm: tegra: Support for kernel command audio_codec
Laxman Dewangan [Sun, 18 Sep 2011 11:19:10 +0000]
arm: tegra: Support for kernel command audio_codec

Adding the handler to parse the kernel command "audio_codec".

bug 876544

Reviewed-on: http://git-master/r/56623
(cherry picked from commit b82c518354864c7dba03beea3c576edfab428efd)

Change-Id: Icb42164ea1276f4f5af941b8ba2f80076759af8b
Reviewed-on: http://git-master/r/57779
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>

Rebase-Id: Rf3a0eed42103ef830c9697da42eb685fde6f6fe9

5 years agoarm: tegra: pm: issue a pl310 cache sync for tegra2
Mayuresh Kulkarni [Thu, 15 Sep 2011 09:26:10 +0000]
arm: tegra: pm: issue a pl310 cache sync for tegra2

this needs to be done when the lp2 is aborted before the
stipulated programmed time to wake-up

for bug 867094

Change-Id: I02102ed8afa69d782de5950118352e80edc79df4
Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-on: http://git-master/r/52581
Reviewed-by: Jin Qian <jqian@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>

Rebase-Id: R5938771982b7cceb9ea23ee73852ca8b9b3490ae

5 years agoarm: tegra: gpio: API to configure pins as gpio with init value
Laxman Dewangan [Fri, 30 Sep 2011 10:44:27 +0000]
arm: tegra: gpio: API to configure pins as gpio with init value

Adding api to configure pins in gpio mode with init value before
gpio library is up. This will provide to configure the pins in
initial state and avoid any glitch in pins.

bug 876305

Reviewed-on: http://git-master/r/56630
(cherry picked from commit 9e357b69d25f96c13acb660860bcdf8e0ab0a1ef)

Change-Id: Ia14721c0bf96e1a45561139fdbbf2d995b9a4963
Reviewed-on: http://git-master/r/57265
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: Rc775d23898a6275d633e4474e6cf9b10395697e2

5 years agoarm: tegra: Add handle for kernel option power_supply
Laxman Dewangan [Sun, 4 Sep 2011 11:40:13 +0000]
arm: tegra: Add handle for kernel option power_supply

Adding the handler function for the kernel command line
option "power_supply".

Reviewed-on: http://git-master/r/50674
(cherry picked from commit 8d9e6bbe59ab68f44a4713f5d1bcc7877baf8180)

Change-Id: I07796b6ee5893d73ac7557e81aac5d26b299c491
Reviewed-on: http://git-master/r/57262
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: Rd64bf314bcdfe3f7bdbcdee946ed261bfce5938f

5 years agoarm: tegra: Remove T30 SPDIF DMA resource info
Sumit Bhattacharya [Tue, 4 Oct 2011 12:02:36 +0000]
arm: tegra: Remove T30 SPDIF DMA resource info

Bug 872652

Change-Id: Iaea76918169f3270f865122f824f60678c419b50
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/55970
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: R70b9408e1c66c97a63a9408dda43aacd369c3178

5 years agoarm: tegra: whistler: add headphone debouncetime and irq
Nikesh Oswal [Mon, 10 Oct 2011 12:06:28 +0000]
arm: tegra: whistler: add headphone debouncetime and irq

add entries for headphone detection irq and debouncetime in
whistler specific board files

Bug: 862023

Change-Id: Ia72ec10f51a1bde0f81eb488b36a8b1439cedf1d
Signed-off-by: Nikesh Oswal <noswal@nvidia.com>
Reviewed-on: http://git-master/r/57034
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: R7fe99f98b6d8c11562af00da3bef9ba5bfd56d1c

5 years agoarch: arm: Enable SPDIF driver for Tegra30
Sumit Bhattacharya [Wed, 28 Sep 2011 12:29:22 +0000]
arch: arm: Enable SPDIF driver for Tegra30

Bug 872652

Change-Id: Ic170dc2fc86f74d9e67d3b73a6f83368597dafcb
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/54975
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: Ra59bdfb6b9109169935b3d5c9275053290d741ad

5 years agoarm: tegra: parse kernel command line for debug port id
Laxman Dewangan [Thu, 8 Sep 2011 14:06:17 +0000]
arm: tegra: parse kernel command line for debug port id

Parsing the linux command line for the debug port id.

bug 795847

Reviewed-on: http://git-master/r/51370
(cherry picked from commit f988c97564f9ecf4b78f4e935e2cfc4ca1b6db0e)

Change-Id: Ib1bbdd9f671ab4c22cffdf379d3b9fd79a5a8736
Reviewed-on: http://git-master/r/57042
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

Rebase-Id: R8b31dafaa124fb7e99d219bb464703b5696da0ff

5 years agoarm: tegra: fix "malformed early option" warning
Deepesh Gujarathi [Fri, 7 Oct 2011 09:48:30 +0000]
arm: tegra: fix "malformed early option" warning

early_param expects return value 0 for success as
opposed to 1 in case of set_param handler.

Bug 875134

Change-Id: I3eaf540a44fef4d211add399cedc258314266ed0
Reviewed-on: http://git-master/r/56638
Tested-by: Deepesh Gujarathi <dgujarathi@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>

Rebase-Id: Rbcbd37982e85a4cbad71319945efbc0ab6052d90

5 years agoARM: tegra: fuse: Fix tegra_chip_uid
Dan Willemsen [Wed, 5 Oct 2011 22:26:57 +0000]
ARM: tegra: fuse: Fix tegra_chip_uid

This now matches what the bootloader thinks the chip ID is (and the lot
code is no longer all zeros).

Change-Id: I46dc677b983dd28f7f77e49919860fef66da8f51
Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
Reviewed-on: http://git-master/r/56316
Reviewed-by: Scott Williams <scwilliams@nvidia.com>

Rebase-Id: Rfb7b961acd57447df95600d4f1678d84242ed1b9

5 years agoARM: tegra: power: Add Tegra3 cpu idle parameters
Alex Frid [Sat, 1 Oct 2011 04:27:37 +0000]
ARM: tegra: power: Add Tegra3 cpu idle parameters

Add Tegra3 cpu idle parameters: lp2_0_in_idle and lp_n_in_idle
to independently control LP2 mode for boot and secondary cpus.

Change-Id: I7e526b9bd78a9d5c3235307bbc89f5fb507bec2b
Reviewed-on: http://git-master/r/55630
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Tested-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

Rebase-Id: Rc6a468b2e9e065c344b2386366d5a47d77ddf037

5 years agoARM: tegra: power: Update Tegra3 LP2 time prediction
Alex Frid [Thu, 29 Sep 2011 05:42:06 +0000]
ARM: tegra: power: Update Tegra3 LP2 time prediction

Use local timer count to predict time to be spent by secondary CPU
in LP2 state instead of scheduler timing. This is more accurate, as
local timer wakes CPU after counts down to zero.

Change-Id: I28fe6c3153e1c527abf4cf66b556d64516582a35
Reviewed-on: http://git-master/r/55629
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Tested-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Reviewed-by: Antti Miettinen <amiettinen@nvidia.com>

Rebase-Id: R577246dfe6bce06bf7a1f87d0ab488322d98b631

5 years agoarm: tegra: move core_edp parsing to early_init
Deepesh Gujarathi [Thu, 15 Sep 2011 08:27:02 +0000]
arm: tegra: move core_edp parsing to early_init

since the dvfs init was being called before the kernel commandline was
parsed, it resulted in an incorrect core_edp voltage being set further
leading to an incorrect emc clock.

move parsing of core_edp voltage value to early_param handler.

fixes bug 875134
partial fix for bug 877315

Change-Id: Iab90e35ecb9145f028dd9c7bae7c7c4b49186b55
Originally Reviewed-on: http://git-master/r/52570
Reviewed-on: http://git-master/r/56181
Tested-by: Deepesh Gujarathi <dgujarathi@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Sridhar Lavu <slavu@nvidia.com>
Tested-by: Sridhar Lavu <slavu@nvidia.com>

Rebase-Id: Rda263df02e386b4b2f455196c3f6ade7526c45ed

5 years agoARM: tegra: clock: Re-factor shared bus locking
Alex Frid [Sat, 1 Oct 2011 23:00:51 +0000]
ARM: tegra: clock: Re-factor shared bus locking

Current code:
- on tegra2 unnecessary covers with bus lock shared user state update
- on tegra3 does not cover shared bus rate update at all
Modified to cover with bus lock shared bus rate update only on both
tegra2 and tegra3.

Change-Id: Iaa2597136a521adf4285c61eb579c917c2c7965c
Reviewed-on: http://git-master/r/55640
Tested-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Tested-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

Rebase-Id: R1b28f32ae37d47c56855023b18c943bf8fd93c74

5 years agoARM: tegra: power: Clean Tegra3 LP2 entry procedure
Alex Frid [Wed, 28 Sep 2011 05:33:50 +0000]
ARM: tegra: power: Clean Tegra3 LP2 entry procedure

- Do not save/restore local timer configuration across secondary CPU
LP2 state. It is always preserved, since local timer is neither power
gated nor reset when secondary CPU is in LP2.

- Do not configure external timer for secondary CPU wake up, since we
can use local timer instead. Moreover, in current code external timer
interrupt is registered too late on secondary CPU after it is brought
on-line, so the timer may not always be able to wake CPU up from LP2.

Change-Id: I864e9910fe7112bbce3ea4dbaef12be4b42fb5dc
Reviewed-on: http://git-master/r/55070
Tested-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

Rebase-Id: R3407f05d200d81e29994daf278170d3619714bef

5 years agoARM: tegra: power: Initialize and update LP2 exit latency
Alex Frid [Wed, 28 Sep 2011 03:14:55 +0000]
ARM: tegra: power: Initialize and update LP2 exit latency

Change-Id: Id6bacc252774758d9ea03b7f2cc91897b5817e10
Reviewed-on: http://git-master/r/55069
Tested-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

Rebase-Id: Ra8e8dfed500041886700a8fd44b0b917367225b3

5 years agoARM: tegra: timer: Update twd suspend/resume
Alex Frid [Wed, 21 Sep 2011 06:37:36 +0000]
ARM: tegra: timer: Update twd suspend/resume

- Preserve twd periodic load register across suspend and LP2 on main
CPU. Keep timer disabled on resume, since it will be re-configured
later when timekeeping switches from global system timer.

- Generate "load equal zero" warning in twd suspend/resume code only
when timer is in periodic mode.

Change-Id: If7df8be08c0ef4e355f315e3f0b7e3cf1b358f0f
Reviewed-on: http://git-master/r/55068
Tested-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

Rebase-Id: R75f3950a915e0953a098620dea9ea32a7d5e9482

5 years agoARM: tegra: dvfs: Disable all rails if one failed to connect
Alex Frid [Fri, 30 Sep 2011 03:50:12 +0000]
ARM: tegra: dvfs: Disable all rails if one failed to connect

Change-Id: I0aa4debdb0bed160c6ff9d6e5863bfa06a693017
Reviewed-on: http://git-master/r/55370
Tested-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

Rebase-Id: Rfb9dea2f471f257a15d9da163226573f5330ce32

5 years agoARM: tegra: power: restore ARM errata fixes after cpu power/rail gating.
vdumpa [Wed, 4 May 2011 18:48:38 +0000]
ARM: tegra: power: restore ARM errata fixes after cpu power/rail gating.

Bug 804805

(cherry picked from commit 068e6789bd335640ad2b444fae1e74fd9ca974c5)

Change-Id: If79b491133e6080b8b9c90c5adb0f59239ea275f
Reviewed-on: http://git-master/r/54842
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Tested-by: Krishna Reddy <vdumpa@nvidia.com>

Rebase-Id: R16eabb01ed2c8197632d6063b5c9f35bed5714dd

5 years agoarm: tegra: smmu: Remove IORESOURCE use from SMMU IOVA range
Hiro Sugawara [Wed, 14 Sep 2011 00:20:35 +0000]
arm: tegra: smmu: Remove IORESOURCE use from SMMU IOVA range

SMMU simply needs to know its assigned IOVA range, but does not need
address space resources.
Bug 874438

Change-Id: I0b9943d06c49363cfc0355586866f3bd6b217274
Reviewed-on: http://git-master/r/54534
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: R3f4045ef2858960cd987a7477ec6869168ccec7d

5 years agoARM: tegra: Disable AUTO_HOTPLUG for Tegra2.
Gaurav Sarode [Wed, 28 Sep 2011 08:38:39 +0000]
ARM: tegra: Disable AUTO_HOTPLUG for Tegra2.

AUTO_HOTPLUG is not supported on Tegra2 platform.

Change-Id: Id6332b8a5e784bfada42c58803075ee2c70ec019
Reviewed-on: http://git-master/r/54915
Tested-by: Gaurav Sarode <gsarode@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Gerrit_Virtual_Submit
Reviewed-by: Scott Williams <scwilliams@nvidia.com>

Rebase-Id: R02328774cd3588a6091446937229983e9131f87c

5 years agoARM: tegra: nvavp: registering new nvavp driver
Bharat Nihalani [Mon, 26 Sep 2011 13:51:08 +0000]
ARM: tegra: nvavp: registering new nvavp driver

Also re-arranged tegra_nvavp code so that it is common accross boards

Bug 880623

Change-Id: I7d634a718e07e07e945fb512466b3a0672aea7e2
Reviewed-on: http://git-master/r/54487
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: R188282334f9e0d18985b87c6241f96f663b8f540

5 years agoarm: tegra: correcting wfi sequence
venu byravarasu [Tue, 27 Sep 2011 06:56:46 +0000]
arm: tegra: correcting wfi sequence

As per hardware documentation, dsb should precede wfi.
Hence fixing it.

Change-Id: I1c98581dfe3891d425ab36c1a2bb313e19ad046d
Reviewed-on: http://git-master/r/54626
Tested-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>

Rebase-Id: R3d7e46306d7d97c2cdfa0ec7ce658a1658724a76

5 years agoarch: arm: tegra: Add SPDIF driver support
Sumit Bhattacharya [Sun, 18 Sep 2011 18:48:34 +0000]
arch: arm: tegra: Add SPDIF driver support

Bug 872652

Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>

Change-Id: I7b948b820434721511c008f644b69d93c23865e1
Reviewed-on: http://git-master/r/53094
Tested-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

Rebase-Id: R769f97e31513f4479b20d7dff995e06cc72e19bd