7 years agotegra_audio: add default implementation for tegra_is_voice_call_active()
Mayuresh Kulkarni [Mon, 26 Mar 2012 12:48:54 +0000]
tegra_audio: add default implementation for tegra_is_voice_call_active()

- mods kernel do not enable audio related configs in kernel
- tegra_is_voice_call_active() is defined only when audio
related configs are enabled
- this commit adds a default implementation for tegra_is_voice_call_active()
which can be called from generic pm code in mach-tegra
- it also makes the default implementation inline

Bug 924817

Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-on: http://git-master/r/92312
(cherry picked from commit 1b7507db6f2266d5cac10fcd4b3e7b06f6d2f3bd)

Change-Id: I286237b838c39cf5c7784c014459bdcaf50c31ef
Reviewed-on: http://git-master/r/94394
Tested-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

7 years agoARM: tegra: p852: fix kernel boot
Vishal Singh [Tue, 3 Apr 2012 12:15:02 +0000]
ARM: tegra: p852: fix kernel boot

CSUS clock can't be driven from any clk other than clk_m. So
updating its parent to clk_m.
Removing pll_m's entry as it's already enabled and running at
666 MHz which is our requirement.
Removing tegra_init_suspend() as it's not needed on p852.

Bug 938667.
Bug 949584.

Change-Id: Id62401de11d213d4e0b87b52fe30e2b37372bbea
Signed-off-by: Vishal Singh <vissingh@nvidia.com>
Reviewed-on: http://git-master/r/94237
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Manoj Chourasia <mchourasia@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

7 years agoRegulator: gpio_swtich: Remove gpio_switch regulator driver
Laxman Dewangan [Wed, 18 Apr 2012 04:54:11 +0000]
Regulator: gpio_swtich: Remove gpio_switch regulator driver

The gpio_switch regulator is NV driver developed during
tegra3 bringup time. The driver functionality is upstreamed
to mainline into fixed regulator and it is accepted by community.
The required functionality is also downstream and required client
driver is moved to use the fixed  regulator. Hence this driver
is just duplicating functionality with fixed regulator and hence
removing this.

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

Conflicts:

drivers/regulator/gpio-switch-regulator.c

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoARM: tegra: configs: Remove CONFIG_REGULATOR_GPIO_SWITCH
Laxman Dewangan [Wed, 18 Apr 2012 04:53:27 +0000]
ARM: tegra: configs: Remove CONFIG_REGULATOR_GPIO_SWITCH

Removing config variable CONFIG_REGULATOR_GPIO_SWITCH as the
same functionality can be achieve with fixed regulator.

Change-Id: I803105f2a247da70721f29562881448bb00d3a44
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/94197
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

Conflicts:

arch/arm/configs/tegra3_defconfig

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoARM: tegra: cardhu: Use fixed regulator for open drain gpio
Laxman Dewangan [Tue, 3 Apr 2012 08:55:02 +0000]
ARM: tegra: cardhu: Use fixed regulator for open drain gpio

The gpio regulator which is controlled through the gpio, which
is open drain type, is using the gpio_switch regulator.
The open drain support is added into the fixed regulator
and hence moving the regulator to use fixed regulator.

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

7 years agousb: gadget: fsl_udc: boost cpu rate for transaction
Alok Chauhan [Wed, 7 Mar 2012 08:18:41 +0000]
usb: gadget: fsl_udc: boost cpu rate for transaction

Boost CPU rate floor ( based upon
TEGRA_GADGET_BOOST_CPU_FREQ ) before any transaction
starts and remove the boost once the transaction completes.

Bug 923594

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

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

7 years agoarm: tegra: enterprise: enable pullup for preq1 on A03/A04
Tom Cherry [Fri, 23 Mar 2012 20:57:32 +0000]
arm: tegra: enterprise: enable pullup for preq1 on A03/A04

Bug 958089

Reviewed-on: http://git-master/r/92054
(cherry picked from commit 92ff85f937cefc0fbe029607e23557adcf13f9fd)

Change-Id: I7e8815f758c2527da3ab635f102888e5a6d5e951
Signed-off-by: Tom Cherry <tcherry@nvidia.com>
Reviewed-on: http://git-master/r/94118
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

7 years agomfd: tps80031: add option to enable internal pullup or pulldown
Tom Cherry [Fri, 23 Mar 2012 20:55:52 +0000]
mfd: tps80031: add option to enable internal pullup or pulldown

Bug 958089

(cherry-picked from commit 7f4c6d6b9dd2b06984b59dcd60d92026cab4c87c)
Reviewed-on: http://git-master/r/92053

Change-Id: I0f2bdb5482fdcb508808d2d58771d74a05b5597f
Signed-off-by: Tom Cherry <tcherry@nvidia.com>
Reviewed-on: http://git-master/r/94117
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

7 years agoarm: tegra: enterprise: Calibrated A03/A04 backlight table
Tom Cherry [Fri, 30 Mar 2012 23:31:58 +0000]
arm: tegra: enterprise: Calibrated A03/A04 backlight table

Bug 956246

Reviewed-on: http://git-master/r/93644
(cherry picked from commit 5009daf8f362b11810f19253d747042b41badfd3)

Change-Id: I5752eb06a95986c974acce24fa63e1c13e47cd4e
Signed-off-by: Tom Cherry <tcherry@nvidia.com>
Reviewed-on: http://git-master/r/94116
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>

7 years agodrivers: misc: nct: Remove regulator error message
Preetham Chandru [Mon, 2 Apr 2012 06:40:19 +0000]
drivers: misc: nct: Remove regulator error message

Print only a warning message if vdd regulator is not registered.
Some board do not have a seperate vdd regulator and hence
print only a warning message in such cases.

Bug 961258
Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>
Change-Id: I953d17ae14650c622e06febe415362e5cb096236
Reviewed-on: http://git-master/r/93777
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Matthew Longnecker <mlongnecker@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

7 years agoARM: tegra: kai: Update measured backlight output
Daniel Solomon [Sun, 1 Apr 2012 20:51:18 +0000]
ARM: tegra: kai: Update measured backlight output

Update measured backlight output for correct linearization.

Bug 962780

Change-Id: Ic35b159a0b951eafff7890e7a7487f3c94b468e8
Signed-off-by: Daniel Solomon <daniels@nvidia.com>
Reviewed-on: http://git-master/r/93744
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Hu He <hhe@nvidia.com>
Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>

7 years agovideo: tegra: host: Init scale3d worker always
Terje Bergstrom [Fri, 30 Mar 2012 09:44:40 +0000]
video: tegra: host: Init scale3d worker always

Initialize scale3d worker even though scale3d would be disabled.

Bug 954879

Change-Id: Iaf3a12740d1d377d949cdfbf7e11fa00568e72fe
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/93488
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>

