Commit Graph

212034 Commits

Author SHA1 Message Date
Benoit Goby
bad2e94f96 usb: ehci: Reduce overhead of the scan_periodic loop
scan_periodic is called with irq disabled. Merged Alan Stern's patch
to reduce the overhead of scan_periodic:

http://article.gmane.org/gmane.linux.usb.general/37441
Here is a patch which ought to reduce the overhead of the loop. It
avoids doing the expensive call to qh_completions() more than once
for each qh.

Change-Id: I218c75a1ce21edd3d58c7e8abd3e7f75880b6ad0
Signed-off-by: Benoit Goby <benoit@android.com>
2010-12-09 13:14:21 -08:00
Colin Cross
85f7f645fb media: video: tegra: avp_svc: Force memory bus to full when avp is enabled
Change-Id: I51382f58f296df939f99d60926ba97f0b4e04aed
Signed-off-by: Colin Cross <ccross@android.com>
2010-12-08 19:44:29 -08:00
Colin Cross
a1243f6783 video: tegra: dc: Force memory bus to full when display is enabled
Change-Id: Ia9dfef275561fdb3b6f0a37ae0535684a60cb63e
Signed-off-by: Colin Cross <ccross@android.com>
2010-12-08 19:44:28 -08:00
Colin Cross
94ef9a634f ARM: tegra: cpufreq: Adjust memory frequency with cpu frequency
Change-Id: I08c64f64a12bcb11e7c0e466fa77fe971e4b2cba
Signed-off-by: Colin Cross <ccross@android.com>
2010-12-08 19:44:28 -08:00
Colin Cross
a4c4c835d5 ARM: tegra: dvfs: Add emc clock to dvfs table
Change-Id: Id93dcd0f4cac3164ab776bc4e68d836724b59bee
Signed-off-by: Colin Cross <ccross@android.com>
2010-12-08 19:44:27 -08:00
Colin Cross
7312d0e19c ARM: tegra: clocks: Add emc scaling
Change-Id: Ica5ee704dd35b5fbf02d8c030a8578d5e8694839
Signed-off-by: Colin Cross <ccross@android.com>
2010-12-08 19:44:26 -08:00
Colin Cross
931788acdb ARM: tegra: Add external memory controller driver
Change-Id: Idcef38723b504719a09537612f2f94ad163844f5
Signed-off-by: Colin Cross <ccross@android.com>
2010-12-08 18:12:09 -08:00
Colin Cross
a8f05581f7 ARM: tegra: clock: Round rate before dvfs
Call the clock's round_rate op, if it exists, before setting
dvfs rate.  Ensures dvfs is set to the rate the clock will
be at after the later call to set_rate.

Change-Id: I4c8e85991238492adc3c37aed57c7269f3b41a2c
Signed-off-by: Colin Cross <ccross@android.com>
2010-12-08 18:12:08 -08:00
Robert Morell
0e3fe9b394 video: tegra: nvmap: Clear handle->owner on release
A struct nvmap_handle may be shared by multiple clients.  If the
original client (the handle "owner") is destroyed, but the handle is
still referenced by other clients, h->owner points to freed memory.  To
prevent this, clear h->owner when the owner frees its reference to that
struct nvmap_handle.

Change-Id: I54722091568ce2058f5988e5f6e00e68605a8100
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2010-12-06 19:26:21 -08:00
Rebecca Schultz Zavin
c0132a6dfe video: tegra: nvmap: Fix per client accounting
Fix the way the total number of carveout allocations is
managed per client.

Change-Id: I3e12e2a98a74cafc1f4c51a48e3c3c549e930160
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2010-12-06 19:26:21 -08:00
Chris Fries
d65dc80617 [ARM] tegra: spdif/i2s audio: fixes
-- release can take a long time

Releasing the out file handles can take a long time, because
we wait for a stop completion that may never arrive.

-- fix possible dma list corruption

If things have gone wrong and a "wait_till_stopped()" times
out, prevent list corrption in the DMA by dequeing any
queued requests.

Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-12-06 18:06:00 -08:00
Varun Wadekar
4d9275dc23 tegra: video: host: remove cancelled actions at power down
Change-Id: I2a82ecadafacec53990db25cb456809dbffd999b
Author: Alex Frid <afrid@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2010-12-06 14:18:13 -08:00
Varun Wadekar
9383458939 tegra: video: host: reset syncpoints on host initialization
Added syncpoints reset to host initialization, to synchronize h/w state
with shadow variables.

