6 years agoUPSTREAM mm: memcg: enable memcg OOM killer only for user faults
Johannes Weiner [Thu, 8 Aug 2013 02:56:32 +0000]
UPSTREAM mm: memcg: enable memcg OOM killer only for user faults

System calls and kernel faults (uaccess, gup) can handle an out of memory
situation gracefully and just return -ENOMEM.

Enable the memcg OOM killer only for user faults, where it's really the
only option available.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.cz>
Cc: David Rientjes <rientjes@google.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: azurIt <azurit@pobox.sk>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 31d1d8b2aa8733b4fe221b4bcbaa15aec3582b99)
Change-Id: If84752f6c46e464bc0d1d868ac543497425ba7cc
Reviewed-on: http://git-master/r/266405
GVS: Gerrit_Virtual_Submit
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Tested-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

6 years agoUPSTREAM arch: mm: pass userspace fault flag to generic fault handler
Prashant Gaikwad [Mon, 12 Aug 2013 10:39:13 +0000]
UPSTREAM arch: mm: pass userspace fault flag to generic fault handler

Unlike global OOM handling, memory cgroup code will invoke the OOM killer
in any OOM situation because it has no way of telling faults occuring in
kernel context - which could be handled more gracefully - from
user-triggered faults.

Pass a flag that identifies faults originating in user space from the
architecture-specific fault handlers to generic code so that memcg OOM
handling can be improved.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
Cc: David Rientjes <rientjes@google.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: azurIt <azurit@pobox.sk>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 407c454cb0ac6e68ca66974da787a71118cfef84)

Conflicts:

arch/arc/mm/fault.c
arch/arm64/mm/fault.c
arch/metag/mm/fault.c
arch/parisc/mm/fault.c

Change-Id: Iee53942737627be8dd8e2e325b5ba87fe85d6814
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-on: http://git-master/r/266410
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

6 years agoUPSTREAM arch: mm: remove obsolete init OOM protection
Prashant Gaikwad [Mon, 12 Aug 2013 10:33:22 +0000]
UPSTREAM arch: mm: remove obsolete init OOM protection

The memcg code can trap tasks in the context of the failing allocation
until an OOM situation is resolved.  They can hold all kinds of locks (fs,
mm) at this point, which makes it prone to deadlocking.

This series converts memcg OOM handling into a two step process that is
started in the charge context, but any waiting is done after the fault
stack is fully unwound.

Patches 1-4 prepare architecture handlers to support the new memcg
requirements, but in doing so they also remove old cruft and unify
out-of-memory behavior across architectures.

Patch 5 disables the memcg OOM handling for syscalls, readahead, kernel
faults, because they can gracefully unwind the stack with -ENOMEM.  OOM
handling is restricted to user triggered faults that have no other option.

Patch 6 reworks memcg's hierarchical OOM locking to make it a little more
obvious wth is going on in there: reduce locked regions, rename locking
functions, reorder and document.

Patch 7 implements the two-part OOM handling such that tasks are never
trapped with the full charge stack in an OOM situation.

This patch:

Back before smart OOM killing, when faulting tasks were killed directly on
allocation failures, the arch-specific fault handlers needed special
protection for the init process.

Now that all fault handlers call into the generic OOM killer (609838c "mm:
invoke oom-killer from remaining unconverted page fault handlers"), which
already provides init protection, the arch-specific leftovers can be
removed.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: David Rientjes <rientjes@google.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: azurIt <azurit@pobox.sk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit c5659bca566f8b4798a34c0bf19b7afd0bfa706e)

Conflicts:

arch/arc/mm/fault.c

Change-Id: I8807370a955f5a730832db8a86eb8dade81be251
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-on: http://git-master/r/266409
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

6 years agoUPSTREAM mm: invoke oom-killer from remaining unconverted page fault handlers
Prashant Gaikwad [Mon, 12 Aug 2013 10:32:28 +0000]
UPSTREAM mm: invoke oom-killer from remaining unconverted page fault handlers

A few remaining architectures directly kill the page faulting task in an
out of memory situation.  This is usually not a good idea since that
task might not even use a significant amount of memory and so may not be
the optimal victim to resolve the situation.

Since 2.6.29's 1c0fe6e ("mm: invoke oom-killer from page fault") there
is a hook that architecture page fault handlers are supposed to call to
invoke the OOM killer and let it pick the right task to kill.  Convert
the remaining architectures over to this hook.

To have the previous behavior of simply taking out the faulting task the
vm.oom_kill_allocating_task sysctl can be set to 1.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: David Rientjes <rientjes@google.com>
Acked-by: Vineet Gupta <vgupta@synopsys.com> [arch/arc bits]
Cc: James Hogan <james.hogan@imgtec.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Chen Liqin <liqin.chen@sunplusct.com>
Cc: Lennox Wu <lennox.wu@gmail.com>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 609838cfed972d49a65aac7923a9ff5cbe482e30)

Conflicts:

arch/arc/mm/fault.c
arch/metag/mm/fault.c

Change-Id: I3a9435be0bd4b8ea43cefd87ca8d408201ae3bf1
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-on: http://git-master/r/266408
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

6 years agoUPSTREAM arch: mm: do not invoke OOM killer on kernel fault OOM
Johannes Weiner [Thu, 8 Aug 2013 02:56:30 +0000]
UPSTREAM arch: mm: do not invoke OOM killer on kernel fault OOM

Kernel faults are expected to handle OOM conditions gracefully (gup,
uaccess etc.), so they should never invoke the OOM killer.  Reserve this
for faults triggered in user context when it is the only option.

Most architectures already do this, fix up the remaining few.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: David Rientjes <rientjes@google.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: azurIt <azurit@pobox.sk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Change-Id: Id58a8ebe3ee619ef9ae3590b5788823fa6bd2dce
Reviewed-on: http://git-master/r/266404
GVS: Gerrit_Virtual_Submit
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Tested-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

6 years agommc: tegra: Set pu,pd offsets for T148 SDMMC
Naveen Kumar Arepalli [Wed, 28 Aug 2013 05:57:28 +0000]
mmc: tegra: Set pu,pd offsets for T148 SDMMC

-Set pu,pd offsets for T148 SDMMC.
-Program pu,pd offset values to 2.

Bug 1333552

Change-Id: I61f17949e8c4da5e7b6044027769a9a437339e52
Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-on: http://git-master/r/267086
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>

6 years agodma: tegra: Use runtime_pm for enabling/disabling clock
Chaitanya Bandi [Tue, 27 Aug 2013 14:48:12 +0000]
dma: tegra: Use runtime_pm for enabling/disabling clock

Used runtime pm APIs for clock enabling/disabling and
also made changes such that clock is not enabled during
idle.

Bug 1326667

Change-Id: I7cf478006e11b3a63271c8c7b0a8f0e9406cbbca
Signed-off-by: Chaitanya Bandi <bandik@nvidia.com>
Reviewed-on: http://git-master/r/265931
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