7 years agovideo: tegra: host: Add syncpt sysfs entries
Terje Bergstrom [Tue, 27 Mar 2012 12:43:58 +0000]
video: tegra: host: Add syncpt sysfs entries

Expose sync point current and max values through sysfs.

Bug 957639

Change-Id: I2a3b914d404bb8d7bbed86d383c859bd8237a278
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/92778
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

7 years agoi2c: tegra: Support for I2C_M_REV_DIR_ADDR protocol mangling
Laxman Dewangan [Tue, 27 Mar 2012 13:24:35 +0000]
i2c: tegra: Support for I2C_M_REV_DIR_ADDR protocol mangling

Add support for protocol mangling "I2C_M_REV_DIR_ADDR"

Change-Id: Icdef16885f1cf6ed1ce9c4003a94c2c2e917ced2
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/92572
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Stephen Warren <swarren@nvidia.com>

7 years agosound: soc: tegra: Use tegra_dma_cancel() to abort request
Laxman Dewangan [Thu, 22 Mar 2012 10:04:52 +0000]
sound: soc: tegra: Use tegra_dma_cancel() to abort request

To terminate request from dma, use the tegra_dma_cancel() inplace of
tegra_dma_dequeue().
The api tegra_dma_dequeue() is getting to be obsolete.

Change-Id: Id2a888a726086fb1e4ade04ac047442554188bee
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/91754
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Scott Peterson <speterson@nvidia.com>

7 years agoserial: tegra: Use tegra_dma_cancel() to abort request
Laxman Dewangan [Thu, 22 Mar 2012 10:04:24 +0000]
serial: tegra: Use tegra_dma_cancel() to abort request

To terminate request from dma, use the tegra_dma_cancel() inplace of
tegra_dma_dequeue().
The api tegra_dma_dequeue() is getting to be obsolete.

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

7 years agospi: tegra: Use tegra_dma_cancel() to abort request
Laxman Dewangan [Thu, 22 Mar 2012 10:03:52 +0000]
spi: tegra: Use tegra_dma_cancel() to abort request

To terminate request from dma, use the tegra_dma_cancel() inplace of
tegra_dma_dequeue().
The api tegra_dma_dequeue() is getting to be obsolete.

Change-Id: I297e67433a2118377ecb9b028dcf8fa82e09f0e2
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/91752
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Ashwini Ghuge <aghuge@nvidia.com>
Tested-by: Ashwini Ghuge <aghuge@nvidia.com>

7 years agoARM: tegra: fuse: Use tegra_dma_cancel() to abort request
Laxman Dewangan [Wed, 18 Apr 2012 04:51:09 +0000]
ARM: tegra: fuse: Use tegra_dma_cancel() to abort request

To terminate request from dma, use the tegra_dma_cancel() inplace of
tegra_dma_dequeue().
The api tegra_dma_dequeue() is getting to be obsolete.

Change-Id: I4b886489458e4ec8f5eb43d857bf710fbb56f5ee
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/91751
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>

Conflicts:

arch/arm/mach-tegra/apbio.c

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agomach-tegra: customize modem parameters for voice call.
Ankit Gupta [Thu, 29 Mar 2012 05:45:29 +0000]
mach-tegra: customize modem parameters for voice call.

Add support to customize modem parameters for voice call.
Signed-off-by: Ankit Gupta <ankitgupta@nvidia.com>

Change-Id: I6a9e5918f709cbb004b66d16112346b692af477b
Reviewed-on: http://git-master/r/93096
Tested-by: Ankit Gupta (Engrg-SW) <ankitgupta@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: Scott Peterson <speterson@nvidia.com>

7 years agodc: enabled recovery from resetting
Adam Jiang [Thu, 8 Mar 2012 12:34:53 +0000]
dc: enabled recovery from resetting

Enabled recovery of DC from resetting. When underflow triggered serveral
times(current > 4 for tegra2), DC driver will reset itself to prevent
data corruption. Reopend nvhost connection when resetting finished. That
helps system to show frames instead of a blank screen again.

Fixed Bug 936613

Change-Id: I314c37258a4a446dc07167ac60d0420e79a5fb2d
Signed-off-by: Adam Jiang <chaoj@nvidia.com>
Reviewed-on: http://git-master/r/89406
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

7 years agoarm: tegra3: change min_rate for sclk
Amit Kamath [Wed, 18 Apr 2012 04:48:55 +0000]
arm: tegra3: change min_rate for sclk

Change the minimal rate of sclk to 12 MHz and set the lowest
frequency of sbus to be 40 MHz when display is on.

bug 939415

Original change http://git-master/r/#change,76959

Change-Id: I81cda6a95494764721c1be5b4001c476f3aed6ab
Signed-off-by: Amit Kamath <akamath@nvidia.com>
Reviewed-on: http://git-master/r/93850
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

Conflicts:

arch/arm/mach-tegra/tegra3_clocks.c

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoARM: tegra: clock: Set EMC and SCLK rates suspend floors
Alex Frid [Fri, 9 Mar 2012 23:07:00 +0000]
ARM: tegra: clock: Set EMC and SCLK rates suspend floors

- On suspend entry set EMC rate floor high enough to select PLLM as
  EMC clock source, since PLLM is always turned off in suspend.
- On suspend entry set SCLK (AVP) rate floor to speed-up system bus
  during save/restore procedures.

Bug 939942
Bug 938649

Reviewed-on: http://git-master/r/89234
(cherry picked from commit ccfdaef143f9017d682af017e11a25c3e5bcf3a7)

Change-Id: I4e1d66521f1f3453502c471999a52637c3d489aa
Signed-off-by: Alex Frid <afrid@nvidia.com>
Signed-off-by: Tom Cherry <tcherry@nvidia.com>
Reviewed-on: http://git-master/r/94124
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

7 years agoregulator: fixed: Support for open drain gpio pin
Laxman Dewangan [Wed, 7 Mar 2012 10:28:33 +0000]
regulator: fixed: Support for open drain gpio pin

Adding flag on fixed regulator board configuration structure
to specify whether gpio is open drain type or not.
Passing this information to gpio library when requesting
gpio so that gpio driver can set the pin state accordingly,
for open drain type:
- Pin can be set HIGH as setting as input, PULL UP on
  pin make this as HIGH.
- Pin can be set LOW as setting it as output and drive to LOW.

The non-open drain pin can be  set HIGH/LOW by setting it to
output and driving it to HIGH/LOW.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
cherry picked from mainline commit
a4d9f179cc788b7f4b735d32c2e4a3b2562e8240

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

7 years agoarm: tegra: pm: Update CPU complex resume
Prashant Gaikwad [Tue, 27 Mar 2012 10:42:57 +0000]
arm: tegra: pm: Update CPU complex resume

