7 years agodrivers: misc: ti-st: remove set_power call
Rakesh Goyal [Fri, 10 Feb 2012 14:10:13 +0000]
drivers: misc: ti-st: remove set_power call

set_power() should not be called as BT module(wl12xx)
need power rail to be always switched on.

Bug 937381

Change-Id: If5b7c6939b57c4384a8b434c58227a84d69e94e5
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-on: http://git-master/r/83134
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

7 years agotegra: pcie: Fix multiple ports detection
Krishna Kishore [Mon, 10 Oct 2011 04:42:55 +0000]
tegra: pcie: Fix multiple ports detection

This patch fixes multiple port detection issue
in tegra pcie driver.

The issue is fixed by reserving IO resource
from ioport_resource memory and PCI MEM and
PCI PREFETCH MEM from iomem_resource. These
memory resources are common to all root
ports. The resource allocation is done in
preinit function.

MMIO space should be reserved for T30 as well.

fixes bug 637871

Signed-off-by: Manoj Chourasia<mchourasia@nvidia.com>

Change-Id: I555b90bd1e0033965c78772dbdc75ea8efd039dd
Reviewed-on: http://git-master/r/79800
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Manoj Chourasia <mchourasia@nvidia.com>
Reviewed-by: Jeremy Alves <jalves@nvidia.com>
Reviewed-by: Kaushik Sen <ksen@nvidia.com>
Tested-by: Krishna Thota <kthota@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Mike Thompson <mikthompson@nvidia.com>

7 years agoARM: tegra: dma: code cleanups and run checkpatch
Laxman Dewangan [Sat, 4 Feb 2012 16:09:21 +0000]
ARM: tegra: dma: code cleanups and run checkpatch

Fixed the checkpatch error and doing code cleanups.

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

7 years agoregulator: tps6236x: Remove tps6236x driver
Laxman Dewangan [Tue, 31 Jan 2012 10:39:39 +0000]
regulator: tps6236x: Remove tps6236x driver

Removing duplicate driver tps6236x as there is mainline's
driver for tps62360 and using the mainline's driver.

Change-Id: I84c1c642f42d2dc934c8b8bf9b92a58a0bfbdc03
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/78415
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

7 years agoarm: tegra: cardhu: use tps62360 regulator driver
Laxman Dewangan [Tue, 31 Jan 2012 10:33:51 +0000]
arm: tegra: cardhu: use tps62360 regulator driver

Use the mainline's regulator driver tps62360 for core power
in place of NV's tps6236x driver.

Change-Id: Ibfa0ef8f4d59f48b31867dc1b1b0635d39a738ef
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/78413
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>

7 years agoarm: tegra3:config: Enable TPS62360 regulator
Laxman Dewangan [Mon, 13 Feb 2012 13:04:33 +0000]
arm: tegra3:config: Enable TPS62360 regulator

Enable config variable for the tps62360 regulator
which is from linux mainline and remove the driver
tps6236x which is duplicate of above driver.

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

7 years agompu6050: Motion Libraries: Defcfg files for Invensense MPU6050.
Pritesh Raithatha [Mon, 13 Feb 2012 14:27:57 +0000]
mpu6050: Motion Libraries: Defcfg files for Invensense MPU6050.

Invensense defcfg files for MPU6050. MPL version 4.1.1.

Added this to unblock other MPU changes to merge.

Change-Id: I14a3ea47a88b94ef83cc6791898a2494148ba9f6
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/83487
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>

7 years agomedia: video: tegra: enable VCLK on tegra2
shivabassu boragalli [Wed, 8 Feb 2012 06:07:19 +0000]
media: video: tegra: enable VCLK on tegra2

yuv sensor on tegra2 uses VIP clock. This
change enables VCLK pad to get external
clock for VI.

Bug 930769
Bug 936053

Change-Id: I4958d354a59dec0a92ca9b049ff22b7ca4cac0ad
Signed-off-by: Shivabassu Boragalli <sboragalli@nvidia.com>
Reviewed-on: http://git-master/r/83394
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>

7 years agoarm: tegra: kai: Add ALC5639 audio codec
Rakesh Iyer [Sun, 29 Jan 2012 06:19:32 +0000]
arm: tegra: kai: Add ALC5639 audio codec

Changes made to add support of ALC5639 codec for kai.

Bug 931371

Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Reviewed-on: http://git-master/r/77954
(cherry picked from commit 8e3e4e00a97759983a0a2e3a2c4d9d4d367ed950)

Change-Id: I899b31fc416d75875456fe7809e0dce6f2e78ffa
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82736
Reviewed-by: Chandler Zhang <chazhang@nvidia.com>
Tested-by: Chandler Zhang <chazhang@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

7 years agompu6050: Motion Libraries: Add kernel files for Invensense MPU6050.
Robert Collins [Fri, 2 Dec 2011 00:18:19 +0000]
mpu6050: Motion Libraries: Add kernel files for Invensense MPU6050.

Invensense kernel files for MPU6050. MPL version 4.1.1.

Bug 825602

Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/70372
(cherry picked from commit 8852d46c35632f960aa1753097bb9d1c448d3602)

Change-Id: I1660a52debaaae39af94199a08e1f3eb88f08b6e
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82716
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>

7 years agoRevert "ARM: tegra: clock: Add i2c fast clock entry in shared clock"
Simone Willett [Tue, 14 Feb 2012 17:44:41 +0000]
Revert "ARM: tegra: clock: Add i2c fast clock entry in shared clock"

This reverts commit 0fbe4ffbcd3fcff93cc574d2bbea94e9971c79cf

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

7 years agoARM: tegra: clock: Add i2c fast clock entry in shared clock
Laxman Dewangan [Sat, 4 Feb 2012 09:09:57 +0000]
ARM: tegra: clock: Add i2c fast clock entry in shared clock

Adding i2c fast clock entry which is derived from pllp_out3.

bug 933653

Change-Id: I5c799edecec7ee7060ff2a11cf1cb22a1c702e26
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/78995
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>

7 years agogpio: tegra: FIx build warning
Laxman Dewangan [Mon, 13 Feb 2012 09:43:32 +0000]
gpio: tegra: FIx build warning

Fixing build warning as
kernel/drivers/gpio/gpio-tegra.c:217:
warning: initialization from incompatible pointer type

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

7 years agovideo: tegra: dc: acquire window locks in an order to avoid a deadlock
Nitin Kumbhar [Thu, 9 Feb 2012 06:07:16 +0000]
video: tegra: dc: acquire window locks in an order to avoid a deadlock

All window locks are grabbed while performing dc window updates. Currently, no
particular locking order is followed for these locks. If user provided windows
are not in order, this leads to deadlock due to race between flip ioctl and
dc underflow reset worker.

Now on all window locks are acquired in an order as below
1. window A i.e. index 0
2. window B i.e. index 1
3. window C i.e. index 2

And unlocked in the reverse order
1. window C i.e. index 2
2. window B i.e. index 1
3. window A i.e. index 0

Bug 936545

Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-on: http://git-master/r/83107
(cherry picked from commit 68815fa87e879d0c783e8fd38f473f414806c0be)

Change-Id: I3b3e00eaf91384c39ff74047f06af8199848ad92
Reviewed-on: http://git-master/r/83405
Tested-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-by: Robert Morell <rmorell@nvidia.com>

7 years agotegra: p1852: Fix build break
Manoj Chourasia [Fri, 10 Feb 2012 10:35:29 +0000]
tegra: p1852: Fix build break

linux/gpio.h header was missing in p1852 board files
causing build break. Adding header fixes the break.

bug 938667

Change-Id: Ie5b471432af2501d74d2dcaa9fe786b1c616107c
Signed-off-by: Manoj Chourasia <mchourasia@nvidia.com>
Reviewed-on: http://git-master/r/83081
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Preetham Chandru <pchandru@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agomedia: video: ov14810: Don't reprogram uC
Krupal Divvela [Fri, 10 Feb 2012 09:15:41 +0000]
media: video: ov14810: Don't reprogram uC

Do not reprogram the micro controller everytime
camera is opened.

Bug 935336

Change-Id: Ib9f67fce07332e15e812be7a9d4efef802a7bd58
Signed-off-by: Krupal Divvela <kdivvela@nvidia.com>
Reviewed-on: http://git-master/r/83059
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Prayas Mohanty <pmohanty@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

7 years agoarm: tegra: kai: Set correct I2C slave address of RTC
Johnny Qiu [Fri, 10 Feb 2012 09:17:47 +0000]
arm: tegra: kai: Set correct I2C slave address of RTC

MAX77663 on Kai uses different RTC I2C slave address comparing to
Cardhu PM298.

Bug 937252

Change-Id: I5d6ee036dc4953a8609a2e4492918335a4ecd428
Signed-off-by: Johnny Qiu <joqiu@nvidia.com>
Reviewed-on: http://git-master/r/83298
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