Change-Id: Ia0a3a644dc5b30ef98158906bcc96954d1c613ff
Author: Alex Frid <afrid@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2010-12-06 14:18:12 -08:00
Varun Wadekar
58045312bf video: tegra: host: Added nvhost resume.
Added nvhost device resume function, and moved syncpoints restoration
here from run-time power_host() control. Respectively added syncpoints
saving to nvhost suspend procedure. This change is required, since
power_host() has no way to account for display advancing syncpoints
after they have been already saved.

Change-Id: I2b5452dd4512c7ea16532d28a2d2894ab88929ca
Author: Alex Frid <afrid@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2010-12-06 14:17:52 -08:00
Varun Wadekar
80824fb0f9 [ARM] tegra: ventana: fix gpio key for menu options
Change-Id: Ia6e5f92fa6f965832546dde95e10b00419396386
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2010-12-06 15:14:21 +05:30
Danny Huang
e1f65c5ad7 regulator: tps6586x: Handle both enable reg/bits being the same
Change-Id: I40400bb65eab496bb1becd26b37a9653b99d4f41
Signed-off-by: Danny Huang <dahuang@nvidia.com>
Signed-off-by: Olof Johansson <olofj@chromium.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  (Split into separate patches)
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-05 15:59:23 -08:00
Danny Huang
07e159fba7 regulator: tps6586x: correct register table
Correct the register table for SM2, LDO8, RTC

Change-Id: I45348cec5ffbb7da9bd7523764fb611b537236b8
Signed-off-by: Danny Huang <dahuang@nvidia.com>
Signed-off-by: Olof Johansson <olofj@chromium.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-05 15:59:23 -08:00
Danny Huang
30e9d119c1 regulator: tps6586x: Add missing bit mask generation
Change-Id: I76eaceb31b56264f6978af15db1e6fc7e2e01b5a
Signed-off-by: Danny Huang <dahuang@nvidia.com>
Signed-off-by: Olof Johansson <olofj@chromium.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  (Split into separate patches)
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-05 15:59:22 -08:00
Danny Huang
6ea91c8300 regulator: tps6586x: Fix TPS6586X_DVM to store goreg/bit
Change-Id: Idacf5e1e51dbbbcd5ea93f310a4e907977e7359e
Signed-off-by: Danny Huang <dahuang@nvidia.com>
Signed-off-by: Olof Johansson <olofj@chromium.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  (Split into separate patches)
  (Minor formatting fixes)
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-05 15:59:21 -08:00
Benoit Goby
cd1bc93404 Revert "usb: host: tegra: Remove programing PTC bits based on bus speed."
This reverts commit 91e80b7924.

This is needed to resume usb from lp0
2010-12-03 17:45:58 -08:00
Dmitriy Gruzman
b01b6774ca [ARM] tegra: cpufreq: Support for tegra cpu throttling
Change-Id: I28d69d22437b6ba2d22e4ce12746630786006071
Signed-off-by: Dmitriy Gruzman <dmitriy.gruzman@motorola.com>
2010-12-03 17:38:31 -08:00
Benoit Goby
3cf8cfddc7 usb: gadget: fsl_udc: Fix a race between ep_disable and ep_queue
Fixed a possible null pointer exception when an endpoint gets
disabled while a request is being enqueued in parallel.

Unmap the request buffer if we fail to enqueue the request.

Change-Id: If94cc278c2e6ab58adcf170511e676348365f3f9
Signed-off-by: Benoit Goby <benoit@android.com>
2010-12-03 14:02:44 -08:00
Michael I. Gold
1538e53fbc video: tegra: fix DC_CMD_STATE_CONTROL_UPDATE register values
Change-Id: I4a3e009244b7894e02f9fa440ea8e65578e451f0
Signed-off-by: Erik Gilling <konkers@android.com>
2010-12-02 15:00:03 -08:00
Andrei Warkentin
5e4f94d29f ARM: tegra: suspend: Fix build with CONFIG_CACHE_L2X0=n
Change-Id: I85c3a98d0c9f61153969649bb9de20a9158e9ee4
Signed-off-by: Andrei Warkentin <andreiw@motorola.com>
2010-12-02 14:38:24 -08:00
Chris Fries
3d8c542754 [ARM] tegra_i2s_audio: don't turn off hardware during over/underflow
-- Leave I2S running during underflow, for a couple of reasons.
   First, the I2S buffers a few samples, and if we get a new write
   before those samples are flushed, we will keep continuous audio
   Second, we burn CPU time stopping and restarting the HW
   frequently.

