Commit graph

212,625 commits

Author SHA1 Message Date
Dmitriy Gruzman
41fec00c4b watchdog: tegra_wdt: Several changes to watchdog driver
Fix not re-enabling watchdog resume if it was enabled in probe
Add clearing watchdog interrupt in probe
Remove tegra_wdt_set_timeout

Change-Id: I8fdbb6da3eda64a85a73ed85ab979a5ee0261c37
Signed-off-by: Dmitriy Gruzman <dmitriy.gruzman@motorola.com>
2011-01-25 17:12:59 -08:00
Benoit Goby
3f0fad7ec4 usb: host: tegra: Request 400MHz emc clock
while USB is active to eliminate all USB buffer underruns.

Change-Id: I9977224601e715e950284708958be98d37b3e6b1
Signed-off-by: Nathan Connell <w14185@motorola.com>
2011-01-25 12:37:56 -08:00
Benoit Goby
2418fe42cc usb: gadget: tegra_udc: Request 400MHz emc clock
while USB is active to eliminate all USB buffer underruns.

Change-Id: I7ad8ebfa2d802f91b81839e14fde906da1a0569e
Signed-off-by: Nathan Connell <w14185@motorola.com>
2011-01-25 12:37:50 -08:00
Rebecca Schultz Zavin
82fa87e2ca video: tegra: nvmap: Several changes to carveout killer
-Add a module param to enable/disable carveout killer
-Fix race condition in code to wait for something to free memory
after firing carveout killer
-Fix the check for current so we always compare task->group_leaders

Change-Id: Ie030978827dce6b0fbbfa1db0d80e4abe59eaa51
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2011-01-24 15:44:07 -08:00
Erik Gilling
22dcde2e84 video: tegra: incresase delay in underflow recovery
Change-Id: I8093c83a2749c63b6ece051cc9b892d87e55fe04
Signed-off-by: Erik Gilling <konkers@android.com>
2011-01-24 15:35:28 -08:00
Erik Gilling
28b85f11c6 video: tegra: dump host state when timing out on suspend
Change-Id: I718fb071ac74f5a051a7d5b9fcdd782163ed48b6
Signed-off-by: Erik Gilling <konkers@android.com>
2011-01-24 12:37:38 -08:00
Colin Cross
3edd9628c0 ARM: tegra: Prevent dynamically ioremapping device io memory
Change-Id: I893a42bd773b1acdf2b83f8602fe1aa6a8ea6741
Signed-off-by: Colin Cross <ccross@android.com>
2011-01-21 17:05:18 -08:00
Colin Cross
5d8b46b6df ARM: tegra: Statically map all device io memory
Change-Id: I0c750b766dcdd166ddff6317b93556f9f5cce899
Signed-off-by: Colin Cross <ccross@android.com>
2011-01-21 17:05:16 -08:00
Benoit Goby
66eaaf9564 usb: gadget: tegra: Enable emc clock while usb is connected
Change-Id: Icb94c516a580e29b42b1899e622c9b91f8701dd2
Signed-off-by: Benoit Goby <benoit@android.com>
2011-01-20 15:42:52 -08:00
Benoit Goby
1df24cc5cf ARM: tegra: clocks: Add shared emc clocks for usb gadget
Change-Id: Idf1982fac02b987cb16ef89509cfe4d72953d1e5
Signed-off-by: Benoit Goby <benoit@android.com>
2011-01-20 15:41:58 -08:00
Benoit Goby
1b02fb1f5c usb: host: tegra: Enable emc clock while usb is resumed
Change-Id: I03a102f40134686fabbd5cfa1830816a691cf876
Signed-off-by: Benoit Goby <benoit@android.com>
2011-01-20 15:19:33 -08:00
Benoit Goby
d3cd98591c ARM: tegra: clocks: Add shared emc clocks for ehci driver
Change-Id: I02f9d798159e14007fa2e5abfc3493a2d779d515
Signed-off-by: Benoit Goby <benoit@android.com>
2011-01-20 15:19:32 -08:00
Jay Cheng
69f118a448 ARM: tegra: DVFS: set 1.2V core voltage for USB to work
Change-Id: Idb7822329f1975307748a72d1786da68c0635738
Signed-off-by: Jay Cheng <jacheng@nvidia.com>
2011-01-20 15:19:32 -08:00
Benoit Goby
ba487c7c5e usb: host: tegra: Fix SetPortFeature PORT_SUSPEND
This fixes a regression where hubs cannot detect new devices once they
have been auto-suspended.