7 years agomfd: max77663: Add option for RTC I2C slave address
Johnny Qiu [Wed, 8 Feb 2012 09:11:22 +0000]
mfd: max77663: Add option for RTC I2C slave address

MAX77663 used on Kai has different I2C slave address from the one
used on PM298. We should add option in platform data to specifiy
the address.

Change-Id: Iaec0a09bbd2b7a37741d8a867be203165d098a15
Signed-off-by: Johnny Qiu <joqiu@nvidia.com>
Reviewed-on: http://git-master/r/83297
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

7 years agoarm: tegra: kai: Add ALC5640 audio codec.
Manoj Gangwal [Sat, 11 Feb 2012 10:07:10 +0000]
arm: tegra: kai: Add ALC5640 audio codec.

Changes made to add support of ALC5640 codec
for kai.

Bug 910788

Signed-off-by: Manoj Gangwal <mgangwal@nvidia.com>
Reviewed-on: http://git-master/r/75958
(cherry picked from commit 2f3e38e34ae7391b9bca74e49f53e20323207f47)

Change-Id: I4f58d29fdaa33f7953373c9a1ebaecc9bd0e49a7
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82735
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

7 years agompu6050: Motion Libraries: Board files for Invensense MPU6050.
Robert Collins [Fri, 2 Dec 2011 00:19:20 +0000]
mpu6050: Motion Libraries: Board files for Invensense MPU6050.

Invensense board files for MPU6050. MPL version 4.1.1.

Bug 825602

Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/70373
(cherry picked from commit 2839895906a9c822e5c9f8abab68e33e9982c5a9)

Change-Id: I97eb4dcc075ab8b6f2bb583756dd10128924f10a
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82717
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>

7 years agovideo: tegra: dc: Activate dc registers properly for one-shot mode.
Kevin Huang [Wed, 1 Feb 2012 07:32:28 +0000]
video: tegra: dc: Activate dc registers properly for one-shot mode.

Enable GENERAL_ACT_REQ and HOST_TRIG_ENABLE at the same time.

Bug 930840

Signed-off-by: Kevin Huang <kevinh@nvidia.com>
Reviewed-on: http://git-master/r/78638
(cherry picked from commit 2f78c8e3c243b4c866ad54a550167abd94c200c1)

Change-Id: If0ef97c4a2b1a0621152c02728edbbed064a5e34
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82715
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agovideo: tegra: dc: enable dc ext from underflow reset worker
Nitin Kumbhar [Wed, 1 Feb 2012 14:13:25 +0000]
video: tegra: dc: enable dc ext from underflow reset worker

DC ext is enabled only from _tegra_dc_controller_enable() which is not used
from reset worker. Enable dc ext from _tegra_dc_controller_reset_enable()
as well.

Bug 933391

Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-on: http://git-master/r/78753
(cherry picked from commit a099c612f91cc12a99325e39609b1f9001525be0)

Change-Id: Ia95df85ea602174c2fd66888b21f7a6d264c176e
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82714
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agovideo: tegra: host: use runtime pm for clock management
Mayuresh Kulkarni [Fri, 3 Feb 2012 09:36:07 +0000]
video: tegra: host: use runtime pm for clock management

- use runtime pm for clock management of host1x
and its clients thus replacing ACM
- start a delayed worker after disabling the clock
if module supports power gating
- in its timeout handler power gate the module after saving
its context for next submit
- use auto-suspend mode of runtime pm for clock management
- pm core seems to keep a ref count on runtime pm thus
we cannot use runtime pm's usage_count as an idicator
of module idle during suspend
- do not use runtime pm call-backs during system suspend.
instead manage the clocks directly for context save of
modules that support it
- enable runtime pm only during boot-up as pm core disables
it before suspending the device and enables it after resume

for bug 887332

Change-Id: I3b30643e8e75c13684cf4edaaae4429c3a18d6eb
Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-on: http://git-master/r/79186
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>

7 years agoASoC: tegra: add capture path
Ravindra Lokhande [Wed, 1 Feb 2012 14:28:41 +0000]
ASoC: tegra: add capture path

added Line In and digital and analog mic to capture path.

Signed-off-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-on: http://git-master/r/78752
(cherry picked from commit 832552a5751502eaf1d3d917368c8d889badb353)

Change-Id: I6304aa179a989becbfc3bf6b85e42d28fdbaabf9
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82712
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>

7 years agoarm: tegra: kai: Add missing pdata_size in macro MAX77663_REG
Johnny Qiu [Thu, 9 Feb 2012 13:04:57 +0000]
arm: tegra: kai: Add missing pdata_size in macro MAX77663_REG

Change-Id: I9c95a2919db66df935afab068a2f594f68e15423
Signed-off-by: Johnny Qiu <joqiu@nvidia.com>
Reviewed-on: http://git-master/r/82753
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

7 years agoarm: tegra: kai: add functionality of power button
Johnny Qiu [Wed, 11 Jan 2012 22:39:26 +0000]
arm: tegra: kai: add functionality of power button

Change-Id: I8c454f465ded68606a29e5dc0cc939cbb9afc96f
Signed-off-by: Johnny Qiu <joqiu@nvidia.com>
Reviewed-on: http://git-master/r/82764
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

7 years agoarm: tegra: kai: Restrict SD2 output to 1.8V
Johnny Qiu [Fri, 10 Feb 2012 05:23:44 +0000]
arm: tegra: kai: Restrict SD2 output to 1.8V

sdhci-tegra driver has an issue which will pull all VDDIO_SDMMC rails
to 2.7V. However, VDDIO_SDMMC on EMMC and WiFi module should be 1.8V
and they are tied to SD2 output. This is to prevent sdhci-tegra from
burning SD2 output rail.

Change-Id: Idcb7a6864fba6f5e4c9e554178dff440a3ceaffc
Signed-off-by: Johnny Qiu <joqiu@nvidia.com>
Reviewed-on: http://git-master/r/83007
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

7 years agoARM: tegra: Clean up CACHE_L2X0 conditionals and includes
Scott Williams [Fri, 3 Feb 2012 02:55:00 +0000]
ARM: tegra: Clean up CACHE_L2X0 conditionals and includes

Change-Id: I9862e73f264c757f97aaad03f3373fb1d3e95462
Signed-off-by: Scott Williams <scwilliams@nvidia.com>
Reviewed-on: http://git-master/r/79138
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

7 years agoregulator: tps65910: Sleep control through external inputs
Laxman Dewangan [Sat, 28 Jan 2012 09:37:57 +0000]
regulator: tps65910: Sleep control through external inputs

Add support for sleep controls of different regulator through
external inputs EN1, EN2 or EN3.
Each regulator's output will be active when its external
input is high and turns to OFF/Low power mode when its
external input is low.
The configuration parameters for sleep control is provided through
board specific platform data.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

cherry picked from mainline
1e0c66f49762fa1866ab20b1feb6e86a9aa4838f

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

7 years agogpio: tps65910: Use correct offset for gpio initialization
Laxman Dewangan [Wed, 18 Jan 2012 14:37:35 +0000]
gpio: tps65910: Use correct offset for gpio initialization

Using the correct gpio offset for setting the initial value
of gpio when setting output direction.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
cherry picked from mainline
94bd2442d25454a874e070d871f50f4ce9d57101

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

7 years agoARM: tegra: fuse: re-arranging fuse offsets
Venu Byravarasu [Tue, 7 Feb 2012 06:35:14 +0000]
ARM: tegra: fuse: re-arranging fuse offsets

Removed multiple #ifdefs to check the chip versions
and moved them into a single #ifdef.

Change-Id: I0fbd20a4dce1fdf813afa8883b473976a89f429e
Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Reviewed-on: http://git-master/r/79724
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoarm: tegra: kai: gpio changes for smb349 driver
Syed Rafiuddin [Thu, 2 Feb 2012 10:00:00 +0000]
arm: tegra: kai: gpio changes for smb349 driver

This patch changes gpio direction from output to input
to enable interrupts for smb349 charger driver.

Signed-off-by: Syed Rafiuddin <srafiuddin@nvidia.com>
Reviewed-on: http://git-master/r/78294
(cherry picked from commit 0e685175440bdb7f004ded2c4a6612a2c8c39b00)

Change-Id: I65435c5f2e9d534344f152758e54d6a3c2835a00
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82706
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

7 years agoarm: tegra: kai: fix pmu GPIO4 drive strength
Chandler Zhang [Tue, 31 Jan 2012 07:02:12 +0000]
arm: tegra: kai: fix pmu GPIO4 drive strength

Modify Kai PMU MAX77663 GPIO4 from open-drain to push-pull.