-- Fix TEGRA_AUDIO_IN/OUT_GET/SET_NUM_BUFS, was causing DMA to
   read/write to null HW address.

Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-12-02 14:08:50 -08:00
Chris Fries
66feb38823 [ARM] tegra: dma: Remove spam log
"Interrupt during enqueue" happens periodically when the
DMA is almost starving.  This happens under certain not-
uncommon scenarios.

Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-12-02 12:55:29 -08:00
Colin Cross
4e6feb548e ARM: tegra: dvfs: Allow boot or run time disabling of dvfs rails
Change-Id: Ie56cbf4ade1bbdb5835851f3c09668c1e0941a2c
Signed-off-by: Colin Cross <ccross@android.com>
2010-12-01 18:14:07 -08:00
Colin Cross
6270fe1708 ARM: tegra: Add dvfs rails
The previous version of dvfs handled requirements between two
different voltage rails by using two sets of dvfs tables, one
for each rail.  That method fails for vdd_aon, which must be
within 170 mV of vdd_core.

Instead, have each dvfs clock only set the voltage rail that
it directly depends on, and add a relationship system to the
voltage rails.  When the voltage changes on one rail, it calls
update on all the rails that depend on it.  The dependent rails
compare the new voltage of the original rail to their own
voltage, and update their own voltage as necessary.

Change-Id: I17b30a61c7c0c01e44702ab486238789abd47330
Signed-off-by: Colin Cross <ccross@android.com>
2010-12-01 18:14:06 -08:00
Colin Cross
33745e8d51 Revert "ARM: tegra: dvfs: Fix locking on external dvfs calls"
This reverts commit f58886c359.

Change-Id: Ie88d8f79db9bf958fc3b9f261d74d031785161d0
2010-12-01 18:14:06 -08:00
Erik Gilling
360f46b91c video: tegra: fix vblank detection
Change-Id: Ib74cbbb0d703c782f64f93930cd234359107021c
Signed-off-by: Erik Gilling <konkers@android.com>
2010-12-01 18:05:02 -08:00
Colin Cross
fb127f4e45 ARM: tegra: clock: Allow any clock to be a shared clock
Change-Id: I7e6be30c7870e8b00a165f99655cd95b917fc6db
Signed-off-by: Colin Cross <ccross@android.com>
2010-12-01 15:18:58 -08:00
Erik Gilling
7682da908f video: tegra: set up high priority on all overlays
this drastically reduces display controller underruns

Change-Id: I7d57c53cf61db4aac5d1baeb0e31b3a5d6fe9e67
Signed-off-by: Erik Gilling <konkers@android.com>
2010-12-01 13:33:26 -08:00
James Wylder
4f3ccb6342 ARM: tegra: enable emc clock updates after lp0
Write a dummy value to EMC_MRW_0 to allow
clock frequency changes after lp0.

Change-Id: I2218967eaf9698eef6dcfe2e3edd89fbce2ebf1a
Signed-off-by: James Wylder <james.wylder@motorola.com>
2010-11-30 18:18:47 -08:00
Varun Wadekar
2b1aded57f [ARM] tegra: ventana: fix volume up gpio
Change-Id: Ie0e25ee8074f4625feb7473f4d5ce759597ed035
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2010-11-30 16:42:25 -08:00
Iliyan Malchev
fce57c09a4 [ARM] tegra2_clocks: remove incorrectly-defined frequencies
Definitions for 11.2896MHz and 12.288MHz were incorrect.  These
frequencies can be still requested through pll_a_out0.

Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-11-30 16:34:42 -08:00
Iliyan Malchev
98a55bb337 [ARM] tegra_i2s_audio: remove unnecessary clocks
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-11-30 16:30:30 -08:00
Jay Cheng
61186dc145 [tegra i2c] add de-bounce cycles.
Change-Id: I3549105bb1d1a7803a300849ddba9c17dad1efba
Signed-off-by: Ken Radtke <kradtke@nvidia.com>
2010-11-30 15:25:04 -08:00
Dima Zavin
888f286631 media: video: tegra: avp: turn off chatty avp/rpc debug logging
Change-Id: I3f9025285fc5a002dbd436ee76bb6ca757c425ea
Signed-off-by: Dima Zavin <dima@android.com>
2010-11-30 12:35:01 -08:00
Dima Zavin
b55ca2cdb0 media: video: tegra: avp: make avp_svc have separate debug mask
Change-Id: Ib5490a7f7d294760d34a3b9da14281ad96c9b26c
Signed-off-by: Dima Zavin <dima@android.com>
2010-11-30 12:35:00 -08:00
Dima Zavin
154526bf83 media: video: tegra: properly drop refs to sclk on cleanup
Change-Id: I7af31dc4cd1e2d7a4142f6265665a05ca4f41d15
Signed-off-by: Dima Zavin <dima@android.com>
2010-11-30 12:35:00 -08:00
Jay Cheng
3b3f0cbc77 usb: host: tegra: Reduce busy polling duration
Change-Id: I63e271409818e33b4c19bb99b00e556bc5a2a4b3
Signed-off-by: Jay Cheng <jacheng@nvidia.com>
2010-11-29 12:29:39 -08:00
Colin Cross
a4c245e920 ARM: tegra: clock: Fix cpu pll table entry for 608MHz
The 608 MHz table entry would incorrectly produce a 760 MHz
clock for input clocks of 12 MHz, 13 MHz, or 26 MHz.

