7 years ago[ARM] tegra: ventana: Add pmu device
Colin Cross [Sun, 22 Aug 2010 01:23:34 +0000]
[ARM] tegra: ventana: Add pmu device

Change-Id: I5fa227893cc64b900ee749d292cb09a728f9ec2f
Signed-off-by: Colin Cross <ccross@google.com>

7 years ago[ARM] tegra: harmony: Add pmu device
Colin Cross [Sun, 22 Aug 2010 01:23:11 +0000]
[ARM] tegra: harmony: Add pmu device

Originally fixed by Will Deacon.

Change-Id: I2319d269f645766597100f91b2086fde4535c0fd
Signed-off-by: Colin Cross <ccross@google.com>

7 years ago[ARM] tegra_i2s_audio: add software downsampling for recorded data + fixes
Iliyan Malchev [Thu, 12 Aug 2010 01:19:47 +0000]
[ARM] tegra_i2s_audio: add software downsampling for recorded data + fixes

downsampling:
-- add ioctl()s to downsample recorded data
-- supported frequencies are 8kHz, 11.025kHz, 22.05kHz, and 44.1kHz
-- downsamping to stereo and mono
-- default is 11.025kHz mono

fixes:
-- fix crashes from dequeuing DMA requests twice

Signed-off-by: Iliyan Malchev <malchev@google.com>

7 years agovideo: tegra: include linux/pm.h in mach/tegradc.h
Erik Gilling [Thu, 12 Aug 2010 02:53:36 +0000]
video: tegra: include linux/pm.h in mach/tegradc.h

Signed-off-by: Erik Gilling <konkers@android.com>

7 years agovideo: tegra: add init/suspend/resume hooks to outputs
Erik Gilling [Thu, 12 Aug 2010 01:52:50 +0000]
video: tegra: add init/suspend/resume hooks to outputs

Allows board specific code to handle panel init.

Signed-off-by: Erik Gilling <konkers@android.com>

7 years agovideo: tegra: checkpatch changes
Erik Gilling [Wed, 11 Aug 2010 22:55:49 +0000]
video: tegra: checkpatch changes

Signed-off-by: Erik Gilling <konkers@android.com>

7 years ago[ARM] tegra: audio_i2s_audio: clean up & support for recording audio
Iliyan Malchev [Fri, 6 Aug 2010 22:41:26 +0000]
[ARM] tegra: audio_i2s_audio: clean up & support for recording audio

-- add audio_in_stream (identical to audio_out_stream, may merge them later)
-- add support for DMA and PIO recording
-- add ioctls for /dev/audio<n>_in to start and stop recording

Signed-off-by: Iliyan Malchev <malchev@google.com>

7 years agovideo: tegra: add tegra display controller driver
Erik Gilling [Mon, 12 Jul 2010 00:06:28 +0000]
video: tegra: add tegra display controller driver

Notable ommisions:
* support for anything but lvds panels
* inegration with nvhost driver to sync updates with 3D
* FB physical geometry is not set
* lacks interface to set overlay/window x,y offset

v2 changes:
* suspend/resume support
* move code into drivers/video/tegra/dc
* modularize output support
* clean register dumping, add debugfs register file
* code review feedback
* make the display controller register the framebuffer devices

Signed-off-by: Erik Gilling <konkers@android.com>

7 years agovideo: tegra: remove old tegra fb driver
Erik Gilling [Mon, 12 Jul 2010 00:00:24 +0000]
video: tegra: remove old tegra fb driver

Signed-off-by: Erik Gilling <konkers@android.com>

7 years ago[ARM] tegra: ventana: add suspend support to ventana
Gary King [Wed, 4 Aug 2010 00:48:42 +0000]
[ARM] tegra: ventana: add suspend support to ventana

add support for system suspend to ventana; currently LP1 (DRAM in
self-refresh, CPU power-gated, core power active) is used.

Change-Id: Idb223a7da94c3b87ea61e0eef1de77206c4171e4
Signed-off-by: Gary King <gking@nvidia.com>

7 years ago[ARM] tegra: ventana: register gpio-keys device
Gary King [Wed, 4 Aug 2010 00:50:19 +0000]
[ARM] tegra: ventana: register gpio-keys device

Change-Id: Ie2e59f61facb116a5af88478e231542778af9eaf
Signed-off-by: Gary King <gking@nvidia.com>

7 years ago[ARM] tegra: clock: Add pll_u to common clock init table
Benoit Goby [Tue, 3 Aug 2010 03:18:11 +0000]
[ARM] tegra: clock: Add pll_u to common clock init table

Change-Id: I8cdef0406b6fe04551584ae0bae9534b4aec93f6
Signed-off-by: Benoit Goby <benoit@android.com>

7 years ago[ARM] tegra: ventana: use tegra_gart_device rather than local definition
Gary King [Tue, 3 Aug 2010 21:54:46 +0000]
[ARM] tegra: ventana: use tegra_gart_device rather than local definition

Change-Id: I6cb57dd46162c258e32c4946de5a649daff3a79b
Signed-off-by: Gary King <gking@nvidia.com>

7 years ago[ARM] tegra: harmony: use tegra_gart_device rather than local definition
Gary King [Tue, 3 Aug 2010 21:54:13 +0000]
[ARM] tegra: harmony: use tegra_gart_device rather than local definition

Change-Id: I1b456bb5634a75ae1dba2f5bd64ad71b8abdfc53
Signed-off-by: Gary King <gking@nvidia.com>

7 years ago[ARM] tegra: add gart device to devices.c
Gary King [Tue, 3 Aug 2010 21:53:23 +0000]
[ARM] tegra: add gart device to devices.c

Change-Id: Id748aa37a3c2234a2a618b09dfa963a4b4ac572c
Signed-off-by: Gary King <gking@nvidia.com>

7 years ago[ARM] ventana: register i2c, touchscreen & regulator
Gary King [Wed, 28 Jul 2010 20:05:45 +0000]
[ARM] ventana: register i2c, touchscreen & regulator

register I2C controllers, regulator consumers and the panjit
touchscreen platform_device

Change-Id: Ife13c0d86084f26c734dea2c358f8c4fd3e27a8e
Signed-off-by: Gary King <gking@nvidia.com>

7 years ago[ARM] tegra: fix packet alignment and padding
Gary King [Wed, 28 Jul 2010 22:03:57 +0000]
[ARM] tegra: fix packet alignment and padding

tegra's DMA controller expects to start transfers at word boundaries,
and the standard packet alignment (2) was resulting in data corruption

also, provide a full cacheline of padding between skbuffs, to eliminate
coherency issues between the processor and USB networking devices.

Change-Id: Ibb508b512f43c8934d35eb182c8738370b7be585
Signed-off-by: Gary King <gking@nvidia.com>

7 years ago[ARM] tegra: generic driver for i2s audio (initial implementation)
Iliyan Malchev [Thu, 29 Jul 2010 21:00:54 +0000]
[ARM] tegra: generic driver for i2s audio (initial implementation)

-- i2s settings are passed through the board file
-- supports playback (no recording yet)
-- works in DMA and PIO (non-DMA) modes (toggle through debugfs)
-- does NOT perform volume and audio-path control
-- exports /dev/audio<n>_{in, out}, where <n> is the i2s interface
-- assumes that i2s is used such that fifo1 is TX and fifo2 is RX

