platform/adaptation/renesas_rcar/renesas_kernel.git
10 years agoARM: tegra: Add MIPI calibration DT entries for Tegra114
Thierry Reding [Thu, 19 Dec 2013 15:59:27 +0000 (16:59 +0100)]
ARM: tegra: Add MIPI calibration DT entries for Tegra114

Add a device node for the MIPI calibration block on Tegra114. There is
no need to disable it by default because it only enables the clock while
performing calibration and therefore shouldn't be consuming any power
when unused.

Signed-off-by: Thierry Reding <treding@nvidia.com>
[swarren, add unit address to new DT node name]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoARM: tegra: Enable LVDS on Cardhu
Thierry Reding [Thu, 19 Dec 2013 15:59:26 +0000 (16:59 +0100)]
ARM: tegra: Enable LVDS on Cardhu

Add backlight and panel nodes for the Cardhu 10.1" WXGA TFT LCD panel.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoARM: tegra: Enable LVDS on Harmony
Thierry Reding [Thu, 19 Dec 2013 15:59:25 +0000 (16:59 +0100)]
ARM: tegra: Enable LVDS on Harmony

Add backlight and panel nodes for the Harmony TFT LCD panel.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoARM: tegra: set up /aliases for RTCs on Venice2
Stephen Warren [Thu, 19 Dec 2013 18:32:15 +0000 (11:32 -0700)]
ARM: tegra: set up /aliases for RTCs on Venice2

This ensures that the PMIC RTC provides the system time, rather than
the on-SoC RTC, which is not battery-backed.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoARM: tegra: add ams AS3722 device to Venice2 DT
Laxman Dewangan [Wed, 18 Dec 2013 12:52:59 +0000 (18:22 +0530)]
ARM: tegra: add ams AS3722 device to Venice2 DT

Add ams AS3722 entry for gpio/pincontrol and regulators
to venice2 DT.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoARM: tegra: fix missing pincontrol configuration for Venice2
Laxman Dewangan [Wed, 18 Dec 2013 12:52:58 +0000 (18:22 +0530)]
ARM: tegra: fix missing pincontrol configuration for Venice2

Compare the initial population of default pinmux configuration of Venice2
with the chrome branch and add/fix the missing configurations.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoARM: tegra: set up /aliases entries for RTCs
Stephen Warren [Mon, 9 Dec 2013 21:43:59 +0000 (14:43 -0700)]
ARM: tegra: set up /aliases entries for RTCs

This ensures that the PMIC RTC provides the system time, rather than
the on-SoC RTC, which is not battery-backed.

tegra124-venice2.dts isn't touched yet since we haven't added any off-
SoC RTC device to its device tree.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoARM: tegra: Add SPI controller nodes for Tegra124
Thierry Reding [Fri, 13 Dec 2013 16:24:05 +0000 (17:24 +0100)]
ARM: tegra: Add SPI controller nodes for Tegra124

The SPI controllers on Tegra124 are compatible with those found on the
Tegra114 SoC.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoARM: tegra: Fix misconfiguration of pin PH2 on Venice2
Thierry Reding [Fri, 13 Dec 2013 16:25:04 +0000 (17:25 +0100)]
ARM: tegra: Fix misconfiguration of pin PH2 on Venice2

This pin needs to be configured in pull-down, non-tristate mode in order
for the backlight to work correctly.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoARM: tegra: fix pinctrl misconfiguration on Venice2
Stephen Warren [Thu, 12 Dec 2013 21:40:30 +0000 (14:40 -0700)]
ARM: tegra: fix pinctrl misconfiguration on Venice2

Other boards use PULL_NONE for their debug UART pins, and without this
change, the board doesn't accept any serial input.

Don't set the I2S port pins to tristate mode, or no audio signal will
be sent out.

Fixes: 605ae5804385 ("ARM: tegra: add default pinctrl nodes for Venice2")
Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoARM: tegra: add default pinctrl nodes for Venice2
Laxman Dewangan [Mon, 9 Dec 2013 10:33:51 +0000 (16:03 +0530)]
ARM: tegra: add default pinctrl nodes for Venice2

Add the default pinmux configuration for the Tegra124 based
Venice2 platform.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoARM: tegra: correct Colibri T20 regulator settings
Stefan Agner [Fri, 6 Dec 2013 12:51:47 +0000 (13:51 +0100)]
ARM: tegra: correct Colibri T20 regulator settings

Set the parent of the regulators LDO2 to LDO9 according to the
schematic. Set the base voltage to 3.3V, there is only 3.3V on the
module itself.

Set the Core and CPU voltage to the specified voltages of 1.2V and
1.0V respectivly.

LDO6 should deliver 2.85V. The attached peripherals were not in
use so far.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoARM: tegra: convert dts files of Tegra30 platforms to use pinctrl defines
Laxman Dewangan [Thu, 5 Dec 2013 10:44:09 +0000 (16:14 +0530)]
ARM: tegra: convert dts files of Tegra30 platforms to use pinctrl defines

Use Tegra pinconrol dt-binding macro to set the values of different pinmux
properties of Tegra30 platforms.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoARM: tegra: convert dts files of Tegra20 platforms to use pinctrl defines
Laxman Dewangan [Thu, 5 Dec 2013 10:44:08 +0000 (16:14 +0530)]
ARM: tegra: convert dts files of Tegra20 platforms to use pinctrl defines

Use Tegra pinconrol dt-binding macro to set the values of different pinmux
properties of Tegra20 platforms.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoARM: tegra: convert dts files of Tegra114 platforms to use pinctrl defines
Laxman Dewangan [Thu, 5 Dec 2013 10:44:07 +0000 (16:14 +0530)]
ARM: tegra: convert dts files of Tegra114 platforms to use pinctrl defines

Use Tegra pinconrol dt-binding macro to set the values of different pinmux
properties of Tegra114 platforms.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoARM: tegra: Add header file for pinctrl constants
Laxman Dewangan [Thu, 5 Dec 2013 10:44:06 +0000 (16:14 +0530)]
ARM: tegra: Add header file for pinctrl constants

This new header file defines pincontrol constants for Tegra to
use from Tegra's DTS file for pincontrol properties option.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoARM: tegra: convert device tree files to use key defines
Laxman Dewangan [Mon, 2 Dec 2013 13:09:57 +0000 (18:39 +0530)]
ARM: tegra: convert device tree files to use key defines

Use key code macros for all key code refernced for keys.

For tegra20-seaboard.dts and tegra20-harmony.dts:
  The key comment for key (16th row and 1st column) is KEY_KPSLASH but
  code is 0x004e which is the key code for KEY_KPPLUS. As there other
  key exist with KY_KPPLUS, I am assuming key code is wrong and comment
  is fine. With this assumption, I am keeping the key code as KEY_KPSLASH.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoARM: tegra: Enable PWM on Venice2
Thierry Reding [Mon, 18 Nov 2013 16:00:35 +0000 (17:00 +0100)]
ARM: tegra: Enable PWM on Venice2

