]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/log
sojka/nv-tegra/linux-3.10.git
9 years agotegra-se: Unregister algs support from tegra-se
Amith Ramachandra [Sat, 20 Sep 2014 21:45:12 +0000 (14:45 -0700)]
tegra-se: Unregister algs support from tegra-se

Owing to lower perf, prefer CPU over SE HW for crypto
operations. However, we may still need SE for save/restore
key context across Lp0 so keep the driver to do this.

Change-Id: I16ffaf64400e70615cdb0d4326f5480d172f6be6
Signed-off-by: Amith Ramachandra <aramachan@nvidia.com>
Signed-off-by: Gagan Grover <ggrover@nvidia.com>
Reviewed-on: http://git-master/r/501214
(cherry picked from commit 9bc76d18fe31233e6aad5ab9b142725b9d0a3875)
Reviewed-on: http://git-master/r/539875
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agousb: otg: tegra: Notify vbus event in resume to otg wakelock
Rakesh Bodla [Mon, 4 Aug 2014 15:22:22 +0000 (20:52 +0530)]
usb: otg: tegra: Notify vbus event in resume to otg wakelock

When device cable is inserted in LP0, display should
wakeup. For this, uevent should be sent to framework
(sent in power supply extcon driver for charger)
before the system initiates system suspend.
Notifying the VBUS event to otg wakelock in driver resume
will make sure system does not goes back to suspend,
so display wakes up.

Bug 200023041

Change-Id: Ie3957b217ed22e62f9acd4fc887acf0557724da4
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/452932
(cherry picked from commit f8a2d1fc284b2e057e83bdb997fd62d1870e0e75)
(cherry picked from commit 51bbc9aebdaa9c23704cc8d0158e63a505ff49c9)
Reviewed-on: http://git-master/r/539879
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agoARM: tegra: skip USB resume from LP0
Suresh Mangipudi [Fri, 13 Jun 2014 05:39:13 +0000 (11:09 +0530)]
ARM: tegra: skip USB resume from LP0

Change to skip USB resume from LP0 when wake source is other than USB

Bug 1410165

Change-Id: I8fd177a128aca837dee8f737a783b59a5925e3c2
Signed-off-by: Suresh Mangipudi <smangipudi@nvidia.com>
Reviewed-on: http://git-master/r/454002
(cherry picked from commit 6ea5e7c896c547cf23d1e0e8d54ff87503db92f1)
Reviewed-on: http://git-master/r/539882
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agousb: phy: tegra: Increase Y-cable current limit to 1.2A
Rakesh Babu Bodla [Fri, 12 Sep 2014 06:59:16 +0000 (12:29 +0530)]
usb: phy: tegra: Increase Y-cable current limit to 1.2A

Increase the y-cable current limit to 1.2A.

Bug 200004368

Change-Id: Idd533ea7ce27eb4600ba3a3bbb7ea2328d2c83a3
Signed-off-by: Rakesh Babu Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/498249
(cherry picked from commit 81f5a42d4a6e78a8cd786ce81a32ce622bf215a0)
Reviewed-on: http://git-master/r/538421
(cherry picked from commit 7fabd3371dc466f5e725f8b93f7c411afd1e63ce)
Reviewed-on: http://git-master/r/539284
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agousb: phy: otg: flush_work for the work to finish
Rohith Seelaboyina [Wed, 10 Sep 2014 13:49:30 +0000 (19:19 +0530)]
usb: phy: otg: flush_work for the work to finish

flush_work to wait for the scheduled work to finish
before going to LP0.

Change-Id: Ib26e3c6bec09681b1c2d614bcccbab09fff8547b
Signed-off-by: Rohith Seelaboyina <rseelaboyina@nvidia.com>
Reviewed-on: http://git-master/r/497867
(cherry picked from commit 24a873a7d6a1838f069c71c8806190b073b2ac77)
(cherry picked from commit 43cf9409a0eb036086c2a388226a502fbeac00e7)
Reviewed-on: http://git-master/r/539275
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agoARM: Tegra: TN8: add otg as consumer for usb_bat_chg
Rakesh Babu Bodla [Mon, 1 Sep 2014 15:51:21 +0000 (21:21 +0530)]
ARM: Tegra: TN8: add otg as consumer for usb_bat_chg

Adding otg device to consumer list of usb battery
charging regulator to support Y cable.

Bug 200004368

Change-Id: I99d861f5234a79c2f4ff758aca7750ca8f8de83b
Signed-off-by: Rakesh Babu Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/494513
(cherry picked from commit 323cee7e9c2b034a8778058d33789cf8340341f4)
Reviewed-on: http://git-master/r/538420
(cherry picked from commit 6670547046ae8500fcfb3c38563364a025063274)
Reviewed-on: http://git-master/r/539282
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agoextcon: palmas: remove mutually exclusive property
Rakesh Babu Bodla [Fri, 22 Aug 2014 10:10:52 +0000 (15:40 +0530)]
extcon: palmas: remove mutually exclusive property

When Y-cable is connected both vbus and id status
should be notified. So, removing mutually
exclusive property for vbus and id cables.

Bug 200004368

Change-Id: I61143b05036ce63a28663df4a1487ae29ee28427
Signed-off-by: Rakesh Babu Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/487660
(cherry picked from commit a705c790d3a5fa87d14e29b2c2e908ab23e52852)
Reviewed-on: http://git-master/r/538418
(cherry picked from commit d87ddb74ff065b9e30b6a2360ff1bd49c5775231)
Reviewed-on: http://git-master/r/539280
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agousb: tegra: increase delay for y-cable detection on tn8
Rakesh Babu Bodla [Mon, 25 Aug 2014 10:26:33 +0000 (15:56 +0530)]
usb: tegra: increase delay for y-cable detection on tn8

On TN8 due to palmas pmic h/w limitation takes more time
to notify the id status. Increasing the delay enables
y-cable detection on TN8. Also, for faster
notification of charging icon reordering the sequence
of charging icon notification and setting current.

Bug 200004368

Change-Id: Ia3940d78e1e87a3483064de3fb8e683be22a348d
Signed-off-by: Rakesh Babu Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/487661
(cherry picked from commit 5f391f0d892e4cabfc093252873cad75426897a8)
Reviewed-on: http://git-master/r/538419
(cherry picked from commit 5f55a3a44fb47aa5b2c44f5bf9fdbe23638df19e)
Reviewed-on: http://git-master/r/539281
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agopower: bq2419x: change input voltage for entire SOC
Laxman Dewangan [Mon, 8 Sep 2014 13:35:31 +0000 (19:05 +0530)]
power: bq2419x: change input voltage for entire SOC

Provide the input voltage configuration for entire range of SoC
so that value can be set properly as per table on charging/discharging
path.

Change-Id: I25eab5815f19763fd604f07af497d3d3aba08645
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
(cherry picked from commit 0ed9641cbc015cee258ab4136c8768f5671ac4c0)
Reviewed-on: http://git-master/r/497041
(cherry picked from commit 7a7207b9782a03b917f388b81954d40b69aa99d8)
Reviewed-on: http://git-master/r/539883
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agost8:gpio-tegra: add irq_disable() callback fn
wahsu [Tue, 26 Aug 2014 02:57:11 +0000 (10:57 +0800)]
st8:gpio-tegra: add irq_disable() callback fn

Add callback function so tegra gpio interrupt can really be disabled
when irq_disable() invoked.
bug 1545184

Change-Id: I15b9bfcbeefca81d638fa43acdde88ded98c4a03
Signed-off-by: wahsu <wahsu@nvidia.com>
Reviewed-on: http://git-master/r/487966
(cherry picked from commit 33583bb85ffdacebc2827a339c79d2c463cd9dcb)
Reviewed-on: http://git-master/r/539229
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
9 years agoconfigs: tegra12: Disable usage of HW SE Engine
Shravani Dingari [Mon, 15 Sep 2014 07:26:50 +0000 (12:56 +0530)]
configs: tegra12: Disable usage of HW SE Engine

Do not use HW SE Engine for crypto operations.
As dm-crypt passes 512bytes to SE, using low
data buffer sizes cannot make use of the SE HW
data pipe-lining efficiently. Changing to 4k
bytes is showing good numbers with SE. So,
working with Google to increase buffer size to
4kbytes in dm-crypt is the solution left.

Bug 200021901

Change-Id: I095ed4621ccf832ad90e3210ebe296f712cf802f
Signed-off-by: Shravani Dingari <shravanid@nvidia.com>
Reviewed-on: http://git-master/r/498768
(cherry picked from commit 5d72f884d7050525a9b346346ef3769c57288687)
Reviewed-on: http://git-master/r/500547
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
9 years agousb: gadget: f_fs: support superspeed gadgets
JC Kuo [Tue, 21 Jan 2014 13:07:41 +0000 (21:07 +0800)]
usb: gadget: f_fs: support superspeed gadgets

