6 years agoRevert "video: tegra: hdcp: Fix Locking Issue"
Matt Wagner [Thu, 23 Aug 2012 18:32:31 +0000]
Revert "video: tegra: hdcp: Fix Locking Issue"

This reverts commit 51f746421b73f8f378bd7908b35fd6c79687e239.

Bug 1030468
Bug 1030415

Signed-off-by: Matt Wagner <mwagner@nvidia.com>
Change-Id: If9b5febd812e84848913431dcaf0bdefc518e5d1
Reviewed-on: http://git-master/r/126948
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jon Mayo <jmayo@nvidia.com>

6 years agoRevert "video: tegra: hdcp: Add Missing Lock"
Matt Wagner [Thu, 23 Aug 2012 18:31:53 +0000]
Revert "video: tegra: hdcp: Add Missing Lock"

This reverts commit 77c8da0aa18fad9e33fd8b1afb2013b1a476d74e.

Bug 1030468
Bug 1030415

Signed-off-by: Matt Wagner <mwagner@nvidia.com>
Change-Id: I2b85159dfcfc40b3a3632dc1300c729e0977a18f
Reviewed-on: http://git-master/r/126946
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jon Mayo <jmayo@nvidia.com>

6 years agoarm: tegra: E1239: Fix LP0 audio stop issue
Manoj Gangwal [Mon, 27 Aug 2012 14:44:03 +0000]
arm: tegra: E1239: Fix LP0 audio stop issue

Fix audio stop issue after resuming from lp0.

Bug 1039326

Change-Id: Ieb586b614ffecc9d149213fbfd3cbb3198088725
Signed-off-by: Manoj Gangwal <mgangwal@nvidia.com>
Reviewed-on: http://git-master/r/127562
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

6 years agovideo: tegra: host: fix integer overflows
Tuomas Tynkkynen [Fri, 24 Aug 2012 12:14:45 +0000]
video: tegra: host: fix integer overflows

job_size() calculates the size of a job structure based on a struct
passed as a ioctl parameter. This calculation was not checked for
overflow.

Bug 1038551

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

6 years agousb: otg: tegra: Notify USB events to otg core
Rakesh Bodla [Fri, 24 Aug 2012 12:43:55 +0000]
usb: otg: tegra: Notify USB events to otg core

Notify USB connection events to otg core. These
notifications will be used by drivers (e.g. otg wakelock
driver) who registered for the events.

Bug 1031034
Bug 976849

Change-Id: I3655071af9226e3aef385681fcabc94b9def4233
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/127137
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Alex Courbot <acourbot@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

6 years agoasoc: aic326x machine: Add support for D-Mic
Manoj Gangwal [Wed, 22 Aug 2012 16:48:44 +0000]
asoc: aic326x machine: Add support for D-Mic

Bug 1034241

Change-Id: I205a74a8f27237470a3cd1266bb925971654459c
Signed-off-by: Manoj Gangwal <mgangwal@nvidia.com>
Reviewed-on: http://git-master/r/125280
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

6 years agoasoc: codecs: TI aic326x: Add Digital Mic support
Manoj Gangwal [Wed, 22 Aug 2012 16:27:08 +0000]
asoc: codecs: TI aic326x: Add Digital Mic support

Bug 1034241

Change-Id: Id0037f18afa58be82cbeeb43e97b606614fb8ba8
Signed-off-by: Manoj Gangwal <mgangwal@nvidia.com>
Reviewed-on: http://git-master/r/125273
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Scott Peterson <speterson@nvidia.com>

6 years agoarm: tegra: E1239: Add TI aic326x support
Manoj Gangwal [Wed, 22 Aug 2012 14:32:19 +0000]
arm: tegra: E1239: Add TI aic326x support

1) Add latest TI aic326x codec driver support
2) Dmic support for TAI

Bug 1034241

Change-Id: I8db5223fd203a4e8f93f159a9c654486831f08a1
Signed-off-by: Manoj Gangwal <mgangwal@nvidia.com>
Reviewed-on: http://git-master/r/125265
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

6 years agoarm: tegra: config: Enable TI TLV320AIC326X codec
Manoj Gangwal [Wed, 22 Aug 2012 14:11:25 +0000]
arm: tegra: config: Enable TI TLV320AIC326X codec

Enable TI TLV320AIC326X audio codec configuration.

Bug 1034241

Change-Id: I5997c365f6ae3fde12e40f3a157421b655bb054e
Signed-off-by: Manoj Gangwal <mgangwal@nvidia.com>
Reviewed-on: http://git-master/r/125261
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

6 years agoasoc: aic326x machine: Add supp. for new TI driver
Manoj Gangwal [Fri, 24 Aug 2012 07:08:38 +0000]
asoc: aic326x machine: Add supp. for new TI driver

Add support for latest TI codec aic326x driver.

Bug 1034241

Change-Id: I387693ed2de466d1704c6f7ff0a1b15c7cbff32f
Signed-off-by: Manoj Gangwal <mgangwal@nvidia.com>
Reviewed-on: http://git-master/r/125180
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Lokesh Pathak <lpathak@nvidia.com>

6 years agodrivers: mfd: Add support for TI aic3262 driver
Manoj Gangwal [Wed, 22 Aug 2012 10:15:42 +0000]
drivers: mfd: Add support for TI aic3262 driver

Bug 1034241

Change-Id: I5607d53cf0bdd25c5e2b8447cd7e676b64cd32a2
Signed-off-by: Manoj Gangwal <mgangwal@nvidia.com>
Reviewed-on: http://git-master/r/125169
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Lokesh Pathak <lpathak@nvidia.com>

6 years agoasoc: codecs: Add TI aic326x driver
Manoj Gangwal [Wed, 22 Aug 2012 09:58:01 +0000]
asoc: codecs: Add TI aic326x driver

Add latest TI aic326x driver.

Bug 1034241

Change-Id: I8457538025b2989c4baa5eaefef48bdd5535def9
Signed-off-by: Manoj Gangwal <mgangwal@nvidia.com>
Reviewed-on: http://git-master/r/125167
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Lokesh Pathak <lpathak@nvidia.com>

6 years agoarm: tegra: pcie: WAR to avoid hang on PCIe device
Jay Agarwal [Thu, 16 Aug 2012 12:38:12 +0000]
arm: tegra: pcie: WAR to avoid hang on PCIe device

Setting DFPCI_RSPPASSPW bit in AFI_CONFIGURATION
register to avoid instant hang on CPU read/write
while gpu transfers are in progress.

Bug 1034443

Change-Id: I40c99588753b8b2cb2d418b54c6ac73f7b8ddc13
Signed-off-by: Jay Agarwal <jagarwal@nvidia.com>
Reviewed-on: http://git-master/r/124037
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

6 years agovideo: tegra: nvmap: fix handle usecount tracking
Tuomas Tynkkynen [Wed, 15 Aug 2012 14:54:38 +0000]
video: tegra: nvmap: fix handle usecount tracking

A handle's usecount used to be incremented once during the mmap ioctl,
and decremented when the mapping is closed by the kernel. However, that
fails if a mapping cloned, for example if the mapping was split due to
a munmap, or (presumably) during fork, as the decrement will then happen
for each cloned mapping.

Therefore increment the usecount when a mapping is opened.
Also fix a BUG_ON() that would have caught this bug, if it wouldn't
have done the check by checking if the unsigned usecount field is
less than zero.

Bug 1033981

Change-Id: I72ac9361a19e44f91ffd6b1126f4632e0f7b6726
Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
Reviewed-on: http://git-master/r/123710
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>

6 years agoARM: tegra: TAI: Add E1239 support
Seema Khowala [Wed, 22 Aug 2012 18:14:29 +0000]
ARM: tegra: TAI: Add E1239 support

Bug 1002637

