dmaengine: add dma_slave_get_caps api

add new device callback .device_slave_caps api which can be used by clients to
query the dma channel capablties before they program the channel. This can help
is removing errors during the channel programming. Also add helper
dma_slave_get_caps API

This patch folds the work done by Matt earlier
https://patchwork.kernel.org/patch/2094891/

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
dma: pl330: Implement device_slave_caps

Implement the device_slave_caps() callback for the pl330 driver. This allows
dmaengine users like the generic ALSA dmaengine PCM driver to query the
capabilities of the driver. The PL330 supports all buswidths and both
mem-to-dev as well as dev-to-mem transfers. In theory there is no limit on the
number of segments that can be transferred (in practice you'll run out of memory
eventually) and the number of bytes per segment is limited by the size of the
PL330 program buffer. Due to the nature of the PL330 the maximum number of bytes
per segment depends on the burstsize, the driver sets it to the value for a
1-byte burstsize, since it is the smallest.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
ARM: shmobile: ape6evm: add DT reference

This patch adds a sample DT-based APE6EVM "reference" implementation. The
use of platform-specific C-code should be avoided with this configuration
as much as possible.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
ARM: shmobile: ape6evm-reference: add CPUFreq support

Add CPUFreq support to ape6evm-reference, using a max8973 regulator, that
is supplying V_DVFS for the 4 CA15 cores on r8a73a4.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
ARM: shmobile: lager: Add DT reference

This is sufficient to allow boot of the Lager board with
a console without boards-lager.c compiled into the kernel.
This is an example of a minimal but still useful initialisation
of the board using DT as much as possible.

As such it is the same as the boot of Lager that can be achieved
without a board file. The intention of adding this file
is to facilitate further work to allow board specific devices to be
initialised via DT.

Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
ARM: shmobile: Minor update for the Lager DT reference code

Update the Lager DT reference code to get rid of the redundant
irqchip header and also make lager_add_standard_devices() static.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
ARM: shmobile: lager-reference: Add LED6-LED8 to the device tree

LED6 to LED8 are GPIO LEDs. Add corresponding DT nodes.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
nfsd: nfs4_file_get_access: need to be more careful with O_RDWR

If fi_fds = {non-NULL, NULL, non-NULL} and oflag = O_WRONLY
the WARN_ON_ONCE(!(fp->fi_fds[oflag] || fp->fi_fds[O_RDWR]))
doesn't trigger when it should.

Signed-off-by: Harshula Jayasuriya <harshula@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
mmc: tmio: fix compiler warning

This patch fixes a compiler warning:

drivers/mmc/host/tmio_mmc_pio.c: In function 'tmio_mmc_power_on':
drivers/mmc/host/tmio_mmc_pio.c:798:19: warning: ignoring return value of
'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Merge branches 'tpu-pwm', 'backlight' and 'soc' into cleanup2-base
ARCH: ARM: shmobile: Remove kota2 board support

Remove support for the sh73a0 based kota2 board.

The sh73a0 SoC is continued to be supported using
the kzm9g board.

Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
ARCH: ARM: shmobile: Remove ag5evm board support

Remove support for the sh73a0 based ag5evm board.

The sh73a0 SoC is continued to be supported using
the kzm9g board.

Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
ARM: shmobile: Remove sh73a0 use of <mach/hardware.h>

Remove unused <mach/hardware.h> on sh73a0.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
ARM: shmobile: Remove sh7372 use of <mach/hardware.h>

Remove unused <mach/hardware.h> on sh7372.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
ARM: shmobile: Remove EMEV2 use of <mach/hardware.h>

Remove unused <mach/hardware.h> on EMEV2.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
ARM: shmobile: Remove r8a7779 use of <mach/hardware.h>

Remove unused <mach/hardware.h> on r8a7779.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
ARM: shmobile: Remove Marzen use of <mach/hardware.h>

Remove unused <mach/hardware.h> on Marzen.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
ARM: shmobile: Remove include <mach/hardware.h>

Now when no one is using this file, remove <mach/hardware.h>.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
ARM: shmobile: r8a73a4: Remove ->init_machine() special case

No need to special case r8a73a4 ->init_machine(),
so get rid of undesired cpufreq platform device
from the generic long term r8a73a4 DT support code.

For short term support on APE6EVM the DT reference
implementation already adds a "cpufreq-cpu0" platform
device so that can be used for development.

Regarding more long term cpufreq support, perhaps
it makes sense to adjust the cpufreq driver to check
for DT information directly instead of using a
platform device for software configuration and DT
for hardware parameters.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
OF: make of_property_for_each_{u32|string}() use parameters if OF is not enabled

I am getting a few
|warning: unused variable ‘p’ [-Wunused-variable]
|warning: unused variable ‘prop’ [-Wunused-variable]

in the case where CONFIG_OF is not defined and the parameters are only
used in the loop macro.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Grant Likely <grant.likely@linaro.org>