Signed-off-by: Iliyan Malchev <malchev@google.com>

7 years ago[ARM] tegra: header describing i2s registers
Iliyan Malchev [Thu, 29 Jul 2010 21:02:17 +0000]
[ARM] tegra: header describing i2s registers

Signed-off-by: Iliyan Malchev <malchev@google.com>

7 years ago[ARM] tegra: add platform devices for i2s1 and i2s2
Iliyan Malchev [Thu, 29 Jul 2010 20:57:45 +0000]
[ARM] tegra: add platform devices for i2s1 and i2s2

Signed-off-by: Iliyan Malchev <malchev@google.com>

7 years ago[ARM] tegra: Don't share tegra_usb1_resources
Benoit Goby [Thu, 29 Jul 2010 03:16:43 +0000]
[ARM] tegra: Don't share tegra_usb1_resources

Don't share tegra_usb1_resources as both tegra-udc and ehci1 are loaded
in otg mode.

Change-Id: Id5c9a076572e18662b5d3e7835f638b1cc5a1e07
Signed-off-by: Benoit Goby <benoit@android.com>

7 years ago[ARM] tegra: add EHCI and UDC controllers to devices.c
Gary King [Wed, 28 Jul 2010 23:22:31 +0000]
[ARM] tegra: add EHCI and UDC controllers to devices.c

update harmony and ventana to use the common UDC definition, rather
than using the current duplicated definitions

Change-Id: I2e3aca674ab35305a0c516bd22e044382280d05e
Signed-off-by: Gary King <gking@nvidia.com>

7 years agousb: gadget: Fix tegra udc in OTG mode
Benoit Goby [Thu, 22 Jul 2010 01:05:06 +0000]
usb: gadget: Fix tegra udc in OTG mode

Check the transceiver state before checking udc->stopped
Enable/disable the PHY and the clock on cable events

Change-Id: Id5a8a1b94f83da8060786f31181014dd1d546fc7
Signed-off-by: Benoit Goby <benoit@android.com>

7 years ago[ARM] tegra: harmony/ventana: register additional devices
Gary King [Wed, 14 Jul 2010 01:30:59 +0000]
[ARM] tegra: harmony/ventana: register additional devices

register GART, pda_power, and OTG devices

Change-Id: I6dec5f765494cdc96f3395cf32fd962c87bf70b7
Signed-off-by: Gary King <gking@nvidia.com>

7 years ago[ARM] tegra: ventana: add initial support for Ventana
Gary King [Wed, 14 Jul 2010 00:16:23 +0000]
[ARM] tegra: ventana: add initial support for Ventana

Change-Id: I1993fda7628c623d53fd2c97649ec3533ad790e2
Signed-off-by: Gary King <gking@nvidia.com>

7 years ago[ARM] tegra: harmony: add sdhci0 controller (wlan)
Gary King [Thu, 15 Jul 2010 17:06:40 +0000]
[ARM] tegra: harmony: add sdhci0 controller (wlan)

Change-Id: I6000b1d34e35d9291cae80e4508518d0059397f8
Signed-off-by: Gary King <gking@nvidia.com>

7 years ago[ARM] tegra: add I/O virtual memory manager interface (iovmm)
Gary King [Sat, 26 Jun 2010 01:39:58 +0000]
[ARM] tegra: add I/O virtual memory manager interface (iovmm)

The Tegra IOVMM is an interface to allow device drivers and subsystems in
the kernel to manage the virtual memory spaces visible to I/O devices.

The interface has been designed to be scalable to allow for I/O virtual
memory hardware which exists in one or more limited apertures of the address
space (e.g., a small aperture in physical address space which can perform
MMU-like remapping) up to complete virtual addressing with multiple
address spaces and memory protection.

The interface has been designed to be similar to the Linux virtual memory
system; however, operations which would be difficult to implement or
nonsensical for DMA devices (e.g., copy-on-write) are not present, and
APIs have been added to allow for management of multiple simultaneous
active address spaces.

The API is broken into four principal objects: areas, clients, domains and
devices.

Areas
=====

An area is a contiguous region of the virtual address space which can be
filled with virtual-to-physical translations (and, optionally, protection
attributes). The virtual address of the area can be queried and used for
DMA operations by the client which created it.

As with the Linux vm_area structures, it is the responsibility of whichever
code creates an area to ensure that it is populated with appropriate
translations.

Domains
=======

A domain in the IOVMM system is similar to a process in a standard CPU
virtual memory system; it represents the entire range of virtual addresses
which may be allocated and used for translation. Depending on hardware
capabilities, one or more domains may be resident and available for
translation. IOVMM areas are allocated from IOVMM domains.

Whenever a DMA operation is performed to or from an IOVMM area, its parent
domain must be made resident prior to commencing the operation.

Clients
=======

I/O VMM clients represent any entity which needs to be able to allocate
and map system memory into I/O virtual space. Clients are created by name
and may be created as part of a "share group," where all clients created
in the same share group will observe the same I/O virtual space (i.e., all
will use the same IOVMM domain). This is similar to threads inside a process
in the CPU virtual memory manager.

The callers of the I/O VMM system are responsible for deciding on the
granularity of client creation and share group definition; depending on the
specific usage model expected by the caller, it may be appropriate to create
an IOVMM client per task (if the caller represents an ioctl'able interface
to user land), an IOVMM client per driver instance, a common IOVMM client
for an entire bus, or a global IOVMM client for an OS subsystem (e.g., the DMA
mapping interface).

Each client is responsible for ensuring that its IOVMM client's translation is
resident on the system prior to performing DMA operations using the IOVMM
addresses. This is accomplished by preceding all DMA operations for the client
with a call to tegra_iovmm_client_lock (or tegra_iovmm_client_trylock),
and following all operations (once complete) with a call to
tegra_iovmm_client_unlock. In this regard, clients are cooperatively context-
switched, and are expected to behave appropriately.

Devices
=======

I/O VMM devices are the physical hardware which is responsible for performing
the I/O virtual-to-physical translation.

Devices are responsible for domain management: the mapping and unmapping
operations needed to make translations resident in the domain (including
any TLB shootdown or cache invalidation needed to ensure coherency), locking
and unlocking domains as they are made resident by clients into the devices'
address space(s), and allocating and deallocating the domain objects.

Devices are responsible for the allocation and deallocation of domains to
allow coalescing of multiple client share groups into a single domain. For
example, if the device's hardware only allows a single address space to
be translated system-wide, performing full flushes and invalidates of the
translation at every client switch may be prohibitively expensive. In these
circumstances, a legal implementation of the IOVMM interface includes
returning the same domain for all clients on the system (regardless of
the originally-specified share group).

In this respect, a client can be assured that it will share an address space
with all of the other clients in its share group; however, it may also share
this address space with other clients, too.

Multiple devices may be present in a system; a device should return a NULL
domain if it is incapable of servicing the client when it is asked to
allocate a domain.

----------------------------------------------------------------------------

IOVMM Client API
================

tegra_iovmm_alloc_client - Called to create a new IOVMM client object; the
 implementation may create a new domain or return an existing one depending on
 both the device and the share group.