Change-Id: I1271f95e8c174422bcb93eed3cc2bd7df8012479
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: http://git-master/r/123537
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Scott Peterson <speterson@nvidia.com>

6 years agoRevert "arm: tegra: Enable speculative line fill in SCU."
Krishna Reddy [Wed, 22 Aug 2012 01:51:22 +0000]
Revert "arm: tegra: Enable speculative line fill in SCU."

This reverts commit 06c880a6086183173c361b4a9d4f8047c6a39769.
This CL is reverted as it causes write perf regression with lmbench(bw_mem)
benchmark.
Bug 1026077

Change-Id: I7ff9ffbfe74e2083aa43cab75b694b1c61987bc3
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/125097
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>

6 years agoRevert "arm: tegra: scu: Enable IC and SCU standby"
Krishna Reddy [Wed, 22 Aug 2012 01:50:09 +0000]
Revert "arm: tegra: scu: Enable IC and SCU standby"

This reverts commit b25193d5c3e2c59169c127d23b59123136cfefa7.
This CL is reverted as it causes write perf regression with lmbench(bw_mem)
benchmark.
Bug 1026077

Change-Id: I9858c88a6e846d2c3629f14c7cc62a7feb4f4528
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/125096
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>

6 years agoARM:tegra:emc: scale latency allowance by tick len
Ray Poudrier [Tue, 21 Aug 2012 19:23:51 +0000]
ARM:tegra:emc: scale latency allowance by tick len

Calculate the tick length of the EMC DFS table
and scale the latency allowance settings.

Bug 955082

Change-Id: Id7b1504c6854009ba7677c7ddebe0a8f62cbfb7e
Signed-off-by: Ray Poudrier <rapoudrier@nvidia.com>
Reviewed-on: http://git-master/r/124980
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>

6 years agovideo: console: Enable framebuffer console
Mark Zhang [Tue, 21 Aug 2012 05:20:35 +0000]
video: console: Enable framebuffer console

Framebuffer console init failed issue will be fixed by:
http://git-master/r/#change,107866
So we should enable framebuffer console now.

Bug 996992
Bug 941073

Change-Id: I6841248fad406f4a00055062691f5794145c030a
Signed-off-by: Mark Zhang <markz@nvidia.com>
Reviewed-on: http://git-master/r/124805
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Peer Chen <pchen@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Rhyland Klein <rklein@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Allen Martin <amartin@nvidia.com>

6 years agoARM: tegra: la: add function to scale LA
Ray Poudrier [Tue, 21 Aug 2012 22:09:09 +0000]
ARM: tegra: la: add function to scale LA

Add functionality to enable changing of latency
allowance settings. This is used for memory
tables that may have different tick lengths.

Bug 955082

Change-Id: I3055a062846cfdeb992931e691cf687ffb05725c
Signed-off-by: Ray Poudrier <rapoudrier@nvidia.com>
Reviewed-on: http://git-master/r/124979
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>

6 years agonet/usbnet: avoid recursive locking in usbnet_stop()
Steve Lin [Wed, 22 Aug 2012 21:55:34 +0000]
net/usbnet: avoid recursive locking in usbnet_stop()

|kernel BUG at kernel/rtmutex.c:724!
|[<c029599c>] (rt_spin_lock_slowlock+0x108/0x2bc) from [<c01c2330>] (defer_bh+0x1c/0xb4)
|[<c01c2330>] (defer_bh+0x1c/0xb4) from [<c01c3afc>] (rx_complete+0x14c/0x194)
|[<c01c3afc>] (rx_complete+0x14c/0x194) from [<c01cac88>] (usb_hcd_giveback_urb+0xa0/0xf0)
|[<c01cac88>] (usb_hcd_giveback_urb+0xa0/0xf0) from [<c01e1ff4>] (musb_giveback+0x34/0x40)
|[<c01e1ff4>] (musb_giveback+0x34/0x40) from [<c01e2b1c>] (musb_advance_schedule+0xb4/0x1c0)
|[<c01e2b1c>] (musb_advance_schedule+0xb4/0x1c0) from [<c01e2ca8>] (musb_cleanup_urb.isra.9+0x80/0x8c)
|[<c01e2ca8>] (musb_cleanup_urb.isra.9+0x80/0x8c) from [<c01e2ed0>] (musb_urb_dequeue+0xec/0x108)
|[<c01e2ed0>] (musb_urb_dequeue+0xec/0x108) from [<c01cbb90>] (unlink1+0xbc/0xcc)
|[<c01cbb90>] (unlink1+0xbc/0xcc) from [<c01cc2ec>] (usb_hcd_unlink_urb+0x54/0xa8)
|[<c01cc2ec>] (usb_hcd_unlink_urb+0x54/0xa8) from [<c01c2a84>] (unlink_urbs.isra.17+0x2c/0x58)
|[<c01c2a84>] (unlink_urbs.isra.17+0x2c/0x58) from [<c01c2b44>] (usbnet_terminate_urbs+0x94/0x10c)
|[<c01c2b44>] (usbnet_terminate_urbs+0x94/0x10c) from [<c01c2d68>] (usbnet_stop+0x100/0x15c)
|[<c01c2d68>] (usbnet_stop+0x100/0x15c) from [<c020f718>] (__dev_close_many+0x94/0xc8)

defer_bh() takes the lock which is hold during unlink_urbs(). The safe
walk suggest that the skb will be removed from the list and this is done
by defer_bh() so it seems to be okay to drop the lock here.

Reported-by: AnÃ\255bal Almeida Pinto <anibal.pinto@efacec.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 4231d47e6fe69f061f96c98c30eaf9fb4c14b96d)
---------------------------------------------------------------------
net/usbnet: reserve headroom on rx skbs

network drivers should reserve some headroom on incoming skbs so that we
dont need expensive reallocations, eg forwarding packets in tunnels.

This NET_SKB_PAD padding is done in various helpers, like
__netdev_alloc_skb_ip_align() in this patch, combining NET_SKB_PAD and
NET_IP_ALIGN magic.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Oliver Neukum <oneukum@suse.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 7bdd402706cf26bfef9050dfee3f229b7f33ee4f)
---------------------------------------------------------------------
usbnet: use netif_tx_wake_queue instead of netif_start_queue

If host is going to autosuspend function with two interfaces and
if IP packet has arrived in-between of two usbnet_suspend() callbacks,
i.e usbnet_resume() is called in-between, tx data flow is stopped.
When autosuspend timer expires and device is put to autosuspend
again, tx queue is waked up and data can be sent again.
This behavior might be repeated several times in a row.

Tested on Intel/ARM.

Reviewed-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Tested-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
Signed-off-by: Alexey Orishko <alexey.orishko@stericsson.com>
Acked-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 1aa9bc5b2f4cf8c48944fb9a607bf1dd674e2c10)
---------------------------------------------------------------------
usbnet: increase URB reference count before usb_unlink_urb

Commit 4231d47e6fe69f061f96c98c30eaf9fb4c14b96d(net/usbnet: avoid
recursive locking in usbnet_stop()) fixes the recursive locking
problem by releasing the skb queue lock, but it makes usb_unlink_urb
racing with defer_bh, and the URB to being unlinked may be freed before
or during calling usb_unlink_urb, so use-after-free problem may be
triggerd inside usb_unlink_urb.

The patch fixes the use-after-free problem by increasing URB
reference count with skb queue lock held before calling
usb_unlink_urb, so the URB won't be freed until return from
usb_unlink_urb.

Reported-by: Dave Jones <davej@redhat.com>
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 0956a8c20b23d429e79ff86d4325583fc06f9eb4)
---------------------------------------------------------------------
usbnet: don't clear urb->dev in tx_complete