Completely removed PLLP restoration from CPU complex resume on
Tegra2 platforms (too late: PLLP is restored from AVP warm boot
code)

Bug 952200
Bug 931285

Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-on: http://git-master/r/92523
(cherry picked from commit 066dc172010f1a5ea5a375e1cbdcf162ab206d63)

Change-Id: I1a31793db8ee1fda5a947d69890e3118f0d3cdab
Reviewed-on: http://git-master/r/93562
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Tested-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

7 years agoARM:tegra:cardhu: Enable PCIe for cardhu, E1186 & E1187
Jay Agarwal [Fri, 30 Mar 2012 09:34:43 +0000]
ARM:tegra:cardhu: Enable PCIe for cardhu, E1186 & E1187

Do platform device registration for cardhu and E1186
& E1187 platforms only.

Bug 790141

Change-Id: I70a0144604631a0dd9499699f892f9fc7ec14d56
Signed-off-by: Jay Agarwal <jagarwal@nvidia.com>
Reviewed-on: http://git-master/r/93486
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-by: Krishna Thota <kthota@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

7 years agovideo: tegra: host: api clean-up
Mayuresh Kulkarni [Tue, 27 Mar 2012 12:16:07 +0000]
video: tegra: host: api clean-up

- remove redundant 2nd argument to nvhost_module_suspend()
- also remove the debug_not_idle() as it redundant after
refactor of host1x code
- debug_not_idle() iterates through host1x's private instance
of channels to find out which client module is active (along
with host1x itself). we are going to remove these instances of
channels from host1x's device private data
- reduce the prints during suspend

Bug 871237

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

7 years agoARM:defconfig: Enable PCIE in kernel
Jay Agarwal [Mon, 26 Mar 2012 16:00:48 +0000]
ARM:defconfig: Enable PCIE in kernel

Enabling PCIE in kernel build after fixing power
management issues due to PCIE.

Bug 790141

Change-Id: I41d46e6872f5df9962519c15da62ff7804580211
Signed-off-by: Jay Agarwal <jagarwal@nvidia.com>
Reviewed-on: http://git-master/r/92341
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Krishna Thota <kthota@nvidia.com>
Reviewed-by: Emily Jiang <ejiang@nvidia.com>
Reviewed-by: Penny Chiu <pchiu@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

7 years agoARM: tegra: dma: Update actual bytes_transferred in dma cancel
Laxman Dewangan [Wed, 21 Mar 2012 12:24:21 +0000]
ARM: tegra: dma: Update actual bytes_transferred in dma cancel

When canceling dma, updating actual bytes transferred by dma,
making all requests status to aborted and deleting from channel
request queue.

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

7 years agopower: bpcm: Re-try setting BPC limit
Alex Frid [Sun, 11 Mar 2012 08:02:33 +0000]
power: bpcm: Re-try setting BPC limit

Check returned value from BPC set limit api, and re-try again
on error. Keep CPU throttled while re-trying.

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

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

7 years agoARM: tegra: clock: Fix emulation clock table
Alex Frid [Sun, 1 Apr 2012 07:28:46 +0000]
ARM: tegra: clock: Fix emulation clock table

Configure PLLC on emulation platforms after SCLK is switched to PLLP.
This would avoid failure in case when emulation initialization script
set PLLC as SCLK source.

Change-Id: Ie0f48c066f6df7f6f3c67858de7e9d7608dcb7ff
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/93730
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Hoang Pham <hopham@nvidia.com>
Reviewed-by: Bo Yan <byan@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

7 years agousb: gadget: tegra: Enable AHB prefetch
Krishna Yarlagadda [Wed, 18 Apr 2012 04:40:46 +0000]
usb: gadget: tegra: Enable AHB prefetch

Enable AHB prefetch and call dma_sync
to avoid memory coherency issues

Bug 921109

Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: http://git-master/r/92257
(cherry picked from commit e8fac4b6f3460928442d6c9dadec301ccf57fb0b)

Change-Id: I2788e94d3609bfdd6d112f0b5386a653af15075e
Reviewed-on: http://git-master/r/93819
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Tested-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

Conflicts:

drivers/usb/gadget/fsl_udc_core.c

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoARM: tegra: usb: AHB prefetch support calls
Krishna Yarlagadda [Mon, 26 Mar 2012 09:25:11 +0000]
ARM: tegra: usb: AHB prefetch support calls

Support for AHB prefetch enable and disable.
These calls are used to avoid memory coherency issues

Bug 921109

Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: http://git-master/r/92256
(cherry picked from commit c992fdbe0be6e2006d65e67e6eb821a054ad401c)

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

7 years agousb: rndis: Avoid unwanted usb config access
Krishna Yarlagadda [Fri, 16 Mar 2012 09:31:50 +0000]
usb: rndis: Avoid unwanted usb config access

Request complete may be called when there is no valid usb config
Avoid access to config when not required.

Bug 949543

Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: http://git-master/r/91151
(cherry picked from commit 08bc68164d0bd90c84a8ea82f87f9f44e4341df2)

Change-Id: I5969144aaa9bcffddefa7933d43bfd3690814fba
Reviewed-on: http://git-master/r/93816
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Tested-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

7 years agoARM: tegra: usb_phy: Power down USB PMC controls
Krishna Yarlagadda [Fri, 9 Mar 2012 17:02:48 +0000]
ARM: tegra: usb_phy: Power down USB PMC controls

Fix leakage current on AVDD_USB when system is in low power
mode.

Bug 934597

Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: http://git-master/r/89160
(cherry picked from commit 6ef00a561be37a909a1c254afc6a14b6492c670f)

Change-Id: I3b8be6eac1ff40148e2de0935db6369909c8bb0a
Reviewed-on: http://git-master/r/93813
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Tested-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

7 years agotegra: video: nvmap: Make nvmap_ioctl.h userspace compatible
Yogish Kulkarni [Thu, 29 Mar 2012 19:18:36 +0000]
tegra: video: nvmap: Make nvmap_ioctl.h userspace compatible

nvmap_ioctl.h intended to be included by both kernel and
userspace code.

Change-Id: I8cccef5e3bc02f3271f471155b2e36126c68017a
Signed-off-by: Yogish Kulkarni <yogishk@nvidia.com>
Reviewed-on: http://git-master/r/93329
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>

7 years agoARM: tegra3: Make MC early ack feature configurable.
Manoj Chourasia [Wed, 21 Mar 2012 08:58:58 +0000]
ARM: tegra3: Make MC early ack feature configurable.

Add a config option to configure early acknowlegement
from memory controller.

Early acknowledgement is feature of memory controller
where MC acknowledged immediately to any write requests
from CPU. To maintain mermory coherency all the read
requests are blocked till all the early-acked writes
have reached to a point of coherency.

bug 943638