6 years agoi2c: tegra: Add debug prints for i2c timed out case
Chaitanya Bandi [Mon, 26 Aug 2013 11:22:28 +0000]
i2c: tegra: Add debug prints for i2c timed out case

Added debug prints for i2c timed out case to
help debug.

Change-Id: I9b8b66acdc80b9bbddbf9d824d7fbd71fa602460
Signed-off-by: Chaitanya Bandi <bandik@nvidia.com>
Signed-off-by: Pradeep Goudagunta <pgoudagunta@nvidia.com>
Reviewed-on: http://git-master/r/266034
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>

6 years agoARM: tegra: pm: Add tegra-apbdma to MC clock power domain
Chaitanya Bandi [Tue, 27 Aug 2013 06:18:36 +0000]
ARM: tegra: pm: Add tegra-apbdma to MC clock power domain

Added tegra-apbdma device to MC clock power domain.

Bug 1326667

Change-Id: Iae1433280f79c3b50cb9e7e08fd324fdbf9a302e
Signed-off-by: Chaitanya Bandi <bandik@nvidia.com>
Reviewed-on: http://git-master/r/266459
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

6 years agovideo: tegra: host: Force runlist update
Terje Bergstrom [Mon, 26 Aug 2013 07:29:45 +0000]
video: tegra: host: Force runlist update

If runlist update hangs, recover the hung channel.

Bug 1342089

Change-Id: Id5d4db9ddd8c58e915b4af84f0f6ed8f77e7f414
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/265972

6 years agovideo: tegra: host: Handle context switch timeout
Terje Bergstrom [Fri, 23 Aug 2013 06:15:38 +0000]
video: tegra: host: Handle context switch timeout

Implement handling of CTXSW_TIMEOUT. We force the hung channel out via
a fake MMU fault, handle the fake MMU fault and disable the channel.
The channel is freed when the process owning it quits.

Bug 1342089

Change-Id: If2195e6a35a22f45f66317e0beac5118916cc845
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/265375

6 years agovideo: tegra: host: Remove compilation warning
Terje Bergstrom [Sun, 25 Aug 2013 12:32:22 +0000]
video: tegra: host: Remove compilation warning

A variable was left unused. Remove the variable.

Change-Id: I4b114c9fcaee5ae154718cf7c9e8e162d88c3979
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/265942
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
Tested-by: Juha Tukkinen <jtukkinen@nvidia.com>

6 years agovideo: tegra: host: Use usleep_range when possible
Terje Bergstrom [Sun, 25 Aug 2013 12:06:56 +0000]
video: tegra: host: Use usleep_range when possible

Replace all udelay()'s with wait time longer than 10ms with
usleep_range(). Give a range of double the delay to reduce impact
on amount of interrupts.

Clock code is the only exception for now.

Bug 1342089

Change-Id: I80fc014016ca7d3ea2ead6b619ec718b12c03b1e
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/265941
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
Tested-by: Juha Tukkinen <jtukkinen@nvidia.com>

6 years agovideo: tegra: host: Use usleep_range on long waits
Terje Bergstrom [Sat, 24 Aug 2013 13:49:44 +0000]
video: tegra: host: Use usleep_range on long waits

Use usleep_range() for all long delays. It allows kernel to run other
threads while waiting, and coalesces the wakeup interrupts.

Bug 1342089

Change-Id: I9f645530285ac3938671803dfa1a3b341145a0b4
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/265940
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
Tested-by: Juha Tukkinen <jtukkinen@nvidia.com>

6 years agovideo: tegra: host: Use wall clock time in ms
Terje Bergstrom [Sat, 24 Aug 2013 12:47:03 +0000]
video: tegra: host: Use wall clock time in ms

When waiting for an event with a timeout, use wall time for checking
if timeout has been exceeded. Also changes timeouts to be managed as
milliseconds in unsigned long to unify with the rest of driver.

Changes infinite timeouts to sane maximums.

Bug 1342089

Change-Id: I7659f7fa85441d1e32b8c207023338d34042c796
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/265939
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
Tested-by: Juha Tukkinen <jtukkinen@nvidia.com>

6 years agovideo: tegra: nvmap: add api's that take dmabuf
Krishna Reddy [Tue, 27 Aug 2013 21:15:03 +0000]
video: tegra: nvmap: add api's that take dmabuf

add api's that take dmabuf instead of nvmap_handle_ref.
these are necessary for nvhost to start using dmabuf.
Bug 1356091

Change-Id: I61c74641f2c013e4aa9812aabf2a6f558fdf1fcf
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/266897
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>

6 years agoiommu/tegra: smmu: T124 : enable support for sata
Bibek Basu [Mon, 26 Aug 2013 05:47:54 +0000]
iommu/tegra: smmu: T124 : enable support for sata

Enable SMMU support for sata in T124

Bug 1350808

Change-Id: Ia3061acc162b98c3225241bead997974ab01e2aa
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/265930
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>

6 years agovideo: tegra: host: Check kzalloc return value
Tuomas Tynkkynen [Thu, 22 Aug 2013 23:50:09 +0000]
video: tegra: host: Check kzalloc return value

Check return value from kzalloc or we'll crash due to a NULL pointer.

Bug 1352454

Change-Id: I5e81ea87ca3a216e48acd601e370dcab961e82cd
Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
Reviewed-on: http://git-master/r/265163
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>

6 years agovideo: tegra: nvmap: add api to get param based on dmabuf
Krishna Reddy [Tue, 27 Aug 2013 06:13:16 +0000]
video: tegra: nvmap: add api to get param based on dmabuf

this api is necessary for nvhost to start using dmabuf till
the dependency on params like heap, kind, size and aligment
are fixed in nvhost/gk20a.
Bug 1356091

Change-Id: I77900df42cdcc067c5d9b4f7815a4da7e03b5366
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/266454
Reviewed-by: Hiroshi Doyu <hdoyu@nvidia.com>

6 years agovideo: tegra: host: Use ERR_PTR, not NULL
Tuomas Tynkkynen [Thu, 15 Aug 2013 01:34:32 +0000]
video: tegra: host: Use ERR_PTR, not NULL

nvhost_memmgr_get should return an ERR_PTR value instead of NULL if
someone gives us a bad handle, since its callers are not expecting NULLs
which leads to a kernel panic.

Bug 1352454

Change-Id: Ie533c1cd319436dcb481119b0a252d17a063ff54
Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
Reviewed-on: http://git-master/r/264008
GVS: Gerrit_Virtual_Submit
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>

6 years agoARM: tegra: clock: Add PM QoS option for core bus cap
Alex Frid [Tue, 23 Jul 2013 02:05:32 +0000]
ARM: tegra: clock: Add PM QoS option for core bus cap

Added an option to specify core bus cap level via PM QoS interface in
addition to the existing sysfs nodes. The most aggressive (minimum)
constraint is applied.

This commit does not add any PM QoS cap limits.