This commit add superspeed gadgets support to f_fs gadget.

Change-Id: I16a540098cfcd157e25b0e81d7cf2533ced2ae39
Signed-off-by: JC Kuo <jckuo@nvidia.com>
Reviewed-on: http://git-master/r/436303
(cherry picked from commit 7b3de28db5d3a14838c8a31eb189bcb8e3fcc513)
Reviewed-on: http://git-master/r/499235
GVS: Gerrit_Virtual_Submit
Reviewed-by: Robert Shih <rshih@nvidia.com>
Tested-by: Robert Shih <rshih@nvidia.com>
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
9 years agovideo: tegra: host: ioctl to set fence name
Deepak Nibade [Tue, 1 Apr 2014 10:53:19 +0000 (16:23 +0530)]
video: tegra: host: ioctl to set fence name

Add ioctl NVHOST_IOCTL_CTRL_SYNC_FENCE_SET_NAME to set
name for a sync fence

Bug 1473041

Change-Id: Iabc1c472f6fddc87dac75d3a37b75a83a834dc1e
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/391271
(cherry picked from commit 44702c84acd2a8d67db29842bfbba5488755ea46)
Reviewed-on: http://git-master/r/498692
Reviewed-by: Robert Shih <rshih@nvidia.com>
Tested-by: Robert Shih <rshih@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: Kevin Kranzusch <kevink@nvidia.com>
9 years agovideo: tegra: enable NVMAP_FORCE_ZEROED_USER_PAGES
Season Li [Mon, 14 Apr 2014 20:39:43 +0000 (13:39 -0700)]
video: tegra: enable NVMAP_FORCE_ZEROED_USER_PAGES

Enable NVMAP_FORCE_ZEROED_USER_PAGES by default

Bug 1392833
Bug 200032104

Change-Id: I217361c1e3d97e6f5ccc26e5f8e1435f2a261550
Reviewed-on: http://git-master/r/396046
(cherry picked from commit 9c2241675127332508856566138f689094ebcc37)
Signed-off-by: Season Li <seasonl@nvidia.com>
Reviewed-on: http://git-master/r/495829
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Robert Shih <rshih@nvidia.com>
Tested-by: Robert Shih <rshih@nvidia.com>
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
9 years agosecurity: tlk_driver: remove legacy IRQ/SS support
Varun Wadekar [Mon, 21 Jul 2014 06:57:43 +0000 (12:27 +0530)]
security: tlk_driver: remove legacy IRQ/SS support

- Delete the legacy IRQ handler registration
- Delete the legacy SS handler registration

Change-Id: I852ed100ebe8257d922645ae53824ba885ab4436
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/440228
(cherry picked from commit ae73170f81c6a90ee62d83ef6cfa61dca0280d2a)
Reviewed-on: http://git-master/r/488999
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Tested-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Reviewed-by: Kevin Kranzusch <kevink@nvidia.com>
9 years agosecurity: tlk_driver: new ss protocol support
Scott Long [Tue, 8 Jul 2014 18:43:10 +0000 (11:43 -0700)]
security: tlk_driver: new ss protocol support

The new secure storage protocol design allows the tlk daemon
to exchange data directly with the secure storage TA.

The only role the tlk_driver now plays is in the scheduling path
between the tlk daemon and the secure storage TA.

A summary of the corresponding changes:

 * add support for persistent mem buffer parameter type (the
   mapping to these buffers persist for the duration of the
   session); persistent mem buffers are kept on a separate
   shared memory descriptor list and are tracked by session id

 * modified ioctl interface between tlk daemon and tlk_driver to
   involve only a single command; the integer value passed down
   by the tlk daemon indicates whether it is ready for a new
   request or has just completed the last request

 * fixed up various warnings

Note that support for old protocol will be left intact until the
corresponding changes are applied to the TLK components.

Change-Id: Ibcaad4f0e00c8b1f107af5c1e82ea0aa4dd57398
Signed-off-by: Scott Long <scottl@nvidia.com>
Reviewed-on: http://git-master/r/435709
(cherry picked from commit 69dd1cf5ba1687fc1f13ecb9b79b1f5a286ec15a)
Reviewed-on: http://git-master/r/488998
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Tested-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Reviewed-by: Kevin Kranzusch <kevink@nvidia.com>
9 years agosecurity: tlk_driver: Pin user space page(s).
Sharif Inamdar [Tue, 3 Jun 2014 11:09:58 +0000 (16:39 +0530)]
security: tlk_driver: Pin user space page(s).

Pin user space pages based on the type of memory i.e.
read or write.

TE_PARAM_TYPE_MEM_RO or TE_PARAM_TYPE_MEM_RW param
indicates whether the TLK kernel will setup a RO/RW
mapping for the TA to this buffer.

Based on the type of memory we should pin the pages
using get_user_pages() as RO/RW.

Bug 1519770

Change-Id: Ib937433b64602f10cd1114f19845e9f6b4f8bf06
Signed-off-by: Sharif Inamdar <isharif@nvidia.com>
Reviewed-on: http://git-master/r/418897
(cherry picked from commit a37d707aff592dc868ae554b026191bd9f4951a5)
Reviewed-on: http://git-master/r/488997
Reviewed-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Tested-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Reviewed-by: Kevin Kranzusch <kevink@nvidia.com>
9 years agoRevert "security: tlk_driver: delete te_pin_user_pages() and its usage"
Sharif Inamdar [Tue, 3 Jun 2014 04:48:11 +0000 (10:18 +0530)]
Revert "security: tlk_driver: delete te_pin_user_pages() and its usage"

We are reverting this as we want to add support of
te_pin_user_pages(). TA can have dynamic mappings
created as part of an OpenSession or LaunchOperation
command.

If either of these specify a buffer as an argument
(with virt addr and length as params), the TLK kernel
will create a mapping to it. This happens for things
that go between TAs (no pin issue there) and between
the NS and S worlds.

In the case of NS buffers being passed in, we need
phys memory to stay where it is, because the secure
world has a mapping to it that Linux is unaware of,
which is why we pin it.

Bug 1519770

This reverts commit f4a063081552617e72cbdda5596ae7bd537696f7.

Change-Id: I7676f7786cef469f6cbb39a76a05541b417dc5f7
Signed-off-by: Sharif Inamdar <isharif@nvidia.com>
Reviewed-on: http://git-master/r/418890
(cherry picked from commit 951a14bd40482c7082c3fa75ebec955c1d444433)
Reviewed-on: http://git-master/r/488996
Reviewed-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Tested-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Reviewed-by: Kevin Kranzusch <kevink@nvidia.com>
9 years agosecurity: tlk: enable logging only if secure firmware supports it
Varun Wadekar [Wed, 9 Apr 2014 05:34:10 +0000 (11:04 +0530)]
security: tlk: enable logging only if secure firmware supports it

We send an SMC to the secure firmware to see if it supports logging.
If it returns failure, then we disable it from the kernel too.

Change-Id: Icc59fc221f6f59d1806815333f3e71a35a45ea90
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/393217
(cherry picked from commit ae19265e71df6e7aacd157b7d012c8833ee7e060)
Reviewed-on: http://git-master/r/488995
Reviewed-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Tested-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Reviewed-by: Kevin Kranzusch <kevink@nvidia.com>
9 years agosecurity: tlk_driver: modify secure storage glue
Varun Wadekar [Wed, 23 Apr 2014 05:04:00 +0000 (10:34 +0530)]
security: tlk_driver: modify secure storage glue

The secure world now sends a PREEMPT_BY_FS error code as a result
of OpenSession/LaunchOp call. This indicates a pending FS request
from the secure world which we need to handle and send the
FS_COMPLETION SMC on completion.

Until the secure firmware and the linux driver get in sync, we keep
legacy SS handling alive to avoid incomaptibility issues. Once the
secure firmware switches to the new handling, we would remove the
legacy support from the linux driver as well.

Bug 1500621

Change-Id: I9e84cd5a87d820107b1c2279c9d89dcd5c31b44b
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/375994
(cherry picked from commit 433d8d1687725ab7db23eef27e5a073e8d88e862)
Reviewed-on: http://git-master/r/488950
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Tested-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Reviewed-by: Kevin Kranzusch <kevink@nvidia.com>
9 years agosecurity: tlk: Move program VPR smc to SIP call
Aaron Gamble [Tue, 11 Mar 2014 18:00:55 +0000 (11:00 -0700)]
security: tlk: Move program VPR smc to SIP call