Subsequent patches will need to reference a PWM channel for backlight
support, so enable the PWM device and assign a label to it.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoARM: tegra: Add Tegra124 PWM support
Thierry Reding [Mon, 18 Nov 2013 16:00:34 +0000 (17:00 +0100)]
ARM: tegra: Add Tegra124 PWM support

The PWM controller on Tegra124 is the same as the one on earlier SoC
generations.

Signed-off-by: Thierry Reding <treding@nvidia.com>
[swarren, added reset properties]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoARM: tegra: add sound card to Venice2 DT
Stephen Warren [Wed, 4 Dec 2013 00:26:12 +0000 (17:26 -0700)]
ARM: tegra: add sound card to Venice2 DT

Venice2 uses the MAX98090 audio CODEC, and supports built-in speakers,
and a combo headphones/microphone jack. Add a top-level sound card node
to represent this.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoARM: tegra: add audio-related device to Tegra124 DT
Stephen Warren [Wed, 4 Dec 2013 22:05:51 +0000 (15:05 -0700)]
ARM: tegra: add audio-related device to Tegra124 DT

Tegra124 contains a similar set of audio devices to previous Tegra chips.
Specifically, there is an AHUB device which contains DMA FIFOs and audio
routing, and which hosts various audio-related components such as I2S
controllers.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoARM: tegra: enable I2C controllers on Venice2
Stephen Warren [Tue, 3 Dec 2013 23:44:35 +0000 (16:44 -0700)]
ARM: tegra: enable I2C controllers on Venice2

Enable all the I2C controllers that are wired up on Venice2. I don't
know the correct I2C bus clock rates, so set them all to a conservative
100KHz for now.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoARM: tegra: add I2C controllers to Tegra124 DT
Stephen Warren [Tue, 3 Dec 2013 23:29:04 +0000 (16:29 -0700)]
ARM: tegra: add I2C controllers to Tegra124 DT

Tegra124 has 6 I2C controllers. The first 5 have identical configuration
to Tegra114, but the sixth obviously has different interrupt/... IDs.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoARM: tegra: add MMC controllers to Tegra124 DT
Stephen Warren [Thu, 31 Oct 2013 23:23:05 +0000 (17:23 -0600)]
ARM: tegra: add MMC controllers to Tegra124 DT

Tegra124 has 4 MMC controllers just like previous versions of the SoC.
Note that there are some non-backwards-compatible HW differences, and
hence a new DT compatible value must be used to describe the HW.

Also enable the relevant controllers in the Venice2 board DT.

power-gpios property suggested by Thierry Reding.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
10 years agoARM: tegra: add Tegra124 pinmux node to DT
Stephen Warren [Fri, 1 Nov 2013 20:03:59 +0000 (14:03 -0600)]
ARM: tegra: add Tegra124 pinmux node to DT

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Acked by: Laxman Dewangan <ldewangan@nvidia.com>

10 years agoARM: tegra: add APB DMA controller to Tegra124 DT
Stephen Warren [Fri, 15 Nov 2013 19:22:53 +0000 (12:22 -0700)]
ARM: tegra: add APB DMA controller to Tegra124 DT

Instantiate the APB DMA controller in the Tegra124 DT, and add all
DMA-related properties to other DT nodes that rely on (reference) the
DMA controller's node.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
10 years agoARM: tegra: add reset properties to Tegra124 DTs
Stephen Warren [Thu, 7 Nov 2013 19:20:57 +0000 (12:20 -0700)]
ARM: tegra: add reset properties to Tegra124 DTs

The DT bindings now require module resets to be specified. The earlier
patches which added these nodes were originally written before that
requirement.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
10 years agoARM: tegra: add clock properties for devices of Tegra124
Joseph Lo [Tue, 8 Oct 2013 07:47:40 +0000 (15:47 +0800)]
ARM: tegra: add clock properties for devices of Tegra124

This patch adds clock properties for devices in the DT for basic support
of Tegra124 SoC.

Signed-off-by: Joseph Lo <josephl@nvidia.com>
[swarren, added missing unit address to "clock" node]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoARM: tegra: fix node sort order
Stephen Warren [Tue, 26 Nov 2013 21:43:45 +0000 (14:43 -0700)]
ARM: tegra: fix node sort order

For Tegra DT files, I've been attempting to keep the nodes sorted in
the order:
1) Nodes with reg, in order of reg.
2) Nodes without reg, alphabetically.

This patch fixes a few escapees that I missed:-(

The diffs look larger than they really are, because sometimes when one
node was moved up or down, diff chose to represent this as many other
nodes being moved the other way!

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoARM: tegra: add missing unit addresses to DT
Stephen Warren [Tue, 26 Nov 2013 00:53:16 +0000 (17:53 -0700)]
ARM: tegra: add missing unit addresses to DT

DT node names should include a unit address iff the node has a reg
property. For Tegra DTs at least, we were previously applying a different
rule, namely that node names only needed to include a unit address if it
was required to make the node name unique. Consequently, many unit
addresses are missing. Add them.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoARM: tegra: add port FF to GPIO IDs
Ashwini Ghuge [Mon, 18 Nov 2013 13:10:41 +0000 (18:40 +0530)]
ARM: tegra: add port FF to GPIO IDs

NVIDIA Tegra124 supports has the new GPIO port as GPIO_FF.
Add the macro for this port name.

Signed-off-by: Ashwini Ghuge <aghuge@nvidia.com>
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agospi: tegra: checking for ERR_PTR instead of NULL
Dan Carpenter [Mon, 16 Dec 2013 14:02:10 +0000 (17:02 +0300)]
spi: tegra: checking for ERR_PTR instead of NULL

dma_request_slave_channel() returns NULL on error and not ERR_PTRs.
I've fixed this by using dma_request_slave_channel_reason() which does
return ERR_PTRs.

Fixes: a915d150f68d ('spi: tegra: convert to standard DMA DT bindings')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoASoC: tegra: update module reset list for Tegra124
Stephen Warren [Wed, 4 Dec 2013 18:13:01 +0000 (11:13 -0700)]
ASoC: tegra: update module reset list for Tegra124

Tegra124 adds a number of extra modules into the configlink bus, which
must be taken out of reset before the bus is used. Update the AHUB
driver to know about these extra modules (the AHUB HW module hosts the
configlink bus).

Based-on-work-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Based-on-work-by: Songhee Baek <sbaek@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Mark Brown <broonie@linaro.org>
---
This patch depends on "ASoC: tegra: use reset framework" to compile,
which is ack'd and slated to go through a (large) topic branch in the
Tegra tree. So, we can either:

a) Merge that Tegra topic branch into the ASoC tree, then apply this.
   Note that I haven't created the topic branch yet, since I'm still
   waiting for DMA dependencies to be applied.

b) Apply this change to the Tegra tree too. This change isn't directly
   related to the changes in the Tegra tree; it just makes use of the new
   reset controller feature that's introduced there.

10 years agoclk: tegra: remove bogus PCIE_XCLK
Stephen Warren [Thu, 7 Nov 2013 17:58:21 +0000 (10:58 -0700)]
clk: tegra: remove bogus PCIE_XCLK