Signed-off-by: Chandler Zhang <chazhang@nvidia.com>
Reviewed-on: http://git-master/r/78377
(cherry picked from commit 3f8f4808e723d84d1a4c505beec6d09799b7643e)

Change-Id: I4af87f75bb1ecee5946e0cf684e1c003c5b8f2c7
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82707
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

7 years agoARM: tegra: power: Don't over-sleep LP2 on secondary CPUs
Alex Frid [Wed, 1 Feb 2012 04:49:40 +0000]
ARM: tegra: power: Don't over-sleep LP2 on secondary CPUs

Adjust Tegra3 secondary CPU LP2 time for exit latency to avoid
scheduler event over-sleep.

Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/78635
(cherry picked from commit 433a3e356a0281efb1caf9b78bb1576008a58ed2)

Change-Id: Ifd298f0a4364fe4775ae209d76b2eda24b1bfefc
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82709
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Tested-by: Aleksandr Frid <afrid@nvidia.com>

7 years agotegra: defconfig: cleanup BCM4329 configs
Mursalin Akon [Fri, 27 Jan 2012 23:33:34 +0000]
tegra: defconfig: cleanup BCM4329 configs

This CL includes following changes
 - BCM4329 CSCAN functionality has been moved to a
   new Kconfig option; we will preserve the expected
   behavior (option enabled) for existing users
 - remove dangling reference to BCM4329 Kconfig
   option

Change-Id: I5876c33ef6f25309bcb0bedb3b1808d6bfb87b65
Signed-off-by: Mursalin Akon <makon@nvidia.com>
Reviewed-on: http://git-master/r/82862
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

7 years agovideo: tegra: dc: Ignore suspend if DSI is disabled
Terje Bergstrom [Fri, 10 Feb 2012 07:28:37 +0000]
video: tegra: dc: Ignore suspend if DSI is disabled

DSI enables during suspend time host1x, and then checks if DSI is really
enabled. Now DSI first checks if it's enabled. If yes, it'll turn on host1x
and disable it.

Bug 887332

Change-Id: I206f908a62d0a56f0737c31634fa46613ca07d7e
Reviewed-on: http://git-master/r/82755
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Animesh Kishore <ankishore@nvidia.com>
Reviewed-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-by: Kevin Huang (Eng-SW) <kevinh@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>

7 years agosdhci: add proper macro values
Shridhar Rasal [Thu, 9 Feb 2012 06:38:30 +0000]
sdhci: add proper macro values

set quirks macros values properly wrt change in number of quirks
and its data type.

bug 919232

Change-Id: I9e980ffd4363ddfe5bd950932285513b27f44eaf
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: http://git-master/r/77802
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

7 years agodrivers: switch: fix unregister of switch device
Manoj Gangwal [Wed, 1 Feb 2012 10:31:20 +0000]
drivers: switch: fix unregister of switch device

Driver data has to be set before destroying the
device. Issue has been found in Secure OS.

Bug 931758

Signed-off-by: Manoj Gangwal <mgangwal@nvidia.com>
Reviewed-on: http://git-master/r/78688
(cherry picked from commit 1a79ae32474868a1ae457f01d0f9e10f4c21f59c)

Change-Id: Iccc6adff5f79898e09d410c8898788597ac4859d
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82710
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-by: Manoj Gangwal <mgangwal@nvidia.com>

7 years agosdhci: tegra: Enabling regulator when card is present
vjagadish [Wed, 1 Feb 2012 13:05:22 +0000]
sdhci: tegra: Enabling regulator when card is present

Enable the regulator with out any dependency on slot
regulator

Bug 932739

Signed-off-by: vjagadish <vjagadish@nvidia.com>
Reviewed-on: http://git-master/r/78745
(cherry picked from commit 83d256fe3c269f59436a7cc08e46235ab5c067c8)

Change-Id: I80fbaef6b76fd4bb7990c29499a62abfe46e5150
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82711
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

7 years agoALSA:hda: add alsa control for query of device
Sayak Ghosh Choudhury [Tue, 31 Jan 2012 15:35:05 +0000]
ALSA:hda: add alsa control for query of device

alsa control is added to facilitate querying ac3 decode capability of
connected device. ac3 decode capability of the connected device is
updated in the ELD buffer. That information is updated in the
ALSA control structure.

Bug 909141
Bug 904553
Bug 920831

Change-Id: I81af196fc5dd85c5c87691393cf2f079611f9b47
Signed-off-by: Sayak Ghosh Choudhury <sayakc@nvidia.com>
Reviewed-on: http://git-master/r/83067
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Scott Peterson <speterson@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>

7 years agomtd: tegra-nor: Replace add_mtd_device with mtd_device_register()
Manoj Chourasia [Fri, 10 Feb 2012 10:10:06 +0000]
mtd: tegra-nor: Replace add_mtd_device with mtd_device_register()

The older add_mtd_device()/add_mtd_partitions() and
their removal are depricated. Replace uses with
mtd_device_register() and mtd_device_unregister().

bug 923135

Change-Id: I03790072d95ac27b4f11a6c522bb5d9de087a0df
Signed-off-by: Manoj Chourasia <mchourasia@nvidia.com>
Reviewed-on: http://git-master/r/83073
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Preetham Chandru <pchandru@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoarm: tegra: harmony: add tegra avp device
Preetham Chandru [Mon, 6 Feb 2012 11:34:08 +0000]
arm: tegra: harmony: add tegra avp device

Register tegra avp platform device from harmony board file.

Bug 932463
Change-Id: I83294a4f402ee0f16433998b9f756240c1ed07d4
Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>
Reviewed-on: http://git-master/r/79482
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Shashank Sharma <shashanks@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoregulator: tps80031: Correct voltage selection logics
Laxman Dewangan [Thu, 2 Feb 2012 10:49:40 +0000]
regulator: tps80031: Correct voltage selection logics

Fixing the voltage selection logics for a given mininum/maximum
range.

bug 934544

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>

Reviewed-on: http://git-master/r/78970
(cherry picked from commit 59b0264b6eda9f1e8123ee5cd82eae7104c3513e)

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

7 years agomedia: video: tegra: nvavp: Fix resource cleanup
Kamal Kannan Balagopalan [Wed, 1 Feb 2012 03:03:35 +0000]
media: video: tegra: nvavp: Fix resource cleanup

Fix bug in releasing nvmap client handles when nvavp release
is invoked.

Bug 930028

Signed-off-by: Kamal Kannan Balagopalan <kbalagopalan@nvidia.com>
Reviewed-on: http://git-master/r/78594
(cherry picked from commit 232e208f6c12d6112efe96f434b34c2b8c83d809)

Change-Id: I94f6990dddf7e683adbd896e059ba1b5e5aa3a75
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82708
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>

7 years agoARM: tegra: video: Flip window for unblanking
Shashank Sharma [Thu, 9 Feb 2012 08:03:24 +0000]
ARM: tegra: video: Flip window for unblanking

This patch contains:
1. Addition of function tegra_fb_flip_win
2. Call to function tegra_fb_flip_win for an unblank event
tegra_dc needs a flip event after blank, to unblank sceen

Bug: 932784
Change-Id: Iec7e3f5ee898228e4efc90ca0efc2ca2b02021ae
Reviewed-on: http://git-master/r/79740
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

7 years agoARM: tegra: config: Enable Framebuffer console
Shashank Sharma [Sat, 4 Feb 2012 09:23:59 +0000]
ARM: tegra: config: Enable Framebuffer console

This patch contains(for both T20 and T30):
1. kernel config flags to enable Fbconsole
2. Kernel config flags to ebable logo during bootup

Bug: 921567
Change-Id: I589c45218973655545c6826131e32fd6c609d7b3
Signed-off-by: Shashank Sharma (shashanks@nvidia.com)
Reviewed-on: http://git-master/r/79396
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Shashank Sharma <shashanks@nvidia.com>
Reviewed-by: Kiran Adduri <kadduri@nvidia.com>
Reviewed-by: Allen Martin <amartin@nvidia.com>

7 years agoarm: tegra: kai: Use different power tree for A01
Johnny Qiu [Thu, 2 Feb 2012 10:21:28 +0000]
arm: tegra: kai: Use different power tree for A01

Power tree of A01 is a little different from A00. On A00,
AVDD_USB/AVDD_HDMI shares the same rail with VDD_3V3_GMI. On A01,
VDD_3V3_GMI has been moved to VDD_3V3_SYS for power gating of
AVDD_USB/AVDD_HDMI.

Bug 931371

Signed-off-by: Johnny Qiu <joqiu@nvidia.com>
Reviewed-on: http://git-master/r/78406
(cherry picked from commit 53f98f53dfe8a8a6b2d402e0ee2e89443dba01a6)

Change-Id: Ifd5da092be2252baf5a7a4563862d218bc6fc779
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82719
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