tegra_iovmm_free_client - Frees a client.

tegra_iovmm_client_lock - Makes a client's translations resident in the IOVMM
 device for subsequent DMA operations. May block if the device is incapable
 of context-switching the client when it is called. Returns -EINTR if the
 waiting thread is interrupted before the client is locked.

tegra_iovmm_client_trylock - Non-blocking version of tegra_iovmm_client_lock

tegra_iovmm_client_unlock - Called by clients after DMA operations on IOVMM-
 translated addresses is complete; allows IOVMM system to context-switch the
 current client out of the device if needed.

tegra_iovmm_create_vm - Called to allocate an IOVMM area. If
 lazy / demand-loading of pages is desired, clients should supply a pointer
 to a tegra_iovmm_area_ops structure providing callback functions to load, pin
 and unpin the physical pages which will be mapped into this IOVMM region.

tegra_iovmm_get_vm_size - Called to query the total size of an IOVMM client

tegra_iovmm_free_vm - Called to free a IOVMM area, releasing any pinned
 physical pages mapped by it and to decommit any resources (memory for
 PTEs / PDEs) required by the VM area.

tegra_iovmm_vm_insert_pfn - Called to insert an exact pfn (system memory
 physical page) into the area at a specific virtual address. Illegal to call
 if the IOVMM area was originally created with lazy / demand-loading.

tegra_iovmm_zap_vm - Called to mark all mappings in the IOVMM area as
 invalid / no-access, but continues to consume the I/O virtual address space.
 For lazy / demand-loaded IOVMM areas, a zapped region will not be reloaded
 until it has been unzapped; DMA operations using the affected translations
 may fault (if supported by the device).

tegra_iovmm_unzap_vm - Called to re-enable lazy / demand-loading of pages
 for a previously-zapped IOVMM area.

tegra_iovmm_find_area_get - Called to find the IOVMM area object
 corresponding to the specified I/O virtual address, or NULL if the address
 is not allocated in the client's address space. Increases the reference count
 on the IOVMM area object

tegra_iovmm_area_get - Called to increase the reference count on the IOVMM
 area object

tegra_iovmm_area_put - Called to decrease the reference count on the IOVMM
 area object

IOVMM Device API
================

tegra_iovmm_register - Called to register a new IOVMM device with the IOVMM
 manager

tegra_iovmm_unregister - Called to remove an IOVMM device from the IOVMM
 manager (unspecified behavior if called while a translation is active and / or
 in-use)

tegra_iovmm_domain_init - Called to initialize all of the IOVMM manager's
 data structures (block trees, etc.) after allocating a new domain

IOVMM Device HAL
================

map - Called to inform the device about a new lazy-mapped IOVMM area. Devices
 may load the entire VM area when this is called, or at any time prior to
 the completion of the first read or write operation using the translation.

unmap - Called to zap or to decommit translations

map_pfn - Called to insert a specific virtual-to-physical translation in the
 IOVMM area

lock_domain - Called to make a domain resident; should return 0 if the
 domain was successfully context-switched, non-zero if the operation can
 not be completed (e.g., all available simultaneous hardware translations are
 locked). If the device can guarantee that every domain it allocates is
 always usable, this function may be NULL.

unlock_domain - Releases a domain from residency, allows the hardware
 translation to be used by other domains.

alloc_domain - Called to allocate a new domain; allowed to return an
 existing domain

free_domain - Called to free a domain.

Change-Id: Ic65788777b7aba50ee323fe16fd553ce66c4b87c
Signed-off-by: Gary King <gking@nvidia.com>

7 years agousb: gadget: Use USB PHY api
Benoit Goby [Wed, 30 Jun 2010 01:24:09 +0000]
usb: gadget: Use USB PHY api

Signed-off-by: Benoit Goby <benoit@android.com>

7 years ago[ARM] tegra: harmony: remove hard-coded partition table
Gary King [Mon, 28 Jun 2010 22:01:43 +0000]
[ARM] tegra: harmony: remove hard-coded partition table

use the partition information provided on the kernel command line rather
than a fixed table that is subject to change.

Change-Id: I650f634bf49b8658debb75535e94f2a497ef3432
Signed-off-by: Gary King <gking@nvidia.com>

7 years agomtd/tegra_nand: don't ignore return value for add_mtd_partitions
Gary King [Mon, 28 Jun 2010 22:00:10 +0000]
mtd/tegra_nand: don't ignore return value for add_mtd_partitions

when the mtd partition command line format is used, ignoring the
return value left err set to the number of partitions, which was
later interpreted as an error return code for tegra_nand_probe,
which caused the MTD master to be unregistered (ultimately causing
NULL pointer derefs when mounting the root partition).

Change-Id: Icebfb295810554617c56deeafc91bc22cc43bb35
Signed-off-by: Gary King <gking@nvidia.com>

7 years ago[ARM] tegra: harmony: Make board init calls explicit
Colin Cross [Sat, 15 May 2010 02:30:34 +0000]
[ARM] tegra: harmony: Make board init calls explicit

Signed-off-by: Colin Cross <ccross@android.com>
Change-Id: Ic14e8db00f2272de2f4ee4013bb3ab5c1951e7fe

7 years ago[ARM] tegra: harmony: Add framebuffer platform device
Colin Cross [Sun, 27 Jun 2010 05:37:57 +0000]
[ARM] tegra: harmony: Add framebuffer platform device

Signed-off-by: Colin Cross <ccross@android.com>

7 years ago[ARM] tegra: harmony: Remove android platform devices
Colin Cross [Sun, 27 Jun 2010 05:36:41 +0000]
[ARM] tegra: harmony: Remove android platform devices

Signed-off-by: Colin Cross <ccross@android.com>

7 years agousb: gadget: Add support for OTG
Benoit Goby [Sat, 5 Jun 2010 02:36:06 +0000]
usb: gadget: Add support for OTG

Based on work by Nvidia

Signed-off-by: Benoit Goby <benoit@android.com>

7 years agow1: master: tegra_w1: Adds generic mach-tegra w1 support.
Andrei Warkentin [Mon, 28 Jun 2010 22:59:01 +0000]
w1: master: tegra_w1: Adds generic mach-tegra w1 support.

This adds w1 as a device for mach-tegra boards, fixes wrong
OWR I/O base, and changes OWR clock name.

Change-Id: Idffbdbd05f383ce8e423ee301e197e230db4f2f9
Signed-off-by: Andrei Warkentin <andreiw@motorola.com>

7 years agow1: master: tegra_w1: Add initial Tegra W1 master driver
Andrei Warkentin [Mon, 28 Jun 2010 22:56:06 +0000]
w1: master: tegra_w1: Add initial Tegra W1 master driver

Initial implementation of W1 master driver for Tegra SoCs.
Tested with DS2781 slave driver.

Change-Id: I6cda1ea152d25a789ae6cdca96b710da72884033
Signed-off-by: Andrei Warkentin <andreiw@motorola.com>

7 years ago[ARM] tegra: enable ARM errata 742230
Colin Cross [Mon, 4 Oct 2010 03:20:10 +0000]
[ARM] tegra: enable ARM errata 742230