The "pcie_xclk" clock is not actually a clock at all, but rather a reset
domain. Now that the custom Tegra module reset API has been removed, we
can remove the definition of any "clocks" that existed solely to support
it.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Acked-By: Peter De Schrijver <pdeschrijver@nvidia.com>
10 years agoclk: tegra: remove legacy reset APIs
Stephen Warren [Wed, 6 Nov 2013 23:58:16 +0000 (16:58 -0700)]
clk: tegra: remove legacy reset APIs

Now that no code uses the custom Tegra module reset API, we can remove
its implementation.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Acked-By: Peter De Schrijver <pdeschrijver@nvidia.com>
10 years agoARM: tegra: remove legacy DMA entries from DT
Stephen Warren [Mon, 11 Nov 2013 20:25:54 +0000 (13:25 -0700)]
ARM: tegra: remove legacy DMA entries from DT

Now that all Tegra drivers have been converted to use DMA APIs which
retrieve DMA channel information from standard DMA DT properties, we can
remove all the legacy DT DMA-related properties.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
10 years agoARM: tegra: remove legacy clock entries from DT
Stephen Warren [Thu, 7 Nov 2013 17:59:42 +0000 (10:59 -0700)]
ARM: tegra: remove legacy clock entries from DT

Now that all Tegra drivers have been converted to use the common reset
framework, we can remove all the legacy DT clocks/clock-names entries for
"clocks" that were only used with the old custom Tegra module reset API.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
10 years agoUSB: EHCI: tegra: use reset framework
Stephen Warren [Wed, 6 Nov 2013 23:53:58 +0000 (16:53 -0700)]
USB: EHCI: tegra: use reset framework

Tegra's clock driver now provides an implementation of the common
reset API (include/linux/reset.h). Use this instead of the old Tegra-
specific API; that will soon be removed.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Thierry Reding <treding@nvidia.com>
10 years agoInput: tegra-kbc - use reset framework
Stephen Warren [Wed, 6 Nov 2013 23:48:16 +0000 (16:48 -0700)]
Input: tegra-kbc - use reset framework

Tegra's clock driver now provides an implementation of the common
reset API (include/linux/reset.h). Use this instead of the old Tegra-
specific API; that will soon be removed.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
10 years agoserial: tegra: convert to standard DMA DT bindings
Stephen Warren [Mon, 11 Nov 2013 21:16:38 +0000 (14:16 -0700)]
serial: tegra: convert to standard DMA DT bindings

By using dma_request_slave_channel_or_err(), the DMA slave ID can be
looked up from standard DT properties, and squirrelled away during
channel allocation. Hence, there's no need to use a custom DT property
to store the slave ID.

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
10 years agoserial: tegra: use reset framework
Stephen Warren [Wed, 6 Nov 2013 23:50:44 +0000 (16:50 -0700)]
serial: tegra: use reset framework

Tegra's clock driver now provides an implementation of the common
reset API (include/linux/reset.h). Use this instead of the old Tegra-
specific API; that will soon be removed.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Thierry Reding <treding@nvidia.com>
10 years agospi: tegra: convert to standard DMA DT bindings
Stephen Warren [Mon, 11 Nov 2013 20:13:47 +0000 (13:13 -0700)]
spi: tegra: convert to standard DMA DT bindings

By using dma_request_slave_channel_or_err(), the DMA slave ID can be
looked up from standard DT properties, and squirrelled away during
channel allocation. Hence, there's no need to use a custom DT property
to store the slave ID.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Mark Brown <broonie@linaro.org>
10 years agospi: tegra: use reset framework
Stephen Warren [Wed, 6 Nov 2013 23:31:24 +0000 (16:31 -0700)]
spi: tegra: use reset framework

Tegra's clock driver now provides an implementation of the common
reset API (include/linux/reset.h). Use this instead of the old Tegra-
specific API; that will soon be removed.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Mark Brown <broonie@linaro.org>
Reviewed-by: Thierry Reding <treding@nvidia.com>
10 years agostaging: nvec: use reset framework
Stephen Warren [Wed, 6 Nov 2013 23:46:24 +0000 (16:46 -0700)]
staging: nvec: use reset framework

Tegra's clock driver now provides an implementation of the common
reset API (include/linux/reset.h). Use this instead of the old Tegra-
specific API; that will soon be removed.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Thierry Reding <treding@nvidia.com>
10 years agoi2c: tegra: use reset framework
Stephen Warren [Wed, 6 Nov 2013 23:42:05 +0000 (16:42 -0700)]
i2c: tegra: use reset framework

Tegra's clock driver now provides an implementation of the common
reset API (include/linux/reset.h). Use this instead of the old Tegra-
specific API; that will soon be removed.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
Reviewed-by: Thierry Reding <treding@nvidia.com>
10 years agoASoC: tegra: convert to standard DMA DT bindings
Stephen Warren [Mon, 11 Nov 2013 22:21:01 +0000 (15:21 -0700)]
ASoC: tegra: convert to standard DMA DT bindings

By passing no flags when calling snd_dmaengine_pcm_register() from
tegra_pcm.c, we end up using dma_request_slave_channel() rather than
dmaengine_pcm_compat_request_channel(), and hence rely on the standard
DMA DT bindings and stashing the DMA slave ID away during channel
allocation. This means there's no need to use a custom DT property to
store the slave ID. So, remove all the code that parsed it.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: tegra: allocate AHUB FIFO during probe() not startup()
Stephen Warren [Fri, 15 Nov 2013 18:48:47 +0000 (11:48 -0700)]
ASoC: tegra: allocate AHUB FIFO during probe() not startup()

The Tegra30 I2S driver currently allocates DMA FIFOs from the AHUB only
when an audio stream starts playback. This is theoretically nice for
resource sharing, but makes no practical difference for any configuration
the drivers currently support. However, this deferral prevents conversion
to the standard DMA DT bindings, since conversion requires knowledge of
the specific DMA channel to be allocated, which in turn depends on which
specific FIFO was allocated.

For this reason, move the FIFO allocation into probe() to allow later
conversion to the standard DMA DT bindings.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: tegra: call pm_runtime APIs around register accesses
Stephen Warren [Fri, 15 Nov 2013 18:29:45 +0000 (11:29 -0700)]
ASoC: tegra: call pm_runtime APIs around register accesses

Call pm_runtime_get_sync() before all register accesses; the HW requires
clocks to be running when accessing registers.

This hasn't been needed to date, since all register IO was performed
while playback was active, and hence the ASoC core had already called
pm_runtime_get(). However, an imminent future commit will allocate and
set up the FIFOs and routing during probe(), when that "protection"
won't be in place.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: tegra: use reset framework
Stephen Warren [Wed, 6 Nov 2013 22:18:22 +0000 (15:18 -0700)]
ASoC: tegra: use reset framework

Tegra's clock driver now provides an implementation of the common
reset API (include/linux/reset.h). Use this instead of the old Tegra-
specific API; that will soon be removed.

This change also renames "clock"/"clk" to "modules"/"mod" in symbols
related to entries in configlink_clocks[], since:
- We don't care about clock handles any more, but rather reset handles,
  so the old name isn't applicable.