7 years agompu6050: Motion Libraries: Defcfg files for Invensense MPU6050.
Robert Collins [Fri, 2 Dec 2011 00:20:40 +0000]
mpu6050: Motion Libraries: Defcfg files for Invensense MPU6050.

Invensense defcfg files for MPU6050. MPL version 4.1.1.

Bug 825602

Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/70374
(cherry picked from commit 50c19aa98126290cfc9ef69a89b4130e97a7b3a4)

Change-Id: I1923853ed71456a06079b13f9d7c01acc03e5617
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82718
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

7 years agoARM: tegra: video: Support basic color scheme
Shashank Sharma [Thu, 9 Feb 2012 05:50:20 +0000]
ARM: tegra: video: Support basic color scheme

This patch contains:
1. Changes in fb.c to support the old color scheme for fbcon
2. Addition of color registration function in fb ops in fb.c

tegra_fb_setcolreg was removed by mistake in commit
f80e81610f4e2e3a9051b465a9176ac70f6913f1 (http://git-master/r/60201)
This patch contains a work around for the co-existence of both basic
and new color schemes.

Bug: 921567
Change-Id: I2b10d4956ce655511fc277d113e623d5d717ed5c
Signed-off-by: Shashank Sharma <shashanks@nvidia.com>
Reviewed-on: http://git-master/r/79397
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

7 years agoARM: tegra: dvfs: Tegra3 speedo detection based on ATE rev
Diwakar Tundlam [Mon, 30 Jan 2012 23:01:16 +0000]
ARM: tegra: dvfs: Tegra3 speedo detection based on ATE rev

Bug 826289

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

Change-Id: I2100ce84c41c22e4175109785f10964e06573c80
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82705
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>

7 years agopower: smb349: Kconfig and Makefile changes
Syed Rafiuddin [Wed, 1 Feb 2012 09:59:33 +0000]
power: smb349: Kconfig and Makefile changes

This patch adds Kconfig and Makefile changes to smb349 driver

Signed-off-by: Syed Rafiuddin <srafiuddin@nvidia.com>
Reviewed-on: http://git-master/r/78292
(cherry picked from commit 2ffb0d06c5b2cda4dfde283257f2dd4f4d6f8300)

Change-Id: Icdb98cadafdcefd84011c92f846cf03f176e448f
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82704
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>

7 years agopower: max17048: Kconfig and Makefile changes
Syed Rafiuddin [Tue, 31 Jan 2012 15:02:43 +0000]
power: max17048: Kconfig and Makefile changes

This patch enables Kconfig and Makefile option

Signed-off-by: Syed Rafiuddin <srafiuddin@nvidia.com>
Reviewed-on: http://git-master/r/78289
(cherry picked from commit b0bc7843eff62ff0a0d2476645fb96b1b947baa4)

Change-Id: Ib5928f88d041731b95713a97f894a0ee3a28ae1c
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82701
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoarm: tegra: kai: use subsys_initcall_sync to initialize fixed regulators
Johnny Qiu [Thu, 2 Feb 2012 08:01:15 +0000]
arm: tegra: kai: use subsys_initcall_sync to initialize fixed regulators

Initialization of fixed regulators should be in subsys_initcall_sync;
otherwise some PMU GPIO based regulators will fail to be registered
since PMU is not registered at this time.

Bug 932578

Signed-off-by: Johnny Qiu <joqiu@nvidia.com>
Reviewed-on: http://git-master/r/78945
(cherry picked from commit e6bc3ad1d54240725b082cc18ad4141d76b9a4b7)

Change-Id: I4527ddbc9ddee0576c894b7c55b0413e93513c68
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82700
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>

7 years agoarm: tegra: kai: Use fixed regulator
Johnny Qiu [Mon, 30 Jan 2012 08:27:52 +0000]
arm: tegra: kai: Use fixed regulator

Using fixed regulator in place of gpio-switch regulator.
Fixed regulator is very similar to gpio-switch regulator
and it is available by default in linux kernel.

gpio-switch-regulator will be used only for the open
collector load switches.

bug 932578

Signed-off-by: Johnny Qiu <joqiu@nvidia.com>
Reviewed-on: http://git-master/r/78039
(cherry picked from commit cd77c6f4f0a1964de84a8b0e9411c177f8e65f34)

Change-Id: Ibfe770501f3037d5c4aac55de2ec2ce82cb95cae
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82699
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agopower: max17048: max17048 fuel gauge driver
Syed Rafiuddin [Tue, 31 Jan 2012 10:25:30 +0000]
power: max17048: max17048 fuel gauge driver

Addition of initial max17048 fuel-gauge driver for maxim's max17048
chipset used in kai platform.

Signed-off-by: Syed Rafiuddin <srafiuddin@nvidia.com>
Reviewed-on: http://git-master/r/78210
(cherry picked from commit edb662a31ba9312227653c3211f23e853ade8d0a)

Change-Id: I78569e112488ed5d99a07e8a26dc912416e78ad5
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/79979
Reviewed-by: Syed Rafiuddin <srafiuddin@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>

7 years agommc: card: Issue BKOPS when queue is empty
Shridhar Rasal [Wed, 25 Jan 2012 13:19:32 +0000]
mmc: card: Issue BKOPS when queue is empty

Issue BKOPS when the request queue is empty.
Before handling any new request, issue HPI
if bkops is being performed.

bug 919232

Originally reviewed on http://git-master/r/69779

Change-Id: Ic9258ebfea7f9cde96525371a5ef9d6d003ebf2f
Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: http://git-master/r/77335
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

7 years agommc: core: Add support for BKOPS and HPI interrupt
Shridhar Rasal [Wed, 25 Jan 2012 12:24:30 +0000]
mmc: core: Add support for BKOPS and HPI interrupt

Added support for starting BKOPS and issuing HPI
commands which are supported by eMMC v4.41 and eMMC
v4.5 cards.
Enable BKOPS and HPI interrupt if the host and card
support it.

Originally reviewed on: http://git-master/r/69778

Bug 919232

Change-Id: I09b33ddc18013e2eeb505fdb28dd8357fa75b569
Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: http://git-master/r/77319
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoarm: tegra: config: Enable ALC5639 audio codec
Rakesh Iyer [Sun, 29 Jan 2012 06:21:06 +0000]
arm: tegra: config: Enable ALC5639 audio codec

Enable ALC5639 audio codec configuration.

Bug 931371

Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Reviewed-on: http://git-master/r/77955
(cherry picked from commit f04d6d7c5deb81ec41ccc357cec69e033d9b4877)

Change-Id: I1a774dd69c4f74d68dda05136a3437a55c35b490
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82734
Reviewed-by: Lokesh Pathak <lpathak@nvidia.com>
Tested-by: Lokesh Pathak <lpathak@nvidia.com>

7 years agoasoc: codecs: Fix build break for ALC5639 codec
Rakesh Iyer [Mon, 30 Jan 2012 21:42:46 +0000]
asoc: codecs: Fix build break for ALC5639 codec

The vendor supplied driver has to be fixed to work on older kernels.

Bug 931371

Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Reviewed-on: http://git-master/r/78278
(cherry picked from commit ffce206b2d67bb9618a97d08e88c6ae25ba79baa)

Change-Id: Ifd8712758307cd4f31526cc050c62a89187a7c8d
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82733
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-by: Manoj Gangwal <mgangwal@nvidia.com>

7 years agoasoc: codecs: Add vendor supplied files for ALC5639 codec
Rakesh Iyer [Mon, 30 Jan 2012 21:40:40 +0000]
asoc: codecs: Add vendor supplied files for ALC5639 codec

Add files for ALC5639 codec as provided by vendor.

Bug 931371

Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Reviewed-on: http://git-master/r/78277
(cherry picked from commit b45ab605accb68fd303deec5ed962f213047f9bf)

Change-Id: I6c19e13c3dfec394cef812a5be1bc2ee5d58751b
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82732
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-by: Manoj Gangwal <mgangwal@nvidia.com>

7 years agoasoc: tegra: ALC5639 machine: Add ALC5639 audio codec
Rakesh Iyer [Sun, 29 Jan 2012 06:17:59 +0000]
asoc: tegra: ALC5639 machine: Add ALC5639 audio codec

Changes made to add support of ALC5639 codec for kai.

Bug 931371

Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Reviewed-on: http://git-master/r/77953
(cherry picked from commit 481fabd90e34b9a8246d494b0caefa212238c1c2)

Change-Id: I1bcc882cb4b8f7bd257b737295061ea1e9e7e41c
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82731
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-by: Manoj Gangwal <mgangwal@nvidia.com>

7 years agoasoc: codecs: Add support for ALC5639 codec
Rakesh Iyer [Sun, 29 Jan 2012 06:14:33 +0000]
asoc: codecs: Add support for ALC5639 codec

Add support for ALC5639 codec present in the KAI A01 board.

Bug 931371

Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Reviewed-on: http://git-master/r/77952
(cherry picked from commit 1747f1003be6413e0e173dee39b25afcbe522528)

Change-Id: I5180d4ed669c4100ca29e6ed508406e69a88fe88
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82730
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-by: Manoj Gangwal <mgangwal@nvidia.com>

7 years agoarm: tegra: Add ALC5640 audio codec header file
Pritesh Raithatha [Thu, 9 Feb 2012 10:21:24 +0000]
arm: tegra: Add ALC5640 audio codec header file

Bug 927513

Change-Id: Ic594fe82f004c600dc369d8323a984c7e3ec4ee7
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82729
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-by: Manoj Gangwal <mgangwal@nvidia.com>

7 years agotegra: usb: otg: Clear the otg interrupt in suspend
Alok Chauhan [Mon, 6 Feb 2012 08:35:27 +0000]
tegra: usb: otg: Clear the otg interrupt in suspend

Resuming from LP1 is not working if usb device is connected
or disconnected while system in LP1 state.
So clear the otg interrupt in suspend and re-enable it while
resuming.

Bug 906171
Bug 935273

Signed-off-by: Alok Chauhan <alokc@nvidia.com>
Reviewed-on: http://git-master/r/79449
(cherry picked from commit 54935893382a1b49a1a23ec39c6e479d163b910b)

Change-Id: Ia62f6fcd475905e5d3bcc93eae8a1e04c356111e
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82728
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agocpufreq interactive governor: Reduce permissions
Dan Willemsen [Thu, 2 Feb 2012 23:36:56 +0000]
cpufreq interactive governor: Reduce permissions

Reduce permissions on the max_boost and go_maxspeed_load, the init
scripts will change their owner so the current users continue to work.

Bug 906796

Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
Reviewed-on: http://git-master/r/79096
(cherry picked from commit f1d91095baff48e58a04af0062f579f394094b47)

Change-Id: Id9542a202bcf02f886cfee9c0bbe69cc83b8c200
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82726
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoinput: touchscreen: atmel_mxt_ts: Change mem_access permissions
Dan Willemsen [Thu, 2 Feb 2012 23:35:03 +0000]
input: touchscreen: atmel_mxt_ts: Change mem_access permissions

Take off the world-write bit from the default permissions for the
mem_access debug node. The init scripts will make it accessible on
engineering builds.

Bug 906796

Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
Reviewed-on: http://git-master/r/79095
(cherry picked from commit a6ba61cc290bebb5dd16e4ad02cd1e8b3b9802b2)

Change-Id: I3e118dd502aa8912ad5fcb8452105c7f5f1c833a
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82725
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agovideo: tegra: hdmi: Enable HDA NULL sample inject support
Sumit Bhattacharya [Fri, 3 Feb 2012 13:33:19 +0000]
video: tegra: hdmi: Enable HDA NULL sample inject support

When HDMI NULL sample injection is enabled codec inserts null samples
into the audio FIFO for each Azalia frame in which it did not receive
any samples. This support is needed to prevent audio loss for HDMI
devices from some vendor(e.g. sony).

Bug 924926

Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/79227
(cherry picked from commit 898fd83d94506de3bd604f75d25084d9bcb6dd9e)

Change-Id: I81f55cab52c92377b49ab94635c8e8aa394b6739
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82724
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-by: Scott Peterson <speterson@nvidia.com>
Reviewed-by: Jon Mayo <jmayo@nvidia.com>

7 years agonet: usb: raw-ip: Fix memory leak in raw_ipc
Seshendra Gadagottu [Sun, 29 Jan 2012 17:52:27 +0000]
net: usb: raw-ip: Fix memory leak in raw_ipc

Reuse rx urb to avoid memory leak.

Detect usb interface disconnect state to avoid rx / tx urb submit
on disconnected interface.

Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: http://git-master/r/77969
(cherry picked from commit 343dcb023cd465a6210239cf64ebed5858223096)

Change-Id: I7e49c73b47f6e1c803cd5f0cdb2e6f81bf8171d3
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82722
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agonet: wireless: bcm4329: move CSCAN enable to a Kconfig option
Eric Brower [Sat, 21 Jan 2012 03:08:57 +0000]
net: wireless: bcm4329: move CSCAN enable to a Kconfig option

Move CSCAN driver compilation flag to CONFIG_BCM4329_CSCAN_ENABLE
Kconfig option; CSCAN is not supported in all userspace environments.

The driver implementation of PNO_SUPPORT has a dependency on CSCAN, so
make that option controlled by CONFIG_BCM4329_CSCAN_ENABLE.

Bug 929960

Signed-off-by: Eric Brower <ebrower@nvidia.com>
(cherry picked from commit af965bf9a82041353a322a3205574ff402c6ff05)
Reviewed-on: http://git-master/r/77890
(cherry picked from commit 2f641aa2781afc80ed496978c55fc83aa251f727)

Change-Id: Iaf9ba7c7122571c7b5c5a670e0b9330d53a8940e
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82721
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agonet: wireless: bcm4329: set reference to physical device
Eric Brower [Fri, 20 Jan 2012 00:44:25 +0000]
net: wireless: bcm4329: set reference to physical device

Set the parent field of the netdevice, which causes sysfs
to create a device subdirectory under the netdevice.  Without
this subdirectory the user-space NetworkManager cannot manage
the network device.

Implemented using void * to maintain current driver implementation
of segregated OS-specific implementation.

Bug 929960

Signed-off-by: Eric Brower <ebrower@nvidia.com>
Reviewed-on: http://git-master/r/77889
(cherry picked from commit 5055320be16c36557e1ab9966ff7537500ca6d4d)

Change-Id: Ia5ea298c32823f896428905a779a734140306861
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82720
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoxfs: fix endian conversion issue in discard code
Dave Chinner [Thu, 26 Jan 2012 19:47:42 +0000]
xfs: fix endian conversion issue in discard code

commit b1c770c273a4787069306fc82aab245e9ac72e9d upstream

When finding the longest extent in an AG, we read the value directly
out of the AGF buffer without endian conversion. This will give an
incorrect length, resulting in FITRIM operations potentially not
trimming everything that it should.

Note, for 3.0-stable this has been modified to apply to
fs/xfs/linux-2.6/xfs_discard.c instead of fs/xfs/xfs_discard.c.  -bpm

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: Iad84b2bb82ee0d410cdb64eeea3a8431c5a0a7ad
Reviewed-on: http://git-master/r/79660
Reviewed-by: Automatic_Commit_Validation_User

7 years agoah: Don't return NET_XMIT_DROP on input.
Nick Bowler [Thu, 10 Nov 2011 09:01:27 +0000]
ah: Don't return NET_XMIT_DROP on input.

commit 4b90a603a1b21d63cf743cc833680cb195a729f6 upstream.

When the ahash driver returns -EBUSY, AH4/6 input functions return
NET_XMIT_DROP, presumably copied from the output code path.  But
returning transmit codes on input doesn't make a lot of sense.
Since NET_XMIT_DROP is a positive int, this gets interpreted as
the next header type (i.e., success).  As that can only end badly,
remove the check.

Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: Ia5db571c5c73a87397fa10dfb668f85b7942f3b0
Reviewed-on: http://git-master/r/79659
Reviewed-by: Automatic_Commit_Validation_User

7 years agoftrace: Fix unregister ftrace_ops accounting
Jiri Olsa [Mon, 5 Dec 2011 17:22:48 +0000]
ftrace: Fix unregister ftrace_ops accounting

commit 30fb6aa74011dcf595f306ca2727254d708b786e upstream.

Multiple users of the function tracer can register their functions
with the ftrace_ops structure. The accounting within ftrace will
update the counter on each function record that is being traced.
When the ftrace_ops filtering adds or removes functions, the
function records will be updated accordingly if the ftrace_ops is
still registered.

When a ftrace_ops is removed, the counter of the function records,
that the ftrace_ops traces, are decremented. When they reach zero
the functions that they represent are modified to stop calling the
mcount code.

When changes are made, the code is updated via stop_machine() with
a command passed to the function to tell it what to do. There is an
ENABLE and DISABLE command that tells the called function to enable
or disable the functions. But the ENABLE is really a misnomer as it
should just update the records, as records that have been enabled
and now have a count of zero should be disabled.

The DISABLE command is used to disable all functions regardless of
their counter values. This is the big off switch and is not the
complement of the ENABLE command.

To make matters worse, when a ftrace_ops is unregistered and there
is another ftrace_ops registered, neither the DISABLE nor the
ENABLE command are set when calling into the stop_machine() function
and the records will not be updated to match their counter. A command
is passed to that function that will update the mcount code to call
the registered callback directly if it is the only one left. This
means that the ftrace_ops that is still registered will have its callback
called by all functions that have been set for it as well as the ftrace_ops
that was just unregistered.

Here's a way to trigger this bug. Compile the kernel with
CONFIG_FUNCTION_PROFILER set and with CONFIG_FUNCTION_GRAPH not set:

 CONFIG_FUNCTION_PROFILER=y
 # CONFIG_FUNCTION_GRAPH is not set

This will force the function profiler to use the function tracer instead
of the function graph tracer.

  # cd /sys/kernel/debug/tracing
  # echo schedule > set_ftrace_filter
  # echo function > current_tracer
  # cat set_ftrace_filter
 schedule
  # cat trace
 # tracer: nop
 #
 # entries-in-buffer/entries-written: 692/68108025   #P:4
 #
 #                              _-----=> irqs-off
 #                             / _----=> need-resched
 #                            | / _---=> hardirq/softirq
 #                            || / _--=> preempt-depth
 #                            ||| /     delay
 #           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
 #              | |       |   ||||       |         |
      kworker/0:2-909   [000] ....   531.235574: schedule <-worker_thread
           <idle>-0     [001] .N..   531.235575: schedule <-cpu_idle
      kworker/0:2-909   [000] ....   531.235597: schedule <-worker_thread
             sshd-2563  [001] ....   531.235647: schedule <-schedule_hrtimeout_range_clock

  # echo 1 > function_profile_enabled
  # echo 0 > function_porfile_enabled
  # cat set_ftrace_filter
 schedule
  # cat trace
 # tracer: function
 #
 # entries-in-buffer/entries-written: 159701/118821262   #P:4
 #
 #                              _-----=> irqs-off
 #                             / _----=> need-resched
 #                            | / _---=> hardirq/softirq
 #                            || / _--=> preempt-depth
 #                            ||| /     delay
 #           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
 #              | |       |   ||||       |         |
           <idle>-0     [002] ...1   604.870655: local_touch_nmi <-cpu_idle
           <idle>-0     [002] d..1   604.870655: enter_idle <-cpu_idle
           <idle>-0     [002] d..1   604.870656: atomic_notifier_call_chain <-enter_idle
           <idle>-0     [002] d..1   604.870656: __atomic_notifier_call_chain <-atomic_notifier_call_chain

The same problem could have happened with the trace_probe_ops,
but they are modified with the set_frace_filter file which does the
update at closure of the file.

The simple solution is to change ENABLE to UPDATE and call it every
time an ftrace_ops is unregistered.

Link: http://lkml.kernel.org/r/1323105776-26961-3-git-send-email-jolsa@redhat.com

Change-Id: Ifdc1c97df0d069226d6818648aade1519106950d
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/79658

7 years agocrypto: sha512 - reduce stack usage to safe number
Alexey Dobriyan [Sat, 14 Jan 2012 18:40:57 +0000]
crypto: sha512 - reduce stack usage to safe number

commit 51fc6dc8f948047364f7d42a4ed89b416c6cc0a3 upstream.

For rounds 16--79, W[i] only depends on W[i - 2], W[i - 7], W[i - 15] and W[i - 16].
Consequently, keeping all W[80] array on stack is unnecessary,
only 16 values are really needed.

Using W[16] instead of W[80] greatly reduces stack usage
(~750 bytes to ~340 bytes on x86_64).

Line by line explanation:
* BLEND_OP
  array is "circular" now, all indexes have to be modulo 16.
  Round number is positive, so remainder operation should be
  without surprises.

* initial full message scheduling is trimmed to first 16 values which
  come from data block, the rest is calculated before it's needed.

* original loop body is unrolled version of new SHA512_0_15 and
  SHA512_16_79 macros, unrolling was done to not do explicit variable
  renaming. Otherwise it's the very same code after preprocessing.
  See sha1_transform() code which does the same trick.

Patch survives in-tree crypto test and original bugreport test
(ping flood with hmac(sha512).

See FIPS 180-2 for SHA-512 definition
http://csrc.nist.gov/publications/fips/fips180-2/fips180-2withchangenotice.pdf

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I7945bdc928bd3491117ea5e334a0bc5dd6231299
Reviewed-on: http://git-master/r/79657

7 years agocrypto: sha512 - make it work, undo percpu message schedule
Alexey Dobriyan [Sat, 14 Jan 2012 18:27:37 +0000]
crypto: sha512 - make it work, undo percpu message schedule

commit 84e31fdb7c797a7303e0cc295cb9bc8b73fb872d upstream.

commit f9e2bca6c22d75a289a349f869701214d63b5060
aka "crypto: sha512 - Move message schedule W[80] to static percpu area"
created global message schedule area.

If sha512_update will ever be entered twice, hash will be silently
calculated incorrectly.

Probably the easiest way to notice incorrect hashes being calculated is
to run 2 ping floods over AH with hmac(sha512):

#!/usr/sbin/setkey -f
flush;
spdflush;
add IP1 IP2 ah 25 -A hmac-sha512 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000025;
add IP2 IP1 ah 52 -A hmac-sha512 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000052;
spdadd IP1 IP2 any -P out ipsec ah/transport//require;
spdadd IP2 IP1 any -P in  ipsec ah/transport//require;

XfrmInStateProtoError will start ticking with -EBADMSG being returned
from ah_input(). This never happens with, say, hmac(sha1).

With patch applied (on BOTH sides), XfrmInStateProtoError does not tick
with multiple bidirectional ping flood streams like it doesn't tick
with SHA-1.

After this patch sha512_transform() will start using ~750 bytes of stack on x86_64.
This is OK for simple loads, for something more heavy, stack reduction will be done
separatedly.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I752dc16e90deb04b35202fddce818ace0b605e9d
Reviewed-on: http://git-master/r/79656

7 years agoxfs: Fix missing xfs_iunlock() on error recovery path in xfs_readlink()
Jan Kara [Wed, 11 Jan 2012 18:52:10 +0000]
xfs: Fix missing xfs_iunlock() on error recovery path in xfs_readlink()

commit 9b025eb3a89e041bab6698e3858706be2385d692 upstream.

Commit b52a360b forgot to call xfs_iunlock() when it detected corrupted
symplink and bailed out. Fix it by jumping to 'out' instead of doing return.

CC: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Alex Elder <elder@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: Ie83d93a6bbe0997f8a41afa9e3bf6f12cee476c6
Reviewed-on: http://git-master/r/79655
Reviewed-by: Automatic_Commit_Validation_User

7 years agodrm: Fix authentication kernel crash
Thomas Hellstrom [Tue, 24 Jan 2012 17:54:21 +0000]
drm: Fix authentication kernel crash

commit 598781d71119827b454fd75d46f84755bca6f0c6 upstream.

If the master tries to authenticate a client using drm_authmagic and
that client has already closed its drm file descriptor,
either wilfully or because it was terminated, the
call to drm_authmagic will dereference a stale pointer into kmalloc'ed memory
and corrupt it.

Typically this results in a hard system hang.

This patch fixes that problem by removing any authentication tokens
(struct drm_magic_entry) open for a file descriptor when that file
descriptor is closed.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: Icbba107e666306a34a621955458091410da3956a
Reviewed-on: http://git-master/r/79654
Reviewed-by: Automatic_Commit_Validation_User

7 years agodrm/radeon/kms: Add an MSI quirk for Dell RS690
Alex Deucher [Sun, 15 Jan 2012 13:51:12 +0000]
drm/radeon/kms: Add an MSI quirk for Dell RS690

commit 44517c44496062180a6376cc704b33129441ce60 upstream.

Interrupts only work with MSIs.
https://bugs.freedesktop.org/show_bug.cgi?id=37679

Reported-by: Dmitry Podgorny <pasis.uax@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I54ba865b1bf3d7584911d57af90e7238e55c7ecc
Reviewed-on: http://git-master/r/79653
Reviewed-by: Automatic_Commit_Validation_User

7 years agoeCryptfs: Fix oops when printing debug info in extent crypto functions
Tyler Hicks [Tue, 24 Jan 2012 16:02:22 +0000]
eCryptfs: Fix oops when printing debug info in extent crypto functions

commit 58ded24f0fcb85bddb665baba75892f6ad0f4b8a upstream.

If pages passed to the eCryptfs extent-based crypto functions are not
mapped and the module parameter ecryptfs_verbosity=1 was specified at
loading time, a NULL pointer dereference will occur.

Note that this wouldn't happen on a production system, as you wouldn't
pass ecryptfs_verbosity=1 on a production system. It leaks private
information to the system logs and is for debugging only.

The debugging info printed in these messages is no longer very useful
and rather than doing a kmap() in these debugging paths, it will be
better to simply remove the debugging paths completely.

https://launchpad.net/bugs/913651

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: Icbb95db933d5fa76938982fcf69cacea85ecbecc
Reviewed-on: http://git-master/r/79652
Reviewed-by: Automatic_Commit_Validation_User

7 years agoeCryptfs: Check inode changes in setattr
Tyler Hicks [Fri, 20 Jan 2012 02:33:44 +0000]
eCryptfs: Check inode changes in setattr

commit a261a03904849c3df50bd0300efb7fb3f865137d upstream.

Most filesystems call inode_change_ok() very early in ->setattr(), but
eCryptfs didn't call it at all. It allowed the lower filesystem to make
the call in its ->setattr() function. Then, eCryptfs would copy the
appropriate inode attributes from the lower inode to the eCryptfs inode.

This patch changes that and actually calls inode_change_ok() on the
eCryptfs inode, fairly early in ecryptfs_setattr(). Ideally, the call
would happen earlier in ecryptfs_setattr(), but there are some possible
inode initialization steps that must happen first.

Since the call was already being made on the lower inode, the change in
functionality should be minimal, except for the case of a file extending
truncate call. In that case, inode_newsize_ok() was never being
called on the eCryptfs inode. Rather than inode_newsize_ok() catching
maximum file size errors early on, eCryptfs would encrypt zeroed pages
and write them to the lower filesystem until the lower filesystem's
write path caught the error in generic_write_checks(). This patch
introduces a new function, called ecryptfs_inode_newsize_ok(), which
checks if the new lower file size is within the appropriate limits when
the truncate operation will be growing the lower file.

In summary this change prevents eCryptfs truncate operations (and the
resulting page encryptions), which would exceed the lower filesystem
limits or FSIZE rlimits, from ever starting.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Reviewed-by: Li Wang <liwang@nudt.edu.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: Idbfa207399bf0f50ce92b4d6fb8ef43896c771d5
Reviewed-on: http://git-master/r/79651
Reviewed-by: Automatic_Commit_Validation_User

7 years agoeCryptfs: Make truncate path killable
Tyler Hicks [Thu, 19 Jan 2012 00:30:04 +0000]
eCryptfs: Make truncate path killable

commit 5e6f0d769017cc49207ef56996e42363ec26c1f0 upstream.

ecryptfs_write() handles the truncation of eCryptfs inodes. It grabs a
page, zeroes out the appropriate portions, and then encrypts the page
before writing it to the lower filesystem. It was unkillable and due to
the lack of sparse file support could result in tying up a large portion
of system resources, while encrypting pages of zeros, with no way for
the truncate operation to be stopped from userspace.

This patch adds the ability for ecryptfs_write() to detect a pending
fatal signal and return as gracefully as possible. The intent is to
leave the lower file in a useable state, while still allowing a user to
break out of the encryption loop. If a pending fatal signal is detected,
the eCryptfs inode size is updated to reflect the modified inode size
and then -EINTR is returned.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I80e83c16c58586c700df081500b6c3e2a4a06270
Reviewed-on: http://git-master/r/79650
Reviewed-by: Automatic_Commit_Validation_User

7 years agoecryptfs: Improve metadata read failure logging
Tim Gardner [Thu, 12 Jan 2012 15:31:55 +0000]
ecryptfs: Improve metadata read failure logging

commit 30373dc0c87ffef68d5628e77d56ffb1fa22e1ee upstream.

Print inode on metadata read failure. The only real
way of dealing with metadata read failures is to delete
the underlying file system file. Having the inode
allows one to 'find . -inum INODE`.

[tyhicks@canonical.com: Removed some minor not-for-stable parts]
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I0460c59fe4a6490683b1cf6f993945b3f05e8aca
Reviewed-on: http://git-master/r/79649
Reviewed-by: Automatic_Commit_Validation_User

7 years agoeCryptfs: Sanitize write counts of /dev/ecryptfs
Tyler Hicks [Thu, 12 Jan 2012 10:30:44 +0000]
eCryptfs: Sanitize write counts of /dev/ecryptfs

commit db10e556518eb9d21ee92ff944530d84349684f4 upstream.

A malicious count value specified when writing to /dev/ecryptfs may
result in a a very large kernel memory allocation.

This patch peeks at the specified packet payload size, adds that to the
size of the packet headers and compares the result with the write count
value. The resulting maximum memory allocation size is approximately 532
bytes.

Change-Id: I4fe5831fb58f9de76c81aa4b60efa93cb100dab8
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Reported-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/79648
Reviewed-by: Automatic_Commit_Validation_User

7 years agoALSA: hda - Fix silent outputs from docking-station jacks of Dell laptops
Takashi Iwai [Mon, 23 Jan 2012 17:23:36 +0000]
ALSA: hda - Fix silent outputs from docking-station jacks of Dell laptops

commit b4ead019afc201f71c39cd0dfcaafed4a97b3dd2 upstream.

The recent change of the power-widget handling for IDT codecs caused
the silent output from the docking-station line-out jack.  This was
partially fixed by the commit f2cbba7602383cd9cdd21f0a5d0b8bd1aad47b33
"ALSA: hda - Fix the lost power-setup of seconary pins after PM resume".
But the line-out on the docking-station is still silent when booted
with the jack plugged even by this fix.

The remainig bug is that the power-widget is set off in stac92xx_init()
because the pins in cfg->line_out_pins[] aren't checked there properly
but only hp_pins[] are checked in is_nid_hp_pin().

This patch fixes the problem by checking both HP and line-out pins
and leaving the power-map correctly.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42637

Change-Id: Ic0147c9a2f9067c6ec2277dbaebd714fdbd9daaa
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/79647
Reviewed-by: Automatic_Commit_Validation_User

7 years agoiommu: tegra/gart: Fix with mainline IOMMU API change
Hiroshi DOYU [Mon, 23 Jan 2012 10:40:32 +0000]
iommu: tegra/gart: Fix with mainline IOMMU API change

The mainline IOMMU API v3.3-rc1 has been changed so that bytes are
used in mapping size instead of page order and page-by-page iteration
is taken care of by iommu core.

The rest are mostly for maintainability:
$ git co iommu/next drivers/iommu/tegra-gart.c

Change-Id: Id88ae8d23d11f4e003d11ec1e4223a72215ad142
Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com>
Reviewed-on: http://git-master/r/78138
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>

7 years agoSdhci: tegra: enable quirk NO_CALC_MAX_DISCARD_TO
Shridhar Rasal [Tue, 7 Feb 2012 15:57:15 +0000]
Sdhci: tegra: enable quirk NO_CALC_MAX_DISCARD_TO

enabling quirk *SDHCI_QUIRK_NO_CALC_MAX_DISCARD_TO* for not to
calculate max discard timeout.

bug 930767

Change-Id: Id2ca4fd202961d1997c9269eb0d437a6fca241cf
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: http://git-master/r/79840
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

7 years agommc: sdhci: quirk for not calculate max_discard_to
Shridhar Rasal [Tue, 7 Feb 2012 15:32:47 +0000]
mmc: sdhci: quirk for not calculate max_discard_to

Adding SDHCI_QUIRK_NO_CALC_MAX_DISCARD_TO for not to calculate
max_discard_to which is deviation in setting max_discard.

For some host controllers, combination of
1) calculated non-zero value of max_discard_to and
2) erase_group_def not set
can result into setting  max_discard value to pref_erase in
sectors which is very less, so it takes long time for erase.