URB unlinking is always racing with its completion and tx_complete
may be called before or during running usb_unlink_urb, so tx_complete
must not clear urb->dev since it will be used in unlink path,
otherwise invalid memory accesses or usb device leak may be caused
inside usb_unlink_urb.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 5d5440a835710d09f0ef18da5000541ec98b537a)
---------------------------------------------------------------------
usbnet: consider device busy at each recieved packet

usbnet should centrally handle busy reporting in the rx path
so subdrivers need not worry. This hurts use cases which do
rx only or predominantly.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 8a78335442cea429afb2b964318b6e257448ea00)
---------------------------------------------------------------------
usbnet: fix leak of transfer buffer of dev->interrupt

The transfer buffer of dev->interrupt is allocated in .probe path,
but not freed in .disconnet path, so mark the interrupt URB as
URB_FREE_BUFFER to free the buffer when the URB is destroyed.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Acked-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 267a83e8e00dc5a878b24c39883643c20a8b1482)

Bug 1036768

Change-Id: I5d6620c8ff4e6cef52c3f467fb2196658c4d47b1
Signed-off-by: Steve Lin <stlin@nvidia.com>
Reviewed-on: http://git-master/r/125338
GVS: Gerrit_Virtual_Submit

6 years agovideo: tegra: host: Clear intr list at intr_put
Terje Bergstrom [Wed, 22 Aug 2012 12:03:07 +0000]
video: tegra: host: Clear intr list at intr_put

Process wait list when removing a waiter. This clears the interrupt
once it is no longer needed.

Bug 1031724

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

6 years agovideo: tegra: dc: Make framebuffer console init OK
Mark Zhang [Fri, 17 Aug 2012 05:31:37 +0000]
video: tegra: dc: Make framebuffer console init OK

Update framebuffer's modelist after we changed it's fb_var_screeninfo.
This makes sure the framebuffer console can be inited successfully.
During framebuffer console init, it'll check whether the var info of
the framebuffer is consistent with the modelist.
Unsuccessful init of framebuffer console driver makes VT driver
doesn't work in right way.

Bug 996992

Signed-off-by: Mark Zhang <markz@nvidia.com>
Change-Id: I96a1db1f389be75dcba48b20447cf1510ad3768b
Reviewed-on: http://git-master/r/107866
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Shashank Sharma <shashanks@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jon Mayo <jmayo@nvidia.com>

6 years agoARM: Tegra: Omit L2 flush at disable
Antti P Miettinen [Thu, 31 May 2012 09:44:01 +0000]
ARM: Tegra: Omit L2 flush at disable

In Tegra kernel L2 is disabled only upon CPU cluster power down,
e.g. LP2 entry. Flushing L2 upon every LP2 entry is costly.
Since we are always in single core mode upon cluster power down
we can safely omit L2 flush upon L2 disable.

Change-Id: I27542b11e6133f3192a02440e5b14ea408b860fd
Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com>
Reviewed-on: http://git-master/r/105625
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>

6 years agogpio: tegra: Added support for GCOV for GPIO
Sumit Sharma [Wed, 22 Aug 2012 11:09:38 +0000]
gpio: tegra: Added support for GCOV for GPIO

Added support for GCOV code coverage for GPIO

Signed-off-by: Sumit Sharma <sumsharma@nvidia.com>
Change-Id: I407433db690696644aa67dffc0de8bc03c624b54
Reviewed-on: http://git-master/r/125183
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit

6 years agohwmon: tegra: tsensor:Fix compilation error
Nagaraja Kolur [Fri, 3 Aug 2012 00:58:16 +0000]
hwmon: tegra: tsensor:Fix compilation error

Bug 1024886

Resolved compilation error for unused code.

Signed-off-by: Nagaraja Kolur <nkolur@nvidia.com>

Change-Id: I9167d8129a9cba0fc6cb203180e07192d66db439
Reviewed-on: http://git-master/r/120581
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Nagaraj Kolur <nkolur@nvidia.com>
Tested-by: Nagaraj Kolur <nkolur@nvidia.com>
Reviewed-by: Vijaya Bhaskar <vbhaskar@nvidia.com>
Reviewed-by: Wahed Syed <wsyed@nvidia.com>
Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>

6 years agoARM: tegra: iovmm: Fix spinlock bug if alloc fails
Tuomas Tynkkynen [Fri, 17 Aug 2012 08:37:02 +0000]
ARM: tegra: iovmm: Fix spinlock bug if alloc fails

iovmm_split_free_block leaves the domain's spinlock unlocked if a
memory allocation failed. Unfortunately, all the callers of that
function assume that it takes the spinlock. This will then lead to
double unlocking of the spinlock.

Bug 1035105

Change-Id: Ib4379cad76f053586d6a77b8d0dc9f41af01931a
Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
Reviewed-on: http://git-master/r/124299
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>

6 years agoRevert "ARM: tegra: enterprise: update memory timings"
Simone Willett [Wed, 22 Aug 2012 20:58:14 +0000]
Revert "ARM: tegra: enterprise: update memory timings"

This reverts commit 64d7608ed4a0fe0964250ad0423c499841292bf6

Change-Id: I0405128605ed7a858aecb8fb9aaaf80e0e44c4b8
Reviewed-on: http://git-master/r/125322
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

6 years agoi2c: tegra: Add delay before resetting the controller after NACK
Laxman Dewangan [Wed, 22 Aug 2012 08:13:08 +0000]
i2c: tegra: Add delay before resetting the controller after NACK

NACK interrupt is generated before I2C controller generates the STOP
condition on bus. Because of this reset of controller is happening
before I2C controller could complete STOP condition. So wait for some
time before resetting the controller so that STOP condition has
delivered properly on bus.

Added delay of 2 clock period before resetting the controller in case of
NACK error.

Signed-off-by: Alok Chauhan <alokc@nvidia.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>

Taken change from mainline commit.

Change-Id: Id089aae313614e58ec6da36eda4ff2d87c5cddc3
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/125148
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>

6 years agoPM QoS: Add disable parameter
Antti P Miettinen [Mon, 20 Aug 2012 16:36:38 +0000]
PM QoS: Add disable parameter

For testing purposes it is useful to be able to disable
PM Qos.

Bug 1020898
Bug 917572

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

6 years agovideo: tegra: host: Fix freeing a ERR_PTR value
Tuomas Tynkkynen [Mon, 20 Aug 2012 14:26:16 +0000]
video: tegra: host: Fix freeing a ERR_PTR value

nvhost_3dctx_alloc_common correctly checks the return value of an
allocator function, and attempts to perform cleanup. However, this
particular allocation API returns ERR_PTR values in case of failure,
which then gets passed to the deallocation function, causing a crash.

Also, the return value of that allocator API is checked with IS_ERR
in some places, and with IS_ERR_OR_NULL in others. For consistency
and avoiding surprises if the allocation implementation changes,
use IS_ERR_OR_NULL in all places.

Bug 1035878

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

6 years agovideo: tegra: host: Fix crash if allocation fails
Tuomas Tynkkynen [Thu, 16 Aug 2012 16:56:51 +0000]
video: tegra: host: Fix crash if allocation fails

nvhost_module_remove_client assumes that a client structure
to be freed exists in the linked list. However, if an allocation fails
in nvhost_module_add_client, no client structure is allocated, and
during cleanup, nvhost_module_remove_client would then attempt
to free an invalid pointer.

Bug 1034729

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

6 years agoarch: arm: pcie: init TXBA registers
krishna kishore [Thu, 2 Aug 2012 12:40:08 +0000]
arch: arm: pcie: init TXBA registers

Setting default values in TXBA registers to avoid
unfair arbitration between downstream reads and
completions to upstream reads

Bug 1027024

Change-Id: I87763817b7974127f93fa18270b5245a54fc6676
Signed-off-by: krishna kishore <kthota@nvidia.com>
Reviewed-on: http://git-master/r/120359
Tested-by: Jay Agarwal <jagarwal@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

