Jay Cheng [Mon, 22 Nov 2010 16:03:52 +0000 (11:03 -0500)]
usb: host: tegra: Reduce busy polling duration
Change-Id: I63e271409818e33b4c19bb99b00e556bc5a2a4b3
Signed-off-by: Jay Cheng <jacheng@nvidia.com>
Colin Cross [Wed, 24 Nov 2010 22:56:34 +0000 (14:56 -0800)]
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>
Colin Cross [Wed, 24 Nov 2010 22:52:02 +0000 (14:52 -0800)]
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>
Colin Cross [Wed, 24 Nov 2010 22:49:35 +0000 (14:49 -0800)]
ARM: tegra: dma: Add dma initialzation stub when compiled out
Change-Id: Iac01fa701342a5ed0bbbb1c6e5d38adb401f2d79
Signed-off-by: Colin Cross <ccross@android.com>
Colin Cross [Wed, 24 Nov 2010 22:44:09 +0000 (14:44 -0800)]
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>
Colin Cross [Wed, 24 Nov 2010 22:34:35 +0000 (14:34 -0800)]
ARM: tegra: fuse: Fix warnings
Change-Id: I2793cb8413669dbae8c6ca92572c423e27f46c4e
Signed-off-by: Colin Cross <ccross@android.com>
Colin Cross [Wed, 24 Nov 2010 22:28:50 +0000 (14:28 -0800)]
ARM: tegra: fuse: Remove carriage returns in fuse files
Change-Id: If3675c8ee7a0e0a5d3f7bd0c147054bc3796deef
Signed-off-by: Colin Cross <ccross@android.com>
Allen Martin [Fri, 19 Nov 2010 23:51:50 +0000 (15:51 -0800)]
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>
Allen Martin [Fri, 19 Nov 2010 22:50:50 +0000 (14:50 -0800)]
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>
Allen Martin [Fri, 19 Nov 2010 22:15:34 +0000 (14:15 -0800)]
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>
Jaikumar Ganesh [Sat, 20 Nov 2010 02:23:29 +0000 (18:23 -0800)]
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>
Varun Wadekar [Mon, 25 Oct 2010 04:49:30 +0000 (10:19 +0530)]
[ARM] tegra: support to burn device fuses
Change-Id: Ic12a93d4212b5f9a7802537b8f21e288aa431005
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Varun Wadekar [Mon, 25 Oct 2010 04:31:28 +0000 (10:01 +0530)]
[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>
Varun Wadekar [Sun, 24 Oct 2010 10:55:32 +0000 (16:25 +0530)]
[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>
Jaikumar Ganesh [Mon, 22 Nov 2010 20:05:04 +0000 (12:05 -0800)]
[ARM] tegra: Change size of constants from SZ_64 to 64.
Signed-off-by: Jaikumar Ganesh <jaikumar@google.com>
Iliyan Malchev [Tue, 23 Nov 2010 19:55:27 +0000 (11:55 -0800)]
[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>
Scott Peterson [Tue, 9 Nov 2010 22:22:27 +0000 (16:22 -0600)]
[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>
Chris Fries [Thu, 18 Nov 2010 18:42:15 +0000 (12:42 -0600)]
[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>
Jay Cheng [Mon, 22 Nov 2010 16:03:52 +0000 (11:03 -0500)]
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>
Jay Cheng [Mon, 22 Nov 2010 16:03:52 +0000 (11:03 -0500)]
ARM: tegra: usb_phy: Disable disconnect detection during resume
Change-Id: I30a45dc7e7a87773a93c128877d0f0827e5d44b7
Signed-off-by: Jay Cheng <jacheng@nvidia.com>
Robert Morell [Sat, 20 Nov 2010 03:17:36 +0000 (19:17 -0800)]
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>
Robert Morell [Sat, 20 Nov 2010 02:55:51 +0000 (18:55 -0800)]
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>
Erik Gilling [Fri, 19 Nov 2010 00:21:02 +0000 (16:21 -0800)]
tegra: video: make tegra_dc_is_yuv_planar return bool
Change-Id: I8adaea9eeb20f1c90b33d41a5b462ab8ee515b49
Signed-off-by: Erik Gilling <konkers@android.com>
Ari Hirvonen [Wed, 17 Nov 2010 12:17:40 +0000 (14:17 +0200)]
video: tegra: YUV overlay support
Change-Id: I4bed4d37bc275cca9ef69390c217498529121db0
Signed-off-by: Erik Gilling <konkers@android.com>
Nathan Connell [Thu, 18 Nov 2010 17:12:37 +0000 (11:12 -0600)]
ARM: tegra: usb_phy: Disable HS disconnect detect for USB2 port
Signed-off-by: Nathan Connell <w14185@motorola.com>
Change-Id: Ia0c24128af0f1def38d0902b15a274582c302ce2
Chris Fries [Thu, 11 Nov 2010 23:39:06 +0000 (17:39 -0600)]
[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>
Erik Gilling [Wed, 17 Nov 2010 22:11:59 +0000 (14:11 -0800)]
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>
Jay Cheng [Wed, 10 Nov 2010 23:40:46 +0000 (18:40 -0500)]
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>
Erik Gilling [Fri, 12 Nov 2010 01:39:04 +0000 (17:39 -0800)]
video: tegra: add option to autodetect bitdepth from bootloader
Change-Id: I5f17ab96323b3d313473622f572006d01b4716f7
Signed-off-by: Erik Gilling <konkers@android.com>
James Wylder [Thu, 11 Nov 2010 22:52:32 +0000 (16:52 -0600)]
video: tegra: call disable with interrupts disabled.
Change-Id: Idb126c14f6e18efcb64f3f613772640b8bd3fca0
Signed-off-by: Erik Gilling <konkers@android.com>
Dima Zavin [Thu, 11 Nov 2010 23:28:46 +0000 (15:28 -0800)]
ARM: tegra: flush console before reboot
If the console_sem was held while the system was rebooted, the messages
in the temporary logbuffer would not have propogated to all the console
drivers.
This force releases the console sem if it failed to be acquired.
Change-Id: I6eba9d744ef41209d26328a17c7ae19c32d6e8cb
Signed-off-by: Dima Zavin <dima@android.com>
James Wylder [Thu, 11 Nov 2010 18:55:59 +0000 (12:55 -0600)]
video: add rgb disable handler
Adjust pinmux on disable in order to save power/leakage
Change-Id: I65b642c128a780aa8932205052ccee199e4c41bf
Signed-off-by: James Wylder <james.wylder@motorola.com>
Signed-off-by: Erik Gilling <konkers@android.com>
Dima Zavin [Wed, 10 Nov 2010 18:18:04 +0000 (10:18 -0800)]
media: tegra: avp: fix a mutex leak on an err path in lib load
Also hold the mutex for longer on cleanup, while deleting
the libs nvmap client. Not strictly necessary...
Change-Id: I4dfdb065211571338053a16bacc2e5412c26ae77
Signed-off-by: Dima Zavin <dima@android.com>
Erik Gilling [Wed, 10 Nov 2010 23:32:58 +0000 (15:32 -0800)]
video: tegra: delay HDMI hotplug detection until after resume
Change-Id: I87c35dc3e1287fc1d936e554013deb2f92cbd6f4
Signed-off-by: Erik Gilling <konkers@android.com>
Erik Gilling [Wed, 10 Nov 2010 23:29:35 +0000 (15:29 -0800)]
video: tegra: mark a window's handle as unused when it is
Change-Id: Iedc9a26f62e14c0263f0f315e589a672762ab31a
Signed-off-by: Erik Gilling <konkers@android.com>
Dima Zavin [Tue, 9 Nov 2010 00:59:22 +0000 (16:59 -0800)]
media: video: tegra: add avp port transport info to debug dump
Change-Id: I7ade4469609ecf87663e6a6733842889b27f7ce5
Signed-off-by: Dima Zavin <dima@android.com>
Dima Zavin [Mon, 8 Nov 2010 21:58:04 +0000 (13:58 -0800)]
media: video: tegra: add debugfs entry for tegra_rpc
For now just includes the existing ports, the peer owners,
and the port and peer state.
Change-Id: I2c6b603ca02dc48acc1c763380ff0f1cb66f482b
Signed-off-by: Dima Zavin <dima@android.com>
Dima Zavin [Tue, 9 Nov 2010 18:27:18 +0000 (10:27 -0800)]
media: video: tegra: wait for remote ack on disconnect
Change-Id: I42bf507b7d644184bd27be6ff53e5974dcfa3797
Signed-off-by: Dima Zavin <dima@android.com>
Jay Cheng [Tue, 9 Nov 2010 05:22:28 +0000 (00:22 -0500)]
ARM: tegra: usb_phy: Correct utmi power off sequence
USB_WAKE_ON_CNNT_EN_DEV is only valid when USB controller is in device mode.
Also only one of USB_WAKE_ON_CNNT_EN_DEV and USB_WAKE_ON_DISCON_EN_DEV bits
can be set at any one time.
Change-Id: I76d7fcf73e6ab8fa1610ec4264060c44b221775c
Signed-off-by: Jay Cheng <jacheng@nvidia.com>
Colin Cross [Tue, 9 Nov 2010 23:48:55 +0000 (15:48 -0800)]
ARM: tegra: dvfs: Fix dvfs disable config option
Change-Id: If976cc25147d96fd1130f48301017ce696e38f4f
Signed-off-by: Colin Cross <ccross@android.com>
Colin Cross [Tue, 9 Nov 2010 00:30:48 +0000 (16:30 -0800)]
ARM: tegra: dvfs: Add lock to dvfs_reg
Change-Id: I0496cf37da3a20d697eb4f372c32d01d49352f98
Signed-off-by: Colin Cross <ccross@android.com>
Colin Cross [Tue, 9 Nov 2010 00:30:11 +0000 (16:30 -0800)]
ARM: tegra: dvfs: Fix locking on external dvfs calls
Change-Id: I9e3a3cc8c6c4424d7f7ded22d886d51f715ec5d5
Signed-off-by: Colin Cross <ccross@android.com>
Colin Cross [Tue, 9 Nov 2010 21:50:25 +0000 (13:50 -0800)]
ARM: tegra: dvfs: Add config options to disable dvfs
Change-Id: I401ab5587f28dfabaf0aae1ffa062a2411a1ad92
Signed-off-by: Colin Cross <ccross@android.com>
Erik Gilling [Tue, 9 Nov 2010 21:59:43 +0000 (13:59 -0800)]
[ARM] tegra: cleanup empty functions in mach/fb.h
adds static inline
Change-Id: Iff0473dcc02ad6d10adb878f195b57a2ed6e3e2a
Signed-off-by: Erik Gilling <konkers@android.com>
Erik Gilling [Thu, 4 Nov 2010 20:48:53 +0000 (13:48 -0700)]
video: add short video mode decode to fbmon
Change-Id: Ida529e096688c231029628d3d16d6f8569bfe2c9
Signed-off-by: Erik Gilling <konkers@android.com>
Erik Gilling [Mon, 8 Nov 2010 23:08:40 +0000 (15:08 -0800)]
video: tegra: flush fb_flip workqueue on blank and suspend
Change-Id: I58e9ba73b2fd232e6c1f40946e2e353b90ce5dd7
Signed-off-by: Erik Gilling <konkers@android.com>
Erik Gilling [Fri, 5 Nov 2010 22:30:35 +0000 (15:30 -0700)]
video: tegra: fix crash when no HDMI modes are supported
Change-Id: I2e23d018d5acb814e7a088921c26c8f305790442
Signed-off-by: Erik Gilling <konkers@android.com>
Dima Zavin [Mon, 8 Nov 2010 21:55:34 +0000 (13:55 -0800)]
media: video: tegra: add ref count for remote clock requests
Change-Id: I824f9a27bfefe86211bc71d5f79ea798052b98b7
Signed-off-by: Dima Zavin <dima@android.com>
Dima Zavin [Mon, 1 Nov 2010 21:29:31 +0000 (14:29 -0700)]
ARM: tegra: make vcp/bsea/vde clocks be owned by the AVP
Change-Id: Ic0c3b1dc5cdccf5220d8c6cc8c7ef7883b28a4d1
Signed-off-by: Dima Zavin <dima@android.com>
Dima Zavin [Mon, 1 Nov 2010 21:31:05 +0000 (14:31 -0700)]
ARM: tegra: add avp platform_device
Change-Id: I8229873e1a450b75d31e6ea4ec64647b88d16844
Signed-off-by: Dima Zavin <dima@android.com>
Dima Zavin [Mon, 1 Nov 2010 21:24:21 +0000 (14:24 -0700)]
media: video: tegra: add support for the AVP media offload engine
Change-Id: Ia72e022ad1217ffe75915465ca0e886b16d1a64a
Signed-off-by: Dima Zavin <dima@android.com>
Dima Zavin [Mon, 1 Nov 2010 21:20:17 +0000 (14:20 -0700)]
media: video: tegra: Add Tegra RPC support for tegra multimedia framework
Change-Id: I9233c5d7c678f6a9ba1c23af686137bf4d6a4291
Signed-off-by: Dima Zavin <dima@android.com>
Dima Zavin [Wed, 3 Nov 2010 17:26:42 +0000 (10:26 -0700)]
ARM: tegra: add avp mailbox address to iomap
Change-Id: I5472f6b6c2b8dd955843efd07d0b31d0f379fee6
Signed-off-by: Dima Zavin <dima@android.com>
Dima Zavin [Thu, 4 Nov 2010 02:08:48 +0000 (19:08 -0700)]
ARM: tegra: add missing spdif device declaration in header
Change-Id: If447711b095ec7025f3bbe232e22444839054927
Signed-off-by: Dima Zavin <dima@android.com>
Todd Poynor [Sat, 6 Nov 2010 01:22:08 +0000 (18:22 -0700)]
ARM: tegra: Don't include idle time in irqsoff/preemptoff tracers
Surprise bonus change: Rename tegra_enter_idle to more accurately reflect
what it does.
Change-Id: I1237e1271df693c109b9db8b47421f8a4c3043c3
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Iliyan Malchev [Fri, 5 Nov 2010 20:03:35 +0000 (13:03 -0700)]
[ARM] tegra_i2s/spdif_audio: move allow_suspend to a work queue
Since pm_qos_update_request() may block, we need to make sure that
allow_suspend is always called in process context.
Signed-off-by: Iliyan Malchev <malchev@google.com>
Rebecca Schultz Zavin [Fri, 5 Nov 2010 20:13:50 +0000 (13:13 -0700)]
Revert "tegra: video: nvmap: Printk if nvmap alloc fails"
This reverts commit
e3ad53ad739afae7e8a4252c807a195e2311cfa7.
Rebecca Schultz Zavin [Thu, 4 Nov 2010 21:39:07 +0000 (14:39 -0700)]
video: tegra: host: Add nvmap client name
Passes a name to nvmap_create_client so it can be tracked
for debugging.
Change-Id: I47c958549c29fb3d5299f6c693e1be79b27a29f3
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Rebecca Schultz Zavin [Thu, 4 Nov 2010 21:35:57 +0000 (14:35 -0700)]
video: tegra: fb: Add nvmap client name
Passes a name to nvmap_create_client so it can be tracked
for debugging.
Change-Id: Id4aa9804d8cc8c04c44f51602362435fb877d1af
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Rebecca Schultz Zavin [Thu, 4 Nov 2010 21:12:37 +0000 (14:12 -0700)]
video: tegra: nvmap: Add names to nvmap client
This modifies the api to allow the user to specify a name
for their clients. This will allow the system to track
allocations from the kernel by name.
Change-Id: I44aad209bc54e72126be3bebfe416b30291d206c
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Rebecca Schultz Zavin [Thu, 4 Nov 2010 19:28:13 +0000 (12:28 -0700)]
video: tegra: nvmap: Move debug info to debugfs
Moves the file tracking clients to debugfs
Add a debugfs file to track the list of allocations per client
Change-Id: I2bb683e3ac0599fa05d962c79ef0b7cbd0007d75
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Colin Cross [Wed, 3 Nov 2010 18:42:20 +0000 (11:42 -0700)]
ARM: tegra: common: Reduce sclk to 120 MHz
Set pll_m_out1, sclk, and hclk to 120 MHz, and pclk to 60 MHz.
Drivers that require a faster bus speed can use a shared bus clock
reference to increase the sclk frequency up to 240 MHz, which will
also increase pll_m_out1, hclk, and pclk.
Change-Id: Ic491da80de1d95e6550cf9351eae185210f55b2a
Signed-off-by: Colin Cross <ccross@android.com>
Colin Cross [Fri, 5 Nov 2010 00:10:09 +0000 (17:10 -0700)]
serial: tegra_hsuart: Fix sleeping while atomic
Move the flush_work outside of stop_tx, do it during suspend and
shutdown instead. Move the tty portion of the tx work into
the dma complete callback, and only handle polling on the fifo and
then requeuing the dma in the work function.
Change-Id: I56db6504d35e5e7019379dc8a4323b4a27c72e59
Signed-off-by: Colin Cross <ccross@android.com>
Colin Cross [Wed, 3 Nov 2010 23:32:15 +0000 (16:32 -0700)]
ARM: tegra: clock: Add a pass-through set_rate to super clocks
Change-Id: I55027c93415a59cbf701b1f30e436203316c0d61
Signed-off-by: Colin Cross <ccross@android.com>
Colin Cross [Tue, 2 Nov 2010 00:30:33 +0000 (17:30 -0700)]
ARM: tegra: suspend: use clk_get_rate_all_locked
Signed-off-by: Colin Cross <ccross@android.com>
Change-Id: I2d4bfd8728998903f9cff4a0f1ab41e76bdc02d7
Colin Cross [Tue, 2 Nov 2010 00:27:29 +0000 (17:27 -0700)]
ARM: tegra: dvfs: Get rid of dvfs_lock and move init later
Get rid of dvfs_lock, replacing it with the cansleep flag on clocks.
Clocks with the cansleep flag set will lock a mutex before calling
into dvfs.
Also does the regulator api calls during late init, after the
regulators have been probed.
Signed-off-by: Colin Cross <ccross@android.com>
Change-Id: I5b8bd249bd4f3ae495f2076f1e6d2bfb38737f29
Colin Cross [Tue, 2 Nov 2010 00:25:30 +0000 (17:25 -0700)]
ARM: tegra: clock: Redo clock locking
Give each clock its own lock, and remove all lock traversals from
parent to child clocks to prevent AB-BA deadlocks.
Signed-off-by: Colin Cross <ccross@android.com>
Change-Id: I0afb7d1bca956439b1a4f17bbc6748aaec706b49
Colin Cross [Tue, 2 Nov 2010 00:24:32 +0000 (17:24 -0700)]
ARM: tegra: clock: Drop set_rate on audio clocks
Signed-off-by: Colin Cross <ccross@android.com>
Change-Id: Idabc71386e7a2fba214d243405e70149faf47a8e
Colin Cross [Tue, 2 Nov 2010 00:17:47 +0000 (17:17 -0700)]
ARM: tegra: dvfs: Disable dvfs on sdmmc
The sdhci core calls clock functions with a spinlock held, which
conflicts with the mutex in dvfs clocks. Disable dvfs on sdmmc
for now.
Signed-off-by: Colin Cross <ccross@android.com>
Change-Id: I59c0648ab6718571794e082d1f4828f158d00031
Rebecca Schultz Zavin [Wed, 3 Nov 2010 23:42:26 +0000 (16:42 -0700)]
tegra: video: nvmap: Printk if nvmap alloc fails
Prints a log message if the nvmap allocate ioctl fails.
Change-Id: Ia0777bc2fcd665dafff0f8948b01faad3f552d72
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Chris Fries [Wed, 3 Nov 2010 17:45:26 +0000 (12:45 -0500)]
[ARM] tegra_i2s_audio: add support for master/slave switching
- Remove duplicate code between probe() and resume(), make new function
i2s_configure()
- When master, pass the sample rate from the board info
- Clean up some checkpatch.pl complaints.
Change-Id: I0169d9a70c02eaf2173b1f1941a545792c01bc6b
Signed-off-by: Iliyan Malchev <malchev@google.com>
Chris Fries [Mon, 25 Oct 2010 03:48:17 +0000 (22:48 -0500)]
[ARM] tegra_spdif_audio: add timeout to prevent flush deadlock
Signed-off-by: Iliyan Malchev <malchev@google.com>
Chris Fries [Mon, 25 Oct 2010 03:48:17 +0000 (22:48 -0500)]
[ARM] tegra_i2s_audio: add timeout to prevent flush deadlock
Signed-off-by: Iliyan Malchev <malchev@google.com>
Rebecca Schultz Zavin [Mon, 1 Nov 2010 22:39:10 +0000 (15:39 -0700)]
media: video: tegra: add basic camera/isp support
The tegra_camera device includes all clock and regulator
functionality needed to support camera on tegra.
Change-Id: I281f1cb5f360276af832309e35dbe17c98b62bb3
Signed-off-by: Dima Zavin <dima@android.com>
Ravindra Lokhande [Mon, 27 Sep 2010 17:53:41 +0000 (12:53 -0500)]
[ARM] tegra: driver for spdif audio
Creates /dev/spdif_out and /dev/spdif_out_ctl for playback and control
settings. Playback is working.
Signed-off-by: Iliyan Malchev <malchev@google.com>
Dima Zavin [Mon, 1 Nov 2010 22:46:57 +0000 (15:46 -0700)]
ARM: configs: update tegra_defconfig to enable regulators
Change-Id: I64e0f2ef1f57d4d2dc86143145f396dfeb4abe46
Signed-off-by: Dima Zavin <dima@android.com>
Erik Gilling [Sat, 30 Oct 2010 01:01:24 +0000 (18:01 -0700)]
video: tegra: set memory priority higher on DC init
Change-Id: I4196a994b7f83f524fb4bd728e2cb58b8cc078e3
Signed-off-by: Erik Gilling <konkers@android.com>
Erik Gilling [Sat, 30 Oct 2010 00:59:33 +0000 (17:59 -0700)]
[ARM] tegra: add API to set memory client priority
Change-Id: Id9b157004f7364fb1f7aaffa925b710dcfb90e86
Signed-off-by: Erik Gilling <konkers@android.com>
Erik Gilling [Fri, 29 Oct 2010 22:05:23 +0000 (15:05 -0700)]
video: tegra: add underflow stats to debug output
Change-Id: Id878f8e7791fa4fa63be1fd39978023ad4f7f93a
Signed-off-by: Erik Gilling <konkers@android.com>
Rebecca Schultz Zavin [Thu, 28 Oct 2010 03:52:19 +0000 (20:52 -0700)]
video: tegra: nvmap: Fix handle ref counting
In the current implementation handles hold references to a
client and clients hold references to their handles. As a
result when a process terminates it's handles can't be cleaned
up and we leak memory. Instead only hold references to handles
from clients.
Change-Id: Iba699e740a043deaf0a78b13b4ea01544675078f
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Colin Cross [Wed, 27 Oct 2010 23:17:57 +0000 (16:17 -0700)]
serial: tegra_hsuart: Remove suspend log spam
Change-Id: I22045608426ff317e6dd7e6f4c8b408f40aeb75f
Signed-off-by: Colin Cross <ccross@android.com>
Colin Cross [Wed, 27 Oct 2010 23:17:40 +0000 (16:17 -0700)]
ARM: tegra: suspend: Remove log spam
Change-Id: I6ad42216d74254351f050d2a895681e5f87f269e
Signed-off-by: Colin Cross <ccross@android.com>
Colin Cross [Wed, 27 Oct 2010 23:05:41 +0000 (16:05 -0700)]
Revert "video: tegra: add hdmi switch_dev for hotplug notifications"
This reverts commit
831bbd76da80cf5c7986262e39c872dfc0262a95.
Colin Cross [Wed, 27 Oct 2010 21:15:19 +0000 (14:15 -0700)]
ARM: tegra: suspend: Disable FIQs in suspend
Change-Id: I9aaba8c0cada6efcdcc0fe8633f643ec5609b198
Signed-off-by: Colin Cross <ccross@android.com>
Rebecca Schultz Zavin [Tue, 26 Oct 2010 23:41:40 +0000 (16:41 -0700)]
video: tegra: nvmap: Track carveout clients
This patch adds the ability to track the total allocations in a
given carveout heap by client. It also adds a sys file to print
the list of clients, their pids and their respective carveout sizes
Change-Id: I34fc97c3be574d2bd30d7594320ff05f6e13c476
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Jay Cheng [Wed, 27 Oct 2010 15:45:19 +0000 (11:45 -0400)]
usb: host: ehci: Add missed memory barrier in the hcd driver
There is one wmb missing in the usb host controller driver after the queue head
update. Due to this data transaction is not happening on the bus after urb
submission by the hcd driver. Register updates/queue heads data in the memory
is not reflected on the AHB bus. After adding the wmb after queue head update
data transaction the USB bus started with out any delay.
originally fixed by Venkat Moganty <vmoganty@nvidia.com>
Change-Id: Ic834df5172ac2f2eb3bced317d38b4a2e7a44801
Signed-off-by: Jay Cheng <jacheng@nvidia.com>
Greg Meiste [Wed, 8 Sep 2010 18:38:36 +0000 (13:38 -0500)]
[ARM] tegra: Setup regulators for suspend
The regulator framework may need to change certain regulators when
entering suspend.
Change-Id: I584e92b3c32cbd1a63325831822e2704a3dd2774
Signed-off-by: Greg Meiste <w30289@motorola.com>
Iliyan Malchev [Fri, 20 Aug 2010 17:22:10 +0000 (10:22 -0700)]
[ARM] tegra: hsuart: use a workqueue in the tx dma callback
Signed-off-by: Iliyan Malchev <malchev@google.com>
Iliyan Malchev [Fri, 20 Aug 2010 17:22:10 +0000 (10:22 -0700)]
[ARM] tegra: dma: switch to nonthreaded interrupts
Signed-off-by: Iliyan Malchev <malchev@google.com>
Erik Gilling [Wed, 27 Oct 2010 04:05:43 +0000 (21:05 -0700)]
video: tegra: fix dvfs for hdmi
Change-Id: I4e6eef34a1e794e622bec10c9025b3820cd6ba8d
Signed-off-by: Erik Gilling <konkers@android.com>
Colin Cross [Wed, 27 Oct 2010 03:33:24 +0000 (20:33 -0700)]
ARM: tegra: dvfs: hdmi can not be an auto dvfs clock
The hdmi block contains a divider that is not visible to the clock
subsystem, prevent auto dvfs on it so that clk_set_rate can set the
input clock higher than 148.5 MHz.
Change-Id: I7f09f4d099e2f24166a65b1b582fe16c1451deba
Signed-off-by: Colin Cross <ccross@android.com>
Erik Gilling [Tue, 26 Oct 2010 22:30:35 +0000 (15:30 -0700)]
video: tegra: flesh out edid support
* read blocks in a single command instead of byte at a time
* allow reading past segment 0 (edid > 256 bytes)
* handle mutiple extention blocks
* add debugfs file for reading edid
Change-Id: Iec8182cdbccdaa2142e4bbc892202d2e8d73c23b
Signed-off-by: Erik Gilling <konkers@android.com>
Erik Gilling [Tue, 26 Oct 2010 22:29:11 +0000 (15:29 -0700)]
video: tegra: transmute HDMI modes into supported ones
Change-Id: I37222e9d1617a0ace062e05740365cfe5c0c2af8
Signed-off-by: Erik Gilling <konkers@android.com>
Erik Gilling [Tue, 26 Oct 2010 22:21:23 +0000 (15:21 -0700)]
video: tegra: allow setting output mode without changing fb geometry
Change-Id: I0a723b4e68c99d2727e12d2c26f1506b1f634f8a
Signed-off-by: Erik Gilling <konkers@android.com>
Erik Gilling [Tue, 26 Oct 2010 21:25:48 +0000 (14:25 -0700)]
video: tegra: add IOCTL for querying modes
Change-Id: Ic312271b96a8bb8d8b2696448d3ff7fd73a7a851
Signed-off-by: Erik Gilling <konkers@android.com>
Colin Cross [Wed, 27 Oct 2010 00:33:31 +0000 (17:33 -0700)]
ARM: tegra: clock: Don't restore PLLP registers
The PLLP registers are now being restored by the low-level resume code,
and the CPU may be running off PLLP, so don't touch them during clock
resume.
Change-Id: Ida248a929c8b59f2e51f43dbbef1cd792ef68737
Signed-off-by: Colin Cross <ccross@android.com>
Colin Cross [Wed, 27 Oct 2010 00:32:13 +0000 (17:32 -0700)]
ARM: tegra: suspend: Save and restore PLLP in low-level suspend
Save and restore the PLLP registers in the platform suspend code, as
the CPU clock may be sourced from the PLLP registers later, before
the clock resume that used to re-enable PLLP has been called.
Change-Id: I0ffc18d8a7f2d62c544328bd44ca7cf62848bc44
Signed-off-by: Colin Cross <ccross@android.com>
Iliyan Malchev [Thu, 21 Oct 2010 23:48:37 +0000 (16:48 -0700)]
[ARM] tegra: dma: expose TEGRA_DMA_MAX_TRANSFER_SIZE, fix typo
NV_DMA_MAX_TRASFER_SIZE --> TEGRA_DMA_MAX_TRANSFER_SIZE
Signed-off-by: Iliyan Malchev <malchev@google.com>
Iliyan Malchev [Wed, 20 Oct 2010 23:48:18 +0000 (16:48 -0700)]
[ARM] tegra: dma: make checkpatch happy
Signed-off-by: Iliyan Malchev <malchev@google.com>
Colin Cross [Mon, 25 Oct 2010 23:23:09 +0000 (16:23 -0700)]
ARM: tegra: clock: Fix warning
Change-Id: I2c175f65b7e7db234f7317e7c51aeea65d33d555