Commit Graph

211924 Commits

Author SHA1 Message Date
Chris Fries
e8d9abdf7b [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>
2010-11-03 13:05:04 -07:00
Chris Fries
47e55a567c [ARM] tegra_spdif_audio: add timeout to prevent flush deadlock
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-11-02 19:43:33 -07:00
Chris Fries
8e1fb0fece [ARM] tegra_i2s_audio: add timeout to prevent flush deadlock
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-11-02 19:43:33 -07:00
Rebecca Schultz Zavin
44da1b533e 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>
2010-11-02 16:19:11 -07:00
Ravindra Lokhande
53bb435d8d [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>
2010-11-02 14:10:42 -07:00
Dima Zavin
624287cd63 ARM: configs: update tegra_defconfig to enable regulators
Change-Id: I64e0f2ef1f57d4d2dc86143145f396dfeb4abe46
Signed-off-by: Dima Zavin <dima@android.com>
2010-11-01 15:47:16 -07:00
Erik Gilling
fcb400c604 video: tegra: set memory priority higher on DC init
Change-Id: I4196a994b7f83f524fb4bd728e2cb58b8cc078e3
Signed-off-by: Erik Gilling <konkers@android.com>
2010-10-29 18:11:07 -07:00
Erik Gilling
a03616950e [ARM] tegra: add API to set memory client priority
Change-Id: Id9b157004f7364fb1f7aaffa925b710dcfb90e86
Signed-off-by: Erik Gilling <konkers@android.com>
2010-10-29 18:11:07 -07:00
Erik Gilling
913a6a0a1c video: tegra: add underflow stats to debug output
Change-Id: Id878f8e7791fa4fa63be1fd39978023ad4f7f93a
Signed-off-by: Erik Gilling <konkers@android.com>
2010-10-29 15:09:33 -07:00
Rebecca Schultz Zavin
95b5312b0f 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>
2010-10-28 18:05:59 -07:00
Colin Cross
84b33d62a4 serial: tegra_hsuart: Remove suspend log spam
Change-Id: I22045608426ff317e6dd7e6f4c8b408f40aeb75f
Signed-off-by: Colin Cross <ccross@android.com>
2010-10-28 17:51:22 -07:00
Colin Cross
f3fadd743d ARM: tegra: suspend: Remove log spam
Change-Id: I6ad42216d74254351f050d2a895681e5f87f269e
Signed-off-by: Colin Cross <ccross@android.com>
2010-10-28 17:51:22 -07:00
Colin Cross
c6069ff5ff Revert "video: tegra: add hdmi switch_dev for hotplug notifications"
This reverts commit 831bbd76da.
2010-10-28 17:51:21 -07:00
Colin Cross
4060ab885f ARM: tegra: suspend: Disable FIQs in suspend
Change-Id: I9aaba8c0cada6efcdcc0fe8633f643ec5609b198
Signed-off-by: Colin Cross <ccross@android.com>
2010-10-28 17:51:21 -07:00
Rebecca Schultz Zavin
179ad42101 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>
2010-10-28 17:19:56 -07:00
Jay Cheng
b0d63aa773 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>
2010-10-28 12:45:46 -07:00
Greg Meiste
2b32d2a33a [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>
2010-10-27 18:15:49 -07:00
Iliyan Malchev
281032d649 [ARM] tegra: hsuart: use a workqueue in the tx dma callback
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-10-27 17:55:40 -07:00
Iliyan Malchev
8418a2dfad [ARM] tegra: dma: switch to nonthreaded interrupts
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-10-27 17:55:00 -07:00
Erik Gilling
e92acc7f00 video: tegra: fix dvfs for hdmi
Change-Id: I4e6eef34a1e794e622bec10c9025b3820cd6ba8d
Signed-off-by: Erik Gilling <konkers@android.com>
2010-10-26 21:06:39 -07:00
Colin Cross
9319898210 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>
2010-10-26 21:05:08 -07:00
Erik Gilling
157e610c36 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>
2010-10-26 18:20:13 -07:00
Erik Gilling
e4886b1e1b video: tegra: transmute HDMI modes into supported ones
Change-Id: I37222e9d1617a0ace062e05740365cfe5c0c2af8
Signed-off-by: Erik Gilling <konkers@android.com>
2010-10-26 18:20:13 -07:00
Erik Gilling
06d191b17b video: tegra: allow setting output mode without changing fb geometry
Change-Id: I0a723b4e68c99d2727e12d2c26f1506b1f634f8a
Signed-off-by: Erik Gilling <konkers@android.com>
2010-10-26 18:20:13 -07:00
Erik Gilling
185ddab215 video: tegra: add IOCTL for querying modes
Change-Id: Ic312271b96a8bb8d8b2696448d3ff7fd73a7a851
Signed-off-by: Erik Gilling <konkers@android.com>
2010-10-26 18:20:13 -07:00
Colin Cross
72c7a306e9 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>
2010-10-26 17:42:21 -07:00
Colin Cross
ff7dc25c7f 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>
2010-10-26 17:42:21 -07:00
Iliyan Malchev
f18c9f31a0 [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>
2010-10-26 11:11:10 -07:00
Iliyan Malchev
008a6926f3 [ARM] tegra: dma: make checkpatch happy
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-10-26 11:11:09 -07:00
Colin Cross
7c10ae2d59 ARM: tegra: clock: Fix warning
Change-Id: I2c175f65b7e7db234f7317e7c51aeea65d33d555
2010-10-25 18:46:20 -07:00
Colin Cross
a98fd00b27 ARM: tegra: Remove debugging from tegra_move_framebuffer
Change-Id: I012b3b565faefe60e7ce581f748905d3baab6da4
Signed-off-by: Colin Cross <ccross@android.com>
2010-10-25 18:46:20 -07:00
Colin Cross
62cd11583c ARM: tegra: suspend: Track the amount of time spent in suspend
Change-Id: Iee5ec7da45d3405846d8655104d9736eccedb713
Signed-off-by: Colin Cross <ccross@android.com>
2010-10-25 18:46:20 -07:00
Colin Cross
0ecadc39ae ARM: tegra: timer: Fix us timer time after resume from LP1
In LP1 suspend, or during a failed LP0 suspend, the core power is
not turned off and the timer register is not reset.  Saving the
timer value during suspend and adding it to the offset after resume
will cause the timer value to double for each suspend cycle.

To fix, when resuming subtract the current value of the timer
register from the offset.  Also, use the rtc registers to add
the time that passed during suspend.

Change-Id: I9f7ee2089b98cf66af45271f8478fbd9eb2ee250
Signed-off-by: Colin Cross <ccross@android.com>
2010-10-25 18:46:20 -07:00
Colin Cross
683a9ff2df ARM: tegra: timer: Remove 32k clocksource
The 32k clocksource is never used, because it is always registered
at the same time as the us clocksource, which has a higher rating.
Using the 32k clocksource would cause a race condition with the
tegra_rtc driver on the RTC shadow registers.  Remove the 32k
clocksource, add a replacement tegra_read_rtc_ms function for the
suspend code to track suspend time, and add a comment on
read_persistent_clock that it should never be called while the
tegra_rtc driver is running.  It is currently only called from
timekeeping init, suspend, and resume.

Change-Id: Ic964578e9923b0f0338959f75de1ac170f850337
Signed-off-by: Colin Cross <ccross@android.com>
2010-10-25 18:46:20 -07:00
Colin Cross
73fd3806b4 ARM: tegra: irq: Add debugfs file to show wake irqs
Change-Id: I66124275869d5f83024937010e14018b7980bb05
Signed-off-by: Colin Cross <ccross@android.com>
2010-10-25 18:46:19 -07:00
Colin Cross
dccfbe43e3 ARM: tegra: cpuidle: Keep statistics on idle wake interrupts
Change-Id: Ieaee455b4e52f232c5b1285756c22bcdc7fdc6b4
Signed-off-by: Colin Cross <ccross@android.com>
2010-10-25 18:46:19 -07:00
Colin Cross
1c83ad292d ARM: tegra: suspend: Fix compile issues with CONFIG_SMP=n
Move suspend pagetable creation to suspend.c
Always compile headsmp-t2.S, it's needed for LP2 resume

Change-Id: I9e23c6bf72fff3e98e0549edf1f85bec823a3a38
Signed-off-by: Colin Cross <ccross@android.com>
2010-10-25 18:46:19 -07:00
Colin Cross
1d583e43c3 ARM: tegra: cpuidle: Fix compile issues with CONFIG_SMP=n
Change-Id: Id02744bcdfc079a6091be2e8a736bcd3a6cc0ba6
Signed-off-by: Colin Cross <ccross@android.com>
2010-10-25 18:46:19 -07:00
Colin Cross
b1a196f10a ARM: tegra: cpufreq: Fix compile issues with CONFIG_SMP=n
Change-Id: Id678df6299adfc23a4321ddaff10b4c64a4ed895
Signed-off-by: Colin Cross <ccross@android.com>
2010-10-25 18:46:19 -07:00
James Wylder
86db6643b3 [ARM] tegra: cpuidle define power_specified
Turn on the cpuidle_device power_specified field
to enable usage of the defined cpuidle_state.power_usage fields
for each state.

Signed-off-by: James Wylder <james.wylder@motorola.com>

Change-Id: Ibca20a937bf4079f61e4b3ae64394d797b4eb287
Signed-off-by: Todd Poynor <toddpoynor@google.com>
2010-10-25 17:05:35 -07:00
Colin Cross
f729366c17 ARM: tegra: clock: Remove dependency between "set" and debugfs
Change-Id: I732f9428096d057e08092120c6f8c2890230a242
2010-10-25 15:06:14 -07:00
Colin Cross
348d21313d video: tegra: dc: Call dvfs functions
Change-Id: If3cca5da2abc5e6c3671c8c23af90cd4e029db5c
Signed-off-by: Colin Cross <ccross@android.com>
2010-10-25 15:06:14 -07:00
Colin Cross
9655d3117e [ARM] tegra: dvfs: Convert cpu to new dvfs, add core dvfs tables
Change-Id: I4020943ee10026866b29302aac177a5bdc259184
Signed-off-by: Colin Cross <ccross@android.com>
2010-10-25 14:57:44 -07:00
Colin Cross
d86613c649 [ARM] tegra: clock: Refcount periph clock enables
Some peripheral clocks share enable bits.  Refcount the enables so
that calling clk_disable on one clock will not turn off another
clock.

Change-Id: Iefb015bc83cac77b3faef8db86cfc42b25c0b6ae
Signed-off-by: Colin Cross <ccross@android.com>
2010-10-25 14:57:42 -07:00
Colin Cross
e99be0bd23 [ARM] tegra: clock: Add shared bus clock type
Change-Id: If8022248049e790030f1480f37a074401e24d54c
Signed-off-by: Colin Cross <ccross@android.com>
2010-10-25 14:57:41 -07:00
Colin Cross
4fb700a34f [ARM] tegra: clock: Move unshared clk struct members into union
Change-Id: I4e03194d4a86c73eea4773fbdcaf773e06b6eebf
Signed-off-by: Colin Cross <ccross@android.com>
2010-10-25 14:57:40 -07:00
Colin Cross
bc77f9721e [ARM] tegra: clock: Rearrange static clock tables
Change-Id: I90078bf5e9eaa0fa64681e2ed77c7ac7f7d31804
Signed-off-by: Colin Cross <ccross@android.com>
2010-10-25 14:57:39 -07:00
Colin Cross
8f716a774a [ARM] tegra: clock: Add new dvfs
New and improved dvfs:
Registered dynamically during init
Exports dvfs functions to control clocks that are not visible to
  the clock subsystem
Supports multiple regulators per clock
Fix dvfs on disabled clocks
Adds /d/clock/dvfs to show current voltage requirements

Change-Id: I93794a7761dccc702566e8850bb79f344ff787a2
Signed-off-by: Colin Cross <ccross@android.com>
2010-10-25 14:57:38 -07:00
Colin Cross
011cc07a11 [ARM] tegra: clock: Drop old CPU dvfs
Change-Id: Iaa5377dd1d8bf32e90deb668053c10588642fa03
Signed-off-by: Colin Cross <ccross@android.com>
2010-10-25 14:41:36 -07:00
Colin Cross
69250e7b06 [ARM] tegra: cpufreq: Remove cansleep from clk api
Change-Id: I97614cac27da66a95664664143952f376fc5462e
Signed-off-by: Colin Cross <ccross@android.com>
2010-10-25 14:41:35 -07:00