6 years agoARM: tegra: kai: update memory timings
Ray Poudrier [Mon, 2 Jul 2012 23:41:32 +0000]
ARM: tegra: kai: update memory timings

Extend tick length to 60ns

Bug 1001229

Change-Id: I8a96dd08b6d11a196c9b82bec403ab2e4676e2f4
Signed-off-by: Ray Poudrier <rapoudrier@nvidia.com>
Reviewed-on: http://git-master/r/113081
(cherry picked from commit 487622aa43568d3f6f9a9f5fc98176e5ffdd6246)
Reviewed-on: http://git-master/r/116208
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

6 years agomedia: video: tegra: ar0832: Add slew rate support
Naren Bhat [Mon, 20 Aug 2012 19:39:16 +0000]
media: video: tegra: ar0832: Add slew rate support

Add slew rate support for AR0832 focuser.

bug 1028733

Change-Id: I4fd0245fad7f7c820fc30a7c4bfc970d52903da6
Signed-off-by: Naren Bhat <nbhat@nvidia.com>
Reviewed-on: http://git-master/r/124695
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>

6 years agoARM: tegra: Remove timer workaround
Antti P Miettinen [Tue, 26 Jun 2012 13:54:37 +0000]
ARM: tegra: Remove timer workaround

Reprogramming running timers may cause timer interrupt state
to get out of sync and result in lost timer interrupts.

Bug 950482

Change-Id: I83c9d735f9b041e8a57d73ba466f5f9c89ca1b89
Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com>
Reviewed-on: http://git-master/r/111242
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

6 years agoi2c: tegra: protect suspend/resume callbacks with CONFIG_PM_SLEEP
Laxman Dewangan [Tue, 21 Aug 2012 08:08:47 +0000]
i2c: tegra: protect suspend/resume callbacks with CONFIG_PM_SLEEP

The CONFIG_PM doesn't actually enable any of the PM callbacks, it
only allows to enable CONFIG_PM_SLEEP and CONFIG_PM_RUNTIME.
This means if CONFIG_PM is used to protect system sleep callbacks
then it may end up unreferenced if only runtime PM is enabled.
Hence protecting sleep callbacks with CONFIG_PM_SLEEP.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>

Change-Id: I090e167c1de8f254a278e9e3b511292cfbc5f250
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/124872
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

6 years agoi2c: tegra: better describe fast and div clocks
Laxman Dewangan [Tue, 21 Aug 2012 08:19:53 +0000]
i2c: tegra: better describe fast and div clocks

Describe the fast and div clock part of structure and prints
better error message when any failure occurs in enabling clocks.

Change-Id: I72f66b5f8cbefbe8b2c6b8c7150edff3ee2244b4
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/124873
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

6 years agoi2c: tegra: declare iomap address to iomem type
Laxman Dewangan [Tue, 21 Aug 2012 08:23:08 +0000]
i2c: tegra: declare iomap address to iomem type

Declare the iomap address to __iomem type.

Change-Id: Ic855834f6e7fd417e4c2fd0415a6195655d3ed60
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/124874
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

6 years agoi2c: tegra: I2_M_NOSTART functionality not supported in Tegra20
Laxman Dewangan [Tue, 21 Aug 2012 09:46:38 +0000]
i2c: tegra: I2_M_NOSTART functionality not supported in Tegra20

Tegra20 i2c controller does not support the continue transfer
which implements the I2C_M_NOSTART functionality of i2c
protocol mangling.
Removing the I2C_M_NOSTART functionality support for Tegra20.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Cherry-picked from mainline
72dedc2fb12ff31cc2da977d0c40c3ac58f554cf

Change-Id: I461342749a834ff2eae056f1c6616a8d7693a32c
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/124875
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

6 years agoARM: tegra: usb_phy: Fix HSIC resume code
Vinod Atyam [Fri, 17 Aug 2012 09:03:47 +0000]
ARM: tegra: usb_phy: Fix HSIC resume code

1) During remote wakeup resume, no need
   to keep 25 msec delay after resume bit
   is cleared. Updated the code now.
2) PSPD bit in HOSTPC register is read only,
   but bymistake it is getting set in our code.
   Corrected the code now.
3) During AP resume, no need to set RUN bit
   2 times. Corrected the code to do it once.

Bug 1028940
Bug 1024592

Change-Id: I872886f4cef6058d3de9d488321aa5b0925fd62a
Signed-off-by: Vinod Atyam <vatyam@nvidia.com>
Reviewed-on: http://git-master/r/124051
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

6 years agoARM: tegra: cardhu: update memory timings
Ray Poudrier [Tue, 3 Jul 2012 18:43:05 +0000]
ARM: tegra: cardhu: update memory timings

Extend tick length to 60ns

Also add missed Cardhu SKU 1000 table

Bug 1001229
Bug 970610

Change-Id: I224158a88d02595d5b911f59b6920b9ed99481ab
Signed-off-by: Ray Poudrier <rapoudrier@nvidia.com>
Reviewed-on: http://git-master/r/113315
(cherry picked from commit 492193079047d9c5a4fff617a14191438f356e42)
Reviewed-on: http://git-master/r/116221
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Wen Yi <wyi@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

6 years agoARM: tegra: enterprise: update memory timings
Ray Poudrier [Tue, 3 Jul 2012 03:17:42 +0000]
ARM: tegra: enterprise: update memory timings

Extend to 60ns tick

Bug 1001229

Change-Id: Id2b01218a7c5cb1566d0e8c175defb12c79e6497
Signed-off-by: Ray Poudrier <rapoudrier@nvidia.com>
Reviewed-on: http://git-master/r/113122
(cherry picked from commit 176fd3fbaede0d38281fe4bad721856e7fef0833)
Reviewed-on: http://git-master/r/116220
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

6 years agovideo: tegra: dc: Add timestamp support
Raghavendra VK [Sat, 4 Aug 2012 04:25:43 +0000]
video: tegra: dc: Add timestamp support

bug 1021221

Change-Id: Ifbe007de5bdeafaa15a0b3f2a138086045eba160
Signed-off-by: Raghavendra VK <rvk@nvidia.com>
Reviewed-on: http://git-master/r/118179
(cherry picked from commit 74be8d4e7210d7bcea0d55565a7cbb06d6cc960e)
Reviewed-on: http://git-master/r/121087
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Robert Morell <rmorell@nvidia.com>

6 years agovideo: tegra: nvmap: Fix overflow in nvmap_heap
Tuomas Tynkkynen [Mon, 13 Aug 2012 12:43:31 +0000]
video: tegra: nvmap: Fix overflow in nvmap_heap

do_heap_alloc locates a suitable free block from a nvmap heap given a
size and alignment. Unfortunately, if a heap block happens to be
smaller than the alignment passed to the function, an integer overflow
will occur, and a block that's too small gets accidentally returned.

Bug 1032642

Change-Id: Ic650c520409134d753e968f62f144ddeb065ccc7
Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
Reviewed-on: http://git-master/r/123076
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>

6 years agoscripts: Make git commit info always present
Tao Hu [Wed, 8 Aug 2012 09:30:06 +0000]
scripts: Make git commit info always present

LOCALVERSION_AUTO is set by default.
And git commit will be part of the version.
E.g. "3.1.10-g0fe9b4a" where 0fe9b4a is the commit.

The version will appear in kpanic logs.
It would help developers to know the exact kernel version.

But a tagged commit (main-ics-2012.06.07-A5) will lead to no git info.
E.g. "3.1.10"
This patch will solve the issue.

Change-Id: I28370ada903b4be12bfc51eb3626512572e15c20
wChange-Id: I9dbb6c0a9e2964ead92114197a6d5c457ed7aab9
Signed-off-by: Tao Hu <taoh@nvidia.com>
Reviewed-on: http://git-master/r/123670
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Prajakta Gudadhe <pgudadhe@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Scott Peterson <speterson@nvidia.com>