Change-Id: Ibd1dcd64c990b284926a15891902d2364df66c8e
Signed-off-by: Aaron Gamble <jgamble@nvidia.com>
Reviewed-on: http://git-master/r/#/c/380437/
(cherry picked from commit 0f9ce68950035bac649ed44de07c4cbf3e1e43b0)
Reviewed-on: http://git-master/r/488947
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Chris Johnson <cwj@nvidia.com>
Reviewed-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Tested-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Reviewed-by: Kevin Kranzusch <kevink@nvidia.com>
9 years agovideo: tegra: dc: implement vblank event
Michael I. Gold [Mon, 30 Jun 2014 08:42:23 +0000 (01:42 -0700)]
video: tegra: dc: implement vblank event

Implement TEGRA_DC_EXT_EVENT_VBLANK for user space notification of
vblank events.  Implement TEGRA_DC_EXT_SET_VBLANK to enable/disable
vblank notification per display.

bug 200016696

Change-Id: Idf8d02b71976a32e06fe972cfb69b838183bcf02
Signed-off-by: Michael I. Gold <gold@nvidia.com>
Reviewed-on: http://git-master/r/432658
Reviewed-on: http://git-master/r/455981
(cherry picked from commit 2945dc94788a450ba5c9d09ec0ecc5c4fe2f3528)
Reviewed-on: http://git-master/r/488542
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Wayne Hsu <wahsu@nvidia.com>
Tested-by: Wayne Hsu <wahsu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
9 years agoarm: tn8: build sensor as input driver
Steven Kao [Thu, 14 Aug 2014 08:18:39 +0000 (16:18 +0800)]
arm: tn8: build sensor as input driver

Change-Id: I5898735ca290307704f4f51cfdfeab3cb14b8c3d
Reviewed-on: http://git-master/r/456610
(cherry picked from commit 378b097e326453ce21bff2f6ef731572d4227d11)
Signed-off-by: wahsu <wahsu@nvidia.com>
Reviewed-on: http://git-master/r/488583
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Steven Kao <skao@nvidia.com>
Reviewed-by: Steven Kao <skao@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
9 years agoARM: tegra: config: enable camera drivers
Gary Fitzer [Tue, 25 Feb 2014 19:20:48 +0000 (11:20 -0800)]
ARM: tegra: config: enable camera drivers

Enable camera driver support in needed builds

Bug 1441127.
Bug 1440706.

Signed-off-by: Gary Fitzer <gfitzer@nvidia.com>
Reviewed-on: http://git-master/r/374378
(cherry picked from commit e76b0cd0df6b144f1845c34797d757db0d0b3a77)
Change-Id: Ia14175d4c819d1ef22fed8fa48a215ebb21f753f
Signed-off-by: Phoenix Jung <pjung@nvidia.com>
Reviewed-on: http://git-master/r/379875
Reviewed-on: http://git-master/r/456104
(cherry picked from commit 1a65ab6d808620adfdbd51d1168d4b6424dad796)
Reviewed-on: http://git-master/r/488574
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Wayne Hsu <wahsu@nvidia.com>
Tested-by: Wayne Hsu <wahsu@nvidia.com>
Reviewed-by: Kevin Kranzusch <kevink@nvidia.com>
9 years agomedia: tegra: nvavp: fix deadlock in nvavp_uninit
Allen Yu [Sat, 9 Aug 2014 07:02:48 +0000 (15:02 +0800)]
media: tegra: nvavp: fix deadlock in nvavp_uninit

nvavp_uninit() should be called with open_lock held. And open_lock
needs to be released before flushing clock_disable_work since the
work handler needs the same lock.

Bug 200013513

Change-Id: I70ddd2e04876e21071a81c5f45fc4a0eb310f840
Signed-off-by: Allen Yu <alleny@nvidia.com>
Reviewed-on: http://git-master/r/454723
(cherry picked from commit 6b1258194d7cae7b09286744793195f45a1937ab)
Reviewed-on: http://git-master/r/455328
(cherry picked from commit 895aa8fdccaa29951032cc1ca63f6ed22f5c0875)
Reviewed-on: http://git-master/r/457563
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Robert Shih <rshih@nvidia.com>
Tested-by: Robert Shih <rshih@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agowatchdog: tegra: enable suspend/resume recovery
Arun Kannan [Tue, 12 Aug 2014 01:48:03 +0000 (18:48 -0700)]
watchdog: tegra: enable suspend/resume recovery

Enable suspend/resume hang recovery using watchdog

Change-Id: If8fd147b2f30db6c73dfef9023843606c4a2ea33
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/455323
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agoHACK: enable nvdumper always
Mitch Luban [Mon, 11 Aug 2014 00:28:25 +0000 (17:28 -0700)]
HACK: enable nvdumper always

Change-Id: I90431ace43eea17b9899c91c855f2824bfd8bf58
Signed-off-by: Mitch Luban <mluban@nvidia.com>
Reviewed-on: http://git-master/r/454857
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Yifei Wan <ywan@nvidia.com>
9 years agowatchdog: tegra: enable wdt0
Mitch Luban [Sun, 10 Aug 2014 23:15:10 +0000 (16:15 -0700)]
watchdog: tegra: enable wdt0

Enable watchdog in T124
WDT0 is enabled using TMR7 as reference.

Change-Id: Ia0d72aaf851ce7289f5f935dea718dba065eb443
Signed-off-by: Mitch Luban <mluban@nvidia.com>
Reviewed-on: http://git-master/r/454850
Reviewed-by: Arun Kannan <akannan@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agowatchdog: tegra: Fix a linker issue
Arun Kannan [Wed, 2 Jul 2014 18:25:09 +0000 (11:25 -0700)]
watchdog: tegra: Fix a linker issue

Fix a linker issue with div and modulo operations
which caused linker to throw an undefined reference to
__aeabi_uldivmod using gcc 4.7.
Fix by typecast to int after division.

Reviewed-on: http://git-master/r/433783
(cherry picked from commit 082010793cfe9f05805162d601daa08362944128)

Change-Id: Iea100e9ae4bc6e53312af66f2abf97b4431346e0
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/454849
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agowatchdog: tegra: move init to subsys_initcall
Colin Cross [Tue, 13 May 2014 21:50:30 +0000 (14:50 -0700)]
watchdog: tegra: move init to subsys_initcall

Move watchdog to subsys init to allow it to catch issues during
probing later devices.

Reviewed-on: http://git-master/r/433782
(cherry picked from commit fb1ee3a0aba6d06ea2732e804f3a41448731a4bb)

Change-Id: I972a4177445f0050ca50433b3fdaea80e0cf28c3
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/454848
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agowatchdog: tegra: Add device tree support.
Arve Hjønnevåg [Tue, 6 May 2014 04:41:55 +0000 (21:41 -0700)]
watchdog: tegra: Add device tree support.

Add compatible string.
Compute timer reg from timer regs base addr instead of device id.

Reviewed-on: http://git-master/r/433781
(cherry picked from commit ae30129714b1f9327e5f4b085413800bfbcbb194)

Change-Id: Ida3e00eff28244a1857fe43c479d7baed667c524
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/454847
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agowatchdog: tegra: fix warnings
Colin Cross [Fri, 25 Apr 2014 00:29:38 +0000 (17:29 -0700)]
watchdog: tegra: fix warnings

Remove an incorrect & in suspend and resume handlers.
Remove MODULE_ALIAS_MISCDEV, its not a misc device any more.

Reviewed-on: http://git-master/r/433780
(cherry picked from commit 530ace346e0262c9381c9b7a45af908ce27509ed)

Change-Id: I622adc5378aa487f087d4ae837e907d7908345f9
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/454846
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agowatchdog: tegra: rewrite on top of watchdog_core.c
Colin Cross [Tue, 15 Apr 2014 00:21:41 +0000 (17:21 -0700)]
watchdog: tegra: rewrite on top of watchdog_core.c

Get rid of all the miscdevice and ioctl handling, and reuse
what is provided by watchdog_core.c.

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

Change-Id: I682db9bd2e32268ce40d09e0a39495d43ed54b20
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/454845
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agowatchdog: tegra: remove reboot notifier
Colin Cross [Mon, 14 Apr 2014 22:42:28 +0000 (15:42 -0700)]
watchdog: tegra: remove reboot notifier

We don't want to disable the watchdog on reboot, it will catch
cases where reboot fails.  On power down, tegra_wdt_remove will
be called and will disable the watchdog.

Reviewed-on: http://git-master/r/433778
(cherry picked from commit c857e334d19a74bf100dc4a8e4f99f3666bd6aad)