With this change host controller can specify to calculate
max_discard_to and based on that max_discard value will be set.

bug 930767

Change-Id: I2c64ef8a6821620f2a65c06e25d2af68e3554a75
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: http://git-master/r/79839
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

7 years agoRevert "tty: serial: tegra: Add runtime PM support"
Nagarjuna Kristam [Tue, 7 Feb 2012 05:28:54 +0000]
Revert "tty: serial: tegra: Add runtime PM support"

This reverts commit 944a82b32d44bae0acb56abf5fec33a1c696c362.

Bug 934678

Change-Id: Icf6cbc2cd8dc22dcd3126f2da19923e7076c0071
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: http://git-master/r/79710
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoUSB: cdc-wdm: call wake_up_all to allow driver to shutdown on device removal
Bjørn Mork [Mon, 16 Jan 2012 14:11:57 +0000]
USB: cdc-wdm: call wake_up_all to allow driver to shutdown on device removal

commit 62aaf24dc125d7c55c93e313d15611f152b030c7 upstream.

wdm_disconnect() waits for the mutex held by wdm_read() before
calling wake_up_all().  This causes a deadlock, preventing device removal
to complete.  Do the wake_up_all() before we start waiting for the locks.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Cc: Oliver Neukum <oliver@neukum.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: Ic92d101f26698708a10ba276eff70825d19d6c89
Reviewed-on: http://git-master/r/79686
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