6 years agoARM: tegra: e1853: Add build support for E1853
Ashwin Joshi [Fri, 27 Jul 2012 10:28:50 +0000]
ARM: tegra: e1853: Add build support for E1853

E1853 is T30 based automotive platform. Modify Makefile to support build
of E1853 board. Also, added config option to Kconfig file.

Bug 966833
Bug 1018258

Change-Id: I18dc015b79256fde1c77947198b426a0060a9017
Signed-off-by: Ashwin Joshi <asjoshi@nvidia.com>
Reviewed-on: http://git-master/r/118932
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
(cherry picked from commit bed57d893803f2ccef8f40bd30bdf1e8a44f184b)
Reviewed-on: http://git-master/r/119652
GVS: Gerrit_Virtual_Submit
Tested-by: Haribabu Narayanan <hnarayanan@nvidia.com>
Reviewed-by: Bob Johnston <bjohnston@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>

6 years agoARM: tegra: cardhu: adjust ov2710 power sequence
Charlie Huang [Fri, 10 Aug 2012 23:26:34 +0000]
ARM: tegra: cardhu: adjust ov2710 power sequence

To fix an instability issue, the power sequence is updated to match
the specification for this device.

bug 1031318

Change-Id: I3970af7ae8ed2baa6060f548242b0093040afb53
Signed-off-by: Charlie Huang <chahuang@nvidia.com>
Reviewed-on: http://git-master/r/122867
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Patrick Shehane <pshehane@nvidia.com>
Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>

6 years agoPM: Need to wake_up_all when suspend fail
BH Hsieh [Mon, 13 Aug 2012 07:33:07 +0000]
PM: Need to wake_up_all when suspend fail

In rpm_suspend, when suspend fail,
before going to reschedule another autosuspend,
wake_up_all is required to avoid remote wakeup
issues.

Bug 1026169
Bug 1027598
Bug 1032565

Change-Id: Ieaf9282dae59b2cb343bf01aa2ba837a8cdc39c7
Signed-off-by: BH Hsieh <bhsieh@nvidia.com>
Reviewed-on: http://git-master/r/122978
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Neil Patel <neilp@nvidia.com>
Tested-by: Neil Patel <neilp@nvidia.com>
Tested-by: Steve Lin <stlin@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Steve Lin <stlin@nvidia.com>

6 years agousb: otg: tegra: fix racing USB connection events
Xin Xie [Wed, 11 Jul 2012 02:23:03 +0000]
usb: otg: tegra: fix racing USB connection events

Sometimes USB connect and disconnect events is not detected properly. The
OTG irq handler is using a workqueue which has no protection for multiple
incoming event handling.

This patch adds mutex to protect the workqueue for USB connection
handling.

BUG 968345

Change-Id: If1c6fec4231dd0dc918f7f278e0a1d7667782917
Signed-off-by: Xin Xie <xxie@nvidia.com>
Reviewed-on: http://git-master/r/122308
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Rakesh Bodla <rbodla@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

6 years agousb: gadget: tegra: remove unnecessary bus resume
Xin Xie [Tue, 7 Aug 2012 23:07:14 +0000]
usb: gadget: tegra: remove unnecessary bus resume

Current Tegra UDC driver share same IRQ with OTG driver, and it will call
bus_resume() even if there is no UDC IRQ pending.

This patch will check UDC IRQ source and will not cause bus resume if no
IRQ pending for UDC driver.

BUG 1015685

Change-Id: Ifc5634ae5d1f7f1435c64bc527ab2e9fb8d0e36b
Signed-off-by: Xin Xie <xxie@nvidia.com>
Reviewed-on: http://git-master/r/121896
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

6 years agousb: gadget: tegra_udc: use USB charging spec 1.2
Xin Xie [Wed, 1 Aug 2012 23:18:55 +0000]
usb: gadget: tegra_udc: use USB charging spec 1.2

Enable the USB charging based on the USB charging spec 1.2. Now we can
detect:
1. SDP (stanardard downstream port)
2. CDP (charging downstream port)
3. DCP (dedicated charging port)
4. None (no cable connected)
5. Non-standard charger

For some non-standard charger, we cannot detect it as DCP device.
If we find a charger detected as USB device but no EP0 packet recieved
with 1s, we then decided this is 1A charger.

bug 968345

Change-Id: I804f90ea6e4794da8f52b1c3ebd694828d99f40e
Signed-off-by: Xin Xie <xxie@nvidia.com>
Reviewed-on: http://git-master/r/120218
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

6 years agovideo: tegra: nvmap: Add sanity checks for page pools.
Krishna Reddy [Wed, 1 Aug 2012 22:15:21 +0000]
video: tegra: nvmap: Add sanity checks for page pools.

Check return code for set_page_array_* calls.

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

6 years agoARM: tegra: usb: handle device connect in lp0
Krishna Yarlagadda [Tue, 14 Aug 2012 16:06:59 +0000]
ARM: tegra: usb: handle device connect in lp0

When a otg cable is connected along with device during lp0
system will wakeup but might not complete device enumeration
before going back to lp0. In this case we have to handle pmc
disable.

Bug 1024456

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

6 years agoUSB: gadget: f_audio_source: Adjust packet timing to reduce glitches
Mike Lockwood [Sun, 27 May 2012 22:41:53 +0000]
USB: gadget: f_audio_source: Adjust packet timing to reduce glitches

Increase max packet size and clean up timing logic so we can better
recover from not getting an interrupt in time for a SOF.

Bug 1026047

Signed-off-by: Mike Lockwood <lockwood@google.com>
(cherry picked from commit 3d2096a7959d023bc31a3cf934c3d425de01c94f)

Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Change-Id: I0a0a6f448e71e4a0c478bb44cadc54fa021e13e4
Reviewed-on: http://git-master/r/123344
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

6 years agoUSB: gadget: f_audio_source: New gadget driver for audio output
Mike Lockwood [Fri, 11 May 2012 16:01:08 +0000]
USB: gadget: f_audio_source: New gadget driver for audio output

This driver presents a standard USB audio class interface to the host
and an ALSA PCM device to userspace

Bug 1026047

Signed-off-by: Mike Lockwood <lockwood@google.com>
(cherry picked from commit a23ff394752015a233dd3b27b05c9d913cbf5536)

Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Change-Id: I4054e09888f17d9cdfcfd4a3d430ca5cfb3fd9fa
Reviewed-on: http://git-master/r/123343
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

6 years agoUSB: gadget: f_accessory: Add support for HID input devices
Rakesh Bodla [Tue, 14 Aug 2012 12:06:15 +0000]
USB: gadget: f_accessory: Add support for HID input devices

Bug 1026047

Signed-off-by: Mike Lockwood <lockwood@google.com>
(cherry picked from commit 7a3d01af4f04950a86a18f5a439f1802d8093650)

Conflicts:

drivers/usb/gadget/f_accessory.c

Change-Id: I30bc02a1bcf636967d56370db83578f49f0e7514
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/123342
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

6 years agoAdd ACCESSORY_SET_AUDIO_MODE control request and ioctl
Mike Lockwood [Fri, 11 May 2012 16:00:40 +0000]
Add ACCESSORY_SET_AUDIO_MODE control request and ioctl

The control request will be used by the host to enable/disable USB audio
and the ioctl will be used by userspace to read the audio mode

Bug 1026047

Signed-off-by: Mike Lockwood <lockwood@google.com>
(cherry picked from commit 3e1ff6142761eef148c667e540381d1fbc437d4f)

Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Change-Id: I5f449de230ca8f44e2dae30a0f87772310b68f20
Reviewed-on: http://git-master/r/123341
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