Change-Id: I25b9e7c266147163ca1dcf7619db0580ff9888d8
Signed-off-by: Colin Cross <ccross@android.com>

7 years agovideo: tegrafb: Enable host1x clock
Colin Cross [Tue, 8 Jun 2010 03:50:12 +0000]
video: tegrafb: Enable host1x clock

Change-Id: If1e50ed661493cb06de5e5bbc5ee2b0966297b4f
Signed-off-by: Colin Cross <ccross@android.com>

7 years ago[ARM] tegra: add FIQ support
Iliyan Malchev [Wed, 26 May 2010 21:21:21 +0000]
[ARM] tegra: add FIQ support

Signed-off-by: Iliyan Malchev <malchev@google.com>

7 years ago[ARM] tegra: delay: Use immediates instead of literals
Colin Cross [Mon, 4 Oct 2010 05:06:14 +0000]
[ARM] tegra: delay: Use immediates instead of literals

Change-Id: I4629398863062e3f80303c84d0fd3b7a4ed6e708
Signed-off-by: Colin Cross <ccross@android.com>

7 years ago[ARM] tegra: Add arch-specific udelay using TMRUS
Colin Cross [Sun, 25 Apr 2010 07:29:45 +0000]
[ARM] tegra: Add arch-specific udelay using TMRUS

Change-Id: If075117642a725ee2ee24a622068274e588a5bc1
Signed-off-by: Colin Cross <ccross@android.com>

7 years ago[ARM] Add ARCH_PROVIDES_UDELAY config option
Colin Cross [Sun, 25 Apr 2010 07:29:07 +0000]
[ARM] Add ARCH_PROVIDES_UDELAY config option

Change-Id: Ife690c9d055fc0f17a52d2b29048af5062a664a6
Signed-off-by: Colin Cross <ccross@android.com>

7 years ago[ARM] tegra: tegrafb: Free irq in probe error case and remove function
Colin Cross [Thu, 15 Apr 2010 21:06:44 +0000]
[ARM] tegra: tegrafb: Free irq in probe error case and remove function

    v3: Fixes from review by Jaya Kumar
        - Free irq in probe error case and remove function

Change-Id: Id6ebb8b79a738d0e3a9ac63fddd785f5652982f7
CC: Jaya Kumar <jayakumar.lkml@gmail.com>
Signed-off-by: Colin Cross <ccross@android.com>

7 years ago[ARM] tegra: Add framebuffer driver
Colin Cross [Mon, 22 Feb 2010 03:39:55 +0000]
[ARM] tegra: Add framebuffer driver

v2: Fixes from review by Russell King
    - Use proper return values

v2: Fixes from review by Jaya Kumar
    - Comments on lcd resolution
    - Remove stub functions
    - Change DUMP_REG to pr_debug
    - Add unregister_framebuffer to tegra_plat_remove

v2: from Colin Cross
    - adjust debugging

Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Erik Gilling <konkers@android.com>

7 years ago[ARM] tegra: move sdhci and i2c to generic devices.c
Erik Gilling [Wed, 31 Mar 2010 20:49:16 +0000]
[ARM] tegra: move sdhci and i2c to generic devices.c

Change-Id: Ib8d500cb868663d851af5e849815bc2a1312f659
Signed-off-by: Erik Gilling <konkers@android.com>

7 years agoi2c-tegra: add support for virtual busses with dynamic pinmuxing
Gary King [Wed, 14 Jul 2010 01:56:40 +0000]
i2c-tegra: add support for virtual busses with dynamic pinmuxing

this adds support for dynamically reprogramming the I2C controller's
pin mux on transaction boundaries to enable one controller to be
registered as multiple I2C bus adapters with the kernel. this allows
platform designers an additional tool to resolve clock rate, I/O
voltage and electrical loading restrictions between the platform's
peripherals.

the i2c-tegra platform data is extended to support this; platforms
which use this feature should pass in the number of busses which
should be created for each controller, the starting adapter number
to use and the clock rate and pin mux for each virtual bus.

Change-Id: I57a96deb7b7b793222ec3f8cc3a941917a023609
Signed-off-by: Gary King <gking@nvidia.com>

7 years agousb: gadget: add utmip phy into to fsl_tegra_udc
Erik Gilling [Fri, 26 Mar 2010 20:31:27 +0000]
usb: gadget: add utmip phy into to fsl_tegra_udc

Signed-off-by: Erik Gilling <konkers@android.com>

7 years ago[ARM] tegra: HACK Enable uart and clocks in uncompress.h
Colin Cross [Mon, 15 Mar 2010 22:06:29 +0000]
[ARM] tegra: HACK Enable uart and clocks in uncompress.h

Signed-off-by: Colin Cross <ccross@android.com>

7 years ago[ARM] tegra: add platform devices to harmony board file
Erik Gilling [Tue, 16 Mar 2010 03:40:51 +0000]
[ARM] tegra: add platform devices to harmony board file

Signed-off-by: Erik Gilling <konkers@android.com>

7 years ago[ARM] tegra: harmony: Add sdhci devices
Colin Cross [Thu, 11 Mar 2010 04:43:14 +0000]
[ARM] tegra: harmony: Add sdhci devices

Change-Id: I29eab117c3fb237d5178d9fcf065563e656d46f2
Signed-off-by: Colin Cross <ccross@android.com>

7 years agousb: gadget: fsl_udc: wmb ep_td struct when submitting to controller
Colin Cross [Wed, 3 Mar 2010 01:25:41 +0000]
usb: gadget: fsl_udc: wmb ep_td struct when submitting to controller

Since these get allocated dmacoherent instead of noncacheable in armv7, we need
to do wmb before handing them to hardware.

Change-Id: I413eeb6da3bfeb754c4b475b19fe5823d83d3d04
Signed-off-by: Colin Cross <ccross@android.com>
Cc: Erik Gilling <konkers@android.com>

7 years agousb: gadget: add preliminary Tegra support to fsl driver
Erik Gilling [Tue, 9 Feb 2010 23:41:00 +0000]
usb: gadget: add preliminary Tegra support to fsl driver

Based on work by Gary King.

Further abstraction of the chipidea core support needs to be done.

Signed-off-by: Colin Cross <ccross@android.com>
Cc: Erik Gilling <konkers@android.com>
Cc: Gary King <GKing@nvidia.com>

7 years ago[ARM] mtd: NVIDIA Tegra NAND controller driver.
Colin Cross [Thu, 18 Dec 2008 20:05:28 +0000]
[ARM] mtd: NVIDIA Tegra NAND controller driver.

Change-Id: I6f0b18c5621bcf8fb6cde8e7b05828075db72594
CC: Dima Zavin <dima@android.com>
Signed-off-by: Colin Cross <ccross@android.com>

7 years agoARM: tegra: timer: Add suspend and resume support
Colin Cross [Fri, 29 Apr 2011 23:59:29 +0000]
ARM: tegra: timer: Add suspend and resume support

Change-Id: I4d431037e83742e123ad81e4614354b14e32d453
Signed-off-by: Colin Cross <ccross@android.com>

7 years agoARM: tegra: Keep pll_m_out1 enabled
Colin Cross [Mon, 28 Mar 2011 22:20:55 +0000]
ARM: tegra: Keep pll_m_out1 enabled