Change-Id: I6755fdde88f0851770490818dc2e5e1e2d512f20
Signed-off-by: Colin Cross <ccross@android.com>
2010-11-24 21:49:11 -08:00
Colin Cross
6236e32391 ARM: tegra: Rearrange subsystem initialization order
Fuses must be initialized before clocks, so clocks can
determine the maximum cpu frequency.  Clocks must be
initialized before DMA, so DMA can enable the clock.
Once DMA is initialized, all fuses accesses must go
through DMA to avoid a hardware bug.

Change-Id: Id1f58e4f43152ec19000e02f2d1ea45abf141f9c
Signed-off-by: Colin Cross <ccross@android.com>
2010-11-24 21:49:11 -08:00
Colin Cross
745d9c84e5 ARM: tegra: dma: Add dma initialzation stub when compiled out
Change-Id: Iac01fa701342a5ed0bbbb1c6e5d38adb401f2d79
Signed-off-by: Colin Cross <ccross@android.com>
2010-11-24 21:49:11 -08:00
Colin Cross
ad42ec4398 ARM: tegra: fuse: Separate fuse dma initialization
There is a dependency loop between fuses, clocks, and APBDMA.
If dma is enabled, fuse reads must go through APBDMA to avoid
corruption due to a hw bug.  APBDMA requires a clock to be
enabled.  Clocks must read a fuse to determine allowable cpu
frequencies.

Separate out the fuse DMA initialization, and allow the fuse
read and write functions to be called without using DMA before
the DMA initialization has been completed.  Access to the fuses
before APBDMA is initialized won't hit the hardware bug because
nothing else can be using DMA.

Change-Id: Ib5cb0f346488f2869e8314c5f3b24fd86873f4c3
Signed-off-by: Colin Cross <ccross@android.com>
2010-11-24 21:49:11 -08:00
Colin Cross
5310d336e1 ARM: tegra: fuse: Fix warnings
Change-Id: I2793cb8413669dbae8c6ca92572c423e27f46c4e
Signed-off-by: Colin Cross <ccross@android.com>
2010-11-24 21:49:11 -08:00
Colin Cross
62f4ae5f7b ARM: tegra: fuse: Remove carriage returns in fuse files
Change-Id: If3675c8ee7a0e0a5d3f7bd0c147054bc3796deef
Signed-off-by: Colin Cross <ccross@android.com>
2010-11-24 21:49:11 -08:00
Allen Martin
febad2cd1e ARM: tegra: suspend: protect suspend functions with CONFIG_PM
Protect suspend/resume functions behind #ifdef CONFIG_PM.  This
prevents a compile error with CONFIG_PM turned off.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Signed-off-by: Colin Cross <ccross@android.com>
2010-11-24 16:28:34 -08:00
Allen Martin
287241377f ARM: tegra: irq: protect irq suspend with CONFIG_PM
Protect irq suspend/resume functions behind #ifdef CONFIG_PM.
This prevents a link error if CONFIG_PM is turned off.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Signed-off-by: Colin Cross <ccross@android.com>
2010-11-24 16:28:34 -08:00
Allen Martin
1b8f8a55f1 usb: host: tegra: protect bus suspend with CONFIG_PM
Protect the bus suspend/resume functions behind #ifdef CONFIG_PM.
This prevents a compile error if CONFIG_PM is turned off.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Signed-off-by: Colin Cross <ccross@android.com>
2010-11-24 16:28:34 -08:00