Change-Id: I97f30261c4711fc338b007502b6eef7217ddb6cb
Signed-off-by: Manoj Chourasia <mchourasia@nvidia.com>
Reviewed-on: http://git-master/r/91477
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

7 years agoARM: tegra: dma: enum for initial status of dma req
Laxman Dewangan [Mon, 2 Apr 2012 08:48:07 +0000]
ARM: tegra: dma: enum for initial status of dma req

Adding new req status TEGRA_DMA_REQ_PENDING. This will be initial
status of the request when enqueued.

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

7 years agomfd: max8907c: Do not use I2C_M_NOSTART in first message
Laxman Dewangan [Thu, 29 Mar 2012 09:54:51 +0000]
mfd: max8907c: Do not use I2C_M_NOSTART in first message

It is not recommended to use the flag I2C_M_NOSTART in first
message.

The documentation kernel/Documentation/i2c/i2c-proocol says:
Flag I2C_M_NOSTART:
    In a combined transaction, no 'S Addr Wr/Rd [A]' is generated at some
    point. For example, setting I2C_M_NOSTART on the second partial message
    generates something like:
      S Addr Rd [A] [Data] NA Data [A] P
    If you set the I2C_M_NOSTART variable for the first partial message,
    we do not generate Addr, but we do generate the startbit S. This will
    probably confuse all other clients on your bus, so don't try this.

Change-Id: I8a8a4f6f91a1b53b6d443588ab18704cf100fd50
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/93187
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Tested-by: Bandi Krishna Chaitanya <bandik@nvidia.com>

7 years agotegra: hdmi: Add 1080p timing table
Hao Tang [Thu, 22 Mar 2012 06:59:46 +0000]
tegra: hdmi: Add 1080p timing table

Bug 949759

Add new 1080p timing support, or 1080p playback is not available on
some monitors like Acer H243HX

Change-Id: I8a8a3a5b2de71d5a56dad233f953e09176f85b76
Signed-off-by: Hao Tang <htang@nvidia.com>
Reviewed-on: http://git-master/r/91732
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

7 years agotegra: p1852: Register tegra WDT platform device
Manoj Chourasia [Tue, 20 Mar 2012 11:46:39 +0000]
tegra: p1852: Register tegra WDT platform device

bug 924362

Change-Id: I878a845d5c78b2f8c0f5882f8c0a97b3842ac883
Signed-off-by: Manoj Chourasia <mchourasia@nvidia.com>
Reviewed-on: http://git-master/r/91224
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

7 years agoi2c: tegra: Fix to avoid possible race condition
Chaitanya Bandi [Fri, 16 Mar 2012 12:17:35 +0000]
i2c: tegra: Fix to avoid possible race condition

Because of race condition between isr and tx fifo fill,
duplicate data is being written. So added locking to make
Tx fifo fill as atomic.

Change-Id: Ia99466adadfb6d86a6f238ec4cd0aa13bd36e434
Signed-off-by: Chaitanya Bandi <bandik@nvidia.com>
Reviewed-on: http://git-master/r/90870
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

7 years agoi2c: tegra: Avoid duplicate write into Tx fifo
Chaitanya Bandi [Mon, 12 Mar 2012 10:48:07 +0000]
i2c: tegra: Avoid duplicate write into Tx fifo

Dvc I2C_DONE_INTR_EN interrupt bit is always enable into dvc
control register3. During normal transaction on dvc i2c bus
sometimes one transaction written two times in TX fifo buffer
because of triggered dvc interrupt. This is causing to corrupt
the next transaction header and send wrong address over dvc
i2c bus. To solve this issue dvc i2c interrupt has to disable
during filling of Tx fifo and enable after that.

Updated the following things in code:
(1) Add the code to mask/unmask I2C_DONE_INTR_EN into dvc control reg3
writing into Tx Fifo register.
(2) Put delay before resetting the controller

Hand-picked this change from: http://git-master/r/#change,39997
Signed-off-by: Chaitanya Bandi <bandik@nvidia.com>

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

7 years agotegra: p1852: correcting the GPIO to use for therm_alert
Vishal Singh [Tue, 27 Mar 2012 12:20:02 +0000]
tegra: p1852: correcting the GPIO to use for therm_alert

Currently the GPIO that we are trying to use for therm_alert is
GPIO_PW2 which is incorrect. The GPIO we ought to use is GPIO_PW3.

Bug 920368.

(cherry picked from commit ad4714c486c6a734681287ea4d85869f05704397)
Change-Id: If1a8cf4b8cdbdd69f2d01f4c292775d413384bc0
Reviewed-on: http://git-master/r/#change,74273
Signed-off-by: Vishal Singh <vissingh@nvidia.com>
Reviewed-on: http://git-master/r/91730
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

7 years agoARM: mm: cache-l2x0: use L2X0_CACHE_ID_PART_MASK to get cache-id
Varun Wadekar [Tue, 17 Apr 2012 07:29:57 +0000]
ARM: mm: cache-l2x0: use L2X0_CACHE_ID_PART_MASK to get cache-id

l2x0_unlock does not use L2X0_CACHE_ID_PART_MASK to get the
actual cache-id, thus always iterating over only one I and
one D lockdown register.

Change-Id: I485a0564103a620f4aed80133403eea37ca27fb0
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoARM: mm: cache-l2x0: replace printk with pr_info_once in l2x0_init
Varun Wadekar [Tue, 17 Apr 2012 07:28:38 +0000]
ARM: mm: cache-l2x0: replace printk with pr_info_once in l2x0_init

printk causes device resume to hang in a recursive loop. Hence
switch over to pr_info_once.

Change-Id: I4540c274b86e8d791b509667edefac3b3565973c
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoRevert "SUNRPC: create unix gid cache per network namespace"
Varun Wadekar [Mon, 16 Apr 2012 14:21:57 +0000]
Revert "SUNRPC: create unix gid cache per network namespace"

This reverts commit 73393232d6a425b6bb4cee590e3e66fc52532a15 since
it causes a crash in net/sunrpc/cache.c:cache_clean() during bootup.

Conflicts:

net/sunrpc/netns.h
net/sunrpc/sunrpc_syms.c

Change-Id: Ic113234738fd7270e3f66efe524773a183399099
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agonet: bluetooth: smp: fix compilation issues with 3.4
Varun Wadekar [Mon, 16 Apr 2012 13:03:19 +0000]
net: bluetooth: smp: fix compilation issues with 3.4

Change-Id: I43f4c22fbe9077ff25bb5e1d58b526c810f2bd87
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agocgroup: fix compilations issues with 3.4
Varun Wadekar [Mon, 16 Apr 2012 10:11:58 +0000]
cgroup: fix compilations issues with 3.4