Change-Id: Ie9d30a679127bc6db09afbd0f80dea8df00d0b58
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/266844
GVS: Gerrit_Virtual_Submit
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

6 years agovideo: tegra: gk20a: enable ELCG
Kevin Huang [Sat, 10 Aug 2013 00:16:52 +0000]
video: tegra: gk20a: enable ELCG

Bug 1327269

Change-Id: I31ecb79fa388561670d58e74a6f30eeb8af2860b
Signed-off-by: Kevin Huang <kevinh@nvidia.com>
Reviewed-on: http://git-master/r/265715
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mitch Luban <mluban@nvidia.com>

6 years agovideo: tegra: gk20a: modify perfmon algorithm
Prashant Malani [Tue, 27 Aug 2013 00:06:07 +0000]
video: tegra: gk20a: modify perfmon algorithm

Modify perfmon algorithm to allow first event to
be either increase or decrease event. Since the
init parameter is no longer necessary, we remove
it.

Also modify the event handler to decrease gk20a
frequency by 70% on a decrease event.

Change-Id: I67647d2b689a107dc0a84cf2abf04f83404f485b
Signed-off-by: Prashant Malani <pmalani@nvidia.com>
Reviewed-on: http://git-master/r/266285
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Tested-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

6 years agoRevert "video: tegra: gk20a: update power_on correctly"
Alex Frid [Sun, 25 Aug 2013 01:05:18 +0000]
Revert "video: tegra: gk20a: update power_on correctly"

This reverts commit 4d312be7ca8a3512999422bb95e434c9cdefde04.

The logic of the original commit is sound, but in this case applied
incorrectly: the nvhost_gk20a_finalize_poweron() is called after gk20a
power is on and h/w is accessible, so the power_on flag can be set at
the beginning.  Complementary the flag can be cleared at the end of
nvhost_gk20a_prepare_poweroff() function.

Change-Id: I29174757582cd8f3d94f07bdddfd0ce9fb852584
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/265877
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

6 years agovideo: tegra: gk20a: Export clock operations
Alex Frid [Fri, 23 Aug 2013 05:29:19 +0000]
video: tegra: gk20a: Export clock operations

Re-factored GPCPLL clock control:
- added s/w shadow for GPCPLL enabled/disabled state
- implemented GPCPLL enable/disable operations
- made sure set rate operation does not enable disabled pll

Connected gk20a tegra_clk handle to gpu shared user clock (instead of
GPCPLL reference clock). Re-factored all clock operations accordingly.
Removed any direct calls into dvfs layer, since gpu voltage will be
automatically scaled bu gpu shared bus in response to user requests.
Registered gk20a clock operations with tegra clock framework.

Bug 1320966

Change-Id: I6827ba99b0d0660114f729efd8e243f11c2a4414
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/265876
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

6 years agoARM: tegra12: clock: Add gpu shared bus
Alex Frid [Sat, 24 Aug 2013 04:44:23 +0000]
ARM: tegra12: clock: Add gpu shared bus

Added Tegra12 gpu shared bus (gbus) on top of clock operations exported
by gk20a driver. Populated bus with gk20a shared user, cap and override
user clocks. Updated gbus dvfs tables.

Bug 1320966

Change-Id: Iafadc4e00fa6348f1f139d69f467c4071c48b145
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/265875
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

6 years agovideo: tegra: deal with invalid window number
Xue Dong [Mon, 26 Aug 2013 20:23:23 +0000]
video: tegra: deal with invalid window number

bug 1322596

Change-Id: I6baee32a769a67863707a4603cc723b0330427ec
Signed-off-by: Xue Dong <xdong@nvidia.com>
Reviewed-on: http://git-master/r/266191
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jon Mayo <jmayo@nvidia.com>

6 years agoARM: tegra: clock: Support clock operations export
Alex Frid [Sat, 24 Aug 2013 03:21:44 +0000]
ARM: tegra: clock: Support clock operations export

Added mechanism for clock producers outside of tegra clock-and-reset
module to register clock operations with tegra clock framework.

Bug 1320966

Change-Id: I5dd49dabd1624e042309f550d68cdf3de8ba2afe
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/265874
Reviewed-by: Kaz Fukuoka <kfukuoka@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

6 years agoinput: cfboost: Fix pm_qos_add_request
Xiaohui Tao [Mon, 26 Aug 2013 17:47:06 +0000]
input: cfboost: Fix pm_qos_add_request

cf_core is used to set how many cpu cores to be brought
online. The pm_qos_class is set to be the wrong value.
Change it from PM_QOS_CPU_FREQ_MIN to PM_QOS_MIN_ONLINE_CPUS.

Change-Id: I0905ef1afbc2bc3724367e6d6e69da3dcc566632
Signed-off-by: Xiaohui Tao <xtao@nvidia.com>
(cherry picked from commit 78e77f377560188d57a894146c57425cc809bb60)
Signed-off-by: Yogish Kulkarni <yogishk@nvidia.com>
Reviewed-on: http://git-master/r/266160
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mitch Luban <mluban@nvidia.com>

6 years agoarm: tegra: ardbeg: Enable panel bl regulator
Vineel Kumar Reddy Kovvuri [Wed, 21 Aug 2013 05:42:09 +0000]
arm: tegra: ardbeg: Enable panel bl regulator

Enabled dvdd_lcd regulator responsible for backlight
intensity.

Bug 1322150

Change-Id: Iebd815691246ae33a6bc5d4dc6546366c77912bf
Signed-off-by: Vineel Kumar Reddy Kovvuri <vineelkumarr@nvidia.com>
Reviewed-on: http://git-master/r/264195
Reviewed-by: Animesh Kishore <ankishore@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>

6 years agovideo: tegra: dc: Fix crash on missing regulators
Vineel Kumar Reddy Kovvuri [Wed, 21 Aug 2013 06:33:57 +0000]
video: tegra: dc: Fix crash on missing regulators

Fix kernel crash if avdd_dsi_csi regulator is
missing

Bug 1311949

Change-Id: Ic63b30a5d1a51288a6eae876a278ee41fedd8fbd
Signed-off-by: Vineel Kumar Reddy Kovvuri <vineelkumarr@nvidia.com>
Reviewed-on: http://git-master/r/264218
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Tested-by: Jon Mayo <jmayo@nvidia.com>

6 years agotegra: dc: hdmi: allow LP0 wakeup by hotplug GPIO
Alexandre Courbot [Tue, 27 Aug 2013 04:22:16 +0000]
tegra: dc: hdmi: allow LP0 wakeup by hotplug GPIO

Introduce a new TEGRA_DC_OUT_HOTPLUG_WAKE_LP0 flag which can be
specified for DC controllers for which we want the HDMI hotplug
GPIO to serve as a LP0 wake source.

Bug 1345127