- It really is a list of modules on the bus, about which we currently
  only care about reset handles.
If we start caring about any other aspect of the modules in the future,
we won't have to rename all these symbols again.

Note: The addition of "depends COMMON_CLOCK" is something that was missing
before, not a new requirement.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Mark Brown <broonie@linaro.org>
Reviewed-by: Thierry Reding <treding@nvidia.com>
10 years agodma: tegra: register as an OF DMA controller
Stephen Warren [Mon, 11 Nov 2013 20:09:35 +0000 (13:09 -0700)]
dma: tegra: register as an OF DMA controller

Call of_dma_controller_register() so that DMA clients can look up the
Tegra DMA controller using standard APIs. This requires the of_xlate()
function to save off the DMA slave ID, and for tegra_dma_slave_config()
not to over-write this information; once DMA client drivers are converted
to dma_request_slave_channel() and DT-based lookups, they won't set this
field of struct dma_slave_config anymore.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Thierry Reding <treding@nvidia.com>
10 years agodma: tegra: use reset framework
Stephen Warren [Wed, 6 Nov 2013 23:35:34 +0000 (16:35 -0700)]
dma: tegra: use reset framework

Tegra's clock driver now provides an implementation of the common
reset API (include/linux/reset.h). Use this instead of the old Tegra-
specific API; that will soon be removed.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
10 years agoARM: tegra: pass reset to tegra_powergate_sequence_power_up()
Stephen Warren [Wed, 6 Nov 2013 22:45:46 +0000 (15:45 -0700)]
ARM: tegra: pass reset to tegra_powergate_sequence_power_up()

Tegra's clock driver now provides an implementation of the common
reset API (include/linux/reset.h). Use this instead of the old Tegra-
specific API; that will soon be removed.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-By: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
10 years agodrm/tegra: use reset framework
Stephen Warren [Wed, 6 Nov 2013 23:20:54 +0000 (16:20 -0700)]
drm/tegra: use reset framework

Tegra's clock driver now provides an implementation of the common
reset API (include/linux/reset.h). Use this instead of the old Tegra-
specific API; that will soon be removed.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-By: Terje Bergstrom <tbergstrom@nvidia.com>
10 years agopci: tegra: use reset framework
Stephen Warren [Wed, 6 Nov 2013 22:56:58 +0000 (15:56 -0700)]
pci: tegra: use reset framework

Tegra's clock driver now provides an implementation of the common
reset API (include/linux/reset.h). Use this instead of the old Tegra-
specific API; that will soon be removed.

The old Tegra-specific API used a struct clock to represent the module
to reset. Some of the clocks retrieved during probe() were only used for
reset purposes, and indeed aren't even true clocks. So, there's no need
to get() them any more.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
10 years agoclk: tegra: implement a reset driver
Stephen Warren [Wed, 6 Nov 2013 00:33:17 +0000 (17:33 -0700)]
clk: tegra: implement a reset driver

The Tegra CAR module implements both a clock and reset controller. So
far, the driver exposes the clock feature via the common clock API and
the reset feature using a custom API. This patch adds an implementation
of the common reset framework API (include/linux/reset*.h). The legacy
reset implementation will be removed once all drivers have been
converted.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Acked-By: Peter De Schrijver <pdeschrijver@nvidia.com>
10 years agoARM: tegra: select the reset framework
Stephen Warren [Wed, 6 Nov 2013 22:23:29 +0000 (15:23 -0700)]
ARM: tegra: select the reset framework

The Tegra clock driver is built unconditionally when Tegra support is
enabled. In order to avoid having to ifdef the forthcoming reset driver
implementation, have ARCH_TEGRA select RESET_CONTROLLER.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
10 years agoARM: tegra: update DT files to add DMA properties
Stephen Warren [Mon, 11 Nov 2013 20:05:59 +0000 (13:05 -0700)]
ARM: tegra: update DT files to add DMA properties

This patch switches the Tegra DT files to use the standard DMA DT bindings
rather than custom properties. Note that the legacy properties are not yet
removed; the drivers must be updated to use the new properties first.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
10 years agoARM: tegra: update DT files to add reset properties
Stephen Warren [Wed, 6 Nov 2013 21:01:16 +0000 (14:01 -0700)]
ARM: tegra: update DT files to add reset properties

An earlier patch updated the Tegra DT bindings to require resets and
reset-names properties to be filled in. This patch updates the DT files
to include those properties.

Note that any legacy clocks and clock-names entries that are replaced by
reset properties are not yet removed; the drivers must be updated to use
the new resets and reset-names properties first.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoARM: tegra: document use of standard DMA DT bindings
Stephen Warren [Mon, 11 Nov 2013 20:04:19 +0000 (13:04 -0700)]
ARM: tegra: document use of standard DMA DT bindings

Update all the Tegra DT bindings to require the standard dmas/dma-names
properties rather than non-standard nvidia,dma-request-selector property.

This is a DT-ABI-incompatible change. It is the second of two changes
required for me to consider the Tegra DT bindings as stable, the other
being the previous conversion to the common reset bindings.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoARM: tegra: document reset properties in DT bindings
Stephen Warren [Thu, 7 Nov 2013 17:11:27 +0000 (10:11 -0700)]
ARM: tegra: document reset properties in DT bindings

Update all the Tegra DT bindings to require resets/reset-names properties
where the HW module has reset inputs. Remove any entries from clocks or
clock-names that were only required to identify reset inputs, rather than
referring to real clocks.

This is a DT-ABI-incompatible change. It is the first of two changes
required for me to consider the Tegra DT bindings as stable, the other
being conversion to the common DMA DT bindings.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-By: Terje Bergstrom <tbergstrom@nvidia.com>
10 years agoARM: tegra: add missing clock documentation to DT bindings
Stephen Warren [Wed, 6 Nov 2013 21:00:25 +0000 (14:00 -0700)]
ARM: tegra: add missing clock documentation to DT bindings

Many of the Tegra DT binding documents say nothing about the clocks or
clock-names properties, yet those are present and required in DT files.
This patch simply updates the documentation file to match the implicit
definition of the binding, based on real-world DT content.

All Tegra bindings that mention clocks are updated to have consistent
wording and formatting of the clock-related properties.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-By: Terje Bergstrom <tbergstrom@nvidia.com>
10 years agoMerge tag 'clk-tegra-for-3.14' into for-3.14/dmas-resets-rework
Stephen Warren [Wed, 11 Dec 2013 23:39:59 +0000 (16:39 -0700)]
Merge tag 'clk-tegra-for-3.14' into for-3.14/dmas-resets-rework

Tegra clk branch for 3.14

10 years agoMerge tag 'asoc-dma-v3.14' into for-3.14/dmas-resets-rework
Stephen Warren [Wed, 11 Dec 2013 23:39:48 +0000 (16:39 -0700)]
Merge tag 'asoc-dma-v3.14' into for-3.14/dmas-resets-rework

ASoC: dma: Generic ASoC dmaengine driver enhancements