Change-Id: I156a2ba21aa973ee6b528f222861742b2af91341
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agonet: wireless: bcmdhd: delete dhd_common_deinit
Varun Wadekar [Mon, 16 Apr 2012 10:11:01 +0000]
net: wireless: bcmdhd: delete dhd_common_deinit

Change-Id: I9a364d9eff931f373ae4547e82274637502958bf
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoinput: evdev: remove duplicate suspend/resume functions
Varun Wadekar [Mon, 16 Apr 2012 10:10:10 +0000]
input: evdev: remove duplicate suspend/resume functions

Change-Id: Ib49b64510bbf974b7d4e92021e4cefa7d8e088e5
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agonet: ppp: replace PPP_MTU with PPP_MRU
Varun Wadekar [Mon, 16 Apr 2012 10:09:30 +0000]
net: ppp: replace PPP_MTU with PPP_MRU

Change-Id: I0372a53147181a165560589f6214b715b8fb4e7b
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agonet: wireless: bcmdhd: Update to version 1.26
Dmitry Shmidt [Sat, 14 Apr 2012 01:36:06 +0000]
net: wireless: bcmdhd: Update to version 1.26

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agoARM: etm: Add sysfs entry to enable return stack if supported
Arve Hjønnevåg [Wed, 4 Apr 2012 01:01:03 +0000]
ARM: etm: Add sysfs entry to enable return stack if supported

Change-Id: Icb73d60324ad0ddfc3e8a450a28bb3d90c702788
Signed-off-by: Arve Hjønnevåg <arve@android.com>

7 years agoARM: etm: Add sysfs entry to disable branch_output flag
Arve Hjønnevåg [Tue, 3 Apr 2012 23:15:36 +0000]
ARM: etm: Add sysfs entry to disable branch_output flag

Change-Id: Ib91208a2c33621aa2d7bd9aa72bfbc670d9d5f1d
Signed-off-by: Arve Hjønnevåg <arve@android.com>

7 years agoARM: etm: Add sysfs entry to set context-id-size
Arve Hjønnevåg [Tue, 3 Apr 2012 00:20:32 +0000]
ARM: etm: Add sysfs entry to set context-id-size

Change-Id: I520dfb6e593dac131de8b9b1db77f1c734f18c24
Signed-off-by: Arve Hjønnevåg <arve@android.com>

7 years agoARM: etm: Add sysfs entry to enable timestamps if supported
Arve Hjønnevåg [Tue, 3 Apr 2012 00:20:32 +0000]
ARM: etm: Add sysfs entry to enable timestamps if supported

Change-Id: Iff964ba2f6236ed81863e02ec7b3ec9fbc48044a
Signed-off-by: Arve Hjønnevåg <arve@android.com>

7 years agoARM: etm: Check arch version and disable data tracing for ptm
Arve Hjønnevåg [Tue, 3 Apr 2012 03:18:56 +0000]
ARM: etm: Check arch version and disable data tracing for ptm

Change-Id: If2cb7928d0711f48348443d882a12416be9c5910
Signed-off-by: Arve Hjønnevåg <arve@android.com>

7 years agoARM: etm: Wait for etm/ptm(s) to stop before requesting PowerDown
Arve Hjønnevåg [Thu, 29 Mar 2012 04:03:13 +0000]
ARM: etm: Wait for etm/ptm(s) to stop before requesting PowerDown

When PowerDown was requested at the same time as ProgBit, the
formatter flush command that follows could get stuck.

Change-Id: Iafb665f61f055819e64ca1dcb60398c656f593e4
Signed-off-by: Arve Hjønnevåg <arve@android.com>

7 years agoandroid: ram_console: use platform_device_register
Colin Cross [Thu, 12 Apr 2012 21:55:21 +0000]
android: ram_console: use platform_device_register

platform_driver_probe can only be used when the platform device
is already present.  In order to enable debugging crashes during
very early boot, the ram_console driver needs to be registered
as early as possible to allow the device to probe as soon as it
is registered at arch_initcall time.  This requires the driver
to be registered before the device.

Replace platform_driver_probe with platform_driver_register,
and make the ram_console probe function __devinit.

Change-Id: Ie02cebef90b9c9dbb5b94e52e4f93e490bb88954
Signed-off-by: Colin Cross <ccross@android.com>

7 years agonet: wireless: bcmdhd: Update to Version 6.10.83.0 (1.23)
Dmitry Shmidt [Mon, 16 Apr 2012 09:36:30 +0000]
net: wireless: bcmdhd: Update to Version 6.10.83.0 (1.23)

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

Conflicts:

drivers/net/wireless/bcmdhd/dhd.h
drivers/net/wireless/bcmdhd/dhd_common.c
drivers/net/wireless/bcmdhd/dhd_sdio.c

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoHACK: bcmdhd: fix compile for 3.4
Colin Cross [Wed, 4 Apr 2012 20:53:41 +0000]
HACK: bcmdhd: fix compile for 3.4

Disable the removed set_beacon/add_beacon interface, and add the
new dBm parameter to cfg80211_rx_mgmt.

Change-Id: Id68530e978886ef482bce51cc8233ffa76a86c5a
Signed-off-by: Colin Cross <ccross@android.com>

7 years agogpu: ion: ion_carveout_heap: fix for 3.4
Colin Cross [Wed, 4 Apr 2012 20:50:43 +0000]
gpu: ion: ion_carveout_heap: fix for 3.4

__arch_ioremap is no longer available, use __arm_ioremap instead.

Change-Id: Ied98208a3c1be6bc5ac195c3ade496fbb5003f37
Signed-off-by: Colin Cross <ccross@android.com>

7 years agoandroid: persistent_ram: move persistent_ram.h back to include/linux
Colin Cross [Mon, 16 Apr 2012 09:32:38 +0000]
android: persistent_ram: move persistent_ram.h back to include/linux

When persistent_ram went in to staging, persistent_ram.h was moved
from include/linux to driver/staging/android.  To avoid having to
fix all the users, move it back to include/linux.

Change-Id: Ifa73781b4af5412042114a4b9b0476f6c4abb99e
Signed-off-by: Colin Cross <ccross@android.com>

Conflicts:

drivers/staging/android/persistent_ram.c
drivers/staging/android/ram_console.c

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoandroid: persistent_ram: fix printk size_t warning
Colin Cross [Wed, 4 Apr 2012 20:37:43 +0000]
android: persistent_ram: fix printk size_t warning

Fix warning in printks by using %zu for size_t variables.

Change-Id: I34faab9fd012adc358ccf5d471a241df2f8c263c
Signed-off-by: Colin Cross <ccross@android.com>

7 years agousb: gadget: adb: Only enable the gadget when adbd is ready
Benoit Goby [Tue, 20 Mar 2012 01:56:52 +0000]
usb: gadget: adb: Only enable the gadget when adbd is ready