7 years agojsm: Fixed EEH recovery error
Lucas Kannebley Tavares [Mon, 9 Jan 2012 12:58:06 +0000]
jsm: Fixed EEH recovery error

commit 26aa38cafae0dbef3b2fe75ea487c83313c36d45 upstream.

There was an error on the jsm driver that would cause it to be unable to
recover after a second error is detected.

At the first error, the device recovers properly:

[72521.485691] EEH: Detected PCI bus error on device 0003:02:00.0
[72521.485695] EEH: This PCI device has failed 1 times in the last hour:
...
[72532.035693] ttyn3 at MMIO 0x0 (irq = 49) is a jsm
[72532.105689] jsm: Port 3 added

However, at the second error, it cascades until EEH disables the device:

[72631.229549] Call Trace:
...
[72641.725687] jsm: Port 3 added
[72641.725695] EEH: Detected PCI bus error on device 0003:02:00.0
[72641.725698] EEH: This PCI device has failed 3 times in the last hour:

It was caused because the PCI state was not being saved after the first
restore. Therefore, at the second recovery the PCI state would not be
restored.

Signed-off-by: Lucas Kannebley Tavares <lucaskt@linux.vnet.ibm.com>
Signed-off-by: Breno Leitao <brenohl@br.ibm.com>
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I17d5be5ce4b8acc1c881290d19933405b3e476b9
Reviewed-on: http://git-master/r/79677
Reviewed-by: Automatic_Commit_Validation_User