Change-Id: I4b3efcaa9634b9a912060e438527000bbc83dc32
Signed-off-by: Benoit Goby <benoit@android.com>
2011-01-18 19:40:17 -08:00
Benoit Goby
b3328e4c67 usb: host: tegra: Fix resuming low speed devices from lp0
Change-Id: I9576853bbe0fae52c5c2cfab26ce8f2017077d4e
Signed-off-by: Benoit Goby <benoit@android.com>
2011-01-18 17:14:04 -08:00
Benoit Goby
d72d507ae9 ARM: tegra: usb_phy: Program DPDM_OBSERVE depending on the device speed
Low speed devices require a K-state resume signaling instead of J.

Change-Id: Ic06011f45c2b0f4cd969d018f2783acea57cb510
Signed-off-by: Benoit Goby <benoit@android.com>
2011-01-18 17:13:53 -08:00
Varun Wadekar
65a1f91c2f crypto: tegra-aes: perf: remove unnecessary polling and memset
Change-Id: I69731fcd50933ccea73542d046c3c5d86d03fcd9
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2011-01-15 16:44:22 +05:30
Colin Cross
684defe4fd video: tegra: host: Force memory bus to full when using 2d, 3d or mpe
Change-Id: I7138af5d26c3f406537bc4b2bc4bb052de37f7bf
Signed-off-by: Colin Cross <ccross@android.com>
2011-01-14 15:28:21 -08:00
Colin Cross
11dc248e04 ARM: tegra: clock: Add shared emc clock for tegra_grhost
Change-Id: Ie2814726d151777140c20d2bc0a3c1a3822043a8
Signed-off-by: Colin Cross <ccross@android.com>
2011-01-14 15:28:20 -08:00
Colin Cross
5feeeb6ace ARM: tegra: clock: Add round_rate op for shared clocks
Change-Id: Ica3f9fd9db4fe38f2c9ca3fc248526211f59c622
Signed-off-by: Colin Cross <ccross@android.com>
2011-01-14 15:28:20 -08:00
Mayuresh Kulkarni
cea5c11234 video: tegra: host: disable MPE auto-power-gate
It is seen that auto-power-gate of MPE causes some issues when long run
camera stress test is run. The issue manifest itself in the form of
MPE sync-point not getting triggered from hardware and hence the caller
who is waiting on it hangs up the system.

Disabling auto-power-gate for MPE seems to resolve this issue.

Original work of Jay Cheng <jacheng@nvidia.com>
Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>

Change-Id: Iaef9f959cbc00dd715352ca637955cd2bea6f355
2011-01-14 15:28:19 -08:00
Rebecca Schultz Zavin
5be6f571ae video: tegra: nvmap: Several fixes to the carveout killer
-Modify the carveout killer to only kill tasks with lower priorities
than the one that's trying to allocate
-After delivering a sigkill to a task, wait for something to exit and
cleanup before retrying the allocation

Change-Id: If62b6ed008a73fc3c347ff26735a83eee284909e
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2011-01-12 17:37:17 -08:00
Sergey Kudakov
683d3f2a8f video: tegra: reset default window in release
Change-Id: I242e9fac525472c5c20f213a6de516f95b2f6a12
Cc: Sergey Kudakov <sergey.kudakov@motorola.com>
Signed-off-by: Erik Gilling <konkers@android.com>
2011-01-12 17:00:36 -08:00
Ken Sumrall
82bc79e717 crypto: tegra-aes: Hack to disable HW AES for dm-crypt
The hardware aes engine is required for key management for
HDCP, but since it's performance is bad, we don't want it
enabled for dm-crypt.  This hack changes the cra_name field
so dm-crypt won't find a match, but leaves the cra_driver_name
field unchanged to the device file interface will still find it.

Signed-off-by: Ken Sumrall <ksumrall@android.com>
2011-01-12 15:58:37 -08:00
Varun Wadekar
67c21536bf crypto: tegra-aes: improve encrypt/decrypt performance
- enable/disable clocks only once per request
- create a thread for handling the driver's work queue
- always set vde clocks to the max before processing a request

Change-Id: I935e5523e9e913c93705cc694f8a475d212c15ce
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2011-01-13 02:29:14 +05:30
Rebecca Schultz Zavin
b7cb0ccbfe video: tegra: nvmap: Don't store task struct for kernel threads
No need to maintain a reference to the task struct if the client
is a kernel thread.  In this case just set the task to NULL.

Change-Id: Ica4785388932f6b298eeb0da04b78b0e1cdc3a44
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2011-01-12 11:14:55 -08:00
Varun Wadekar
1c10dcd996 crypto: tegra-aes: call INIT_COMPLETION before setting the transfer
Change-Id: I368a9bf8aa1c311532e54d18a813b556576b8da1
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2011-01-12 00:08:22 -08:00
Varun Wadekar
269ae7240f crypto: tegra-aes: do not reset bsev/vde per operation
avp does not use the crypto engine inside the vde block,
so it is ok if we do not reset the entire block before
any crypto operation. this would save more than 100us per crypto
operation.