When adb is enabled, only connect the gadget when adbd is ready. If adbd
dies or is restarted (e.g. "adb root"), the gadget is disconnected when
the adb device is close, and it is re-connected once adb re-open the
device.

- Add callbacks to adb, similar to FunctionFs callbacks, to notify the
  gadget when the daemon is ready or closed.
- Refcount calls to android_enable/android_disable to enable the gadget
  only once all the function daemons are ready.
- Add enable/disble to android_usb_function to notify the function when
  it is added/removed from the list of enabled functions.

Change-Id: Id54ff85aec9cf8715c94b4f9bd6137a79ad58bfc
Signed-off-by: Benoit Goby <benoit@android.com>

7 years agoandroid: logger: Allow a UID to read it's own log entries
Nick Kralevich [Thu, 23 Feb 2012 18:09:06 +0000]
android: logger: Allow a UID to read it's own log entries

Modify the kernel logger to record the UID associated with
the log entries. Always allow the same UID which generated a
log message to read the log message.

Allow anyone in the logs group, or anyone with CAP_SYSLOG, to
read all log entries.

In addition, allow the client to upgrade log formats, so they
can get additional information from the kernel.

Change-Id: Ie48fb614b43c9302a07ad2673b78dd8749b492b6
Signed-off-by: Nick Kralevich <nnk@google.com>

7 years agoARM: fiq_debugger: add support for reboot commands
Colin Cross [Wed, 14 Mar 2012 23:29:47 +0000]
ARM: fiq_debugger: add support for reboot commands

Pass the rest of the reboot command to kernel_restart to allow
reboot bootloader to work from FIQ debugger.

Change-Id: I4e7b366a69268dda17ffcf4c84f2373d15cb1271
Signed-off-by: Colin Cross <ccross@android.com>

7 years agoARM: fiq_debugger: fix compiling for v3.3
Colin Cross [Mon, 16 Apr 2012 09:29:24 +0000]
ARM: fiq_debugger: fix compiling for v3.3

Call kernel_restart instead of arch_reset, the ARM reset handling
has changed.

Remove localtimer irq printing, they now show up in the regular
irq stats.

Change-Id: I523da343b292c5711f3e1cbfd766d32eea2da84e
Signed-off-by: Colin Cross <ccross@android.com>

Conflicts:

arch/arm/common/fiq_debugger.c

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoandroid: persistent_trace: fix section mismatch warning
Colin Cross [Tue, 13 Mar 2012 20:14:31 +0000]
android: persistent_trace: fix section mismatch warning

persistent_trace_probe can be calls persistent_ram init
functions that are __devinit, mark it __devinit as well.

Change-Id: I8f3cfb1bc443d143dc838b2bced2d191b3bf52d7
Signed-off-by: Colin Cross <ccross@android.com>

7 years agousb: gadget: adb: do not set error flag when dequeuing req
Colin Cross [Fri, 9 Mar 2012 01:57:51 +0000]
usb: gadget: adb: do not set error flag when dequeuing req

When an ep_out req is dequeued because of userspace freezing,
don't set the error flag.

Change-Id: I680f1a1059b8ac2244aaa069e7d42dc44abf98e9
Signed-off-by: Colin Cross <ccross@android.com>

7 years agousb: gadget: adb: allow freezing in adb_read
Colin Cross [Mon, 5 Mar 2012 21:29:45 +0000]
usb: gadget: adb: allow freezing in adb_read

wait_event_interruptible in adb_read might return -ERESTARTSYS if
userspace is frozen during adb_read or another signal is delivered
to adb.  If so, don't set dev->error to avoid resetting the adb
connection.

Change-Id: I5a7baa013a9a3a3b5305de7e6a0d18546a560018
Signed-off-by: Colin Cross <ccross@android.com>

7 years agoandroid: persistent_trace: ftrace into persistent_ram
Colin Cross [Mon, 16 Apr 2012 09:28:18 +0000]
android: persistent_trace: ftrace into persistent_ram

persistent_trace uses the ftrace infrastructure, but traces
into a persistent_ram buffer instead of the regular ftrace
ringbuffer.  After a reset or panic, the trace can be
decoded with cat /sys/kernel/debug/persistent_trace.

Change-Id: Ia6025ccc323599c7844e0783af0386d32ed7419e
Signed-off-by: Colin Cross <ccross@android.com>

Conflicts:

drivers/staging/android/trace_persistent.c

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoRevert "HACK: android-alarm: wakelock workaround"
Colin Cross [Mon, 16 Apr 2012 09:27:12 +0000]
Revert "HACK: android-alarm: wakelock workaround"

This reverts commit 1f1a4544e5196a8e30cec7a21724e190bb51a2df.

Conflicts:

drivers/staging/android/alarm-dev.c
drivers/staging/android/alarm.c

Change-Id: I5717b7736b10de3a288613c8a7e4e5281c78fcaf

Conflicts:

drivers/staging/android/alarm-dev.c

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoandroid-alarm: Remove unused android alarm in-kernel interfaces
John Stultz [Fri, 27 Jan 2012 08:16:31 +0000]
android-alarm: Remove unused android alarm in-kernel interfaces

Now that alarm-dev.c uses the upstreamed alarmtimer interfaces,
we can remove the otherwise unused in-kernel android alarm api.

Signed-off-by: John Stultz <john.stultz@linaro.org>

7 years agoandroid-alarm: Rework alarm-dev.c to use upstreamed alarmtimers
John Stultz [Mon, 16 Apr 2012 09:26:00 +0000]
android-alarm: Rework alarm-dev.c to use upstreamed alarmtimers

This reworks the alarm-dev.c to use the upstreamed alarmtimers
interface.

Signed-off-by: John Stultz <john.stultz@linaro.org>

Conflicts:

drivers/staging/android/alarm-dev.c

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoandroid-alarm: Convert ALARM_ELAPSED_REALTIME to use CLOCK_BOOTTIME
John Stultz [Wed, 22 Jun 2011 00:01:27 +0000]
android-alarm: Convert ALARM_ELAPSED_REALTIME to use CLOCK_BOOTTIME

The ALARM_ELAPSED_REALTIME clock domain in Android pointed
to the need for something similar in linux system-wide
(instead of limited to just the alarm interface).

Thus CLOCK_BOOTTIME was introduced into the upstream kernel
in 2.6.39.

This patch attempts to convert the android alarm timer to utilize
the kernel's CLOCK_BOOTTIME clockid for ALARM_ELAPSED_REALTIME,
instead of managing it itself.

Change-Id: I4867ed2823ebb29d27c53f236c6a3dbb47f3ac78
Signed-off-by: John Stultz <john.stultz@linaro.org>

7 years agousb: gadget: accessory: Add Android Accessory function
Benoit Goby [Mon, 16 Apr 2012 09:25:05 +0000]
usb: gadget: accessory: Add Android Accessory function