7 years agoserial: amba-pl011: lock console writes against interrupts
Rabin Vincent [Tue, 17 Jan 2012 10:52:28 +0000]
serial: amba-pl011: lock console writes against interrupts

commit ef605fdb33883d687cff5ba75095a91b313b4966 upstream.

Protect against pl011_console_write() and the interrupt for
the console UART running concurrently on different CPUs.

Otherwise the console_write could spin for a long time
waiting for the UART to become not busy, while the other
CPU continuously services UART interrupts and keeps the
UART busy.

The checks for sysrq and oops_in_progress are taken
from 8250.c.

Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Reviewed-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Reviewed-by: Bibek Basu <bibek.basu@stericsson.com>
Reviewed-by: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I0874bd94d979a5f3a61922ec5fb4c092d7e40874
Reviewed-on: http://git-master/r/79676
Reviewed-by: Automatic_Commit_Validation_User

7 years agoTTY: fix UV serial console regression
Jiri Slaby [Thu, 12 Jan 2012 21:55:15 +0000]
TTY: fix UV serial console regression

commit 0eee50af5b13e00b3fb7a5fe8480419a71b8235d upstream.

Commit 74c2107759d (serial: Use block_til_ready helper) and its fixup
3f582b8c110 (serial: fix termios settings in open) introduced a
regression on UV systems. The serial eventually freezes while being
used. It's completely unpredictable and sometimes needs a heap of
traffic to happen first.