sclk, which clocks all of the internal busses, runs off
pll_m_out1 during resume.  To prevent it getting turned off,
always keep pll_m_out1 on.

Change-Id: I30c55ad4625165e4c8d3df941b31fd561cbe4f63
Signed-off-by: Colin Cross <ccross@android.com>

7 years agoARM: tegra: add hotplug support
Colin Cross [Sun, 3 Apr 2011 07:57:28 +0000]
ARM: tegra: add hotplug support

Hotplug uses the same CPU wfi code as cpuidle to put either cpu
into a slightly lower power mode (clock gated, but still powered).
If the remaining cpu enters LP2, the hotplugged cpu will be power
gated until the remaining cpu is active.

Change-Id: Ib7428709043415dc759136cf91668f6f63fe5a5c
Signed-off-by: Colin Cross <ccross@android.com>

7 years agoARM: tegra: add cpuidle driver
Colin Cross [Mon, 29 Nov 2010 07:59:30 +0000]
ARM: tegra: add cpuidle driver

Supports clock-gated (LP3) SMP idle mode, and power-gated (LP2) idle.

Latency for LP2 idle state is calculated as a 2-sample weighted moving
average, to allow for variations due to CPU frequency scaling.

LP3 idle gates a single CPU core, but LP2 requires power gating both
CPU cores.  When the first CPU requests to enter LP2, it saves its
own state and then enters WFI.  When the second CPU requests LP2,
it attempts to put the first CPU into reset to prevent it from waking
up, with some synchronization in case it was already awake, and then
powers down both CPUs together.

Change-Id: I1dc2a7fb9b3bff524952d0cbf3c322a7b9a38be9
Signed-off-by: Colin Cross <ccross@android.com>

7 years agoARM: tegra: Add suspend support
Colin Cross [Mon, 29 Nov 2010 06:36:08 +0000]
ARM: tegra: Add suspend support

Tegra supports three low power modes that involve powering down the CPU.

LP2 powers down both CPU cores and the GICs, but leaves the core
peripherals, including the memory controller and the legacy
interrupt controller, enabled.  The legacy interrupt controller
is used as the wakeup source, and any interrupt can wake the device.
LP2 can be used in idle.

LP1 is the same as LP2, but in addition turns off the memory
controller and puts the DDR memory in self-refresh.  Any interrupt
can wake the device. LP1 could be used in idle if no peripherals
are doing DMA.

LP0 turns off everything in the SoC except the RTC and a power
management controller, both of which run off a 32 kHz clock.
The power management controller has 32 wake sources, all other
interrupts can not be used to wake from LP0.

These low power modes power-gate the main CPU complex, requiring a
full processor state save and restore from a reset vector.

Platform-specific data (power good times, PMU capabilities, etc.) must be
specified when registering the suspend operations to ensure that platform
power sequencing restrictions are maintained.

In both LP0 and LP1, SDRAM is placed into self-refresh. in order to safely
perform this transition, the final shutdown procedure responsible for

  * turning off the MMU and L1 data cache
  * putting memory into self-refresh
  * setting the DDR pads to the lowest power state
  * and turning off PLLs

is copied into IRAM (at the address TEGRA_IRAM_BASE + SZ_4K) at the
start of the suspend process.

In LP1 mode (like LP2), the CPU is reset and executes the code specified
at the EVP reset vector.  Since SDRAM is in self-refresh, this code must
also be located in IRAM, and it must re-enable DRAM before restoring the
full context.  In this implementation, it enables the CPU on PLLP, enables
PLLC and PLLM, restores the SCLK burst policy, and jumps to the LP2 reset
vector to restore the rest of the system (MMU, PLLX, coresite, etc.).  The
LP2 reset vector is expected to be found in PMC_SCRATCH1, and is
initialized during system-bootup.

In LP0 mode, the core voltage domain is also shutoff.  As a result, all
of the volatile state in the core voltage domain (e.g., pinmux registers,
clock registers, etc.) must be saved to memory so that it can be restored
after the system resumes.  A limited set of wakeups are available from LP0,
and the correct levels for the wakeups must be programmed into the PMC
wakepad configuration register prior to system shutdown.  On resume, the
system resets into the boot ROM, and the boot ROM restores SDRAM and other
system state using values saved during kernel initialization in the PMC
scratch registers.

Resuming from LP0 requires the boot ROM to supply a signed recovery codeblob
to the kernel; the kernel expects that the length and address of this blob
is supplied with the lp0_vec= command line argument; if not present, suspend-
to-LP0 will be disabled

For simplicity, the outer cache is shutdown for both LP0 and LP1; it
is possible to optimize the LP1 routine to bypass outer cache shutdown
and restart.

Includes fixes from:
Scott Williams <scwilliams@nvidia.com>
Aleksandr Frid <afrid@nvidia.com>
Vik Kasivajhula <tkasivajhula@nvidia.com>
Bharat Nihalani <Kbnihalani@nvidia.com>
James Wylder <james.wylder@motorola.com>
Allen Martin <amartin@nvidia.com>

Change-Id: I9e4e61c2fbb8c7bb5a29b1832ea38e7ea0524c52
Original-author: Gary King <gking@nvidia.com>
Signed-off-by: Gary King <gking@nvidia.com>
Signed-off-by: Colin Cross <ccross@android.com>

7 years agoARM: tegra: simplify platsmp.c
Colin Cross [Sun, 3 Apr 2011 07:47:27 +0000]
ARM: tegra: simplify platsmp.c

The synchronization between cpus is handled in the generic ARM
code, no need to do it in boot_secondary

Change-Id: I2c490823d962c88e177e267c2a46278976925a38
Signed-off-by: Colin Cross <ccross@android.com>

7 years agoARM: tegra: pinmux: Convert suspend/resume to syscore
Colin Cross [Tue, 29 Mar 2011 00:48:56 +0000]
ARM: tegra: pinmux: Convert suspend/resume to syscore

Signed-off-by: Colin Cross <ccross@android.com>
Change-Id: I3228600e93f819821b13b0955961fc1cbfb826a8

7 years agoARM: tegra: dma: Convert suspend/resume to syscore
Colin Cross [Tue, 29 Mar 2011 00:45:44 +0000]
ARM: tegra: dma: Convert suspend/resume to syscore

Signed-off-by: Colin Cross <ccross@android.com>
Change-Id: Ibc0b36149bb10baa357a8bb3f24925ce3d6f3d9d

7 years agoARM: tegra: timer: Convert timer suspend/resume to syscore
Colin Cross [Tue, 29 Mar 2011 00:49:12 +0000]
ARM: tegra: timer: Convert timer suspend/resume to syscore

Signed-off-by: Colin Cross <ccross@android.com>
Change-Id: I914e2836b3ab36218658afc77751a7b394f62400

7 years agoARM: tegra: clock: Convert suspend/resume to syscore_ops
Colin Cross [Tue, 29 Mar 2011 00:49:24 +0000]
ARM: tegra: clock: Convert suspend/resume to syscore_ops

Signed-off-by: Colin Cross <ccross@android.com>
Change-Id: Ib014bf03ccbb7703f3c1b76a96c09322b98066fa