Change-Id: I4e6f4940c5b6e95498b6f7a62498fbf956e25254
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2011-01-12 00:08:09 -08:00
Eric Laurent
a8ac34d55b [ARM] tegra_i2s_audio: fixed several issues
- Acquire the DMA request spinlock in dma_tx_complete_callback()
(this was omitted)
- allow_suspend() was called by mistake in start_recording_if_necessary()
every time it was executed which could cause the wake lock to be
released during audio capture.

Signed-off-by: Eric Laurent <elaurent@google.com>
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-01-11 20:09:34 -08:00
Colin Cross
55bfef75ea ARM: tegra: clock: Round frequency up in clock dividers
When picking clock divider values, the clock framework picks
the closest frequency that is lower than the requested
frequency.  If the value from a clock divider rounds down,
and then the new rounded down frequency is requested, it
will get rounded down again, resulting in a frequency two
steps lower than the original requested frequency.

Fix the problem by rounding up when calculating the frequency
coming out of a clock divider, so if that frequency is
requested again, the same divider value will be picked.

Change-Id: Ieaf74448f67d91aeb7ba08226e48c092d8afaa2b
Signed-off-by: Colin Cross <ccross@android.com>
2011-01-11 16:59:55 -08:00
Erik Gilling
4ce07d6140 video: tegra: work around overlay corruption on underflows
Overlays can get their internal state corrupted during and underflow
condition.  The only way to fix this state is to reset the DC.  If we get
4 consecutive frames with underflows, assume we're hosed and reset.

Change-Id: Icdf61517837c8570b8de35f585075de08aa35fe7
Signed-off-by: Erik Gilling <konkers@android.com>
Cc: Michael I. Gold <gold@nvidia.com>
2011-01-11 16:35:08 -08:00
Rebecca Schultz Zavin
8df53e4599 watchdog: tegra_wdt: Several changes to watchdog driver
Add a config option to enable the watchdog driver from probe
Reduce the default timeout to 30 seconds
Read the reset reason and print a messge if the last reboot was
	due to watchdog reset

Change-Id: I7500ef236089b06ffcff3d8e7d86a5b9060b59cb
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2011-01-11 15:49:02 -08:00
Colin Cross
a8075881c1 ARM: tegra: clock: Save and restore audio clock during suspend
Change-Id: Id1c7a6c8e8679995ad462f17309c2f3550c00da1
Signed-off-by: Colin Cross <ccross@android.com>
2011-01-11 12:15:44 -08:00
Colin Cross
08da711a74 ARM: tegra: clock: Save and restore plld, plls, and pllu in suspend
HDMI was not working after LP0 because the plld were being reset
during suspend.  plls and pllu were also not being saved.  Add
all three to tegra_clk_suspend.

The lock time for plld is 1000 us, so increase the delay after
setting the PLLs.

Add a BUG_ON to ensure the size of the suspend context area is
correct.

Originally fixed by Mayuresh Kulkarni.

Original-author: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Change-Id: I50a3e994c6e3cab5989aa7a8e26e7a2eb66b6dfb
Signed-off-by: Colin Cross <ccross@android.com>
2011-01-10 18:56:11 -08:00
Benoit Goby
f7120584fa ARM: tegra: Fix powergate_debugfs_init return value
Change-Id: Iff865e0f74e1667aa6e998a63d33d3b4cd09694c
Signed-off-by: Benoit Goby <benoit@android.com>
2011-01-10 15:16:51 -08:00
Rebecca Schultz Zavin
0479121df7 video: tegra: nvmap: Add carveout killer
This change attempts to reclaim carveout memory by killing
other carveout users when an allocation fails.  Processes
are killed in order of priority from lowest to highest, and then
from largest to smallest users.

Change-Id: Iee8a6f36269bc8165d691000a153dbf9f4337775
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2011-01-10 12:37:27 -08:00
Stephen Warren
962feda6df ARM: tegra: pll_a clock fixes
Increase the max_frequency entries for clocks that can be driven from pll_a
to match the fastest pll_a table entry.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Colin Cross <ccross@android.com>
2011-01-09 19:18:07 -08:00
Stephen Warren
aa49ac169f ARM: tegra: Prevent requeuing in-progress DMA requests
If a request already in the queue is passed to tegra_dma_enqueue_req,
tegra_dma_req.node->{next,prev} will end up pointing to itself instead
of at tegra_dma_channel.list, which is the way a the end-of-list
should be set up. When the DMA request completes and is list_del'd,
the list head will still point at it, yet the node's next/prev will
contain the list poison values. When the next DMA request completes,
a kernel panic will occur when those poison values are dereferenced.