To reproduce this, yast installation was used as it turned out to be
pretty reliable in reproducing. Especially during installation process
where one doesn't have an SSH daemon running. And no monitor as the HW
is completely headless. So this was fun to find. Given the machine
doesn't boot on vanilla before 2.6.36 final. (And the commits above
are older.)

Unless there is some bad race in the code, the hardware seems to be
pretty broken. Otherwise pure MSR read should not cause such a bug,
or?

So to prevent the bug, revert to the old behavior. I.e. read modem
status only if we really have to -- for non-CLOCAL set serials.
Non-CLOCAL works on this hardware OK, I tried. See? I don't.

And document that shit.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
References: https://lkml.org/lkml/2011/12/6/573
References: https://bugzilla.novell.com/show_bug.cgi?id=718518
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: Ib498daa38459e658a081a3e218e9c87d63f1fc3b
Reviewed-on: http://git-master/r/79675
Reviewed-by: Automatic_Commit_Validation_User

7 years agousb: io_ti: Make edge_remove_sysfs_attrs the port_remove method.
Eric W. Biederman [Sat, 14 Jan 2012 05:32:06 +0000]
usb: io_ti: Make edge_remove_sysfs_attrs the port_remove method.

commit 6d443d8499e4e59ffb949759cdded32730f8d2f6 upstream.

Calling edge_remove_sysfs_attrs from edge_disconnect is too late
as the device has already been removed from sysfs.

Do the simple and obvious thing and make edge_remove_sysfs_attrs
the port_remove method.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Reported-by: Wolfgang Frisch <wfpub@roembden.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I13e0dc8ffc1e26d14a66fabc1d40c8ba02ac1b3a
Reviewed-on: http://git-master/r/79674
Reviewed-by: Automatic_Commit_Validation_User

7 years agoqcaux: add more Pantech UML190 and UML290 ports
Dan Williams [Tue, 24 Jan 2012 23:16:54 +0000]
qcaux: add more Pantech UML190 and UML290 ports

commit 074cc73506f529f39fef32ad1c9e1d4cdd8acf6c upstream.

More ports we now know how to talk to.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I94880694af4a404ad56476a4d1676ad48a862339
Reviewed-on: http://git-master/r/79673
Reviewed-by: Automatic_Commit_Validation_User

7 years agoUSB: cdc-wdm: use two mutexes to allow simultaneous read and write
Bjørn Mork [Mon, 16 Jan 2012 11:41:48 +0000]
USB: cdc-wdm: use two mutexes to allow simultaneous read and write

commit e8537bd2c4f325a4796da33564ddcef9489b7feb upstream.

using a separate read and write mutex for locking is sufficient to make the
driver accept simultaneous read and write. This improves useability a lot.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Cc: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I10ed5f0e41b379f0fef8a22abde46d4231162ff9
Reviewed-on: http://git-master/r/79672
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

7 years agoUSB: cdc-wdm: updating desc->length must be protected by spin_lock
Bjørn Mork [Mon, 16 Jan 2012 11:41:47 +0000]
USB: cdc-wdm: updating desc->length must be protected by spin_lock

commit c428b70c1e115c5649707a602742e34130d19428 upstream.

wdm_in_callback() will also touch this field, so we cannot change it without locking

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Acked-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I7eb2367de1a74be1ac68578354113154595d02cc
Reviewed-on: http://git-master/r/79671
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

7 years agoUSB: ftdi_sio: Add more identifiers
Alan Cox [Thu, 26 Jan 2012 17:41:34 +0000]
USB: ftdi_sio: Add more identifiers

commit 2353f806c97020d4c7709f15eebb49b591f7306d upstream.

0x04d8, 0x000a: Hornby Elite

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I0cdcd93865fe4ce86bb5fa5e18c585a64b0edb78
Reviewed-on: http://git-master/r/79670
Reviewed-by: Automatic_Commit_Validation_User

7 years agoUSB: serial: ftdi additional IDs
Peter Naulls [Wed, 18 Jan 2012 02:27:09 +0000]
USB: serial: ftdi additional IDs

commit fc216ec363f4d174932df90bbf35c77d0540e561 upstream.

I tested this against 2.6.39 in the Ubuntu kernel, however I see the IDs
are not in latest 3.2 git.

This adds IDs for the FTDI controller in the Rainforest Automation
Zigbee dongle.

Signed-off-by: Peter Naulls <peter@chocky.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I27ff506978bf3387a2571e5146b3c181eed95bf0
Reviewed-on: http://git-master/r/79669
Reviewed-by: Automatic_Commit_Validation_User

7 years agoUSB: ftdi_sio: add PID for TI XDS100v2 / BeagleBone A3
Peter Korsgaard [Wed, 18 Jan 2012 22:43:45 +0000]
USB: ftdi_sio: add PID for TI XDS100v2 / BeagleBone A3

commit 55f13aeae0346f0c89bfface91ad9a97653dc433 upstream.

Port A for JTAG, port B for serial.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I4ce3e7aa2d117dde3840f3da1adb21caee413e03
Reviewed-on: http://git-master/r/79668
Reviewed-by: Automatic_Commit_Validation_User

7 years agoUSB: ftdi_sio: fix initial baud rate
Johan Hovold [Wed, 18 Jan 2012 00:46:00 +0000]
USB: ftdi_sio: fix initial baud rate

commit 108e02b12921078a59dcacd048079ece48a4a983 upstream.

Fix regression introduced by commit b1ffb4c851f1 ("USB: Fix Corruption
issue in USB ftdi driver ftdi_sio.c") which caused the termios settings
to no longer be initialised at open. Consequently it was no longer
possible to set the port to the default speed of 9600 baud without first
changing to another baud rate and back again.

Reported-by: Roland Ramthun <mail@roland-ramthun.de>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Tested-by: Roland Ramthun <mail@roland-ramthun.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: Ic092fe37a53c546aceb7e1b3cd8bd44cd8b8369b
Reviewed-on: http://git-master/r/79667
Reviewed-by: Automatic_Commit_Validation_User