6 years agopower: max17048: update charge status when resume
Kerwin Wan [Tue, 14 Aug 2012 09:31:11 +0000]
power: max17048: update charge status when resume

bug 1033234

Change-Id: I67a28113fbf0a2461886658322f9106d17a69f23
Signed-off-by: Kerwin Wan <kerwinw@nvidia.com>
Reviewed-on: http://git-master/r/123301
Reviewed-by: Chandler Zhang <chazhang@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

6 years agovideo: tegra: nvmap: fix input check in mmap ioctl
Tuomas Tynkkynen [Tue, 31 Jul 2012 14:49:49 +0000]
video: tegra: nvmap: fix input check in mmap ioctl

nvmap_map_into_caller_ptr takes a memory handle from usermode
and adds a memory mapping for the handle. However, the handle
is not checked for being allocated. An unallocated handle
would cause a kernel panic later on from a NULL dereference.

Change-Id: I73987b097a0c843b913660445e8bd1b4755dac61
Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
Reviewed-on: http://git-master/r/119689
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

6 years agogpio: tegra: hide tegra_gpio_enable()/disable()
Laxman Dewangan [Tue, 31 Jul 2012 10:08:43 +0000]
gpio: tegra: hide tegra_gpio_enable()/disable()

The direction apis and irq_set_wake() support the
configuration of pins in gpio mode and hence it
is not require to export the apis for gpio_enable()/
gpio_disable().
Hiding these api.

Change-Id: I5493e4f270df85da21afb6500ac841f4fa4b522a
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/119616
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit

6 years agoARM: tegra: clocks: Frequency stats for SCLK/CBUS
Srikanth Nori [Tue, 3 Jul 2012 00:35:38 +0000]
ARM: tegra: clocks: Frequency stats for SCLK/CBUS

This adds a frequency histogram of the frequencies that SCLK
and CBUS clocks go to over time. Stats are presented in the
debugfs at /d/clock_stats/cbus and /d/clock_stats/sclk only if
debugfs is enabled in config

Change-Id: Icae83329612958d8ed4318b2e10c487683d9d734
Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
Reviewed-on: http://git-master/r/118380
Reviewed-by: Wen Yi <wyi@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Thomas Cherry <tcherry@nvidia.com>

6 years agousb: gadget: tegra_udc: Enable DR IRQ in udc_start
Preetham Chandru [Tue, 10 Jul 2012 13:12:16 +0000]
usb: gadget: tegra_udc: Enable DR IRQ in udc_start

Currently dr_controller_run() is called only during otg state
change.
When we unload a gadget driver, for example g_mass_storage
gadget driver, dr_controller_stop() is called but when it is
loaded back dr_controller_run() won't get called becasue of the
if condition failure. i.e
if (!udc->transceiver) {
dr_controller_run(udc);
}

So when the gadget driver is loaded for the second time
without removing the cable (i.e without otg state change),
the device won't get enumerated on the host because DR
IRQs are not enabled.

This CL fixes the above issue.

Bug 1012787
Signed-off-by: Preetham Chandru <pchandru@nvidia.com>

Change-Id: Ia127630e24dbe4c1e418163c2b858efb3baa8e45
Reviewed-on: http://git-master/r/114592
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

6 years agovideo: tegra: dc: disuse notifier
Ilan Aelion [Fri, 10 Aug 2012 19:53:10 +0000]
video: tegra: dc: disuse notifier

Due to issues with rcu notifiers on secureos, modifying dc flip
notifications to use a simple callback instead.

Bug 1028850

Change-Id: Iebf2a6d64d7316e3df2b88444201f9f9a29698c5
Signed-off-by: Ilan Aelion <iaelion@nvidia.com>
Reviewed-on: http://git-master/r/123103
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: Nitin Kumbhar <nkumbhar@nvidia.com>

6 years agosecurity: tf_driver: integrate latest TL release
Hyung Taek Ryoo [Fri, 10 Aug 2012 18:48:56 +0000]
security: tf_driver: integrate latest TL release

Tegra 3 version: TF_TEGRA3_AB01.15.36932
1)Fix an issue in GIC controller
2)Add a task profiler option into the Trusted Foundations
3)Fixes the RCU stalls

Change-Id: Ib137dc4f155765cb7d7084f1f9a6f75d3bf38116
Signed-off-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Reviewed-on: http://git-master/r/122808
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: James Zhao <jamesz@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>

6 years agoarm: tegra: la: refactor la code.
Krishna Reddy [Mon, 13 Aug 2012 19:37:32 +0000]
arm: tegra: la: refactor la code.

This is necessary to support future tegra SOC's.

Change-Id: I2f6ce328e30a6895dce16d82c4097291339155cd
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/123146
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-by: Mark Stadler <mastadler@nvidia.com>
GVS: Gerrit_Virtual_Submit

6 years agovideo: tegra: host: Fix leak in 3D register read
Terje Bergstrom [Wed, 15 Aug 2012 09:12:16 +0000]
video: tegra: host: Fix leak in 3D register read

When 3D register is read, and we need to do a context switch, the old
context reference is incremented, but it never gets decremented. Fix
by using nvhost_job_get_hwctx() to acquire the reference.

Bug 1031746

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

6 years agomm: Avoid freeing init and initrd memory when CPA is enabled.
Krishna Reddy [Sun, 29 Jul 2012 22:32:14 +0000]
mm: Avoid freeing init and initrd memory when CPA is enabled.

Align memblock reserve for text area to PMD size.
Reserve the memory hole between DRAM start and Page table start.
Add Sanity check to avoid section split in text area.

Bug 1028787

Change-Id: I586e4ad6e3a94aa0c79b302e51156dbe089e481f
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/121883
(cherry picked from commit 65d02640b4b0b38263687c7f3e664c873237dc43)
Reviewed-on: http://git-master/r/123431
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

6 years agoARM: tegra: power: Trace LP2 entry and exit
Antti P Miettinen [Tue, 14 Aug 2012 10:14:00 +0000]
ARM: tegra: power: Trace LP2 entry and exit

Add traces for measuring LP2 entry/exit times.

Bug 960304

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

6 years agoarm: tegra: E1506 Tristate, pull down LCD pins
Prem Sasidharan [Mon, 13 Aug 2012 20:54:16 +0000]
arm: tegra: E1506 Tristate, pull down LCD pins

Tristate and pull down LCD pins D0-D23, LCD_PWR* and
LCD_CS*_N pins for E1506 DSI panel. Reduced the power
consumption on VDDIO_LCD to 0.37mW for PM269 with E1506
DSI panel.

Bug 1007512
Bug 1015349

Signed-off-by: Prem Sasidharan <psasidharan@nvidia.com>
Change-Id: Ic54d1ca71f5ff92742f70915b7b27104c0a508a6
Reviewed-on: http://git-master/r/123172
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jon Mayo <jmayo@nvidia.com>

6 years agoARM: tegra: enterprise: set I2S as slave mode.
Ankit Gupta [Mon, 13 Aug 2012 06:44:51 +0000]
ARM: tegra: enterprise: set I2S as slave mode.

Setting default I2S mode as slave. This will help in power
optimization of around 4mW.

Change-Id: Ic2d702c332283bd0f6c4f73615e8097fb3b16ef9
Signed-off-by: Ankit Gupta <ankitgupta@nvidia.com>
Reviewed-on: http://git-master/r/122943
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

6 years agoARM: tegra: p1853: get rid of tegra_gpio_enable()
Laxman Dewangan [Mon, 13 Aug 2012 05:51:45 +0000]
ARM: tegra: p1853: get rid of tegra_gpio_enable()

The gpio mode is enabled when setting direction and
disabled when freeing gpio and hence this call is no
more required.

Change-Id: Ic40a506a54ee8fe125c0c1f56a8857fb290fcccb
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/122938
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