Change-Id: I7ae61b3193c7689a8201e3b6ff49df7989859fcb
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/454844
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agowatchdog: tegra: modify enable on probe
Colin Cross [Fri, 18 Apr 2014 00:08:20 +0000 (17:08 -0700)]
watchdog: tegra: modify enable on probe

Enable on probe no longer pets the watchdog from the interrupt, it
still expects userspace to boot and start petting the watchdog
before it barks.

There is now a module parameter, tegra_wdt.enable_on_probe, to
turn on enable_on_probe even if CONFIG_TEGRA_WATCHDOG_ENABLE_ON_PROBE
is not set.

Reviewed-on: http://git-master/r/433777
(cherry picked from commit 429a1693b24daf58059bca9bc7dbc99a31d39c24)

Change-Id: I7e19a6e780eaa81788aacef72ec30e3692d8451c
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/454843
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agowatchdog: tegra: Add support back for tegra 12x
Colin Cross [Mon, 14 Apr 2014 22:25:24 +0000 (15:25 -0700)]
watchdog: tegra: Add support back for tegra 12x

Commit 459d61d7fc74baf77408f892a2e14f5457d1a04a
("arm: tegra: support for FIQ debugger with secure OS"), now
reverted, also added support for CONFIG_ARCH_TEGRA_12x_SOC.
Put the required #ifdef change back.

Reviewed-on: http://git-master/r/433776
(cherry picked from commit cb0c263767f610eaf0acfcb5c625b9c3b5f3811e)

Change-Id: I7225a5df5140cc79a1d120301c1b421dafffe994
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/454842
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agoRevert "watchdog: tegra: Add support for FIQ debugger"
Colin Cross [Mon, 14 Apr 2014 22:14:20 +0000 (15:14 -0700)]
Revert "watchdog: tegra: Add support for FIQ debugger"

This reverts commit cef3ced89dcd2f00532a5e7b023aeaacfd716f56.

"FIQ debugger support" is a hack that disables the real uses of
the FIQ debugger.

Reviewed-on: http://git-master/r/433775
(cherry picked from commit a96ce5e48bd7e71f323c054a5d5181c11ab0f20d)

Change-Id: Ia081e5a02980f1e38b66e78471903ba94d95722e
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/454841
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agoRevert "watchdog: tegra: enable compile warning as error"
Colin Cross [Mon, 14 Apr 2014 22:14:15 +0000 (15:14 -0700)]
Revert "watchdog: tegra: enable compile warning as error"

This reverts commit e18b7c37710cb0538678e1005fb2b7d1aa3db324.

-Werror often breaks when switching compilers, and this code isn't
even warning-clean under all configurations.

Reviewed-on: http://git-master/r/433774
(cherry picked from commit df81517bdcfedaba2c4331ce139729e780a14010)

Change-Id: I4592bbca16e2b212f29efa5d93349f4fa882af03
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/454840
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agoRevert "watchdog: tegra: fix reboot reason"
Colin Cross [Mon, 14 Apr 2014 22:14:00 +0000 (15:14 -0700)]
Revert "watchdog: tegra: fix reboot reason"

This reverts commit eeb81888c41ebce8f6822fd241934e582c13a773.

The reset reason is already avaiable through other sources,
no reason for the watchdog device to print it.

Reviewed-on: http://git-master/r/433773
(cherry picked from commit 50eb2ae7b0c66458259d4c21f382d6dc6814dab9)

Change-Id: I160d7035ace88cb65f59bfb8b45aab8674901469
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/454839
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agoRevert "watchdog: tegra: Only support one wdt device"
Colin Cross [Mon, 14 Apr 2014 22:13:51 +0000 (15:13 -0700)]
Revert "watchdog: tegra: Only support one wdt device"

This reverts commit b44525f85fedebb6f7a8f89a8690a51163180391.

There is no reason to restrict to a single wdt device any more.

Reviewed-on: http://git-master/r/433772
(cherry picked from commit e3ffe9d51cde76fbd1f37ec08dedb0928b59a03e)

Change-Id: I8df85c956cabd963d42b8d3bc42627c15b718511
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/454838
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agoRevert "arm: tegra: support for FIQ debugger with secure OS"
Colin Cross [Mon, 14 Apr 2014 22:06:08 +0000 (15:06 -0700)]
Revert "arm: tegra: support for FIQ debugger with secure OS"

This reverts commit 459d61d7fc74baf77408f892a2e14f5457d1a04a.

The reverted patch hacks stacktraces on watchdog resets into the
fiq debugger, making the fiq debugger useless for anything else.

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

Change-Id: I54a5e053fa1f56cf275b9b93bf3d6379acb8c014
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/454837
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agoRevert "watchdog: tegra_wdt: trigger FIQ if any CPU hangs"
Colin Cross [Mon, 14 Apr 2014 22:01:00 +0000 (15:01 -0700)]
Revert "watchdog: tegra_wdt: trigger FIQ if any CPU hangs"

This reverts commit 61c80149c7ade9564245bfb4e7f3151119b2bc8f.

Dependency for a later revert.

Reviewed-on: http://git-master/r/433770
(cherry picked from commit af13424775faa411548217a46ec5464668972015)

Change-Id: I2182ac2cde66541088983adb532a1bbfa057b394
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/454836
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agoRevert "watchdog: tegra: remove CONFIG_TEGRA_USE_SECURE_KERNEL usage"
Colin Cross [Mon, 14 Apr 2014 22:00:48 +0000 (15:00 -0700)]
Revert "watchdog: tegra: remove CONFIG_TEGRA_USE_SECURE_KERNEL usage"

This reverts commit 8719f1ddcb873079f1726ae0abd9c6cdf8a2f728.

Depedency for a later revert.

Reviewed-on: http://git-master/r/433769
(cherry picked from commit 75c4e193455da13a519f00927dc8e3465fef5d85)

Change-Id: If9e82209906e2e4f64a2fea4c4153824fa06b4fd
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/454835
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agovideo: tegra: host: initialize vi regulator info
Sang-Hun Lee [Tue, 12 Aug 2014 01:21:08 +0000 (18:21 -0700)]
video: tegra: host: initialize vi regulator info

Problem description:
 - nvhost_vi_init also specifies which regulator supplies
   current to VI
 - If this is not called before nvhost_vi_finalize_powerdown,
   nvhost_vi_finalize_powerdown will not initialize the required
   regulator
 - nvhost_vi_init was being called inside nvhost_module_busy.
   nvhost_module_busy is ultimately called as the result
   of userspace operation in most cases, which is unreliable
 - If the userspace ordering changes, nvhost_vi_finalize_powerdown
   is called when there is no regulator set against vi

Fix description:
 - Call nvhost_vi_init as a part of vi_probe

Bug 200016507

Change-Id: I97c9e1b126a96a91a68a41f77cf6fda514d07dca
Signed-off-by: Sang-Hun Lee <sanlee@nvidia.com>
Reviewed-on: http://git-master/r/455305
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: David Schalig <dschalig@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agommc: tegra: unlock mutex before returning
Sang-Hun Lee [Fri, 18 Jul 2014 03:39:57 +0000 (23:39 -0400)]
mmc: tegra: unlock mutex before returning

To avoid hanging the entire system, unlock mutex lock before
returning

Bug 1526837

Change-Id: I523b5ad2ea7787ca780163e1e1db91c475c81ce1
Signed-off-by: Sang-Hun Lee <sanlee@nvidia.com>
Reviewed-on: http://git-master/r/439706
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agoARM: tegra: set kernel maximum soc to 99
Venkat Reddy Talla [Thu, 7 Aug 2014 05:41:48 +0000 (11:11 +0530)]
ARM: tegra: set kernel maximum soc to 99

set maximum soc to 99 to scale FG chip reported soc value 99% to 100%.
some times sudden drop seen from 100% to 99% when charger cable
disconnected.

Bug 200025580
Bug 1445682

Change-Id: Ie7c44dcf5dfbe40e93d17b0dd6785ce06fa2ad74
Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
Reviewed-on: http://git-master/r/453802
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
9 years agoASoc: rt5639: Set audio CODEC IRQ as a wake up pin
wahsu [Mon, 14 Jul 2014 08:55:06 +0000 (16:55 +0800)]
ASoc: rt5639: Set audio CODEC IRQ as a wake up pin

1. Enable wake attribute for audio CODEC IRQ.
2. Disable GPIO interrupt before entering Lp0 for those
   GPIOs are not Lp0 wake source.

Bug 200009793

