Commit Graph

212014 Commits

Author SHA1 Message Date
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
Jaikumar Ganesh
44fcde3cc9 serial: tegra_hsuart: Use resources instead of platform data.
Use resources to pass data to tegra_hsuart to set
mapbase, irq.

Signed-off-by: Jaikumar Ganesh <jaikumar@google.com>
2010-11-24 15:11:24 -08:00
Varun Wadekar
9e6a2ba103 [ARM] tegra: support to burn device fuses
Change-Id: Ic12a93d4212b5f9a7802537b8f21e288aa431005
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2010-11-23 16:44:00 -08:00
Varun Wadekar
c3b77692f4 [ARM] tegra: fuse read/write apis for fuse burning
expose fuse register read and write apis for fuse
burning

Change-Id: Id6785f5506fe9293ddb5072240f49470ca5fcd08
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2010-11-23 16:44:00 -08:00
Varun Wadekar
e8903adee3 [ARM] tegra: use dma to read/write fuse registers
tegra2 hangs if fuse registers are accessed during an apb dma
operation. war is to use apb dma to read/write fuse registers
instead.

Change-Id: I4d99a1ad56115c0d73e9cd0679cf38f70f922f3d
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2010-11-23 16:44:00 -08:00
Jaikumar Ganesh
1ff693aee0 [ARM] tegra: Change size of constants from SZ_64 to 64.
Signed-off-by: Jaikumar Ganesh <jaikumar@google.com>
2010-11-23 14:40:55 -08:00
Iliyan Malchev
e9ccef1e98 [ARM] tegra_spdif_audio: support continuous DMA mode
-- Add support for contnuous single-buffered DMA
-- Remove PIO support
-- Added suspend and resume functionality

Signed-off-by: Scott Peterson <speterson@nvidia.com>
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-11-23 13:49:39 -08:00
Scott Peterson
3707e1c4af [ARM] tegra_spdif_audio: Enable 16 bit packed mode
Enable 16 bit packed fifo format mode to work avoid
channel swapping when dma underrun occurs.

Added suspend/resume functionality so spdif registers
are restored.

Change-Id: Id80e7903b81fd3b3b84af08dba40196121eb6cb7
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-11-22 15:41:17 -08:00
Chris Fries
230015ed6a [ARM] tegra: i2s: Continuous DMA support
- Refactor DMA interactions to handle continuous single-buffered DMA
- Remove PIO support (obsolete, conflicts with new buffer management)
- Remove sample rate conversion (obsolete)
- Remove error-reporting logic
- Remove TEGRA_AUDIO_IN/OUT_GET/SET_BUF_CONFIG
- Add TEGRA_AUDIO_IN/OUT_GET/SET_NUM_BUFS

Change-Id: I8f21a0bb314aac3b7d1bb4918bda9141e58db38d
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-11-22 15:41:10 -08:00
Jay Cheng
ea1a88753b usb: host: tegra: rewrite usb suspend/resume routine.
Tegra host controller will time the resume operation to clear the bit
when the port control state switches to HS or FS Idle. This behavior
is different from EHCI where the host controller driver is required
to set this bit to a zero after the resume duration is timed in the
driver.

Poll PORT_SUSPEND bit till the suspend is completed. Write PORT_RESUME to 0
to clear PORT_SUSPEND bit.

Disable disconnect detection during resume.

Change-Id: I30a45dc7e7a87773a93c128877d0f0827e5d44b7
Signed-off-by: Jay Cheng <jacheng@nvidia.com>
2010-11-22 13:05:49 -08:00
Jay Cheng
c543614360 ARM: tegra: usb_phy: Disable disconnect detection during resume
Change-Id: I30a45dc7e7a87773a93c128877d0f0827e5d44b7
Signed-off-by: Jay Cheng <jacheng@nvidia.com>
2010-11-22 13:05:38 -08:00
Robert Morell
d6f7633ef2 video: tegra: host: Fix bounds-checking
The length of the mod_locks array is NV_HOST1X_NB_MLOCKS, not
NV_HOST1X_SYNCPT_NB_PTS.

Change-Id: Ibce054bb8a168f2b83646745f2b62cd282b8ff9d
Signed-off-by: Robert Morell <rmorell@nvidia.com>
Acked-by: Erik Gilling <konkers@android.com>
2010-11-19 19:26:36 -08:00
Robert Morell
d340f9224d video: tegra: Scale colors in pseudopalette
This fixes incorrect colors drawn by clients such as fbconsole.  As
described by skeletonfb's fb_setcolreg: "The values supplied have a 16
bit magnitude which needs to be scaled in this function for the
hardware."

Tested with both r8g8b8 and r5g6b5 pixel depths and fbconsole.

Change-Id: Ie3c3579502ddab8843a8a4dc7049c6efaa5d0ac1
Signed-off-by: Robert Morell <rmorell@nvidia.com>
Acked-by: Erik Gilling <konkers@android.com>
2010-11-19 19:19:25 -08:00
Erik Gilling
a60ea58ebe tegra: video: make tegra_dc_is_yuv_planar return bool
Change-Id: I8adaea9eeb20f1c90b33d41a5b462ab8ee515b49
Signed-off-by: Erik Gilling <konkers@android.com>
2010-11-18 16:27:52 -08:00
Ari Hirvonen
9a3e1502d5 video: tegra: YUV overlay support
Change-Id: I4bed4d37bc275cca9ef69390c217498529121db0
Signed-off-by: Erik Gilling <konkers@android.com>
2010-11-18 16:06:46 -08:00
Nathan Connell
5915336cb1 ARM: tegra: usb_phy: Disable HS disconnect detect for USB2 port
Signed-off-by: Nathan Connell <w14185@motorola.com>
Change-Id: Ia0c24128af0f1def38d0902b15a274582c302ce2
2010-11-18 15:37:25 -08:00
Chris Fries
c706cd5d9c [ARM] tegra: dma: Single buffered continuous DMA
- Added "single buffer continuous DMA" mode in addition to the
  "double buffer continuous DMA" mode that is already implemented
- Changed the queuing of next buffer to be more flexible for
  continuous DMA.  It can now get in-flight right after a transfer
  starts, or whenever the client enqueues a buffer.

Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-11-17 23:07:23 -08:00
Erik Gilling
482c7cd4fa video: tegra: fill in transparency info in 32bpp FB mode
also remove incorrect support for 24bpp

Change-Id: Ic6528760bf2585ca5e7a2a68a200e3346694505e
Signed-off-by: Erik Gilling <konkers@android.com>
2010-11-17 14:13:33 -08:00
Jay Cheng
91e80b7924 usb: host: tegra: Remove programing PTC bits based on bus speed.
Program PTC bits as NORMAL_OP is enough when resume.

Change-Id: I229eb3ef2ebaff72d023179502ec7a8904e87682
Signed-off-by: Jay Cheng <jacheng@nvidia.com>
2010-11-15 11:34:03 -08:00
Erik Gilling
7a58a0e87e video: tegra: add option to autodetect bitdepth from bootloader
Change-Id: I5f17ab96323b3d313473622f572006d01b4716f7
Signed-off-by: Erik Gilling <konkers@android.com>
2010-11-11 18:02:29 -08:00
James Wylder
8cb73bc101 video: tegra: call disable with interrupts disabled.
Change-Id: Idb126c14f6e18efcb64f3f613772640b8bd3fca0
Signed-off-by: Erik Gilling <konkers@android.com>
2010-11-11 18:02:29 -08:00