This makes the DMA driver more robust in the face of buggy clients.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Colin Cross <ccross@android.com>
2011-01-09 19:18:04 -08:00
Lowell Dennis
178b6def88 rtc: tps6586x: Fix error in RTC tick calculations
In the TPS6586x PMU/PMIC RTC support code, when
converting from seconds to ticks using a shift
operator, the most significant bits were being lost
due to seconds being a 32-bit value and ticks being
a 64-bit value.  A hard cast was added to avoid this
loss.

Reviewed-by: Lowell Dennis <ldennis@nvidia.com>
Tested-by: Lowell Dennis <ldennis@nvidia.com>
Reviewed-by: Jonathan Mayo <jmayo@nvidia.com>
Reviewed-by: Peter Zu <pzu@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Signed-off-by: Robert Morell <rmorell@nvidia.com>
Signed-off-by: Colin Cross <ccross@android.com>
2011-01-09 19:18:01 -08:00
Jay Cheng
e750de624e usb: ehci: tegra: continues driving FS-J during resume
To prevent USB glitch.
Also only program PTC bits when resume from LP0

Change-Id: Iced668e33f986828d3a483b411055948b5b257e1
Signed-off-by: Jay Cheng <jacheng@nvidia.com>
2011-01-09 17:41:59 -08:00
Jay Cheng
cfdeb3d801 ARM: tegra: usb_phy: continues driving FS-J during resume
to prevent USB glitch.

Change-Id: Iced668e33f986828d3a483b411055948b5b257e1
Signed-off-by: Jay Cheng <jacheng@nvidia.com>
2011-01-09 17:41:58 -08:00
Jay Cheng
edd66078f5 usb: ehci: tegra: remove reschedule rh_timer
Reschedule rh_timer may cause usb device resume fail, as rh_timer may be
timeout and send USB_REQ_GET_STATUS SETUP control transfer by the time when
the device is handling clear suspend feature, which in turn the device may
drop clear suspend feature request.

Actually on port resume case, the host driver don't need to reschedule
rh_timer to check port status. The host driver will check port status right
after suspend feature is cleared.

Change-Id: I6205e97af49ed4349b6215b851f6b5f1394258d8
Signed-off-by: Jay Cheng <jacheng@nvidia.com>
2011-01-09 17:21:58 -08:00
Colin Cross
db23c5ae58 ARM: tegra: powergate: Allow calling power up when already powered
Allow calling tegra_powergate_sequence_power_up on a partition
that is already powered.  Reset the partition, and return success
with the clock enabled.

Change-Id: I776c6a84091f0bb8faca22d87b3fabf0cfede564
Signed-off-by: Colin Cross <ccross@android.com>
2011-01-08 14:42:59 -08:00
Todd Poynor
4b1622335d NCT1008 temperature sensor driver
Replace the PM-only driver for NCT1008 with a new version written by
Varun Wadekar and Dmitriy Gruzman.  Add a callback to an alarm
function specified in the board platform data.

Change-Id: Ib429533930ee75af3402d24b0bc286da9f6ee67b
Signed-off-by: Todd Poynor <toddpoynor@google.com>
2011-01-07 20:42:59 -08:00
Greg Meiste
63b6d550a6 misc: Initial NCT1008 driver
Initial version of the NCT1008 driver to turn off the sensor when the
device is suspended.  This improves standby current drain.

Change-Id: Ia64613c33c0052434d5e304c434605611e5ef789
Signed-off-by: Greg Meiste <w30289@motorola.com>
2011-01-07 20:37:34 -08:00
Erik Gilling
d38b03a9f6 video: tegra: fix debug regs file hang
Change-Id: I2bdfe5ec9f69b7b7960e59bec76fb9b02b61f3fb
Signed-off-by: Erik Gilling <konkers@android.com>
2011-01-07 18:52:42 -08:00
Colin Cross
bd842b53fa Merge commit 'v2.6.36.3' into linux-tegra-2.6.36 2011-01-07 17:14:48 -08:00
Varun Wadekar
5a5f348ffc crytpo: tegra-aes: make aes_handle_req aynschronous
the encrypt/decrypt callbacks have to return with -EINPROGRESS
error code and the request complete callback needs to be
called from handle_req for aynchronous block ciphers. use
work queue to make the driver asynchronous.

Change-Id: I0dec1185c31e5de7ba039c39d6bd87c8b3487b2a
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2011-01-07 15:51:18 -08:00
Greg Kroah-Hartman
d77cf23f1b Linux 2.6.36.3 2011-01-07 14:39:58 -08:00
Jean-Francois Moine
8a77688b45 gspca - sonixj: Add a flag in the driver_info table
commit c6c1433071 upstream.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-07 13:58:56 -08:00