Change-Id: Ie772c3784e652c8d7b2ce0a7e5edcd22f1bba138
Signed-off-by: wahsu <wahsu@nvidia.com>
Reviewed-on: http://git-master/r/437644
(cherry picked from commit 238e6a62ff84e57b4f9887f4aef25a5cb6a62974)
Reviewed-on: http://git-master/r/447470
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Pierre Gervais <pgervais@nvidia.com>
9 years agoALC5639: Combining all Realtek tweaks
Rene Houle [Wed, 30 Jul 2014 08:40:18 +0000 (01:40 -0700)]
ALC5639: Combining all Realtek tweaks

Cache sync optimization
Fix for pop on speaker
Class-D Amplifier tuning
Update provided by Realtek

Change-Id: Ic445ecbd7398d03a9b9bc59f46b5d75d921ced77
Signed-off-by: Rene Houle <rhoule@nvidia.com>
Reviewed-on: http://git-master/r/448758
Reviewed-by: Pierre Gervais <pgervais@nvidia.com>
9 years agomisc: tegra-profiler: fix Coverity issue of NULL dereference
Deepak Nibade [Fri, 25 Jul 2014 07:05:45 +0000 (12:35 +0530)]
misc: tegra-profiler: fix Coverity issue of NULL dereference

Pointer "pt_regs *regs" is first dereferenced and then checked for NULL
To fix this move NULL checking to beginning of function
Coverity id : 26686

Bug 1416640

Change-Id: I40e97e38e5a61a5d77ea68fa511e996f24385cfc
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/447532
(cherry picked from commit 4651be4faa111a0ff64a924889b69ec56ae19ace)
Reviewed-on: http://git-master/r/454484
Reviewed-by: Igor Nabirushkin <inabirushkin@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Maxim Morin <mmorin@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agomisc: tegra-profiler: rd_alloc
Shu Zhong [Tue, 1 Jul 2014 17:25:57 +0000 (10:25 -0700)]
misc: tegra-profiler: rd_alloc

quadd_unwind_start calls rd_alloc while holding a spinlock.
This is dangerous because rd_alloc allocates memory with
the GFP_KERNEL flag. This fix simply moves rd_alloc outside
the critical section.

Bug 1529894

Change-Id: I284e72d2fdd9089428d75f3c3efb79513a897b7e
Signed-off-by: Shu Zhong <shuz@nvidia.com>
Reviewed-on: http://git-master/r/433264
(cherry picked from commit e29a862f449b3f1831410162c4360041438017dc)
Reviewed-on: http://git-master/r/454479
Reviewed-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Maxim Morin <mmorin@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agomisc: tegra-profiler: fix backtraces for 64-bit
Igor Nabirushkin [Tue, 24 Jun 2014 13:07:53 +0000 (17:07 +0400)]
misc: tegra-profiler: fix backtraces for 64-bit

* Fix backtraces for 64-bit programs
* Also, allow user to use any frequency in range [100 Hz; 100 kHz]

Bug 1527404

Change-Id: I29495ddd1449e59b354ac00d4112bdf7b9845375
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/427738
(cherry picked from commit b4f84b60177750214ddac24c63c2f9a08b15ce05)
Reviewed-on: http://git-master/r/454469
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Maxim Morin <mmorin@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agomisc: tegra-profiler: add time source option
Igor Nabirushkin [Tue, 24 Jun 2014 08:18:29 +0000 (12:18 +0400)]
misc: tegra-profiler: add time source option

* Add time source option (CNTVCT or kernel monotonic clock).
* Do not use arch timer if user does not have direct access to
  CNTVCT register.

Bug 1508327

Change-Id: I0efc619146c1256ac57120b8646ecd8e819a1315
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/427620
(cherry picked from commit 5e375e6dbca8211bb2af04bd25d5e5d66371aa4f)
Reviewed-on: http://git-master/r/454468
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Maxim Morin <mmorin@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agomisc: tegra-profiler: mixed backtraces
Igor Nabirushkin [Thu, 5 Jun 2014 07:57:52 +0000 (11:57 +0400)]
misc: tegra-profiler: mixed backtraces

Unwinding: switch from code with frame pointers to code
with unwind tables.

Bug 1487488

Change-Id: I254a8fd762b5312f854db1fe79635a2b419091f0
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/419384
(cherry picked from commit 79aede1e667170d0479302b6690cdd666d10960e)
Reviewed-on: http://git-master/r/454462
GVS: Gerrit_Virtual_Submit
Tested-by: Maxim Morin <mmorin@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agomisc: tegra-profiler: add sched samples
Igor Nabirushkin [Thu, 5 Jun 2014 07:08:55 +0000 (11:08 +0400)]
misc: tegra-profiler: add sched samples

Tegra Profiler: capture task starting being scheduled on a core.
Add sched in/out samples.

Bug 1520808

Change-Id: I2c62e5c1918bdba0fc997d79d8aeb3b7b63530f0
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/419352
(cherry picked from commit 662031c6aee9dedb05e4b5cb12aabf3ea001337f)
Reviewed-on: http://git-master/r/454461
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Maxim Morin <mmorin@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agomisc: tegra-profiler: use cntvct as time source
Igor Nabirushkin [Thu, 5 Jun 2014 05:52:29 +0000 (09:52 +0400)]
misc: tegra-profiler: use cntvct as time source

Tegra Profiler: use Virtual Count register (CNTVCT) as
time source.

Bug 1508327

Change-Id: If37e2dbe0a256ec28575d7c1b7d601d6bc1090f5
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/419305
(cherry picked from commit 2e5fe3f706a404a087e110a9289818dd6c855c15)
Reviewed-on: http://git-master/r/454458
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Maxim Morin <mmorin@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agomisc: tegra-profiler: get perfmon extension
Igor Nabirushkin [Thu, 5 Jun 2014 05:10:47 +0000 (09:10 +0400)]
misc: tegra-profiler: get perfmon extension

Add version of the ARMv8 NVIDIA perfmon extension to
device capabilities.

Bug 1520757

Change-Id: I18d10133272a10e3faf5022b4579c7dfea78791e
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/419274
(cherry picked from commit 1973fe595ad0fc5ec45e65df3c70ffbeaac94e7e)
Reviewed-on: http://git-master/r/454453
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Maxim Morin <mmorin@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agomisc: tegra-profiler: fix hang up bug for Norrin
Igor Nabirushkin [Mon, 19 May 2014 12:49:19 +0000 (16:49 +0400)]
misc: tegra-profiler: fix hang up bug for Norrin

Do not use probe_kernel_address.
Actually, it is not safe on Norrin: this can lead to system crash.

Bug 200005974
Bug 1522252

Change-Id: If8bae9afd7c7e1bbb5beaf430c0c61f552aeb036
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/411507
(cherry picked from commit 6c6b72dcf09a127d05082bab65b172a77bb56f45)
Reviewed-on: http://git-master/r/454452
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Maxim Morin <mmorin@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agomisc: tegra-profiler: add unwind information
Igor Nabirushkin [Fri, 16 May 2014 08:49:15 +0000 (12:49 +0400)]
misc: tegra-profiler: add unwind information

Tegra Profiler: add additional unwind information
for each call entry.

Bug 1514626

Change-Id: I2873941a4c903e0e7e909897ead55eb34d80b966
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/410770
(cherry picked from commit c240aead0cc500c3bd8ef668d93e7b44acd3310c)
Reviewed-on: http://git-master/r/454451
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Maxim Morin <mmorin@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agomisc: tegra-profiler: fixed recursive call chains
Igor Nabirushkin [Fri, 16 May 2014 08:05:36 +0000 (12:05 +0400)]
misc: tegra-profiler: fixed recursive call chains

In some cases, recursive call chains can be broken.
This patch fixes this problem.

Bug 200005395

Change-Id: I7d31ec64b004109c3684cf0d143d9b1d6cd59f9f
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/410745
(cherry picked from commit 0f2d2d582d5907a51a2f32e9d1c0fa50b9f59601)
Reviewed-on: http://git-master/r/454449
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Maxim Morin <mmorin@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agomisc: tegra-profiler: support too deep stack level
Igor Nabirushkin [Fri, 16 May 2014 07:24:50 +0000 (11:24 +0400)]
misc: tegra-profiler: support too deep stack level

Too deep stack level: handle it properly.
Appropriate unwind reason code has been added.

Unwinding based on frame pointers: add unwind reason codes.

Bug 200005380

Change-Id: I2199df90c746ada6a7f224a8b675638b69dc6da8
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/410717
(cherry picked from commit e96cd9adf0ca020c55545925168671373a67a009)
Reviewed-on: http://git-master/r/454446
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Maxim Morin <mmorin@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agomisc: tegra-profiler: fix setup bug
Igor Nabirushkin [Fri, 16 May 2014 06:44:06 +0000 (10:44 +0400)]
misc: tegra-profiler: fix setup bug