6 years agoARM: tegra: p852: get rid of tegra_gpio_enable()
Laxman Dewangan [Mon, 13 Aug 2012 05:49:41 +0000]
ARM: tegra: p852: get rid of tegra_gpio_enable()

The gpio mode is enabled when setting direction and
disabled when freeing gpio and hence this call is no
more required.

Change-Id: I30647b96fa2a120fb323c18e97bc9936a95c305d
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/122937
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

6 years agovideo: tegra: nvmap: Add support for zeroed pages
Alex Waterman [Wed, 1 Aug 2012 18:02:30 +0000]
video: tegra: nvmap: Add support for zeroed pages

Add support to alloc zeroed pages for user space alloc requests. Also
define a config option to force userspace allocation requests to be
zeroed.

Change-Id: I75d3b2bc36e808f1470b423578ec4cba99e0f967
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/122549
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

6 years agomm: Fix incorrect cache attribute restoration.
Krishna Reddy [Thu, 9 Aug 2012 18:18:21 +0000]
mm: Fix incorrect cache attribute restoration.

armv7 uses cache policy as WRITEALLOC. CPA is
restoring the cache attributes to WRITEBACK during
set_pages_array_wb().
Fixed issues in pmd to pte prot translation and vice versa.

Change-Id: I8406b784f62d559f657ef7bc08e77c83ac6e5690
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/122472
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

6 years agoarm: tegra: xmm: adding callback for L0 sequence.
Shawn Joo [Mon, 13 Aug 2012 07:50:48 +0000]
arm: tegra: xmm: adding callback for L0 sequence.

adding callback of xmm modem for L3->L0 power sequence.

Bug 1030815

Change-Id: I4997f56819726a55fc8268a1011bc98ff6baf8ca
Signed-off-by: Shawn Joo <sjoo@nvidia.com>
Reviewed-on: http://git-master/r/122960
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

6 years agovideo: tegra: host: Disable host1x irqs at suspend
Terje Bergstrom [Mon, 13 Aug 2012 12:06:23 +0000]
video: tegra: host: Disable host1x irqs at suspend

host1x interrupts have been left on at suspend due to using wrong
constant for the interrupt register. Disable host1x interrupts at
suspend.

Change-Id: I915fc4e663e6ad90fccacff6fb223c5080e21fcd
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/123055
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Andrew Howe <ahowe@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>

6 years agopower: tps80031-battery: enable battery full event
Xin Xie [Thu, 12 Jul 2012 22:17:37 +0000]
power: tps80031-battery: enable battery full event

BUG 1015045

Change-Id: Id9ac783365f08787638edc057d55f29c9a0e46eb
Signed-off-by: Xin Xie <xxie@nvidia.com>
Reviewed-on: http://git-master/r/122310
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

6 years agopower: tps80031: charger: handle re-charge event
Xin Xie [Fri, 13 Jul 2012 01:26:59 +0000]
power: tps80031: charger: handle re-charge event

After the charging completed, TPS80031 can re-enable the charging if it
sense the voltage dropping (120mV below target). Current drive does not
handle this event and causing the charging forever stopped.

This patch will check the above re-charging happens in the charging WDT
handler, and will ack WDT in order to continue charging.

BUG 1015045

Change-Id: Ia0a53d29cd0e73e7ebcd53f8176c8ef81b6c6090
Signed-off-by: Xin Xie <xxie@nvidia.com>
Reviewed-on: http://git-master/r/122309
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

6 years agomisc: throughput: move client calls to work queue
Ilan Aelion [Wed, 8 Aug 2012 18:25:52 +0000]
misc: throughput: move client calls to work queue

Perform throughput notifications to clients on work queue rather than
synchronously to dc flip notifications.

Bug 1028850

Change-Id: Ib9446a4ab87a476230a90a1f23c260bcf98e01dc
Signed-off-by: Ilan Aelion <iaelion@nvidia.com>
(cherry picked from commit f48bec5168232d7a50ecfb193146a4be214af3d7)
Reviewed-on: http://git-master/r/#change,122160
Reviewed-on: http://git-master/r/123102
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User

6 years agovideo: tegra: hdcp: Add Missing Lock
Matt Wagner [Fri, 10 Aug 2012 18:43:35 +0000]
video: tegra: hdcp: Add Missing Lock

Lock was missing around one state set, so we add it here.

Bug 1024031

Change-Id: Iab013fff7e8519e8bcc91e84a5ca7cd6e6e783da
Signed-off-by: Matt Wagner <mwagner@nvidia.com>
Reviewed-on: http://git-master/r/122802
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jon Mayo <jmayo@nvidia.com>

6 years agoARM: tegra: Ignore PmQos when disabled
Sai Charan Gurrappadi [Fri, 10 Aug 2012 22:13:00 +0000]
ARM: tegra: Ignore PmQos when disabled

The cpu hotplug drivers should only bother updating state or switching
to the G cluster if the driver is not disabled

Bug 1032096

Change-Id: Ice938b094bbf48fef47afa3915b1a48362fb256d
Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: http://git-master/r/122859
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>

6 years agoARM: tegra: cardhu: report correct height/width
Rakesh Iyer [Mon, 6 Aug 2012 21:06:17 +0000]
ARM: tegra: cardhu: report correct height/width

We will report the exact width/height instead of rounding it off for
Android's bucketed dpi values. The determination of the bucketed dpi
values is handled in user mode.

Bug 1003707.

Change-Id: Id3d4b9fc325187067e2d3df895ff6a753b730633
Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Reviewed-on: http://git-master/r/121431
Reviewed-by: Kevin Huang (Eng-SW) <kevinh@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
GVS: Gerrit_Virtual_Submit

6 years agopower: smb349: correct charger status
Allen Yu [Wed, 8 Aug 2012 06:50:40 +0000]
power: smb349: correct charger status

When tegra-otg suspends with charger cable connected, the charger
state and type should not be changed, neither should the charger
callback be executed.

SMB349 has a debounce delay of ~20ms +/- 3 after cable is unpluged
and will stop all I2C functions for 2.3ms when getting reset to POR.
Add 50ms' delay before reading charger status to avoid I2C error and
make sure we get the right charger state.

Bug 1024735

Change-Id: I1667b23df768b46b524c6578c4bee09e131d9f96
Signed-off-by: Allen Yu <alleny@nvidia.com>
Reviewed-on: http://git-master/r/120905
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit

6 years agovideo: tegra: host: Fix section mismatches
Terje Bergstrom [Fri, 3 Aug 2012 11:29:11 +0000]
video: tegra: host: Fix section mismatches

nvhost context related functions were in init section, even though
they are called from non-init functions.

Bug 1022681

Change-Id: Ie85e9dd3f19873aec4153e34c7bffa19f40d37fa
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/120884
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

6 years agotracing: Clock lock trace events
Antti P Miettinen [Fri, 10 Aug 2012 12:18:38 +0000]
tracing: Clock lock trace events

Add tracing for clock lock/unlock operations.

Bug 960307

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

6 years agoworkqueue: CPU hotplug keep idle workers
Mitch Luban [Wed, 25 Jul 2012 19:59:04 +0000]
workqueue: CPU hotplug keep idle workers

This change merges two patchsets. The first set,
containing 6 patches, reimplements WQ_HIGHPRI
to use a seperate worker_pool. gcwq->pools[0]
is used for normal priority work and pools[1]
for high priority.

The second patchset contains 9 patches and
reimplements CPU hotplug to keep idle workers.
Updates workqueue CPU hotplug path to use a
disassociated global_cwq, which runs as an
unbound one (WQ_UNBOUND). While this requires
rebinding idle workers, overall hotplug path
is much simpler.

Original patchset:
http://thread.gmane.org/gmane.linux.kernel/1329164