This is the work so far on dmaengine for v3.14, it is being cross merged
into the Tegra tree to support a large DMA overhaul there.  The main
additions are a change in the DMA request API which allows better
interaction at system startup using deferred probes and methods for
overriding the default device and channel names used to request DMA.

10 years agoMerge branch 'for-3.14/deps-from-dma-of' into for-3.14/dmas-resets-rework
Stephen Warren [Wed, 11 Dec 2013 23:39:35 +0000 (16:39 -0700)]
Merge branch 'for-3.14/deps-from-dma-of' into for-3.14/dmas-resets-rework

This merges git://git.infradead.org/users/vkoul/slave-dma.git topic/of

10 years agoMerge branch 'for-3.14/deps-from-dma-defer_probe' into for-3.14/dmas-resets-rework
Stephen Warren [Wed, 11 Dec 2013 23:38:41 +0000 (16:38 -0700)]
Merge branch 'for-3.14/deps-from-dma-defer_probe' into for-3.14/dmas-resets-rework

This merges git://git.infradead.org/users/vkoul/slave-dma.git topic/defer_probe

10 years agoASoC: dmaengine: fix deferred probe detection
Stephen Warren [Wed, 11 Dec 2013 18:20:50 +0000 (11:20 -0700)]
ASoC: dmaengine: fix deferred probe detection

Check the return value of dma_request_slave_channel_reason() to see if
deferred probe happens, not the variable the return value will be
assigned to later.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Fixes: 5eda87b890f8 ("ASoC: dmaengine: support deferred probe for DMA channels")
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: dmaengine: support deferred probe for DMA channels
Stephen Warren [Tue, 10 Dec 2013 18:11:02 +0000 (11:11 -0700)]
ASoC: dmaengine: support deferred probe for DMA channels

Enhance dmaengine_pcm_request_chan_of() to support deferred probe for
DMA channels, by using the new dma_request_slave_channel_or_err() API.
This prevents snd_dmaengine_pcm_register() from succeeding without
acquiring DMA channels due to the relevant DMA controller not yet being
registered.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoMerge branch 'topic/defer_probe' of git://git.infradead.org/users/vkoul/slave-dma...
Mark Brown [Wed, 11 Dec 2013 11:12:20 +0000 (11:12 +0000)]
Merge branch 'topic/defer_probe' of git://git.infradead.org/users/vkoul/slave-dma into asoc-dma

The following branch/patch is a dependency for my "ASoC: dmaengine:
support deferred probe for DMA channels". If you could pull the branch
below into your topic/dma, then merge my ASoC patch, that would be
great. I would then like to merge your topic/dma into the Tegra tree as
a baseline for the Tegra conversion to the standard DMA DT bindings.

Vinod has confirmed this his topic/defer_probe branch is stable, and
won't be rebased:

https://lkml.org/lkml/2013/12/10/463

10 years agodma: add dma_get_any_slave_channel(), for use in of_xlate()
Stephen Warren [Tue, 26 Nov 2013 19:40:51 +0000 (12:40 -0700)]
dma: add dma_get_any_slave_channel(), for use in of_xlate()

mmp_pdma.c implements a custom of_xlate() function that is 95% identical
to what Tegra will need. Create a function to implement the common part,
so everyone doesn't just cut/paste the implementation.

Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: dmaengine@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
10 years agodma: add channel request API that supports deferred probe
Stephen Warren [Tue, 26 Nov 2013 17:04:22 +0000 (10:04 -0700)]
dma: add channel request API that supports deferred probe

dma_request_slave_channel() simply returns NULL whenever DMA channel
lookup fails. Lookup could fail for two distinct reasons:

a) No DMA specification exists for the channel name.
   This includes situations where no DMA specifications exist at all, or
   other general lookup problems.

b) A DMA specification does exist, yet the driver for that channel is not
   yet registered.

Case (b) should trigger deferred probe in client drivers. However, since
they have no way to differentiate the two situations, it cannot.

Implement new function dma_request_slave_channel_reason(), which performs
identically to dma_request_slave_channel(), except that it returns an
error-pointer rather than NULL, which allows callers to detect when
deferred probe should occur.

Eventually, all drivers should be converted to this new API, the old API
removed, and the new API renamed to the more desirable name. This patch
doesn't convert the existing API and all drivers in one go, since some
drivers call dma_request_slave_channel() then dma_request_channel() if
that fails. That would require either modifying dma_request_channel() in
the same way, or adding extra error-handling code to all affected
drivers, and there are close to 100 drivers using the other API, rather
than just the 15-20 or so that use dma_request_slave_channel(), which
might be tenable in a single patch.

acpi_dma_request_slave_chan_by_name() doesn't currently implement
deferred probe. It should, but this will be addressed later.

Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
10 years agoASoC: dmaengine: add custom DMA config to snd_dmaengine_pcm_config
Stephen Warren [Tue, 3 Dec 2013 21:26:34 +0000 (14:26 -0700)]
ASoC: dmaengine: add custom DMA config to snd_dmaengine_pcm_config

Add fields to struct snd_dmaengine_pcm_config to allow custom:

- DMA channel names.

  This is useful when the default "tx" and "rx" channel names don't
  apply, for example if a HW module supports multiple channels, each
  having different DMA channel names. This is the case with the FIFOs
  in Tegra's AHUB. This new facility can replace
  SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME.

- DMA device

  This allows requesting DMA channels for a device other than the device
  which is registering the "PCM" driver. This is quite unusual, but is
  currently useful on Tegra. In much HW, and in Tegra20, each DAI HW
  module contains its own FIFOs which DMA writes to. However, in Tegra30,
  the DMA FIFOs were split out AHUB HW module, which then routes the data
  through a cross-bar, and into the DAI HW modules. However, the current
  ASoC driver structure does not expose this detail, and acts as if the
  FIFOs are still part of the DAI HW modules. Consequently, the "PCM"
  driver is registered with the DAI HW module, yet the DMA channels must
  be looked up in the AHUB HW module's device tree node. This new config
  field allows that to happen. Eventually, the Tegra drivers will be
  reworked to fully expose the AHUB, and this config field can be
  removed.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoMerge remote-tracking branch 'asoc/fix/dma' into asoc-dma
Mark Brown [Mon, 9 Dec 2013 18:44:55 +0000 (18:44 +0000)]
Merge remote-tracking branch 'asoc/fix/dma' into asoc-dma

10 years agoASoC: don't leak on error in snd_dmaengine_pcm_register
Stephen Warren [Tue, 3 Dec 2013 21:26:33 +0000 (14:26 -0700)]
ASoC: don't leak on error in snd_dmaengine_pcm_register

If snd_dmaengine_pcm_register()'s call to snd_soc_add_platform() fails,
all objects allocated during registration are leaked. Fix this by adding
error-handling code.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: restructure dmaengine_pcm_request_chan_of()
Stephen Warren [Tue, 3 Dec 2013 21:26:32 +0000 (14:26 -0700)]
ASoC: restructure dmaengine_pcm_request_chan_of()