7 years agoARM: tegra: clock: Add smp_twd clock
Colin Cross [Tue, 15 Mar 2011 00:28:25 +0000]
ARM: tegra: clock: Add smp_twd clock

Change-Id: If129115add0fc26e4cd940bcbb36be681045f0b3
Signed-off-by: Colin Cross <ccross@android.com>

7 years agoARM: tegra: gpio: remove manual acks in irq handler
Colin Cross [Sun, 3 Apr 2011 07:31:18 +0000]
ARM: tegra: gpio: remove manual acks in irq handler

The interrupt will be acked by the generic irq handler, there is
no need to ack it manually.

Change-Id: I48ffc78d90f7951afcfde849300fcbc0673a876a
Signed-off-by: Colin Cross <ccross@android.com>

7 years agoARM: tegra: gpio: Convert suspend/resume to syscore
Colin Cross [Tue, 29 Mar 2011 00:47:31 +0000]
ARM: tegra: gpio: Convert suspend/resume to syscore

Signed-off-by: Colin Cross <ccross@android.com>
Change-Id: I5cd5b83eb0a760826fc7443f06cd1e94bba359db

7 years agoARM: tegra: gpio: Add support for waking from suspend
Colin Cross [Wed, 18 Aug 2010 07:19:27 +0000]
ARM: tegra: gpio: Add support for waking from suspend

Change-Id: Ifd11daa6eac4ca747aba4a4d98f41270b7055bbb
Signed-off-by: Colin Cross <ccross@android.com>

7 years agoARM: tegra: irq: Add debugfs file to show wake irqs
Colin Cross [Sun, 24 Oct 2010 06:22:07 +0000]
ARM: tegra: irq: Add debugfs file to show wake irqs

Change-Id: I4a4a05e4b082fff11ed6bd975daebbed31f02a6b
Signed-off-by: Colin Cross <ccross@android.com>

7 years agoARM: tegra: irq: Add wake irq handling
Colin Cross [Sun, 3 Apr 2011 07:02:37 +0000]
ARM: tegra: irq: Add wake irq handling

Add LP0 wake irq handling in pm-irq.c, called from irq.c and
gpio.c.
Use IRQCHIP_MASK_ON_SUSPEND for LP1 wake irq handling, when
the legacy irq controller stays powered.
Determine valid suspend modes based on requested wake sources.

Signed-off-by: Colin Cross <ccross@android.com>
Change-Id: I547bd8290c0921163054d49f43141379e8f9f493

7 years agoARM: tegra: suspend: add LP0 wakeup sources
Colin Cross [Mon, 4 Apr 2011 20:07:37 +0000]
ARM: tegra: suspend: add LP0 wakeup sources

LP0 suspend can only wake up from 31 sources, mostly gpios spread
randomly across all the gpio banks, but also a few internal irqs.

Change-Id: Ic707d1da6b8d7ddb45dc511ed3739f31066aceaf
Signed-off-by: Colin Cross <ccross@android.com>

7 years agoARM: tegra: remove unused mach/suspend.h
Colin Cross [Mon, 4 Apr 2011 19:56:18 +0000]
ARM: tegra: remove unused mach/suspend.h

mach/suspend.h is not used yet, and its functions will be replaced
with syscore ops.  Delete it.

Change-Id: I7b32d3514e7f4427c7d5faa97c1954a7a2cc286c
Signed-off-by: Colin Cross <ccross@android.com>

7 years agoARM: mm: cache-l2x0: Add support for re-enabling l2x0
Colin Cross [Sat, 22 Jan 2011 08:37:09 +0000]
ARM: mm: cache-l2x0: Add support for re-enabling l2x0

Remove __init annotation from l2x0_init so it can be used to
reinitialize the l2x0 after it has been reset during suspend.

Only print the init messages the first time l2x0_init is called.

Add l2x0_enable to re-enable the l2x0 after l2x0_disable if
the l2x0 was not reset.

l2x0_disable cannot use writel, as writel calls wmb(), and wmb()
may call outer_cache_sync, which takes the same spinlock as
l2x0_disable.

Change-Id: Iaddedb4f582c7eeaef3cbe2a1e463787f0f809a4
Signed-off-by: Colin Cross <ccross@android.com>

7 years agoARM: tegra: clock: Disable clocks left on by bootloader
Colin Cross [Mon, 21 Feb 2011 23:47:24 +0000]
ARM: tegra: clock: Disable clocks left on by bootloader

Iterates through all clocks, disabling any for which the
refcount is 0 but the clock init detected the bootloader
left the clock on.  Can be disabled with command line
tegra_keep_boot_clocks

Signed-off-by: Colin Cross <ccross@android.com>

7 years agoARM: gic: Allow gic arch extensions to provide irqchip flags
Colin Cross [Sat, 30 Apr 2011 02:25:13 +0000]
ARM: gic: Allow gic arch extensions to provide irqchip flags

Tegra can benefit from the IRQCHIP_MASK_ON_SUSPEND flag, allow it
to be passed to the gic irq chip.

Signed-off-by: Colin Cross <ccross@android.com>

7 years agoirq: Always clear pending flag in check_irq_resend
Colin Cross [Sat, 30 Apr 2011 23:10:56 +0000]
irq: Always clear pending flag in check_irq_resend

If an interrupt occurs while the irq is masked, the irq is marked
as pending.  For a level triggered interrupt, the pending flag
is only cleared when the interrupt is handled.  If the interrupt
is never handled because the irq is deasserted before being
enabled it will stay pending, and suspend may be blocked by
check_wakeup_irqs.

Change check_irq_resend to always clear the pending flag,
including for level interrupts.

Signed-off-by: Colin Cross <ccross@android.com>

7 years agoARM: vfp: Always save VFP state in vfp_pm_suspend
Colin Cross [Sun, 13 Feb 2011 23:01:54 +0000]
ARM: vfp: Always save VFP state in vfp_pm_suspend

vfp_pm_suspend should save the VFP state any time there is
a last_VFP_context.  If it only saves when the VFP is enabled,
the state can get lost when, on a UP system:
   Thread 1 uses the VFP
   Context switch occurs to thread 2, VFP is disabled but the
      VFP context is not saved to allow lazy save and restore
   Thread 2 initiates suspend
   vfp_pm_suspend is called with the VFP disabled, but the
      context has not been saved.

Modify vfp_pm_suspend to save the VFP context whenever
last_VFP_context is set.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Colin Cross <ccross@android.com>

7 years agoARM: vfp: Use cpu pm notifiers to save vfp state
Colin Cross [Thu, 10 Feb 2011 10:08:32 +0000]
ARM: vfp: Use cpu pm notifiers to save vfp state

Signed-off-by: Colin Cross <ccross@android.com>

7 years agoARM: gic: Use cpu pm notifiers to save gic state
Colin Cross [Thu, 10 Feb 2011 20:54:10 +0000]
ARM: gic: Use cpu pm notifiers to save gic state

Signed-off-by: Colin Cross <ccross@android.com>

7 years agoARM: Add cpu power management notifiers
Colin Cross [Thu, 10 Feb 2011 10:04:45 +0000]
ARM: Add cpu power management notifiers