Change-Id: I9193be6ada4b0eca1c074c4b9a5888e3b0e49150
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Reviewed-on: http://git-master/r/266365
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Aaron Gamble <jgamble@nvidia.com>
Reviewed-by: Prajakta Gudadhe <pgudadhe@nvidia.com>
Reviewed-by: Jon Mayo <jmayo@nvidia.com>

6 years agovideo: tegra: dc: Update DC LPAE support
Chao Xu [Wed, 21 Aug 2013 00:38:21 +0000]
video: tegra: dc: Update DC LPAE support

bug 1341658

Change-Id: I9cb506f5ffb4be36804c1c294025898dcf9b9a7e
Signed-off-by: Chao Xu <cxu@nvidia.com>
Reviewed-on: http://git-master/r/265622
GVS: Gerrit_Virtual_Submit

6 years agohwmon: ina230: fix negative current reading
Xin Xie [Tue, 4 Jun 2013 01:27:55 +0000]
hwmon: ina230: fix negative current reading

bug 1298931

Change-Id: If0037afb285b88dde11fe5f40def8f8fe9727c56
Signed-off-by: Xin Xie <xxie@nvidia.com>
Reviewed-on: http://git-master/r/235215
(cherry picked from commit 339d494c5790e7a96d00e94e7e6c68716644c18a)
Reviewed-on: http://git-master/r/266525
Reviewed-by: Timo Alho <talho@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Timo Alho <talho@nvidia.com>
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>

6 years agoARM: tegra: config: remove CONFIG_TEST_POWER
Timo Alho [Tue, 27 Aug 2013 09:58:46 +0000]
ARM: tegra: config: remove CONFIG_TEST_POWER

Removing CONFIG_TEST_POWER=y as it is a debug feature that may
potentially cause problems in production systems.

Change-Id: I3bec94c8f9c13fc183945716b317c5b3f5234573
Signed-off-by: Timo Alho <talho@nvidia.com>
Reviewed-on: http://git-master/r/266689
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>

6 years agortc: palmas: clean-up rtc driver
Laxman Dewangan [Tue, 27 Aug 2013 09:53:47 +0000]
rtc: palmas: clean-up rtc driver

Clean-up and align the Palmas RTC driver to mainline.
Following are the changes:
- Remove intermediate read/write API and directly use the palmas_*
  APIs.
- Simplify the read-time/set-time/read-alarm and set-alarm
  implementation.
- Avoid duplication of code by using function.

Change-Id: I70a3c65312a21da170a5a0558a3cefd7d8f796bd
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/266677

6 years agortc: palmas: rename platform data to more appropriate
Laxman Dewangan [Mon, 26 Aug 2013 12:26:26 +0000]
rtc: palmas: rename platform data to more appropriate

Renames platform data for Palmas RTC to more appropriate:
- enable_charging->backup_battery_chargeable
- charging_current_ua -> backup_battery_charger_high_current

Change-Id: Id8b48c4e337dbeda2b0545ce9ed5e3f5230edd83
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/266102

6 years agoARM: tegra: reset system through PMIC
Laxman Dewangan [Tue, 27 Aug 2013 07:36:38 +0000]
ARM: tegra: reset system through PMIC

If there is need of system reboot without any command then
use then reset system through PMIC rather than PMC reset.

Enable this for Ardbeg with TI PMIC.

bug 1234703

Change-Id: I3628f7460f1ddd3ebd8e7d35217fb0fcc41fe5b1
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/266506
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit

6 years agoARM: tegra: enable bit-banging i2c transfer after shutdown on ardbeg pwr-i2c
Laxman Dewangan [Tue, 27 Aug 2013 07:35:28 +0000]
ARM: tegra: enable bit-banging i2c transfer after shutdown on ardbeg pwr-i2c

To provide the system reset through PMIC, enable the gpio based i2c
transfer after shutdown.

bug 1234703

Change-Id: I27d6c7fad05f293f07ecba0f8c452d8b194db709
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/266505
GVS: Gerrit_Virtual_Submit

6 years agopower: reset: palmas: implement errata for palams reset
Laxman Dewangan [Tue, 27 Aug 2013 07:17:53 +0000]
power: reset: palmas: implement errata for palams reset

Palmas device version ES2.1, ES2.0 and ES1.0 have the hw issue
when doing reset and as a SW-WAR, it need to reset the PMIC as
power-off and then power on through RTC alarm.

Implement the same for the above ES version.

Bug 1234703

Change-Id: I97e27162a572676c1fe2139cd574753a73f9ed3a
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/266504
GVS: Gerrit_Virtual_Submit

6 years agoARM: tegra: reset system through PMIC
Laxman Dewangan [Mon, 26 Aug 2013 14:06:47 +0000]
ARM: tegra: reset system through PMIC

If there is need of system reboot without any command then
use then reset system through PMIC rather than PMC reset.

Change-Id: I18e44137e08fe73819cd60f2f256d0f3a1924c01
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/266131
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit

6 years agoARM: tegra: enable bit-banging i2c transfer after shutdown on TN8 pwr-i2c
Laxman Dewangan [Mon, 26 Aug 2013 10:11:31 +0000]
ARM: tegra: enable bit-banging i2c transfer after shutdown on TN8 pwr-i2c

To provide the system reset through PMIC, enable the gpio based i2c
transfer after shutdown.

Change-Id: I8ef5dff371e4df2de7b3a7f50afb3907c4e16d15
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/266130
GVS: Gerrit_Virtual_Submit

6 years agopower: reset: palmas: implement power reset API
Laxman Dewangan [Mon, 26 Aug 2013 10:10:14 +0000]
power: reset: palmas: implement power reset API

Implement power reset to provide the system reset through
PMIC. This functionality can be enable through platform data.

Change-Id: Ia6fb70306c8afa7674f9f3fb79e20527bc7ea2b1
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/266128
GVS: Gerrit_Virtual_Submit

6 years agovideo: tegra: host: Block timed out gk20a channel
Terje Bergstrom [Thu, 22 Aug 2013 07:59:54 +0000]
video: tegra: host: Block timed out gk20a channel

Return error when trying to submit to a channel that has been
blacklisted.

Bug 1342089

Change-Id: Ic0e259c6573f4b7c617bbebd19a81cb7f6987f1a
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/264850
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>

6 years agovideo: tegra: host: Use sleep when preempting
Terje Bergstrom [Thu, 22 Aug 2013 07:57:04 +0000]
video: tegra: host: Use sleep when preempting

Waiting for preemption can take several seconds if there is a long
submit in channel. A busy loop can peg the CPU for many seconds. Use
usleep_range() to yield CPU time to other tasks.

Bug 1342089

Change-Id: I85a053a95f102c5d3a0cf6e8d60295615e14e491
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/264849
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>

6 years agovideo: tegra: host: Add debug support for gk20a ch
Terje Bergstrom [Thu, 22 Aug 2013 07:41:06 +0000]
video: tegra: host: Add debug support for gk20a ch

Add support for dumping the state of gk20a channels. At the moment
dumping the status of active channel is broken, but dormant channels
should be ok.