Restructure the internals of dmaengine_pcm_request_chan_of() as a loop
over all channels to be allocated. This makes it easier to add logic
that applies to all allocated channels, without having to duplicate that
logic in each of the half-duplex/full-duplex paths.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoLinux 3.13-rc3
Linus Torvalds [Fri, 6 Dec 2013 17:34:04 +0000 (09:34 -0800)]
Linux 3.13-rc3

10 years agoMerge tag 'trace-fixes-3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 6 Dec 2013 16:34:16 +0000 (08:34 -0800)]
Merge tag 'trace-fixes-3.13-rc2' of git://git./linux/kernel/git/rostedt/linux-trace

Pull tracing fix from Steven Rostedt:
 "A regression showed up that there's a large delay when enabling all
  events.  This was prevalent when FTRACE_SELFTEST was enabled which
  enables all events several times, and caused the system bootup to
  pause for over a minute.

  This was tracked down to an addition of a synchronize_sched()
  performed when system call tracepoints are unregistered.

  The synchronize_sched() is needed between the unregistering of the
  system call tracepoint and a deletion of a tracing instance buffer.
  But placing the synchronize_sched() in the unreg of *every* system
  call tracepoint is a bit overboard.  A single synchronize_sched()
  before the deletion of the instance is sufficient"

* tag 'trace-fixes-3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  tracing: Only run synchronize_sched() at instance deletion time

10 years agoMerge git://git.kvack.org/~bcrl/aio-next
Linus Torvalds [Fri, 6 Dec 2013 16:32:59 +0000 (08:32 -0800)]
Merge git://git.kvack.org/~bcrl/aio-next

Pull aio fix from Benjamin LaHaise:
 "AIO fix from Gu Zheng that fixes a GPF that Dave Jones uncovered with
  trinity"

* git://git.kvack.org/~bcrl/aio-next:
  aio: clean up aio ring in the fail path

10 years agoMerge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Fri, 6 Dec 2013 16:30:18 +0000 (08:30 -0800)]
Merge tag 'scsi-fixes' of git://git./linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "This is a set of nine fixes (and one author update).

  The libsas one should fix discovery in eSATA devices, the WRITE_SAME
  one is the largest, but it should fix a lot of problems we've been
  getting with the emulated RAID devices (they've been effectively lying
  about support and then firmware has been choking on the commands).

  The rest are various crash, hang or warn driver fixes"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  [SCSI] bfa: Fix crash when symb name set for offline vport
  [SCSI] enclosure: fix WARN_ON in dual path device removing
  [SCSI] pm80xx: Tasklets synchronization fix.
  [SCSI] pm80xx: Resetting the phy state.
  [SCSI] pm80xx: Fix for direct attached device.
  [SCSI] pm80xx: Module author addition
  [SCSI] hpsa: return 0 from driver probe function on success, not 1
  [SCSI] hpsa: do not discard scsi status on aborted commands
  [SCSI] Disable WRITE SAME for RAID and virtual host adapter drivers
  [SCSI] libsas: fix usage of ata_tf_to_fis