* Fix bug that happens when using non-standard profiling frequencies
* Allow root user to use any frequency in range [100 Hz; 100 kHz]

Bug 200005366

Change-Id: I9a07e2c9c1fec6d61f34009d1975ea7f5d0e2592
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/410705
(cherry picked from commit baa22c2e4e7b1f676fec2456907c8f8ce43c6c03)
Reviewed-on: http://git-master/r/454443
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Maxim Morin <mmorin@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agomisc: tegra-profiler: fix resource leaks
Deepak Nibade [Mon, 19 May 2014 10:18:02 +0000 (15:48 +0530)]
misc: tegra-profiler: fix resource leaks

Fix Coverity issue of resource leaks
Coverity id : 26481
Coverity id : 26483

Bug 1416640

Change-Id: Ib71950f196b5421ccbc21b3ac8d620e790e83366
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/411421
(cherry picked from commit 4449c4508c2619f2e21c2965c97605d69284ab0c)
Reviewed-on: http://git-master/r/454441
Reviewed-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Maxim Morin <mmorin@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agotegra-profiler: add access to the exception tables
Igor Nabirushkin [Tue, 6 May 2014 05:47:02 +0000 (09:47 +0400)]
tegra-profiler: add access to the exception tables

Tegra Profiler: add access to the exception tables via mmap areas.
Do not read directly from the user space.

Bug 200002243

Change-Id: I442daaecb11fd4416b3e485722efdf34234e0241
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/405671
(cherry picked from commit eb721f5af416f14aacf5589c4403c7b6a0b0b5fb)
Reviewed-on: http://git-master/r/454440
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Maxim Morin <mmorin@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agomisc: tegra-profiler: unwinding: use RCU locking
Igor Nabirushkin [Thu, 17 Apr 2014 09:02:07 +0000 (13:02 +0400)]
misc: tegra-profiler: unwinding: use RCU locking

Unwinding: use RCU locking instead of spinlocks to protect
map of regions.

Bug 1502205

Change-Id: If1089b74b1f317eeaae5059de40d7a3365ae4061
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/397599
(cherry picked from commit 3504dc62f0aad25ad5c50f46c6c3319b95775966)
Reviewed-on: http://git-master/r/454437
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Maxim Morin <mmorin@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agonet:wireless:bcmdhd: set rpt_hitxrate
kraghavender [Mon, 11 Aug 2014 11:39:02 +0000 (17:09 +0530)]
net:wireless:bcmdhd: set rpt_hitxrate

Set the rpt_hitxrate to 1 so that link speed updated by WLC_GET_RATE
is the maximum transmit rate
rpt_hitxrate 0 : Here the rate reported is the most used rate in the
link.
rpt_hitxrate 1 : Here the rate reported is the highest used rate in the
link.
Otherwise linkspeed updated in the GUI is 802.11 NULL frame data rate
which is 24 Mbps.

Bug 200027022

Change-Id: I0c69b635d0b68c06f38297f39070cc5da04e478b
Signed-off-by: Raghu <kraghavender@nvidia.com>
Reviewed-on: http://git-master/r/455067
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agopower: lc709203f:report actual FG read value when BC reports charging done
Venkat Reddy Talla [Mon, 4 Aug 2014 14:42:20 +0000 (20:12 +0530)]
power: lc709203f:report actual FG read value when BC reports charging done

do not set Battery SOC to 100% when FG reports less than 100% and Battery
charger trigger charging done.

Change-Id: I0a1c70ed4ad0745b4ca074450e52389f6f655b31
Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
Reviewed-on: http://git-master/r/450986
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
9 years agopower: lc709203f:report raw battery soc to framework
Venkat Reddy Talla [Fri, 1 Aug 2014 15:05:14 +0000 (20:35 +0530)]
power: lc709203f:report raw battery soc to framework

do not limit soc to 99 when fuel gauge is reporting
battery soc 100%, if battery reached DONE state with BQ
charger chip done interrupt and cable is disconnected after that,
sudden drop in battery soc is observed.

Change-Id: I9fa47541f791cf9b44fe257e26fa681b8e3dd8a5
Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
Reviewed-on: http://git-master/r/450372
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
9 years agoasoc: tegra: sync regcache across suspend-resume
vmali [Wed, 6 Aug 2014 12:21:25 +0000 (17:51 +0530)]
asoc: tegra: sync regcache across suspend-resume

- I2S registers and regcahe lose sync across suspend-resume
- Mark regcache dirty in suspend
- Sync regcache with i2s registers in resume

Bug 200008638

Change-Id: I4b603047f48fa771bd84a5481039760bf433cf35
Signed-off-by: vmali <vmali@nvidia.com>
Reviewed-on: http://git-master/r/453473
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Pierre Gervais <pgervais@nvidia.com>
Reviewed-by: Rene Houle <rhoule@nvidia.com>
Tested-by: Rene Houle <rhoule@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agoARM: arch_timer: Enable PL0 access to the CNTVCT
Neil Gabriel [Wed, 11 Jun 2014 22:41:44 +0000 (17:41 -0500)]
ARM: arch_timer: Enable PL0 access to the CNTVCT

Enable usermode access to the generic virtual counter.

Change-Id: Id033d12690d1693e67cf75ce7017fd4a24a18b45
Signed-off-by: Neil Gabriel <ngabriel@nvidia.com>
Reviewed-on: http://git-master/r/422391
(cherry picked from commit 49e21cf475a62c2c6c38f6b2460579834ad62b6b)
Reviewed-on: http://git-master/r/453554
GVS: Gerrit_Virtual_Submit
Reviewed-by: Andrey Trachenko <atrachenko@nvidia.com>
Tested-by: Andrey Trachenko <atrachenko@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agodrivers: clocksource: add CPU PM notifier for ARM architected timer
Sudeep KarkadaNagesha [Fri, 23 Aug 2013 14:53:15 +0000 (15:53 +0100)]
drivers: clocksource: add CPU PM notifier for ARM architected timer

Few control settings done in architected timer as part of initialisation
can be lost when CPU enters deeper power states. They need to be
restored when the CPU is (warm)reset again.

This patch adds CPU PM notifiers to save the counter control register
when entering low power modes and restore it when CPU exits low power.

Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
Change-Id: I0bad683961e4b72835ad40edf2c9ac9e0f78fad0
Reviewed-on: http://git-master/r/350844
(cherry picked from commit 1dd60414e4839c11eb99dbbd071b8accdaa3dafd)
Reviewed-on: http://git-master/r/453553
GVS: Gerrit_Virtual_Submit
Reviewed-by: Andrey Trachenko <atrachenko@nvidia.com>
Tested-by: Andrey Trachenko <atrachenko@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agobcmdhd: update cfg layer with active channel list
bibhayr [Fri, 11 Jul 2014 20:30:43 +0000 (13:30 -0700)]
bcmdhd: update cfg layer with active channel list

Update the cfg layer with active channel list after
associating to AP. Currently cfg layer gets updated
only during driver initialization. If some other
channel is passive during that time, it will never
get updated to active. Also, this update should be
done after every scan, but this should take care of
at least to update the AP association channel to be
active so that the p2p GO can be created on the APs
channel. Cfg layer does not check the passive channel
list for wlan0 connection but it checks the passive
channel for p2p GO creations.

Bug 200015567
BuG 200020740

Change-Id: Id42836917ca60aff0ae3a2115d7ee90ba017ee9f
Signed-off-by: bibhayr <bibhayr@nvidia.com>
Reviewed-on: http://git-master/r/436981
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
Tested-by: Todd Poynter <tpoynter@nvidia.com>
9 years agobcmdhd: null check for wl->p2p
Om Prakash Singh [Mon, 28 Jul 2014 08:15:03 +0000 (13:45 +0530)]
bcmdhd: null check for wl->p2p

Bug 200024287
Change-Id: Ideb514aeb37250431a6fc4c064c95fbdbe498936
Signed-off-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-on: http://git-master/r/448019
GVS: Gerrit_Virtual_Submit
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
9 years agobcmdhd: ensure work completion before freeing
Sang-Hun Lee [Wed, 30 Jul 2014 00:53:48 +0000 (17:53 -0700)]
bcmdhd: ensure work completion before freeing

Problem description:
 - wl_dealloc_netinfo would free allocated wireless_dev structures, which has
   work_struct for wdev_cleanup_work
 - If there is any job scheduled for wdev_cleanup_work and if it
   is scheduled after kfree of its parent struct, the result is undefined
 - But simply waiting for wdev_cleanup_work completion in
   wl_cfg80211_netdev_notifier_call would result in a dead lock, as wdev_cleanup_work
   and cfg80211_event_work both use the same workqueue. cfg80211_event_work
   may ultimately call wl_cfg80211_netdev_notifier_call