Bug 1342089

Change-Id: I32174f0fac46cc0793803e8cc84803164791cd55
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/264848
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>

6 years agoARM: tegra: Increase PMU max voltage for vdd_cpu to 1350
Chaitanya Bandi [Tue, 2 Jul 2013 08:21:35 +0000]
ARM: tegra: Increase PMU max voltage for vdd_cpu to 1350

Bug 1310622

Change-Id: I2d47023f46a0d6fb56731274b6312d89b51f1635
Signed-off-by: Chaitanya Bandi <bandik@nvidia.com>
Reviewed-on: http://git-master/r/244224
(cherry picked from commit 80d052a8ba69489a95b50bbc8584470387602b3f)
(cherry picked from commit e494dcf525192161ee08d93f396a6488ace2cc95)
Reviewed-on: http://git-master/r/266044
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

6 years agoarm: config: tegra12: vcm30_t124: Update defconfig
Ashwin Joshi [Mon, 26 Aug 2013 12:11:26 +0000]
arm: config: tegra12: vcm30_t124: Update defconfig

Update defconfig of board vcm30_t124, enable following options:

CONFIG_TEGRA_MC_DOMAINS
CONFIG_PLATFORM_ENABLE_IOMMU
CONFIG_TEGRA_IOMMU_SMMU

Bug 1319925

Change-Id: Ib4fb4a49f0313adf6beb1ddc04199d257bd519b6
Signed-off-by: Ashwin Joshi <asjoshi@nvidia.com>
Reviewed-on: http://git-master/r/266108
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

6 years agoarm: tegra: dts for vcm30_t124.
Ashwin Joshi [Mon, 26 Aug 2013 12:10:00 +0000]
arm: tegra: dts for vcm30_t124.

Add dts file for vcm30_t124 board.

Bug 1319925

Change-Id: Ic1e53ec38f03b38163da28aaae22ab56f256ab2d
Signed-off-by: Ashwin Joshi <asjoshi@nvidia.com>
Reviewed-on: http://git-master/r/262292
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

6 years agoarm: tegra: vcm3.0: t124: Add initial board files.
Ashwin Joshi [Tue, 6 Aug 2013 12:06:18 +0000]
arm: tegra: vcm3.0: t124: Add initial board files.

Add initial board files for automotive board. The board will be named as
vcm30_t124 and will support all automotive boards.

Bug 1319925

Change-Id: Ib23aa3ef1d57a8d2e4f18f2d1de26c12de5b28f0
Signed-off-by: Ashwin Joshi <asjoshi@nvidia.com>
Reviewed-on: http://git-master/r/262290
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

6 years agopower: max17048: Add thermal zone name for max17048
Chaitanya Bandi [Mon, 22 Jul 2013 05:36:35 +0000]
power: max17048: Add thermal zone name for max17048

Bug 1325837

Change-Id: I58095ca0daab92aee762f86b6e90792c6b72ff7a
Signed-off-by: Chaitanya Bandi <bandik@nvidia.com>
(cherry picked from commit 4a1ec0614da4374e8232921a58b6df53e501f831)
Reviewed-on: http://git-master/r/266041
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

6 years agoi2c: tegra: Use appropriate clk divisor and debounce for HS mode
Chaitanya Bandi [Mon, 8 Jul 2013 06:45:46 +0000]
i2c: tegra: Use appropriate clk divisor and debounce for HS mode

Bug 1318578

Change-Id: I5d53b71e977f0a8ab8282820dbcdbfe6188d588a
Signed-off-by: Chaitanya Bandi <bandik@nvidia.com>
(cherry picked from commit a307421c4e0a400ed1905648ee5b695f17bbf403)
Reviewed-on: http://git-master/r/266040
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

6 years agoi2c: tegra: Add appropriate clk divisor for FM Plus mode
Chaitanya Bandi [Fri, 5 Jul 2013 10:45:28 +0000]
i2c: tegra: Add appropriate clk divisor for FM Plus mode

Added appropriate clock divisor for FM Plus mode.

Bug 1318578

Change-Id: I5f5d0fdbcb3df54f6ca74b752c81b00ab8841f05
Signed-off-by: Chaitanya Bandi <bandik@nvidia.com>
(cherry picked from commit 01faecda1d6ab479ada1f12ada3da4fbbe1fb7e1)
Reviewed-on: http://git-master/r/266039
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

6 years agoARM: tegra: pinmux: Fix GME drive pinmux in T14x
Chaitanya Bandi [Wed, 3 Jul 2013 10:10:02 +0000]
ARM: tegra: pinmux: Fix GME drive pinmux in T14x

The GME drive pinmux was set to wrong register configuration.
Corrected it as per register spec.

Change-Id: I61b21719ff3140c4972407b45114a55d23bb584b
Signed-off-by: Chaitanya Bandi <bandik@nvidia.com>
(cherry picked from commit af3412c61662d8c2ad4bdee8578f02ed95e1124f)
Reviewed-on: http://git-master/r/266038
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

6 years agoRevert "USB: set hub's default autosus delay as 0"
Krishna Yarlagadda [Fri, 23 Aug 2013 10:45:34 +0000]
Revert "USB: set hub's default autosus delay as 0"

This reverts commit 596d789a211d134dc5f94d1e5957248c204ef850.
Setting usb auto suspend timeout to zero is risky considering
we enable/disable pmc and do other power saving techniques in
autosuspend. Also switching between controllers for device and
host mode on otg port

Bug 1242148
Bug 1307598
Bug 1344340

Change-Id: Ic6523505e9e5ccb03a533b2160e6aeb019655863
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: http://git-master/r/265458
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

6 years agovideo: tegra: host: Fix error handling
Terje Bergstrom [Fri, 23 Aug 2013 11:21:08 +0000]
video: tegra: host: Fix error handling

Dusted error handling paths. Converts all IS_ERR_OR_NULL() instances
to appropriate versions IS_ERR() or check against NULL. Fixes
several calls to nvhost_memmgr_*() which treated the return value
incorrectly.

Bug 1212465

Change-Id: I764616d98d35b965335a9a2537fe3e2d555f0497
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/265476

6 years agoRevert "video: tegra: dc: display colorbar testcase"
Jon Mayo [Fri, 23 Aug 2013 19:27:14 +0000]
Revert "video: tegra: dc: display colorbar testcase"

This code does not belong in the kernel, please quit adding it back

This reverts commit fb7292583293529b95c04910b045adef01b361d9.

Change-Id: Ie7605a6a43ecbd9a0e7d3c04ff0a3f5db26d8b42
Signed-off-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-on: http://git-master/r/265657
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Tested-by: Krishna Reddy <vdumpa@nvidia.com>

6 years agoarm: tegra: enable smmu errata when smmu is enabled
Krishna Reddy [Mon, 26 Aug 2013 22:47:43 +0000]
arm: tegra: enable smmu errata when smmu is enabled