During some CPU power modes entered during idle, hotplug and
suspend, peripherals located in the CPU power domain, such as
the GIC, localtimers, and VFP, may be powered down.  Add a
notifier chain that allows drivers for those peripherals to
be notified before and after they may be reset.

Signed-off-by: Colin Cross <ccross@android.com>

7 years agoARM: smp_twd: Reconfigure clockevents after cpufreq change
Colin Cross [Mon, 16 May 2011 20:16:52 +0000]
ARM: smp_twd: Reconfigure clockevents after cpufreq change

The localtimer's clock changes with the cpu clock.  After a
cpufreq transition, update the clockevent's frequency and
reprogram the next clock event.

Adds a clock called "smp_twd" that is used to determine the
twd frequency, which can also be used at init time to
avoid calibrating the twd frequency.

Clock changes are based on Rob Herring's work.

Change-Id: I413b5cd07fb2b79bc9fad8b4bf257332d1da7bcd
Signed-off-by: Colin Cross <ccross@android.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Rob Herring <robherring2@gmail.com>
Tested-by: Linus Walleij <linus.walleij@linaro.org>

7 years agoLinux 3.1.4
Greg Kroah-Hartman [Mon, 28 Nov 2011 22:48:14 +0000]
Linux 3.1.4

7 years agoRevert "USB: EHCI: fix HUB TT scheduling issue with iso transfer"
Greg Kroah-Hartman [Mon, 28 Nov 2011 22:40:10 +0000]
Revert "USB: EHCI: fix HUB TT scheduling issue with iso transfer"

This reverts commit f0cc710a6dec5b808a6f13f1f8853c094fce5f12.

Cc: Matthieu Castet <matthieu.castet@parrot.com>
Cc: Thomas Poussevin <thomas.poussevin@parrot.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agoLinux 3.1.3
Greg Kroah-Hartman [Sat, 26 Nov 2011 17:08:57 +0000]
Linux 3.1.3

7 years agovmscan: fix shrinker callback bug in fs/super.c
Mikulas Patocka [Tue, 1 Nov 2011 00:08:57 +0000]
vmscan: fix shrinker callback bug in fs/super.c

commit 09f363c7363eb10cfb4b82094bd7064e5608258b upstream.

The callback must not return -1 when nr_to_scan is zero. Fix the bug in
fs/super.c and add this requirement to the callback specification.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: Dave Chinner <david@fromorbit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agobatman-adv: unify hash_entry field position in tt_local/global_entry
Antonio Quartulli [Fri, 21 Oct 2011 22:55:39 +0000]
batman-adv: unify hash_entry field position in tt_local/global_entry

commit 93840ac40bb0d0f177ef8af74e64671be67e8c37 upstream.

Function tt_response_fill_table() actually uses a tt_local_entry pointer to
iterate either over the local or the global table entries (it depends on the
what hash table is passed as argument). To iterate over such entries the
hlist_for_each_entry_rcu() macro has to access their "hash_entry" field which
MUST be at the same position in both the tt_global/local_entry structures.

Reported-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agobatman-adv: add sanity check when removing global tts
Simon Wunderlich [Wed, 19 Oct 2011 08:28:26 +0000]
batman-adv: add sanity check when removing global tts

commit 6e8014947d6469df1566e9e253805557c5c0e4e0 upstream.

After removing the batman-adv module, the hash may be already gone
when tt_global_del_orig() tries to clean the hash. This patch adds
a sanity check to avoid this.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Tested-by: Alexey Fisher <bug-track@fisher-privat.net>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agobatman-adv: remove references for global tt entries
Simon Wunderlich [Wed, 19 Oct 2011 09:02:25 +0000]
batman-adv: remove references for global tt entries

commit 531027fcddbcf81c9937dd04f08a7e8f11fd47d2 upstream.

struct tt_global_entry holds a reference to an orig_node which must be
decremented before deallocating the structure.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Tested-by: Alexey Fisher <bug-track@fisher-privat.net>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agobatman-adv: correctly set the data field in the TT_REPONSE packet
Antonio Quartulli [Mon, 17 Oct 2011 12:25:13 +0000]
batman-adv: correctly set the data field in the TT_REPONSE packet

commit 9d8523931f7f5eb8900077f0da0fbe6b8ad0010b upstream.

In the TT_RESPONSE packet, the number of carried entries is not correctly set.
This leads to a wrong interpretation of the packet payload on the receiver side
causing random entries to be added to the global translation table. Therefore
the latter gets always corrupted, triggering a table recovery all the time.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agobatman-adv: fix tt_local_reset_flags() function
Antonio Quartulli [Sun, 16 Oct 2011 16:53:37 +0000]
batman-adv: fix tt_local_reset_flags() function

commit 31901264511cf20c5ed33b8649a3ca9ce28df60b upstream.

Currently the counter of tt_local_entry structures (tt_local_num) is incremented
each time the tt_local_reset_flags() is invoked causing the node to send wrong
TT_REPONSE packets containing a copy of non-initialised memory thus corrupting
other nodes global translation table and making higher level communication
impossible.

Reported-by: Junkeun Song <jun361@gmail.com>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Acked-by: Junkeun Song <jun361@gmail.com>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agodrm/i915: always set FDI composite sync bit
Jesse Barnes [Mon, 10 Oct 2011 21:28:52 +0000]
drm/i915: always set FDI composite sync bit

commit c4f9c4c2b3f1831e932e04db992cf6fe92c2a95a upstream.

It's needed for 3 pipe support as well as just regular functionality
(e.g. DisplayPort).

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Tested-by: Adam Jackson <ajax@redhat.com>
Tested-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Robert Hooker <robert.hooker@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agodrm/i915: fix IVB cursor support
Jesse Barnes [Wed, 12 Oct 2011 18:10:21 +0000]
drm/i915: fix IVB cursor support

commit 65a21cd65316145f9302594be8e69074369e1050 upstream.

The cursor regs have moved around, add the offsets and new macros for
getting at them.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Tested-By: Eugeni Dodonov <eugeni.dodonov@intel.com>
Reviewed-By: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Robert Hooker <robert.hooker@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agoUSB: quirks: adding more quirky webcams to avoid squeaky audio
sordna [Fri, 28 Oct 2011 04:06:26 +0000]
USB: quirks: adding more quirky webcams to avoid squeaky audio

commit 0d145d7d4a241c321c832a810bb6edad18e2217b upstream.

The following patch contains additional affected webcam models, on top of the
patches commited to linux-next 2394d67e446bf616a0885167d5f0d397bdacfdfc
and 5b253d88cc6c65a23cefc457a5a4ef139913c5fc

Signed-off-by: sordna <sordna@gmail.com>
Cc: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agoUSB: add quirk for Logitech C600 web cam
Josh Boyer [Wed, 26 Oct 2011 17:53:17 +0000]
USB: add quirk for Logitech C600 web cam

commit 60c71ca972a2dd3fd9d0165b405361c8ad48349b upstream.

We've had another report of the "chipmunk" sound on a Logitech C600 webcam.
This patch resolves the issue.

Signed-off-by: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agoUSB: EHCI: fix HUB TT scheduling issue with iso transfer
Thomas Poussevin [Thu, 27 Oct 2011 16:46:48 +0000]
USB: EHCI: fix HUB TT scheduling issue with iso transfer