Fix description:
 - Separate the detach of an interface from the deallocation of an interface
 - Upon a detach, only remove the interface, and schedule a deallocation of it

Bug 1533639

Change-Id: I865907243ac370ab5932fb1d5ec7ce8c83279baf
Signed-off-by: Sang-Hun Lee <sanlee@nvidia.com>
Reviewed-on: http://git-master/r/448637
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agovideo: tegra: host: Register VI isomgr on request
Sudhir Vyas [Mon, 24 Mar 2014 15:34:51 +0000 (21:04 +0530)]
video: tegra: host: Register VI isomgr on request

Register VI as isomgr client when the camera user
driver has requested for memory BW requirements.
Currently it is being done in probe only, which
may be unnecessary for the usecases where VI is
not the memory client.

Bug 1485474

Change-Id: I9ae41e299bf0a8ef21ed94d44a57829cf70d11e2
Signed-off-by: Sudhir Vyas <svyas@nvidia.com>
(cherry picked from commit 279b41ca6155d3e6b17c09a9418a6e1bbdc57889)
Reviewed-on: http://git-master/r/449588
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Robert Shih <rshih@nvidia.com>
Tested-by: Robert Shih <rshih@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agoov5693: fix fuse ID read
Philip Breczinski [Fri, 25 Jul 2014 23:58:24 +0000 (16:58 -0700)]
ov5693: fix fuse ID read

Add 150us delay to start of fuse ID read to ensure sensor is ready
to communicate.

Bug 200005241

Change-Id: Ie9be9f22419e3c16952bde44ce1e289f48b7bba2
Signed-off-by: Philip Breczinski <pbreczinski@nvidia.com>
Reviewed-on: http://git-master/r/447834
(cherry picked from commit df3e4528e5b2f8f96a658c8b865db1e077105d3d)
Reviewed-on: http://git-master/r/448948
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: David Schalig <dschalig@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
9 years agostaging: iio: light: iqs263: synchronize driver
Shylender Gaddamwar [Tue, 8 Jul 2014 21:14:32 +0000 (14:14 -0700)]
staging: iio: light: iqs263: synchronize driver

-support iqs263 read/write.

Change-Id: I47c36978037af6fabedd01b319b1645ce73d095e
Signed-off-by: Shylender Gaddamwar <sgaddamwar@nvidia.com>
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/435874
(cherry picked from commit ae243d22c899302bba08990598c3c0a13ade0d7b)
Reviewed-on: http://git-master/r/440489
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agoARM: Tegra: TN8: Correct vana mapping
Sang-Hun Lee [Wed, 16 Jul 2014 04:22:13 +0000 (00:22 -0400)]
ARM: Tegra: TN8: Correct vana mapping

The i2c address of the rear camera sensor has changed

Bug 200016507

Change-Id: I9d6794b2efe81c96286d4ca305731492f9062961
Signed-off-by: Sang-Hun Lee <sanlee@nvidia.com>
Reviewed-on: http://git-master/r/438554
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
Tested-by: Todd Poynter <tpoynter@nvidia.com>
9 years agobcmdhd: wait for cfg cleanup before unregistering
bibhayr [Fri, 18 Jul 2014 22:23:42 +0000 (15:23 -0700)]
bcmdhd: wait for cfg cleanup before unregistering

If the p2p device is unregistered before the cfg
cleanup work item is scheduled then, the wdev
struct is corrupted and can cause the kernel panic.
wait for the work item to finish before freeing

Bug 1533639

Change-Id: Ib8729a985d2ed14ec062f98a9a8bcebacf90f8fc
Signed-off-by: bibhayr <bibhayr@nvidia.com>
Reviewed-on: http://git-master/r/439979
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: Sang-Hun Lee <sanlee@nvidia.com>
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
9 years agostaging: ozwpan: Cancel hrtimer before expiry set
Sai Gurrappadi [Fri, 18 Jul 2014 06:46:56 +0000 (23:46 -0700)]
staging: ozwpan: Cancel hrtimer before expiry set

Currently oz_timer_add sets the new expiry time before calling
hrtimer_start_expires where the timer is actually updated in the
timerqueue.

However, this update to expiry time is racy because the the
hrtimer_set_expires call is being performed from a softirq or a thread's
context. The CPU could recieve a hrtimer_interrupt before the
hrtimer_start_expires call but after hrtimer_set_expires.

This would leave the hrtimer with a new expiry value but with the same
position in the rbtree which a subsequent hrtimer_interrupt could use
to perform its timerqueue add/del operations with. Leaving the rbtree
in this stale/bad state causes some timers to never get serviced.

Fix this by first removing the timer from the timerqueue by calling
hrtimer_cancel and then updating the expiry time.

Bug 200016188

Change-Id: Ib8acb9f2977580e077bbe968a32c6deba992d000
Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: http://git-master/r/439729
Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
9 years agoHID: hidraw: check disconnect before get raw report
Vinayak Pane [Thu, 17 Jul 2014 03:27:23 +0000 (20:27 -0700)]
HID: hidraw: check disconnect before get raw report

Bug 200021849

Change-Id: I4096a25b251a351eeae627a776683adfec7dd197
Signed-off-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-on: http://git-master/r/439070
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
9 years agomedia: platform: tegra: ov5693: fix sysedp registration
Timo Alho [Mon, 26 May 2014 13:45:05 +0000 (16:45 +0300)]
media: platform: tegra: ov5693: fix sysedp registration

Register sysedp consumer with actual device name, not with generic
'ov5693' name. This allows more than one device to exists in the
system.

Bug 200007892
Bug 200021368

Change-Id: I2c85f3d1f483afb75df2b16a4d5808fdd8f3d9ad
Signed-off-by: Timo Alho <talho@nvidia.com>
Reviewed-on: http://git-master/r/415014
(cherry picked from commit d0a2342b78cb93ac858932cb2973f87a33417830)
Reviewed-on: http://git-master/r/438112
Reviewed-by: Steve Rogers <srogers@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: David Wang (SW-TEGRA) <davidw@nvidia.com>
9 years agonet: wireless: bcmdhd: reduce tasklet priority
Sang-Hun Lee [Fri, 11 Jul 2014 18:05:28 +0000 (14:05 -0400)]
net: wireless: bcmdhd: reduce tasklet priority

In case there is a lot of workload, wifi's bottom half handler can
starve the system critical threads such as the watchdog and CPU workload
monitor triggering a system reboot

Lower the priority of wifi tasklets to match the other bottom half handlers
priority

Bug 1526837

Change-Id: Ie1d592b7d445f22a79a9f0d5e50f61965d695888
Signed-off-by: Sang-Hun Lee <sanlee@nvidia.com>
Reviewed-on: http://git-master/r/432423
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agousb: gadget: tegra: conditionally update LP0 connect type
Rakesh Bodla [Tue, 15 Jul 2014 15:26:07 +0000 (20:56 +0530)]
usb: gadget: tegra: conditionally update LP0 connect type

After driver resume sometimes connect_type_lp0 is not
set to NONE, due some tasks didn't get scheduled.
In this case retain the value, so that correct
value will be preserved.

Bug 200017175

Change-Id: I8f2400675a8ced063a182c1069c586dfb9cc756f
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/438218
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
9 years agoALC5639: Remove usage of the one-bit-depop feature.
Rene Houle [Wed, 16 Jul 2014 03:33:24 +0000 (20:33 -0700)]
ALC5639: Remove usage of the one-bit-depop feature.
Bug 200020621

Change-Id: Ib0f81cec748863d4a09b163cc4ff6208e372c59f
Signed-off-by: Rene Houle <rhoule@nvidia.com>
Reviewed-on: http://git-master/r/438476
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agostaging: iio: palmas-adc: convert adc conversion to polling based.
Laxman Dewangan [Thu, 10 Jul 2014 10:44:38 +0000 (16:14 +0530)]
staging: iio: palmas-adc: convert adc conversion to polling based.

Convert ADC conversion to polling from interrupt as the
conversion takes 113us.

bug 1532624

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

9 years agopower: lc709203f: decouple gauge report from query
Sang-Hun Lee [Mon, 14 Jul 2014 00:09:57 +0000 (20:09 -0400)]
power: lc709203f: decouple gauge report from query

battery_gauge_report_battery_soc may call back one of lc709203f functions

If the mutex lock is still held, this sequence will dead lock

Bug 200020663