Change-Id: I7a88a7f170eefb8c7b96736d8d0551bc9272e1ac
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/266242
Reviewed-by: Alex Waterman <alexw@nvidia.com>
GVS: Gerrit_Virtual_Submit

6 years agovideo: tegra: nvmap: fix compilation issue
Krishna Reddy [Mon, 26 Aug 2013 22:46:03 +0000]
video: tegra: nvmap: fix compilation issue

fix compilation issue when smmu is disabled

Bug 898152

Change-Id: Ic1cdf4ffa8e8dd91965e8b1e2ac1ce764aa99065
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/266241
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Alex Waterman <alexw@nvidia.com>
GVS: Gerrit_Virtual_Submit

6 years agoARM: tegra12: clock: Fix PLLM post-divider
Kaz Fukuoka [Fri, 14 Jun 2013 01:07:39 +0000]
ARM: tegra12: clock: Fix PLLM post-divider

Fix PLLM post-divider in the same way as Tegra14.

Change-Id: Ic4ab25a879a86030869994e82a13c0218b52612c
Signed-off-by: Kaz Fukuoka <kfukuoka@nvidia.com>
Reviewed-on: http://git-master/r/265266
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

6 years agoinput: Add MSC_TIMESEC/_TIMEUSEC for android
Xiaohui Tao [Mon, 26 Aug 2013 21:42:43 +0000]
input: Add MSC_TIMESEC/_TIMEUSEC for android

Eventhub defines two entries:
MSC_ANDROID_TIME_SEC 0x6
MSC_ANDROID_TIME_USEC 0x7

to pass the timestamp from the linux kernel to android
if the input devices have a better concetp of the time.
These two entries conflict with MSC_ACTIVITY which is
used for CPU_BOOST, which causes the first touc does not
work after lp0. Add the two entries in input.h to match
with android layer.

Bug 1354400

Change-Id: I5cc9b2605db609cebad96ad1b95433fa333e77f7
Signed-off-by: Xiaohui Tao <xtao@nvidia.com>
Reviewed-on: http://git-master/r/266219
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>

6 years agovideo: tegra: gk20a: don't limit gpcpll freqs
Prashant Malani [Sat, 24 Aug 2013 03:49:09 +0000]
video: tegra: gk20a: don't limit gpcpll freqs

Min and max frequency for gpcpll is currently
limited to that of gpu dvfs table. We should be
able to beyond those limits, if required.

This change prevents overwriting of gpcpll freq
limits in gk20a clk driver.

Change-Id: If69524bfc217716166eedb4c889a84d6eb5a8ae7
Signed-off-by: Prashant Malani <pmalani@nvidia.com>
Reviewed-on: http://git-master/r/265825
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Kaz Fukuoka <kfukuoka@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

6 years agoARM: tegra: power: Enable cluster switch instrumentation
Alex Frid [Fri, 16 Aug 2013 03:47:13 +0000]
ARM: tegra: power: Enable cluster switch instrumentation

Enabled cluster switch instrumentation by default.

Change-Id: Id55dc7f4a0d16946f80d359c92ce9f03ec1bf967
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/262860
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-by: Bo Yan <byan@nvidia.com>

6 years agovideo: tegra: dc: use dmabuf API
Krishna Reddy [Thu, 22 Aug 2013 23:12:25 +0000]
video: tegra: dc: use dmabuf API

convert nvmap handle id to dmabuf and use dmabuf API

Change-Id: Ib1d4fead7e61e3a39c657d56baa9d792f79c94ee
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/265144

6 years agovideo: tegra: gk20a: Show GPCPLL registers via debugfs
Alex Frid [Sun, 25 Aug 2013 04:01:08 +0000]
video: tegra: gk20a: Show GPCPLL registers via debugfs

Change-Id: I67966140a831525d17be2c497ae02eaa028749c7
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/265873
GVS: Gerrit_Virtual_Submit
Reviewed-by: Kaz Fukuoka <kfukuoka@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

6 years agovideo: tegra: nvmap: add API to alloc dmabuf
Krishna Reddy [Fri, 23 Aug 2013 21:33:57 +0000]
video: tegra: nvmap: add API to alloc dmabuf

This api allocates memory from specified heap
and returns dmabuf.

Bug 1356091

Change-Id: Ic29bbdbfc4cbdb85f969d2ea9cf0ff2b6efb5f1f
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/265707

6 years agomedia: video: tegra: nvavp: use dmabuf API
Krishna Reddy [Fri, 23 Aug 2013 00:30:01 +0000]
media: video: tegra: nvavp: use dmabuf API

convert nvmap handle id to dmabuf and use dmabuf API

Change-Id: I2f3eda3624f39d2d4690ef69e2086516e3fc6525
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/265226
GVS: Gerrit_Virtual_Submit
Reviewed-by: Soumenkumar Dey <sdey@nvidia.com>
Reviewed-by: Somu Sundaram <somasundarams@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Alex Waterman <alexw@nvidia.com>

6 years agoARM: t114: Allow tegra-nvmap device to register
Bibek Basu [Wed, 21 Aug 2013 04:55:54 +0000]
ARM: t114: Allow tegra-nvmap device to register

If CONFIG_TEGRA_DC is disabled, kernel panics because
nvmap_probe is not happening.

Bug 1343356

Change-Id: Ie76d24f56b290c39fd30290b52006a12680d69eb
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/264188
GVS: Gerrit_Virtual_Submit
Tested-by: Matt Craighead <mcraighead@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Matt Craighead <mcraighead@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>

6 years agomfd: palmas: remove use_power_off from palmas platform data
Laxman Dewangan [Mon, 26 Aug 2013 09:09:09 +0000]
mfd: palmas: remove use_power_off from palmas platform data

Palmas power off driver is added and it has separate power-off
platform data and hence removing from Palmas platform data.

Change-Id: Id26e2b8baa997e7c5289aabf572e7ac8825a9faa
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/266000

6 years agoARM: config: remove use_power_off setting for Palmas PMIC
Laxman Dewangan [Mon, 26 Aug 2013 09:07:24 +0000]
ARM: config: remove use_power_off setting for Palmas PMIC

Remove use_power_off configuration for Palmas PMIC is this
is default configuration and this variable is going to
be remove.

Change-Id: I76c87ce7e2705f150e41b374655edcc19500bda0
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/265999

6 years agomfd: palmas: move power-off implementation to palmas-power-off driver
Laxman Dewangan [Mon, 26 Aug 2013 08:59:39 +0000]
mfd: palmas: move power-off implementation to palmas-power-off driver

Move Power off implementation to separate driver to have more
configuration like auto power on, power reset etc.

Change-Id: I8b6c18a68cb777feca87a499009cf118754b1adc
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/265998

6 years agoARM: config: enable PALMAS-POWEROFF config
Laxman Dewangan [Mon, 26 Aug 2013 08:55:57 +0000]
ARM: config: enable PALMAS-POWEROFF config

Enable Palmas power off config to enable the power off
from Palmas.