commit 811c926c538f7e8d3c08b630dd5844efd7e000f6 upstream.

The current TT scheduling doesn't allow to play and then record on a
full-speed device connected to a high speed hub.

The IN iso stream can only start on the first uframe (0-2 for a 165 us)
because of CSPLIT transactions.
For the OUT iso stream there no such restriction. uframe 0-5 are possible.

The idea of this patch is that the first uframe are precious (for IN TT iso
stream) and we should allocate the last uframes first if possible.

For that we reverse the order of uframe allocation (last uframe first).

Here an example :

hid interrupt stream
----------------------------------------------------------------------
uframe                |  0  |  1  |  2  |  3  |  4  |  5  |  6  |  7  |
----------------------------------------------------------------------
max_tt_usecs          | 125 | 125 | 125 | 125 | 125 | 125 | 30  |  0  |
----------------------------------------------------------------------
used usecs on a frame | 13  |  0  |  0  |  0  |  0  |  0  |  0  |  0  |
----------------------------------------------------------------------

iso OUT stream
----------------------------------------------------------------------
uframe                |  0  |  1  |  2  |  3  |  4  |  5  |  6  |  7  |
----------------------------------------------------------------------
max_tt_usecs          | 125 | 125 | 125 | 125 | 125 | 125 | 30  |  0  |
----------------------------------------------------------------------
used usecs on a frame | 13  | 125 |  39 |  0  |  0  |  0  |  0  |  0  |
----------------------------------------------------------------------

There no place for iso IN stream  (uframe 0-2 are used) and we got "cannot
submit datapipe for urb 0, error -28: not enough bandwidth" error.

With the patch this become.

iso OUT stream
----------------------------------------------------------------------
uframe                |  0  |  1  |  2  |  3  |  4  |  5  |  6  |  7  |
----------------------------------------------------------------------
max_tt_usecs          | 125 | 125 | 125 | 125 | 125 | 125 | 30  |  0  |
----------------------------------------------------------------------
used usecs on a frame |  13 |  0  |  0  |  0  | 125 |  39 |  0  |  0  |
----------------------------------------------------------------------

iso IN stream
----------------------------------------------------------------------
uframe                |  0  |  1  |  2  |  3  |  4  |  5  |  6  |  7  |
----------------------------------------------------------------------
max_tt_usecs          | 125 | 125 | 125 | 125 | 125 | 125 | 30  |  0  |
----------------------------------------------------------------------
used usecs on a frame |  13 |  0  | 125 | 40  | 125 |  39 |  0  |  0  |
----------------------------------------------------------------------

Signed-off-by: Matthieu Castet <matthieu.castet@parrot.com>
Signed-off-by: Thomas Poussevin <thomas.poussevin@parrot.com>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agousb-storage: Accept 8020i-protocol commands longer than 12 bytes
Alan Stern [Tue, 25 Oct 2011 14:50:58 +0000]
usb-storage: Accept 8020i-protocol commands longer than 12 bytes

commit 2f640bf4c94324aeaa1b6385c10aab8c5ad1e1cf upstream.

The 8020i protocol (also 8070i and QIC-157) uses 12-byte commands;
shorter commands must be padded.  Simon Detheridge reports that his
3-TB USB disk drive claims to use the 8020i protocol (which is
normally meant for ATAPI devices like CD drives), and because of its
large size, the disk drive requires the use of 16-byte commands.
However the usb_stor_pad12_command() routine in usb-storage always
sets the command length to 12, making the drive impossible to use.

Since the SFF-8020i specification allows for 16-byte commands in
future extensions, we may as well accept them.  This patch (as1490)
changes usb_stor_pad12_command() to leave commands larger than 12
bytes alone rather than truncating them.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Simon Detheridge <simon@widgit.com>
CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agoUSB: Fix Corruption issue in USB ftdi driver ftdi_sio.c
Andrew Worsley [Fri, 18 Nov 2011 12:13:33 +0000]
USB: Fix Corruption issue in USB ftdi driver ftdi_sio.c

commit b1ffb4c851f185e9051ba837c16d9b84ef688d26 upstream.

Fix for ftdi_set_termios() glitching output

ftdi_set_termios() is constantly setting the baud rate, data bits and parity
unnecessarily on every call, . When called while characters are being
transmitted can cause the FTDI chip to corrupt the serial port bit stream
output by stalling the output half a bit during the output of a character.
Simple fix by skipping this setting if the baud rate/data bits/parity are
unchanged.

Signed-off-by: Andrew Worsley <amworsley@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agoUSB: ark3116 initialisation fix
Bart Hartgers [Wed, 26 Oct 2011 11:29:42 +0000]
USB: ark3116 initialisation fix

commit 583182ba5f02c8c9be82ea550f2051eaec15b975 upstream.

This patch for the usb serial ark3116 driver fixes an initialisation
ordering bug that gets triggered on hotplug when using at least recent
debian/ubuntu userspace. Without it, ark3116 serial cables don't work.

Signed-off-by: Bart Hartgers <bart.hartgers@gmail.com>
Tested-by: law_ence.dev@ntlworld.com
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agoUSB: workaround for bug in old version of GCC
Alan Stern [Thu, 27 Oct 2011 15:20:21 +0000]
USB: workaround for bug in old version of GCC

commit 97ff22ee3b4cb3a334f7385e269773141aed702f upstream.

This patch (as1491) works around a bug in GCC-3.4.6, which is still
supposed to be supported.  The number of microseconds in the udelay()
call in quirk_usb_disable_ehci() is fixed at 100, but the compiler
doesn't understand this and generates a link-time error.  So we
replace the otherwise unused variable "delta" with a simple constant
100.  This same pattern is already used in other delay loops in that
source file.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Konrad Rzepecki <krzepecki@dentonet.pl>
Tested-by: Konrad Rzepecki <krzepecki@dentonet.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agoUSB: cdc-acm: Fix disconnect() vs close() race
Havard Skinnemoen [Wed, 9 Nov 2011 21:47:38 +0000]
USB: cdc-acm: Fix disconnect() vs close() race

commit 5dc2470c602da8851907ec18942cd876c3b4ecc1 upstream.

There's a race between the USB disconnect handler and the TTY close
handler which may cause the acm object to be freed while it's still
being used. This may lead to things like

http://article.gmane.org/gmane.linux.usb.general/54250

and

https://lkml.org/lkml/2011/5/29/64

This is the simplest fix I could come up with. Holding on to open_mutex
while closing the TTY device prevents acm_disconnect() from freeing the
acm object between acm->port.count drops to 0 and the TTY side of the
cleanups are finalized.

Signed-off-by: Havard Skinnemoen <hskinnemoen@google.com>
Cc: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agoUSB: pch_udc: Support new device LAPIS Semiconductor ML7831 IOH
Tomoya MORINAGA [Fri, 28 Oct 2011 00:37:34 +0000]
USB: pch_udc: Support new device LAPIS Semiconductor ML7831 IOH

commit 731ad81e2dd97e3f222361f7b3ff4b35639e46af upstream.

ML7831 is companion chip for Intel Atom E6xx series.

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>