Change-Id: Ic55c630333ec2a4797510388fa77642b103e1367
Signed-off-by: Sang-Hun Lee <sanlee@nvidia.com>
Reviewed-on: http://git-master/r/437549
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
9 years agoalc5639 : Adding Realtek update for reducing pops on jack detection.
Rene Houle [Wed, 2 Jul 2014 01:53:20 +0000 (18:53 -0700)]
alc5639 : Adding Realtek update for reducing pops on jack detection.
Also adding Realtek driver support for their register access tool.
Bug 1529295

Change-Id: I996c95762231adea4ca09e70cd92c8075beee744
Signed-off-by: Rene Houle <rhoule@nvidia.com>
Reviewed-on: http://git-master/r/433415
GVS: Gerrit_Virtual_Submit
Reviewed-by: Pierre Gervais <pgervais@nvidia.com>
9 years agoRevert "bq2419x: dump stack backtrace when WDT expired."
Robert Shih [Fri, 11 Jul 2014 11:31:45 +0000 (19:31 +0800)]
Revert "bq2419x: dump stack backtrace when WDT expired."

This reverts commit 876d855741d5aa7fce49d79ffb703ad71677e388.

Change-Id: I92b6e266ff60e1a251e88bce3c6376532b9f7d6c
Signed-off-by: Robert Shih <rshih@nvidia.com>
Reviewed-on: http://git-master/r/437141
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agoAdd driver command MKEEP_ALIVE
Srinivas Ramachandran [Fri, 11 Jul 2014 02:34:40 +0000 (19:34 -0700)]
Add driver command MKEEP_ALIVE

Add the driver command MKEEP_ALIVE to send a periodic IP based keep alive
packet from the firmware to avoid deauth from access point due to inactivity.

Bug 1528060

Change-Id: I6836b7d19ed617d216391e318e9cd5b93e1e0724
Signed-off-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-on: http://git-master/r/436944
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
9 years agostaging: iio: adc: palmas: ADC convertion error handling
Jinyoung Park [Thu, 10 Jul 2014 14:26:57 +0000 (23:26 +0900)]
staging: iio: adc: palmas: ADC convertion error handling

Added error handling for ADC conversion.

Bug 200019496

Change-Id: I94785687e69596e5e8e0f5a7ad79a85a1766acdf
Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-on: http://git-master/r/436690
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
9 years agousb: gadget: tegra: add debug info related extcon
Rakesh Bodla [Thu, 10 Jul 2014 12:43:55 +0000 (18:13 +0530)]
usb: gadget: tegra: add debug info related extcon

Adding the extcon notification status debug info
in driver.

Bug 200017175

Change-Id: I1a2f0d6d9a8518ed4119a51443174ad802b18b9d
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/436639
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
9 years agostaging: iio: adc: palmas: Fix a wrong return
pchiang [Mon, 12 May 2014 09:52:10 +0000 (17:52 +0800)]
staging: iio: adc: palmas: Fix a wrong return

Fix a wrong return from palmas_gpadc_start_convertion

Bug 1512199

Change-Id: I7be181554288719550786b568088b1390fcce0c3
Signed-off-by: pchiang <pchiang@nvidia.com>
Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-on: http://git-master/r/408117
(cherry picked from commit 765c9e47862d92320ec06413a0999d16038a2573)
Reviewed-on: http://git-master/r/436689
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agothermal: check return value of update_temperature
Jinyoung Park [Thu, 26 Jun 2014 00:48:58 +0000 (09:48 +0900)]
thermal: check return value of update_temperature

Checking return value of update_temperature.
If return value is not Zero, it does't handle thermal trips.

Bug 200011588
Bug 200015248

Change-Id: I084e7c53ee132b33fa377d96f6c9e70f26529ffe
Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-on: http://git-master/r/428636
(cherry picked from commit d7254186c9a2a6aeaf360d853c332a33ef9f0ff8)
Reviewed-on: http://git-master/r/436688
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
9 years agothermal: check tz device is registered
Jinyoung Park [Tue, 17 Jun 2014 08:03:51 +0000 (17:03 +0900)]
thermal: check tz device is registered

Checking thermal zone device whether it is registered or not.

Bug 200011588

Change-Id: I377583f887d3dbe8258daa46d777daa6337b192f
Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-on: http://git-master/r/424088
(cherry picked from commit 397ce28d1841853103bc028080dfb00656211b9e)
Reviewed-on: http://git-master/r/427501
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
9 years agomisc: therm_est: Unregister tz and cdev in shutdown
Jinyoung Park [Wed, 28 May 2014 17:58:13 +0000 (02:58 +0900)]
misc: therm_est: Unregister tz and cdev in shutdown

Unregister thermal zone and cooling device in shutdown callback to prevent
unwanted thermal operating while shutdown processing.

Bug 1515432

Change-Id: I49a13618f7b8f8d5b55a8e960676e7357891fe89
Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-on: http://git-master/r/416278
(cherry picked from commit cb140feb445ff6dce4984bed527eca56191180a8)
Reviewed-on: http://git-master/r/436687
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
9 years agothermal: generic-adc-thermal: Add shutdown callback
Jinyoung Park [Wed, 28 May 2014 17:11:11 +0000 (02:11 +0900)]
thermal: generic-adc-thermal: Add shutdown callback

Added shutdown callback function to prevent unwanted thermal zone operating
while shutdown processing.

Bug 1515432

Change-Id: I54822fa6fe4a1af811b11324c5c378904c11f654
Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-on: http://git-master/r/416247
(cherry picked from commit d587035a252ca5c579db4ad8fad1756259a2566c)
Reviewed-on: http://git-master/r/427500
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
9 years agonet: wireless: bcmdhd: delete p2p device if already exist
Om Prakash Singh [Thu, 10 Jul 2014 13:18:00 +0000 (18:48 +0530)]
net: wireless: bcmdhd: delete p2p device if already exist

in case of android service restart, framework calls DRIVER STOP and
and then DRIVER START command. We are not removing p2p device
on DRIVER STOP call as it will as it is also trigger to disable wifi when
wifi sleep policy: never selected(Bug 1525819). While android service
restart, supplicant also restarts that try to create p2p device and it
returns failure because p2p device was not unregister.

Solution: while registering p2p device(it will only call when
supplicant starts), free old p2p device and register it again
instead of returning failure.

Bug 200020160

Change-Id: I950f7f6e55e1250081107a65fc3d13f44a32c848
Signed-off-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-on: http://git-master/r/436678
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agostaging: iio: light: iqs253: make sensor always on
Sri Krishna chowdary [Thu, 10 Jul 2014 03:07:16 +0000 (08:37 +0530)]
staging: iio: light: iqs253: make sensor always on

Keep sensor always on for its proper functioning.
It seems, we do not work fine with sensor turning on when
needed and turning it off when not in use. This behavior
could be because of the time it takes to adjust to the
environment but the root cause is not yet clear.

Bug 1499925

Change-Id: I57a5949e01f8d9cf68e50d877a2dae6925592ffd
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/436506
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Chas Inman <chasi@nvidia.com>
9 years agonet: wireless: bcmdhd: reorder sdlock to avoid lockup
Allen Yu [Tue, 8 Jul 2014 17:21:21 +0000 (01:21 +0800)]
net: wireless: bcmdhd: reorder sdlock to avoid lockup

dhd_os_sdlock() is called in dhd_watchdog(), which is the timer function
of dhd->timer. So we need to release the lock before deleting the timer
to avoid cpu lockup.

bug 1526837

Change-Id: Icbeb393afe81ff476d0e133f60bc7b0477d37364
Signed-off-by: Allen Yu <alleny@nvidia.com>
Reviewed-on: http://git-master/r/435684
Reviewed-by: Sang-Hun Lee <sanlee@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agonet: wireless: bcmdhd: do not call wl_cfgp2p_del_disc_if on DRIVER STOP
Parth Bera (Parth) Bera [Tue, 8 Jul 2014 10:20:14 +0000 (15:50 +0530)]
net: wireless: bcmdhd: do not call wl_cfgp2p_del_disc_if on DRIVER STOP

In kernel 3.10 we only use one net device wlan0 and p2p is a
wireless device register above wlan0 (driver_param with with
p2p_device=1). In this specific configuration, the DRIVER STOP
command implies to unregister of the p2p-dev-wlan0 wireless
device and to down the wlan0 iface. But when the DRIVER START
command occurs only the wlan0 net device is up, the p2p-dev-wlan0
wireless device is never registered again.

Solution:
wl_cfgp2p_del_disc_if code in wl_cfgp2p_down is unnecessary
because the function is called during  unloading driver.

Bug 1525819

Change-Id: I1e37e151411fa5f85075640c831e327a4fdc7c2d
Signed-off-by: Parth Bera (Parth) Bera <parth.bera@broadcom.com>
Signed-off-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-on: http://git-master/r/435594
Reviewed-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>