Change-Id: Ibc4dae5194b7f9d28c5c8ba6d793cff0e78ca186
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/265997
Reviewed-by: Automatic_Commit_Validation_User

6 years agopower: reset: add palmas power off driver
Laxman Dewangan [Mon, 26 Aug 2013 08:46:23 +0000]
power: reset: add palmas power off driver

Add power off driver for Palmas which will provide the system
system power off through Palmas PMIC off.

Change-Id: I8ccfeba886b40696a81adc429134ab118efc4b45
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/265996

6 years agopower: reset: add generic system-pmic support
Laxman Dewangan [Mon, 26 Aug 2013 08:41:41 +0000]
power: reset: add generic system-pmic support

Add system PMIC core support to provide the generic functionality
like system power off, system power reset, system power on
configuration etc.

Change-Id: I1d3f7caa73b14e42189e1c36de18b4ac4edf8cec
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/265995

6 years agoARM: tegra: enable tegra124-tn8 dts compilation on dts/Makefile
Laxman Dewangan [Mon, 26 Aug 2013 10:13:22 +0000]
ARM: tegra: enable tegra124-tn8 dts compilation on dts/Makefile

Change-Id: Ib6ad22ed11851849b033fc4ecbedb75a4354f503
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/266020
Reviewed-by: Hayden Du <haydend@nvidia.com>

6 years agoARM: tegra: devices: Remove tegra_hsuart support
Pradeep Goudagunta [Mon, 26 Aug 2013 10:24:08 +0000]
ARM: tegra: devices: Remove tegra_hsuart support

Remove tegra_hsuart support, rename device name of
uart nodes to serial-tegra driver.

Bug 1355596

Change-Id: I29303155e5bcb03ef47c061e2059372d0354e31b
Signed-off-by: Pradeep Goudagunta <pgoudagunta@nvidia.com>
Reviewed-on: http://git-master/r/266024
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>

6 years agovideo: tegra: host: Check error pointers in nvmap
Arto Merilainen [Mon, 26 Aug 2013 06:08:06 +0000]
video: tegra: host: Check error pointers in nvmap

nvmap_get_nvhost_private() function returns error pointers instead
of NULL. nvhost assumed the opposite causing thereby usage of
invalid pointers.

Change-Id: I8c09fa9822d77def1791eed6c2c7ce942599b815
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/265938
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>

6 years agoARM: Tegra: Move cluster switch tracepoints
Antti P Miettinen [Wed, 21 Aug 2013 11:16:37 +0000]
ARM: Tegra: Move cluster switch tracepoints

Move tracepoints for measuring cluster switch latency
to account for the whole interrupts-disabled time.

Change-Id: Ib49cc54078d2e284c34b55dd6e2dc57431706b78
Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com>
Reviewed-on: http://git-master/r/264800
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>

6 years agovideo: tegra: host: Reduce host1x clock to 81.6MHz
Terje Bergstrom [Fri, 23 Aug 2013 12:41:51 +0000]
video: tegra: host: Reduce host1x clock to 81.6MHz

Reduce host1x clock to 81.6MHz on Tegra12.

Change-Id: I287314f8056ba9ebcdfb426214e8258ea30a023f
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/265539
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>

6 years agoARM: tegra: use PALMAS_REGS_PDATA for power tree population
Laxman Dewangan [Fri, 23 Aug 2013 09:41:10 +0000]
ARM: tegra: use PALMAS_REGS_PDATA for power tree population

For power tree population with Palma device, use the macro
PALMAS_REGS_PDATA in place of defining sub macro locally.

Change-Id: I40032e8f5323c4588943898a78648b24eeefe6c4
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/265422

6 years agoARM: tegra: remove config Tegra_12x check for T124 platform
Laxman Dewangan [Fri, 23 Aug 2013 09:26:10 +0000]
ARM: tegra: remove config Tegra_12x check for T124 platform

T124 platforms i.e. Ardbeg, Laguna, TN8 and Loki used only with
T124 SoC and hence config CONFIG_ARCH_TEGRA_12x_SOC is always
enabled for these platforms.

Hence removing of additional macro check from the code to make
code simple.

Change-Id: Ic28c65eef0db9f8d4af57a85ad776de1fbe1f2f1
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/265421

6 years agoARM: tegra: remove TEGRA_11x SoC supports from T124 platform
Laxman Dewangan [Fri, 23 Aug 2013 08:52:06 +0000]
ARM: tegra: remove TEGRA_11x SoC supports from T124 platform

Tegra11x support was added on the T124 platform to support the T114
interposer.

Now there is no need of interposer and hence removing the support for
T114 from T124's platform.

Change-Id: If2cdf50b66e352efe62855fc7d5c01576a8fdba0
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/265403

6 years agoARM: tegra: remove E1731 PMU module support from Ardbeg
Laxman Dewangan [Fri, 23 Aug 2013 08:36:22 +0000]
ARM: tegra: remove E1731 PMU module support from Ardbeg

PMU module E1731 is the PMIC TI TPS80036 based which is not used
on T124 platform.

Remove this module support from Ardbeg power device.

Change-Id: I2182ab374161ec2911e3c96ce8679f0269287cee
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/265402
Reviewed-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
GVS: Gerrit_Virtual_Submit

6 years agoARM: tegra: fix safe func for pin PH0
Bibek Basu [Fri, 23 Aug 2013 11:44:43 +0000]
ARM: tegra: fix safe func for pin PH0

correct the fsafe value for pin GPIO_PH0

Bug 1275005

Change-Id: I1417a3d8350330a05ccd1fb6f57eeabefea3e7d9
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/265514
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

6 years agoarm: tegra: fuse: refactor driver for pgm2 value
Ken Chang [Mon, 12 Aug 2013 10:13:23 +0000]
arm: tegra: fuse: refactor driver for pgm2 value

Add an explicit function instead of the pre-defined table
to calculate the value of FUSETIME_PGM2 register.

PGM_TIME_US is defined for the fuse programming pulse:
 - for T114, T124 and T148, this is set to 12us.
 - for T30 and T20, this is set to 10us.

Change-Id: I6e276124bb5fb5081e085b23ed8c4bb7c0f87c5f
Signed-off-by: Ken Chang <kenc@nvidia.com>
Reviewed-on: http://git-master/r/263001
Reviewed-by: Marc Delvaux <mdelvaux@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

6 years agovideo: tegra: nvmap: remove nvmap_dev overwrite
Krishna Reddy [Fri, 23 Aug 2013 21:13:06 +0000]
video: tegra: nvmap: remove nvmap_dev overwrite

this is unnecessary and unintended change.

Change-Id: I64731adc0129cd2d127c620759c76b4a4d2ba810
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/265701
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit

6 years agoarm: t124: tn8: Enable VBUS regulator for TN8 USB OTG
Hayden Du [Thu, 22 Aug 2013 08:58:04 +0000]
arm: t124: tn8: Enable VBUS regulator for TN8 USB OTG