USB accessory mode allows users to connect USB host hardware
specifically designed for Android-powered devices. The accessories
must adhere to the Android accessory protocol outlined in the
http://accessories.android.com documentation. This allows
Android devices that cannot act as a USB host to still interact with
USB hardware. When an Android device is in USB accessory mode, the
attached Android USB accessory acts as the host, provides power
to the USB bus, and enumerates connected devices.

Signed-off-by: Mike Lockwood <lockwood@android.com>

Conflicts:

drivers/usb/gadget/android.c

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agousb: gadget: adb: Add ADB function
Benoit Goby [Mon, 16 Apr 2012 09:24:32 +0000]
usb: gadget: adb: Add ADB function

Android Debug Bridge (adb) is a command line tool that lets
users communicate with a Android-powered device. It is used
mainly to debug applications and tranfer files. f_adb implements
the transport layer between the ADB Server (on the host) and the
ADBD daemon (on the device).

Signed-off-by: Mike Lockwood <lockwood@android.com>

Conflicts:

drivers/usb/gadget/f_adb.c

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agousb: gadget: mtp: Add MTP/PTP function
Benoit Goby [Mon, 16 Apr 2012 09:23:11 +0000]
usb: gadget: mtp: Add MTP/PTP function

USB gadget function driver used by the Android framework to
implement the MTP and PTP protocols. It creates a character device
that provides an interface for fast transfer of files and
supports transferring files greater than 4GB.

Signed-off-by: Mike Lockwood <lockwood@android.com>

Conflicts:

drivers/usb/gadget/android.c

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agousb: gadget: Add Android Composite Gadget driver
Benoit Goby [Mon, 16 Apr 2012 09:22:36 +0000]
usb: gadget: Add Android Composite Gadget driver

The Android Gadget driver is a composite driver that allows
userspace to change at runtime the list of functions enabled in
its configuration and to configure these functions. It supports
multiple functions: acm, adb, rndis, mtp/ptp, mass storage and
accessory.

It is usually controlled by a daemon that changes the configuration
based on user settings. For example, rndis is enabled when the user
enables sharing the phone data connection and adb (Android Debug
Bridge) is only enabled when the user wants to debug applications
for security reasons.

As an example on how to use it, the following shell commands will
make the gadget disconnect from the host and make it be re-enumerated
as a composite with 1 rndis and 2 acm interfaces, and a different
product id:

echo 0       > /sys/class/android_usb/android0/enable
echo rndis,acm > /sys/class/android_usb/android0/functions
echo 2       > /sys/class/android_usb/android0/f_acm/instances
echo 2d01    > /sys/class/android_usb/android0/idProduct
echo 1       > /sys/class/android_usb/android0/enable

The driver requires a gadget controller that supports software
control of the D+ pullup and the controller driver must support
disabling the pullup during composite_bind.

Signed-off-by: Mike Lockwood <lockwood@android.com>
Signed-off-by: Benoit Goby <benoit@android.com>

Conflicts:

drivers/usb/gadget/android.c

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agonetfilter: add xt_qtaguid matching module
JP Abgrall [Mon, 20 Jun 2011 19:41:46 +0000]
netfilter: add xt_qtaguid matching module

This module allows tracking stats at the socket level for given UIDs.
It replaces xt_owner.
If the --uid-owner is not specified, it will just count stats based on
who the skb belongs to. This will even happen on incoming skbs as it
looks into the skb via xt_socket magic to see who owns it.
If an skb is lost, it will be assigned to uid=0.

To control what sockets of what UIDs are tagged by what, one uses:
  echo t $sock_fd $accounting_tag $the_billed_uid \
     > /proc/net/xt_qtaguid/ctrl
 So whenever an skb belongs to a sock_fd, it will be accounted against
   $the_billed_uid
  and matching stats will show up under the uid with the given
   $accounting_tag.

Because the number of allocations for the stats structs is not that big:
  ~500 apps * 32 per app
we'll just do it atomic. This avoids walking lists many times, and
the fancy worker thread handling. Slabs will grow when needed later.

It use netdevice and inetaddr notifications instead of hooks in the core dev
code to track when a device comes and goes. This removes the need for
exposed iface_stat.h.

Put procfs dirs in /proc/net/xt_qtaguid/
  ctrl
  stats
  iface_stat/<iface>/...
The uid stats are obtainable in ./stats.

Change-Id: I01af4fd91c8de651668d3decb76d9bdc1e343919
Signed-off-by: JP Abgrall <jpa@google.com>

7 years agonet: wireless: Skip connect warning for CONFIG_CFG80211_ALLOW_RECONNECT
Dmitry Shmidt [Fri, 28 Oct 2011 17:35:37 +0000]
net: wireless: Skip connect warning for CONFIG_CFG80211_ALLOW_RECONNECT

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: Add CFG80211_ALLOW_RECONNECT option
Dmitry Shmidt [Thu, 15 Sep 2011 16:22:35 +0000]
net: wireless: Add CFG80211_ALLOW_RECONNECT option

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: Add get_country_code functionality to platform
Dmitry Shmidt [Tue, 15 Feb 2011 00:58:48 +0000]
net: wireless: Add get_country_code functionality to platform

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonetwork: wireless: Add get_mac_addr functionality to platform
Dmitry Shmidt [Thu, 3 Jun 2010 17:55:33 +0000]
network: wireless: Add get_mac_addr functionality to platform

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agoARM: etm: Power down etm(s) when tracing is not enabled
Arve Hjønnevåg [Thu, 24 Feb 2011 00:51:58 +0000]
ARM: etm: Power down etm(s) when tracing is not enabled

Without this change a saw an 18% increase in idle power consumption
on one deivce when trace support is compiled into the kernel. Now
I see the same increase only when tracing.

Change-Id: I21bb5ecf1b7d29ce3790ceeb5323409cc22d5a3b
Signed-off-by: Arve Hjønnevåg <arve@android.com>

7 years agoARM: etm: Support multiple ETMs/PTMs.
Arve Hjønnevåg [Mon, 16 Apr 2012 07:57:02 +0000]
ARM: etm: Support multiple ETMs/PTMs.

If more than one ETM or PTM are present, configure all of them
and enable the formatter in the ETB. This allows tracing on dual
core systems (e.g. omap4).

Change-Id: I028657d5cf2bee1b23f193d4387b607953b35888
Signed-off-by: Arve Hjønnevåg <arve@android.com>

Conflicts:

arch/arm/kernel/etm.c

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoARM: etm: Return the entire trace buffer if it is empty after reset
Arve Hjønnevåg [Mon, 16 Apr 2012 07:56:13 +0000]
ARM: etm: Return the entire trace buffer if it is empty after reset