Bug 978010

Change-Id: Ic66ec8848a8d111b5278e63ef6a410846dfd8fcc
Signed-off-by: Mitch Luban <mluban@nvidia.com>
Reviewed-on: http://git-master/r/118387
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

6 years agomtd: tegra-nor: treat warnings as errors
Deepak Nibade [Tue, 24 Jul 2012 12:38:52 +0000]
mtd: tegra-nor: treat warnings as errors

add compilation flag to treat warnings as errors
handle error of variable declaration

bug 949219

Change-Id: Iac05d4d0e4c4cbf39a534b7aee32c0dac57ae49d
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/118027
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sanjay Singh Rawat <srawat@nvidia.com>
Reviewed-by: Sri Krishna Chowdary <schowdary@nvidia.com>
Reviewed-by: Manoj Chourasia <mchourasia@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

6 years agoinput: tegra: kbc: treat warnings as errors
Deepak Nibade [Tue, 24 Jul 2012 11:42:33 +0000]
input: tegra: kbc: treat warnings as errors

-add compilation flag to treat warning as error

bug 949219

Change-Id: I3f7f557099b0473883e0b959b65eb8f17ed30978
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/118008
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sanjay Singh Rawat <srawat@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

6 years agoE1853 BRINGUP: HDMI bringup
Dongfang Shi [Fri, 27 Jul 2012 10:28:50 +0000]
E1853 BRINGUP: HDMI bringup

- Register HDMI device.
- Panel init also registers HOST1x.
- HDMI is fully functional
- Hotplug detect GPIO, DDC bus works fine.

bug 966833
bug 1018258

Change-Id: Ia04fbfb9b9ddcf81cef241f3cd1187cdc87d159d
Reviewed-on: http://git-master/r/119118
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Raymond Rees <rrees@nvidia.com>
Tested-by: Dongfang Shi <dshi@nvidia.com>
(cherry picked from commit c62d307b84a034bae31afce67b8755d500170f58)
Reviewed-on: http://git-master/r/119743
Reviewed-by: Bob Johnston <bjohnston@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

6 years agoARM: tegra: enterprise: get rid of tegra_gpio_disable()
Laxman Dewangan [Wed, 8 Aug 2012 13:46:16 +0000]
ARM: tegra: enterprise: get rid of tegra_gpio_disable()

The gpio mode is enabled when setting direction and
disabled when freeing gpio and hence this call is no
more required.

Change-Id: Ib384ec9295184ee6d3b2edcf76b0c99bcd28e25a
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/122117
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>

6 years agoARM: tegra: harmony: get rid of tegra_gpio_disable()
Laxman Dewangan [Wed, 8 Aug 2012 13:45:50 +0000]
ARM: tegra: harmony: get rid of tegra_gpio_disable()

The gpio mode is disabled when freeing gpio and
hence this call is no more required.

Change-Id: I21f0f098a4ed741984c474996ba13d7390617646
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/122116
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>

6 years agoARM: tegra: aruba: get rid of tegra_gpio_disable()
Laxman Dewangan [Wed, 8 Aug 2012 13:44:46 +0000]
ARM: tegra: aruba: get rid of tegra_gpio_disable()

The gpio mode is disabled when freeing gpio and
hence this call is no more required.

Change-Id: I61469ec85713e3599245c59d2311f869ba03335b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/122115
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>

6 years agovideo: tegra: nvmap: fix usermode input validation
Tuomas Tynkkynen [Tue, 31 Jul 2012 12:01:04 +0000]
video: tegra: nvmap: fix usermode input validation

nvmap_pin_ids accepts a list of handles to pin, which are passed
directly from usermode when called from nvmap_ioctl_pinop.

However, if invalid handles are passed in, the function might
still access them as valid handles, and cause a crash.

Bug 1023954

Change-Id: I6b98a2ef448bb496be7d569ddd4fb516fc399cba
Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
Reviewed-on: http://git-master/r/119667
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>

6 years agousb: ehci: tegra: Fix Slab corruption error
Preetham Chandru [Thu, 9 Aug 2012 08:21:39 +0000]
usb: ehci: tegra: Fix Slab corruption error

Give ownership of the DMA buffer back to the processor first and
then free the buffer. Otherwise processor won't be able to
access the dma mapped buffers and this would lead to slab
corruption.
When the DMA buffer is freed without a call to dma_sync_single_for_cpu(),
the kernel won't be able to set the buffer as POISON FREE and when we
acquire this memory back again the kernel will start printing slab
corruption output as the memory is not set to POISON FREE

Bug 1017884
Bug 1018161
Reviewed-on: http://git-master/r/#change,122151
Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>

Change-Id: I00d6cb185cd2314cccb56f968eb0a05288588c13
Reviewed-on: http://git-master/r/122390
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

6 years agoarm: tegra: usb_phy: remote-wake for LS devices
Suresh Mangipudi [Thu, 9 Aug 2012 08:24:57 +0000]
arm: tegra: usb_phy: remote-wake for LS devices

Remote wakeup was not working for low speed devices.
Remote wakeup interrupt is now handled properly for low speed
devices.

Bug 1029608

Change-Id: If224f30ccc6275b97d50120fe04d9aa53d495e2e
Signed-off-by: Suresh Mangipudi <smangipudi@nvidia.com>
Reviewed-on: http://git-master/r/122367
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

6 years agoarm: tegra: usbphy: disable PLLU clock
Suresh Mangipudi [Wed, 1 Aug 2012 11:27:51 +0000]
arm: tegra: usbphy: disable PLLU clock

Disable the MASTER_BLASTER clock for the null phy interface
when usb_bus is suspended.

Bug 992861

Change-Id: I86ff559148f9a128ee48bbea2564493f4286b420
Signed-off-by: Suresh Mangipudi <smangipudi@nvidia.com>
Reviewed-on: http://git-master/r/120006
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

6 years agoarm: tegra: xmm: device set to null in unregister
Vinayak Pane [Wed, 18 Jul 2012 02:06:54 +0000]
arm: tegra: xmm: device set to null in unregister

hsic_unregister is being called multiple times
during two step enumeration process of xmm.
In failure cases when enumeration does not
complete properly, kernel panic is seen because
of extra unregister-ehci device.

Bug 1016593

Change-Id: Ibaeb20ed0dab0e906741fdfad78f7d89a3672f60
Signed-off-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-on: http://git-master/r/116626
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

6 years agomisc: tegra-throughput: warn on short frames
Ilan Aelion [Tue, 7 Aug 2012 15:27:45 +0000]
misc: tegra-throughput: warn on short frames

issue a warning on flip events less than 1 microsecond apart.

Bug 1027664
Bug 1028850

Signed-off-by: Ilan Aelion <iaelion@nvidia.com>
Reviewed-on: http://git-master/r/121810
(cherry picked from commit 6c0e907b437765fb9f7093599911b71a836d49a6)

Change-Id: Ie15256e35475d345b2ebe6ddb637ccc181fcb61e
Reviewed-on: http://git-master/r/122326
Reviewed-by: Donghan Ryu <dryu@nvidia.com>
Tested-by: Donghan Ryu <dryu@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit

6 years agovideo: tegra: host: invalidate FDC before context save
Nuno Subtil [Tue, 7 Aug 2012 05:11:01 +0000]
video: tegra: host: invalidate FDC before context save

Invalidate the FDC before submitting the context
save pushbuffer to ensure cache coherency across
both GPU cores.

Bug 1020291

Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/121945
(cherry picked from commit cef956d07ec717f4714f5101805bbe2f0f149e71)

Change-Id: I43ffee6a77122b4f2fe17f063dc6756c501e59c7
Reviewed-on: http://git-master/r/122323
Tested-by: Donghan Ryu <dryu@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: Donghan Ryu <dryu@nvidia.com>