Bug 1353788

Change-Id: I467a148768d61f96c71687fa4f6504f784bf4a04
Signed-off-by: Hayden Du <haydend@nvidia.com>
Reviewed-on: http://git-master/r/264783
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

6 years agoARM: tegra11: dvfs: Update T40T frequency limits
Alex Frid [Thu, 18 Jul 2013 19:18:21 +0000]
ARM: tegra11: dvfs: Update T40T frequency limits

Change-Id: I25851ce78f034ac592a0bd39ded1444f0a7e230d
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/250901
(cherry picked from commit 37debd44cbe1c325ab1b806415d5889ad3f2d7b9)
Reviewed-on: http://git-master/r/254679
(cherry picked from commit 23c414a032c76d1f0eebcb99f77668f31962a51f)
Reviewed-on: http://git-master/r/264650
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

6 years agoARM: tegra11: clock: Add cbus fine granularity region
Alex Frid [Tue, 16 Jul 2013 19:43:15 +0000]
ARM: tegra11: clock: Add cbus fine granularity region

Added fine granularity region to cbus possible rates. In this region
requested cbus rate is not clipped to dvfs steps, but rounded to fine
granularity resolution. The latter is set as 12MHz, and the region is
defined as 5 resolution steps below the top dvfs rate, assuming this
top rate is reachable on the particular chip bin/sku.

Change-Id: Id111b074c39a0a314d57da8ce628f3dbbf385b73
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/249902
(cherry picked from commit 51b5403fcc8d7052a311428614f9877deebfd6da)
Reviewed-on: http://git-master/r/254678
(cherry picked from commit 586d86439988ae394a48c175628e177b1a30310b)
Reviewed-on: http://git-master/r/264649
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

6 years agoARM: tegra11: dvfs: Update T40T tables and limits
Alex Frid [Fri, 12 Jul 2013 02:50:22 +0000]
ARM: tegra11: dvfs: Update T40T tables and limits

Updated dvfs and edp tables, clock and voltage limits for T40T part.

Change-Id: I99649b1ac7347424d668e9a7cb3862bb32f55c6b
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/248952
(cherry picked from commit e34558cae80c71a24de4cf604de454d4d0abebaf)
Reviewed-on: http://git-master/r/254677
(cherry picked from commit 397dccea22b7d315c83eba8e043b0d50cdfe56c0)
Reviewed-on: http://git-master/r/264648
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

6 years agoARM: tegra11: power: Add T40T core edp tables
Alex Frid [Sat, 13 Jul 2013 05:22:28 +0000]
ARM: tegra11: power: Add T40T core edp tables

Change-Id: I7cabf0fdd0c031a01a0db730508d258679052a96
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/248951
(cherry picked from commit 545c35478282a246dd1b3c1e6bfa75654733a581)
Reviewed-on: http://git-master/r/254676
(cherry picked from commit 9cb0abce1501a317ce35320f2ad82009be86655f)
Reviewed-on: http://git-master/r/264647
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

6 years agoARM: tegra11: dvfs: Don't throttle T40T nominal voltage
Alex Frid [Sat, 13 Jul 2013 03:36:22 +0000]
ARM: tegra11: dvfs: Don't throttle T40T nominal voltage

On T40T parts removed throttling of nominal voltage by boot core edp.
Used the latter to specify detached mode (boot, disable, suspend)
limits.

Change-Id: If6ab57785c22ffb9622998aaf9d06bfe36496949
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/248950
(cherry picked from commit e4db337e073099f997010e4c923f47320729dcc7)
Reviewed-on: http://git-master/r/254675
(cherry picked from commit 74431ca47827a53d072499366a58a3afb8f11ed0)
Reviewed-on: http://git-master/r/264646
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

6 years agoARM: tegra: Fix uninitialized variable in uncompress.h
Dan Willemsen [Tue, 3 Sep 2013 07:58:18 +0000]
ARM: tegra: Fix uninitialized variable in uncompress.h

If none of the debug uarts are configured, set uart to NULL by
initializing the uart_id.

Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>

6 years agoiommu/tegra: smmu: fix incorrect allocation size of struct smmu_device
Eric Miao [Tue, 3 Sep 2013 03:53:16 +0000]
iommu/tegra: smmu: fix incorrect allocation size of struct smmu_device

Change-Id: Id74a769aa71478942075a8daa7130736d066c530
Signed-off-by: Eric Miao <emiao@nvidia.com>
Reviewed-on: http://git-master/r/269287
Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>

6 years agopalmas: obtain IRQ from palmas_irq_get_virq
Ajay Nandakumar [Wed, 28 Aug 2013 05:02:01 +0000]
palmas: obtain IRQ from palmas_irq_get_virq

obtain interrupts through palmas_irq_get_virq instead of
platform_get_irq for MFD palmas drivers.

Change-Id: I66791b6adcb2c7f365d5b90d7b76c6d3ad66c8c6
Signed-off-by: Ajay Nandakumar <anandakumarm@nvidia.com>
Reviewed-on: http://git-master/r/267068
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>

6 years agonvhost: Updates for devfreq API change
Ajay Nandakumar [Wed, 28 Aug 2013 07:37:46 +0000]
nvhost: Updates for devfreq API change

Bug 1327616

Change-Id: Ia4d794ac665a6e32ee69ff45ab8c90b2f1d4309d
Signed-off-by: Ajay Nandakumar <anandakumarm@nvidia.com>
Reviewed-on: http://git-master/r/267134
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
Tested-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>

6 years agoARM: tegra: Move debug uart mapping out of that static mappings
Dan Willemsen [Sat, 31 Aug 2013 23:11:33 +0000]
ARM: tegra: Move debug uart mapping out of that static mappings

This ensures that we can't overlap with the static mappings.

Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>

6 years agoRevert "USB: EHCI: Fix resume signalling on remote wakeup"
Dan Willemsen [Sat, 31 Aug 2013 20:02:27 +0000]
Revert "USB: EHCI: Fix resume signalling on remote wakeup"

This reverts commit c65b5f6ade7209fc5eda9f0779de4ee254a6bb78.

Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>

6 years agoARM: tegra: Enable new PWM driver in tegra12 clocks
Dan Willemsen [Fri, 30 Aug 2013 00:49:13 +0000]
ARM: tegra: Enable new PWM driver in tegra12 clocks

Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
Change-Id: Ib930fd42e60144e0a658d0786f7b9803833bbe14
Reviewed-on: http://git-master/r/268207

6 years agoARM: tegra: Add tegra_cpu_car_ops for Tegra12
Dan Willemsen [Fri, 30 Aug 2013 00:17:25 +0000]
ARM: tegra: Add tegra_cpu_car_ops for Tegra12

Copied from tegra11

Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
Change-Id: I70ca30c9a69a14f9a7d3cd4c4fed4cbcd16d91a5
Reviewed-on: http://git-master/r/268209
Reviewed-by: Automatic_Commit_Validation_User