On some SOCs the read and write pointer are reset when the chip
resets, but the trace buffer content is preserved. If the status
bits indicates that the buffer is empty and we have never started
tracing, assume the buffer is full instead. This can be useful
if the system rebooted from a watchdog reset.

Change-Id: Iaf21c2c329c6059004ee1d38e3dfff66d7d28029
Signed-off-by: Arve Hjønnevåg <arve@android.com>

Conflicts:

arch/arm/kernel/etm.c

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoARM: etm: Add some missing locks and error checks
Arve Hjønnevåg [Mon, 16 Apr 2012 07:55:42 +0000]
ARM: etm: Add some missing locks and error checks

It is not safe to call etm_lock or etb_lock without holding the
mutex since another thread may also have unlocked the registers.

Also add some missing checks for valid etb_regs in the etm sysfs
entries.

Change-Id: I939f76a6ea7546a8fc0d4ddafa2fd2b6f38103bb
Signed-off-by: Arve Hjønnevåg <arve@android.com>

Conflicts:

arch/arm/kernel/etm.c

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoARM: etm: Configure data tracing
Arve Hjønnevåg [Mon, 16 Apr 2012 07:55:09 +0000]
ARM: etm: Configure data tracing

The old code enabled data tracing, but did not configure the
range. We now configure it to trace all data addresses by default,
and add a trace_data_range attribute to change the range or disable
data tracing.

Change-Id: I9d04e3e1ea0d0b4d4d5bcb93b1b042938ad738b2
Signed-off-by: Arve Hjønnevåg <arve@android.com>

Conflicts:

arch/arm/kernel/etm.c

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoARM: etm: Allow range selection
Arve Hjønnevåg [Mon, 16 Apr 2012 07:54:24 +0000]
ARM: etm: Allow range selection

Trace kernel text segment by default as before, allow tracing of other
ranges by writing a range to /sys/devices/etm/trace_range, or to trace
everything by writing 0 0.

Change-Id: Ibb734ca820fedf79560b20536247f1e1700cdc71
Signed-off-by: Arve Hjønnevåg <arve@android.com>

Conflicts:

arch/arm/kernel/etm.c

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoARM: etm: Don't try to clear the buffer full status after reading the buffer
Arve Hjønnevåg [Mon, 16 Apr 2012 07:53:27 +0000]
ARM: etm: Don't try to clear the buffer full status after reading the buffer

If the write address was at the end of the buffer, toggling the trace
capture bit would set the RAM-full status instead of clearing it, and
if any of the stop bits in the formatter is set toggling the trace
capture bit may not do anything.

Instead use the read position to find out if the data has already
been returned.

This also fixes the read function so it works when the trace buffer is
larger than the buffer passed in from user space. The old version
would reset the trace buffer pointers after every read, so the second
call to read would always return 0.

Change-Id: I75256abe2556adfd66fd5963e46f9e84ae4645e1
Signed-off-by: Arve Hjønnevåg <arve@android.com>

Conflicts:

arch/arm/kernel/etm.c

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agonet: Reorder incoming packets in PPPoLAC and PPPoPNS.
Chia-chi Yeh [Fri, 15 Apr 2011 22:22:09 +0000]
net: Reorder incoming packets in PPPoLAC and PPPoPNS.

PPP handles packet loss but does not work with out of order packets.
This change performs reordering of incoming data packets within a
sliding window of one second. Since sequence number is optional,
receiving a packet without it will drop all queued packets.

Currently the logic is triggered by incoming packets, so queued
packets have to wait till another packet is arrived. It is done for
simplicity since no additional locks or threads are required. For
reliable protocols, a retransmission will kick it. For unreliable
protocols, queued packets just seem like packet loss. Time-critical
protocols might be broken, but they never work with queueing anyway.

Signed-off-by: Chia-chi Yeh <chiachi@android.com>

7 years agoMove x86_64 idle notifiers to generic
Todd Poynor [Thu, 16 Jun 2011 00:21:57 +0000]
Move x86_64 idle notifiers to generic

Move the x86_64 idle notifiers originally by Andi Kleen and Venkatesh
Pallipadi to generic.

Change-Id: Idf29cda15be151f494ff245933c12462643388d5
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agostaging: remove Greg's TODO, now obsolete.
Brian Swetland [Thu, 21 Oct 2010 21:19:31 +0000]
staging: remove Greg's TODO, now obsolete.

Signed-off-by: Brian Swetland <swetland@google.com>

7 years agoARM: Add fiq_glue
Arve Hjønnevåg [Mon, 16 Apr 2012 07:47:46 +0000]
ARM: Add fiq_glue

Change-Id: I27d2554e07d9de204e0a06696d38db51608d9f6b
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Colin Cross <ccross@android.com>

Conflicts:

arch/arm/common/Kconfig
arch/arm/common/Makefile
arch/arm/common/fiq_glue_setup.c

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agonet: activity_stats: Add statistics for network transmission activity
Mike Chan [Fri, 28 May 2010 21:32:19 +0000]
net: activity_stats: Add statistics for network transmission activity

When enabled, tracks the frequency of network transmissions
(inbound and outbound) and buckets them accordingly.
Buckets are determined by time between network activity.

Each bucket represents the number of network transmisions that were
N sec or longer apart. Where N is defined as 1 << bucket index.

This network pattern tracking is particularly useful for wireless
networks (ie: 3G) where batching network activity closely together
is more power efficient than far apart.

New file: /proc/net/stat/activity

output:

Min Bucket(sec) Count
              1 7
              2 0
              4 1
              8 0
             16 0
             32 2
             64 1
            128 0

Change-Id: I4c4cd8627b872a55f326b1715c51bc3bdd6e8d92
Signed-off-by: Mike Chan <mike@android.com>

7 years agostaging: android: lowmemorykiller: Fix task_struct leak
San Mehat [Thu, 6 May 2010 22:40:07 +0000]
staging: android: lowmemorykiller: Fix task_struct leak

As it turns out, the CONFIG_PROFILING interfaces leak a
task struct if the notifier chain returns NOTIFY_OK.. doh.

This patch reworks lowmemkiller to use the new generic task
free notifier chain.

Signed-off-by: San Mehat <san@google.com>

7 years agowlan: Extract generic wlan platform data from tiwlan specific header
Dmitry Shmidt [Mon, 16 Apr 2012 07:41:49 +0000]
wlan: Extract generic wlan platform data from tiwlan specific header

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

Conflicts:

include/linux/wifi_tiwlan.h
include/linux/wlan_plat.h

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoBluetooth: Use the stored LTK for restabilishing security
Vinicius Costa Gomes [Thu, 7 Jul 2011 21:59:41 +0000]
Bluetooth: Use the stored LTK for restabilishing security

Now that it's possible that the exchanged key is present in
the link key list, we may be able to estabilish security with
an already existing key, without need to perform any SMP
procedure.

Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>