10 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Fri, 6 Dec 2013 16:28:35 +0000 (08:28 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/linux-security

Pull IMA fixes from James Morris:
 "Here are two more fixes for IMA"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
  ima: properly free ima_template_entry structures
  ima: Do not free 'entry' before it is initialized

10 years agoMerge tag 'dt-fixes-for-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh...
Linus Torvalds [Fri, 6 Dec 2013 16:27:47 +0000 (08:27 -0800)]
Merge tag 'dt-fixes-for-3.13' of git://git./linux/kernel/git/robh/linux

Pull devicetree fixes from Rob Herring:
 - Various DT binding documentation updates
 - Add Kumar Gala and remove Stephen Warren as DT binding maintainers

* tag 'dt-fixes-for-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
  dt: binding: reword PowerPC 8xxx GPIO documentation
  ARM: tegra: delete nvidia,tegra20-spi.txt binding
  hwmon: ntc_thermistor: Fix typo (pullup-uV -> pullup-uv)
  of: add vendor prefix for GMT
  clk: exynos: Fix typos in DT bindings documentation
  of: Add vendor prefix for LG Corporation
  Documentation: net: fsl-fec.txt: Add phy-supply entry
  ARM: dts: doc: Document missing binding for omap5-mpu
  dt-bindings: add ARMv8 PMU binding
  MAINTAINERS: remove swarren from DT bindings
  MAINTAINERS: Add Kumar to Device Tree Binding maintainers group

10 years agoaio: clean up aio ring in the fail path
Gu Zheng [Wed, 4 Dec 2013 10:19:06 +0000 (18:19 +0800)]
aio: clean up aio ring in the fail path

Clean up the aio ring file in the fail path of aio_setup_ring
and ioctx_alloc. And maybe it can fix the GPF issue reported by
Dave Jones:
https://lkml.org/lkml/2013/11/25/898

Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
Signed-off-by: Benjamin LaHaise <bcrl@kvack.org>
10 years agoMerge branch 'free-memory' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar...
James Morris [Fri, 6 Dec 2013 14:21:02 +0000 (01:21 +1100)]
Merge branch 'free-memory' of git://git./linux/kernel/git/zohar/linux-integrity into for-linus

10 years agoMerge tag 'pm-3.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Linus Torvalds [Fri, 6 Dec 2013 02:26:40 +0000 (18:26 -0800)]
Merge tag 'pm-3.13-rc3' of git://git./linux/kernel/git/rafael/linux-pm

Pull power management fixes from Rafael Wysocki:

 - cpufreq regression fix from Bjørn Mork restoring the pre-3.12
   behavior of the framework during system suspend/hibernation to avoid
   garbage sysfs files from being left behind in case of a suspend error

 - PNP regression fix to restore the correct states of devices after
   resume from hibernation broken in 3.12.  From Dmitry Torokhov.

 - cpuidle fix to prevent cpuidle device unregistration from crashing
   due to a NULL pointer dereference if cpuidle has been disabled from
   the kernel command line.  From Konrad Rzeszutek Wilk.

 - intel_idle fix for the C6 state definition on Intel Avoton/Rangeley
   processors from Arne Bockholdt.

 - Power capping framework fix to make the energy_uj sysfs attribute
   work in accordance with the documentation.  From Srinivas Pandruvada.

 - epoll fix to make it ignore the EPOLLWAKEUP flag if the kernel has
   been compiled with CONFIG_PM_SLEEP unset (in which case that flag
   should not have any effect).  From Amit Pundir.

 - cpufreq fix to prevent governor sysfs files from being lost over
   system suspend/resume in some (arguably unusual) situations.  From
   Viresh Kumar.

* tag 'pm-3.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  PowerCap: Fix mode for energy counter
  PNP: fix restoring devices after hibernation
  cpuidle: Check for dev before deregistering it.
  epoll: drop EPOLLWAKEUP if PM_SLEEP is disabled
  cpufreq: fix garbage kobjects on errors during suspend/resume
  cpufreq: suspend governors on system suspend/hibernate
  intel_idle: Fixed C6 state on Avoton/Rangeley processors

10 years agoMerge branches 'pm-epoll', 'pnp' and 'powercap'
Rafael J. Wysocki [Fri, 6 Dec 2013 01:18:28 +0000 (02:18 +0100)]
Merge branches 'pm-epoll', 'pnp' and 'powercap'

* pm-epoll:
  epoll: drop EPOLLWAKEUP if PM_SLEEP is disabled

* pnp:
  PNP: fix restoring devices after hibernation

* powercap:
  PowerCap: Fix mode for energy counter

10 years agoMerge branches 'pm-cpuidle' and 'pm-cpufreq'
Rafael J. Wysocki [Fri, 6 Dec 2013 01:17:59 +0000 (02:17 +0100)]
Merge branches 'pm-cpuidle' and 'pm-cpufreq'

* pm-cpuidle:
  cpuidle: Check for dev before deregistering it.
  intel_idle: Fixed C6 state on Avoton/Rangeley processors

* pm-cpufreq:
  cpufreq: fix garbage kobjects on errors during suspend/resume
  cpufreq: suspend governors on system suspend/hibernate

10 years agoMerge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux...
Linus Torvalds [Thu, 5 Dec 2013 23:37:44 +0000 (15:37 -0800)]
Merge branch 'stable' of git://git./linux/kernel/git/cmetcalf/linux-tile

Pull arch/tile ftrace bug fix from Chris Metcalf:
 "This fixes a build failure with allyesconfig reported by Fengguang Wu
  and fixed by Tony Lu"

* 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
  ftrace: default to tilegx if ARCH=tile is specified

10 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-block
Linus Torvalds [Thu, 5 Dec 2013 23:33:27 +0000 (15:33 -0800)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-block

Pull block layer fixes from Jens Axboe:
 "A small collection of fixes for the current series. It contains:

   - A fix for a use-after-free of a request in blk-mq.  From Ming Lei

   - A fix for a blk-mq bug that could attempt to dereference a NULL rq
     if allocation failed

   - Two xen-blkfront small fixes

   - Cleanup of submit_bio_wait() type uses in the kernel, unifying
     that.  From Kent

   - A fix for 32-bit blkg_rwstat reading.  I apologize for this one
     looking mangled in the shortlog, it's entirely my fault for missing
     an empty line between the description and body of the text"

* 'for-linus' of git://git.kernel.dk/linux-block:
  blk-mq: fix use-after-free of request
  blk-mq: fix dereference of rq->mq_ctx if allocation fails
  block: xen-blkfront: Fix possible NULL ptr dereference
  xen-blkfront: Silence pfn maybe-uninitialized warning
  block: submit_bio_wait() conversions
  Update of blkg_stat and blkg_rwstat may happen in bh context

10 years agoMerge tag 'nfs-for-3.13-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Linus Torvalds [Thu, 5 Dec 2013 21:05:48 +0000 (13:05 -0800)]
Merge tag 'nfs-for-3.13-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

Pull NFS client bugfixes from Trond Myklebust:
 - Stable fix for a NFSv4.1 delegation and state recovery deadlock
 - Stable fix for a loop on irrecoverable errors when returning
   delegations
 - Fix a 3-way deadlock between layoutreturn, open, and state recovery
 - Update the MAINTAINERS file with contact information for Trond
   Myklebust
 - Close needs to handle NFS4ERR_ADMIN_REVOKED
 - Enabling v4.2 should not recompile nfsd and lockd
 - Fix a couple of compile warnings

* tag 'nfs-for-3.13-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  nfs: fix do_div() warning by instead using sector_div()
  MAINTAINERS: Update contact information for Trond Myklebust
  NFSv4.1: Prevent a 3-way deadlock between layoutreturn, open and state recovery
  SUNRPC: do not fail gss proc NULL calls with EACCES
  NFSv4: close needs to handle NFS4ERR_ADMIN_REVOKED
  NFSv4: Update list of irrecoverable errors on DELEGRETURN
  NFSv4 wait on recovery for async session errors
  NFS: Fix a warning in nfs_setsecurity
  NFS: Enabling v4.2 should not recompile nfsd and lockd

10 years agoftrace: default to tilegx if ARCH=tile is specified
Tony Lu [Thu, 5 Dec 2013 20:36:54 +0000 (15:36 -0500)]
ftrace: default to tilegx if ARCH=tile is specified

This matches the existing behavior in arch/tile/Makefile for defconfig.

Reported-by: fengguang.wu@intel.com
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Tony Lu <zlu@tilera.com>
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
10 years agotracing: Only run synchronize_sched() at instance deletion time
Steven Rostedt [Tue, 3 Dec 2013 17:41:20 +0000 (12:41 -0500)]
tracing: Only run synchronize_sched() at instance deletion time

It has been reported that boot up with FTRACE_SELFTEST enabled can take a
very long time. There can be stalls of over a minute.

This was tracked down to the synchronize_sched() called when a system call
event is disabled. As the self tests enable and disable thousands of events,
this makes the synchronize_sched() get called thousands of times.

The synchornize_sched() was added with d562aff93bfb53 "tracing: Add support
for SOFT_DISABLE to syscall events" which caused this regression (added
in 3.13-rc1).

The synchronize_sched() is to protect against the events being accessed
when a tracer instance is being deleted. When an instance is being deleted
all the events associated to it are unregistered. The synchronize_sched()
makes sure that no more users are running when it finishes.

Instead of calling synchronize_sched() for all syscall events, we only
need to call it once, after the events are unregistered and before the
instance is deleted. The event_mutex is held during this action to
prevent new users from enabling events.

Link: http://lkml.kernel.org/r/20131203124120.427b9661@gandalf.local.home
Reported-by: Petr Mladek <pmladek@suse.cz>
Acked-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Acked-by: Petr Mladek <pmladek@suse.cz>
Tested-by: Petr Mladek <pmladek@suse.cz>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
10 years agoMerge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
Linus Torvalds [Thu, 5 Dec 2013 18:48:40 +0000 (10:48 -0800)]
Merge tag 'for-linus' of git://git./linux/kernel/git/mason/linux-btrfs

Pull btrfs MAINTAINERS file update:
 "I'm still getting settled into new devel hardware etc, but I do have
  one commit for the next rc.

  This changes my email over to fb.com, and adds a MAINTAINERS entry for
  Josef as well"

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: update the MAINTAINERS file

10 years agoMerge tag 'fbdev-fixes-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba...
Linus Torvalds [Thu, 5 Dec 2013 17:55:20 +0000 (09:55 -0800)]
Merge tag 'fbdev-fixes-3.13' of git://git./linux/kernel/git/tomba/linux

Pull minor fbdev fixes from Tomi Valkeinen.

* tag 'fbdev-fixes-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux:
  video: vt8500: fix error handling in probe()
  atmel_lcdfb: fix module autoload
  fbdev: sh_mobile_meram: Fix defined but not used compiler warnings
  video: kyro: fix incorrect sizes when copying to userspace
  ARM: OMAPFB: panel-sony-acx565akm: fix bad unlock balance

10 years agoMerge tag 'sound-3.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
Linus Torvalds [Thu, 5 Dec 2013 17:54:35 +0000 (09:54 -0800)]
Merge tag 'sound-3.13-rc3' of git://git./linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "A usual pattern of half ASoC and half HD-audio fixes, although
  HD-audio fixups have more volumes, in addition to a couple of trivial
  fixes.  Nothing to worry much is found here.

  For ASoC side: a few fixes for PCM rate constraints calculations,
  regmap byte-order fix, the rest driver specific fixes (atmel, fsl,
  omap, kirkwood, wm codecs).

  For HD-audio: Dell headset and mono out fix, ELD update in polling
  mode, ALC283 Chromebook fixes, a few fixes for old AD codecs and
  MBA2, one regression fix"

* tag 'sound-3.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (30 commits)
  ALSA: hda - Fix silent output on MacBook Air 2,1
  ALSA: hda - Fix missing ELD info when using jackpoll_ms parameter
  ALSA: hda/realtek - remove hp_automute_hook from alc283_fixup_chromebook
  ASoC: wm8731: fix dsp mode configuration
  ALSA: hda/realtek - Independent of model for HP
  ALSA: hda - Fix headset mic input after muted internal mic (Dell/Realtek)
  ALSA: hda - Use always amps for auto-mute on AD1986A codec
  ALSA: hda/analog - Handle inverted EAPD properly in vmaster hook
  ALSA: hda - Another fixup for ASUS laptop with ALC660 codec
  ALSA: atmel: Fix possible array overflow
  ALSA: hda - Fix complete_all() timing in deferred probes
  ALSA: hda - Fix bad EAPD setup for HP machines with AD1984A
  ASoC: core: fix devres parameter in devm_snd_soc_register_card()
  ASoC: omap: n810: Convert to clk_prepare_enable/clk_disable_unprepare
  ASoC: fsl: set correct platform drvdata in pcm030_fabric_probe()
  ASoC: fsl: imx-pcm-fiq: Remove unused 'runtime' variable
  ASoC: fsl: imx-pcm-fiq: remove bogus period delta calculation
  ALSA: hda - Fix silent output on ASUS W7J laptop
  ASoC: core: Use consistent byte ordering in snd_soc_bytes_get
  ALSA: dice: fix array limits in dice_proc_read()
  ...

10 years agoMerge tag 'pinctrl-v3.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
Linus Torvalds [Thu, 5 Dec 2013 17:53:59 +0000 (09:53 -0800)]
Merge tag 'pinctrl-v3.13-2' of git://git./linux/kernel/git/linusw/linux-pinctrl

Pull pin control fixes from Linus Walleij:

 - Minor bug fixes for the Rockchip, ST-Ericsson abx500, Renesas PFC
   r8a7740 and sh7372.

 - Compilation warning fixes.

* tag 'pinctrl-v3.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  sh-pfc: sh7372: Fix pin bias setup
  sh-pfc: r8a7740: Fix pin bias setup
  pinctrl: abx500: Fix header file include guard
  pinctrl: rockchip: missing unlock on error in rockchip_set_pull()
  pinctrl: abx500: fix some more bitwise AND tests
  pinctrl: rockchip: testing the wrong variable

10 years agoblk-mq: fix use-after-free of request
Ming Lei [Thu, 5 Dec 2013 17:50:39 +0000 (10:50 -0700)]
blk-mq: fix use-after-free of request

If accounting is on, we will do the IO completion accounting after
we have freed the request. Fix that by moving it sooner instead.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
10 years agoMerge branch 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Linus Torvalds [Thu, 5 Dec 2013 05:45:21 +0000 (21:45 -0800)]
Merge branch 'x86/urgent' of git://git./linux/kernel/git/tip/tip

Pull x86 and EFI fixes from Peter Anvin:
 "Half of these are EFI-related:

  The by far biggest change is the change to hold off the deletion of a
  sysfs entry while a backend scan is in progress.  This is to avoid
  calling kmemdup() while under a spinlock.

  The other major change is for each entry in the EFI pstore backend to
  get a unique identifier, as required by the pstore filesystem proper.

  The other changes are:

  A fix to the recent consolidation and optimization of using "asm goto"
  with read-modify-write operation, which broke the bitops; specifically
  in such a way that we could end up generating invalid code.

  A build hack to make sure we compile with -mno-sse.  icc, and most
  likely future versions of gcc, can generate SSE instructions unless we
  tell it not to.

  A comment-only patch to a change the was due in part to an unpublished
  erratum; now when the erratum is published we want to add a comment
  explaining why"

* 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/apic, doc: Justification for disabling IO APIC before Local APIC
  x86, bitops: Correct the assembly constraints to testing bitops
  x86-64, build: Always pass in -mno-sse
  efi-pstore: Make efi-pstore return a unique id
  x86/efi: Fix earlyprintk off-by-one bug
  efivars, efi-pstore: Hold off deletion of sysfs entry until the scan is completed

10 years agox86/apic, doc: Justification for disabling IO APIC before Local APIC
Fenghua Yu [Thu, 5 Dec 2013 00:07:49 +0000 (16:07 -0800)]
x86/apic, doc: Justification for disabling IO APIC before Local APIC

Since erratum AVR31 in "Intel Atom Processor C2000 Product Family
Specification Update" is now published, I added a justification
comment for disabling IO APIC before Local APIC, as changed in commit:

522e66464467 x86/apic: Disable I/O APIC before shutdown of the local APIC

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Link: http://lkml.kernel.org/r/1386202069-51515-1-git-send-email-fenghua.yu@intel.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
10 years agoPowerCap: Fix mode for energy counter
Srinivas Pandruvada [Wed, 4 Dec 2013 19:12:59 +0000 (11:12 -0800)]
PowerCap: Fix mode for energy counter

As per the documentation of powercap sysfs, energy_uj field is read only,
if it can't be reset. Currently it always allows write but will fail,
if there is no reset callback.
Changing mode field, to read only if there is no reset callback.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Reported-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoPNP: fix restoring devices after hibernation
Dmitry Torokhov [Thu, 5 Dec 2013 01:01:55 +0000 (02:01 +0100)]
PNP: fix restoring devices after hibernation

On returning from hibernation 'restore' callback is called,
not 'resume'.  Fix it.

Fixes: eaf140b60ec9 (PNP: convert PNP driver bus legacy pm_ops to dev_pm_ops)
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: 3.12+ <stable@vger.kernel.org> # 3.12+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agox86, bitops: Correct the assembly constraints to testing bitops
H. Peter Anvin [Wed, 4 Dec 2013 22:31:28 +0000 (14:31 -0800)]
x86, bitops: Correct the assembly constraints to testing bitops

In checkin:

0c44c2d0f459 x86: Use asm goto to implement better modify_and_test() functions

the various functions which do modify and test were unified and
optimized using "asm goto".  However, this change missed the detail
that the bitops require an "Ir" constraint rather than an "er"
constraint ("I" = integer constant from 0-31, "e" = signed 32-bit
integer constant).  This would cause code to miscompile if these
functions were used on constant bit positions 32-255 and the build to
fail if used on constant bit positions above 255.

Add the constraints as a parameter to the GEN_BINARY_RMWcc() macro to
avoid this problem.

Reported-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/529E8719.4070202@zytor.com