Sergei Shtylyov [Sat, 15 Mar 2014 00:29:14 +0000 (03:29 +0300)]
sh_eth: convert dev_*() to netdev_*() calls
Convert dev_*(&ndev->dev, ...) to netdev_*(ndev, ...) calls since they are a bit
shorter and at the same time give more information on a device.
Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit
da2468555643efbde3fb026cd46e5245800cc872)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Sergei Shtylyov [Sat, 15 Mar 2014 00:27:54 +0000 (03:27 +0300)]
sh_eth: convert pr_*() to netdev_*() calls
Convert pr_*() to netdev_*() calls as the latter provide info on a device.
Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit
f75f14ec2f7b552dc87b4b57b2a19e487378f774)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Sergei Shtylyov [Sat, 15 Mar 2014 00:11:24 +0000 (03:11 +0300)]
sh_eth: exit probe with unknown register layout
Exit the driver's probe() method when the register layout is unknown as the
driver would cause kernel oops in this case anyway.
While at it, move the corresponding error message printout and convert it from
pr_err() to dev_err().
Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit
264be2f5a973cc85be3e31d6bf6234b55a256627)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Ben Dooks [Wed, 12 Mar 2014 17:47:40 +0000 (17:47 +0000)]
sh_eth: update OF PHY registeration
If the sh_eth device is registered using OF, then the driver
should call of_mdiobus_register() to register the PHYs described
in the devicetree and then use of_phy_connect() to connect the
PHYs to the device.
This ensures that any PHYs registered in the device tree are
appropriately connected to the parent devices nodes so that
the PHY drivers can access their OF properties.
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit
702eca02b7c8574b42359512ebccfa777a71f66e)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Sergei Shtylyov [Tue, 18 Feb 2014 00:12:43 +0000 (03:12 +0300)]
sh_eth: add device tree support
Add support of the device tree probing for the Renesas SH-Mobile SoCs
documenting the device tree binding as necessary.
This work is loosely based on the original patch by Nobuhiro Iwamatsu
<nobuhiro.iwamatsu.yj@renesas.com>.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit
b356e978e92fccd17a3e4620a4821bdbfb706c1a)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Sergei Shtylyov [Fri, 14 Feb 2014 00:05:42 +0000 (03:05 +0300)]
sh_eth: use ETH_ZLEN instead of home-grown #define
The driver #define's and uses ETHERSMALL macro for the minimum Ethernet frame
size for which we have a standard macro ETH_ZLEN. Use the latter instead of
the home-grown one.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit
730c8c69bc8d4640336885e20e719b0842d0fcb2)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Geert Uytterhoeven [Tue, 6 May 2014 21:26:19 +0000 (23:26 +0200)]
drivers: sh: compile drivers/sh/pm_runtime.c if ARCH_SHMOBILE_MULTI
If the kernel is built to support multi-ARM configuration with shmobile
support built in, then drivers/sh is not built. This contains the PM
runtime code in drivers/sh/pm_runtime.c, which implicitly enables the
module clocks for all devices, and thus is quite essential.
Without this, the state of clocks depends on implicit reset state, or on
the bootloader.
If ARCH_SHMOBILE_MULTI then build the drivers/sh directory, but ensure that
bits that may conflict (drivers/sh/clk if the common clock framework is
enabled) or are not used (drivers/sh/intc), are not built.
Also, only enable the PM runtime code when actually running on a shmobile
SoCs that needs it.
ARCH_SHMOBILE_MULTI was added a while ago by commit
efacfce5f8a523457e9419a25d52fe39db00b26a ("ARM: shmobile: Introduce
ARCH_SHMOBILE_MULTI"), but drivers/sh was compiled for both
ARCH_SHMOBILE_LEGACY and ARCH_SHMOBILE_MULTI until commit
bf98c1eac1d4a6bcf00532e4fa41d8126cd6c187 ("ARM: Rename ARCH_SHMOBILE to
ARCH_SHMOBILE_LEGACY").
Inspired by a patch from Ben Dooks <ben.dooks@codethink.co.uk>.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit
3c90c55dcde745bed81f6447f24ba96bda43d984)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Laurent Pinchart [Wed, 27 Nov 2013 01:18:37 +0000 (02:18 +0100)]
sh: intc: Enable driver compilation with COMPILE_TEST
This helps increasing build testing coverage.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit
4f3068f60503e08bc9e729528d9e54289980fa96)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Geert Uytterhoeven [Tue, 11 Mar 2014 09:59:12 +0000 (10:59 +0100)]
spi: rspi: Add runtime PM support, using spi core auto_runtime_pm
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
490c97747d5dc77dfb5826e2823b41d8b2ef7ecc)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Geert Uytterhoeven [Fri, 21 Feb 2014 16:29:18 +0000 (17:29 +0100)]
spi: rspi: Fix loopback mode for Dual/Quad SPI Transfers
While normal Dual and Quad SPI Transfers are unidirectional, we must do
a bidirectional transfer if loopback mode is enabled, else rx_buf is not
filled.
With spidev it seemed to work, as spidev uses the same buffer for
tranmission and reception.
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
ba824d4971691a7f1f66429e378a08a95fbb5b79)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Geert Uytterhoeven [Fri, 21 Feb 2014 16:29:17 +0000 (17:29 +0100)]
spi: rspi: Remove empty rspi_cleanup()
If spi_master.cleanup() is not needed, it can be left unimplemented.
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
ab98fcba962a57cee9fdb97aff2b25248c93cea5)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Geert Uytterhoeven [Tue, 4 Feb 2014 10:06:24 +0000 (11:06 +0100)]
spi: rspi: Only enable interrupts when there's a need to wait
rspi_wait_for_interrupt() unconditionally enables interrupts, even when the
wait condition is already satisfied. This causes a high interrupt load (2
interrupts/byte for full-duplex Single SPI transfers, 1 interrupt/byte for
RSPI with TX Only mode, or QSPI in unidirectional Dual or Quad Transfer
mode).
Change this to return immediately when the wait condition is satisfied.
This dramatically reduces the interrupt load, especially in high-speed
Quad Transfer mode, and increases transfer speed, as no interrupts need to
be handled when there's space available in the output FIFO, or data
available in the input FIFO.
Benchmark results for QSPI on r8a7791 while reading 1 MiB from 30 MHz SPI
FLASH on the Koelsch development board:
Before:
Single SPI Dual SPI Quad SPI
Interrupts: 2096856 1048592 1048594
Mbps: 0.9 1.6 1.6
After:
Single SPI Dual SPI Quad SPI
Interrupts: 1048569 21295 8
Mbps: 0.7 10.8 12.9
I don't know why Single SPI slowed down a bit.
I've also verified functionality for RSPI-RZ on r7s72100, but don't have
benchmark results as there's no SPI FLASH connected to RSPI on the Genmai
development board. Unlike RSPI and QSPI, RSPI-RZ has separate interrupts
for RX and TX, which shows that Single SPI transfers now generate (mostly)
RX interrupts, as expected.
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
5dd1ad23af689591d70be06ee6efcc57d1ec2d16)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Shimoda, Yoshihiro [Mon, 3 Feb 2014 01:43:46 +0000 (10:43 +0900)]
spi: rspi: fix build error when CONFIG_OF is not set
This patch fixes an issue that the following build error happens when
the CONFIG_OF is not set:
drivers/spi/spi-rspi.c: In function 'rspi_probe':
drivers/spi/spi-rspi.c:1203:26: error: 'rspi_of_match' undeclared (first use in this function)
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
64b67defe4eb4de2d2df8acd5584a9e28fa727d3)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Geert Uytterhoeven [Thu, 30 Jan 2014 08:43:50 +0000 (09:43 +0100)]
spi: rspi: Add support for Quad and Dual SPI Transfers on QSPI
Add support for Quad and Dual SPI Transfers on the Renesas Quad Serial
Peripheral Interface, as found in R-Car Gen2 SoCs like R-Car H2 (r8a7790)
and R-Car M2 (r8a7791):
- Add unidirectional transfer methods for Quad/Dual SPI Transfers.
- Program the sequencer to handle SPI messages with multiple transfer
modes when Quad or Dual transfers are enabled for an SPI slave.
Up to 4 transfer modes per SPI message are supported by the hardware.
- Advertise the availability of Quad and Dual SPI modes on QSPI.
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
880c6d114fd79a6973708744c78c7f55da6aea4c)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Geert Uytterhoeven [Tue, 28 Jan 2014 09:21:38 +0000 (10:21 +0100)]
spi: rspi: Add DT support
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
426ef76dd8a394a0e04d096941cd9acb49539a3e)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Geert Uytterhoeven [Fri, 24 Jan 2014 08:44:02 +0000 (09:44 +0100)]
spi: rspi: Use NULL as the clock ID
There's only one RSPI/QSPI clock, so we can use NULL as the clock ID
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
29f397b739ceef90c8b848f6579cbacd088e896e)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Geert Uytterhoeven [Fri, 24 Jan 2014 08:44:01 +0000 (09:44 +0100)]
spi: rspi: Convert to clk_prepare_enable/disable_unprepare
Get the driver ready for the migration to the common clock framework by
calling clk_prepare_enable() and clk_disable_unprepare().
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
17fe0d9a28fe742c467f800625459cf7bcb44b3b)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Geert Uytterhoeven [Fri, 24 Jan 2014 08:44:00 +0000 (09:44 +0100)]
spi: rspi: Add support for loopback mode
Add support for specifying loopback mode.
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
06a7a3cff042a36fb7e6af71039a17c6d1a6d90f)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Geert Uytterhoeven [Fri, 24 Jan 2014 08:43:59 +0000 (09:43 +0100)]
spi: rspi: Add support for RSPI on RZ/A1H
Add support for the RSPI variant in the RZ/A1H (r7s72100) SoC.
Main differences with RSPI on SH are:
- Lack of TX only mode, hence we always have to use full duplex
transfers,
- The Data Register must be accessed used 8-bit operations.
RSPI on RZ is matched using the new "rspi-rz" platform device name.
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
862d357f84f009fdcba22be8d6a2f82ff80ab740)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Geert Uytterhoeven [Fri, 24 Jan 2014 08:43:58 +0000 (09:43 +0100)]
spi: rspi: Add support for more than one interrupt
Add support for multiple interrupts, based on the SDK reference code.
This is needed for RZ/A1H, which supports 3 interrupts.
When using multiple interrupts, they must be called "rx" (SPRI) and "tx"
(SPTI). The error interrupt (SPEI) is not used, as it matters for slave
mode only.
When using a single interrupt, it may be called "mux". If it cannot be
found, the first interrupt in the device's resources will be used.
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
9372220678cd4c62992f7637b2ee36b47fa58d37)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Geert Uytterhoeven [Fri, 24 Jan 2014 08:43:57 +0000 (09:43 +0100)]
spi: rspi: Merge qspi_send_pio() and qspi_receive_pio()
qspi_send_pio() and qspi_receive_pio() are very similar: they both send
and receive full duplex data to/from the hardware, but ignore the data
stream in the unused direction.
Merge them into qspi_transfer_out_in(), now supporting real full duplex.
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
340a15e6f0d6cd436c55693f7328a1de02fcdb96)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Geert Uytterhoeven [Fri, 24 Jan 2014 08:43:56 +0000 (09:43 +0100)]
spi: rspi: Merge rspi_send_pio() and rspi_receive_pio()
rspi_send_pio() and rspi_receive_pio() are very similar:
- the former only sends data, using TX Only Mode,
- the latter sends and receives full duplex data to/from the hardware,
but uses dummy transmit data.
Merge them into rspi_transfer_out_in(), now supporting full duplex if
needed.
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
8449fd76deb9ac67a15a6fb8ead7bb4595d019d2)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Geert Uytterhoeven [Fri, 24 Jan 2014 08:43:55 +0000 (09:43 +0100)]
spi: rspi: Abstract transfer_one() for RSPI and QSPI
Split off qspi_transfer_one() (which doesn't support DMA yet) from
rspi_transfer_one().
Replace the abstraction of send_pio()/receive_pio() by the abstracrion of
transfer_one().
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
eb557f75269e82dd26a79be536eca223ddc3eaf7)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Geert Uytterhoeven [Fri, 24 Jan 2014 08:43:54 +0000 (09:43 +0100)]
spi: rspi: Add rspi_data_{out,in,out_in}() helpers
Add helpers rspi_data_{out,in,out_in}() to write, read, or write and
read data to/from the Data Register, taking care of waiting until data
or space is available in the buffers.
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
35301c996046243ca6e41d490dea2823f045614c)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Geert Uytterhoeven [Fri, 24 Jan 2014 08:43:53 +0000 (09:43 +0100)]
spi: rspi: Abstract 8/16-bit Data Register access
Add rspi_{write,read}_data(), to abstract 8-bit (QSPI, and RSPI on RZ/A1H)
versus 16-bit (RSPI) Data Register access.
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
74da76865d57161cadf8f324281f23ed3eb5db9c)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Geert Uytterhoeven [Fri, 24 Jan 2014 08:43:52 +0000 (09:43 +0100)]
spi: rspi: Use core message handling
Let the generic SPI core handle SPI messages, calling into our
rspi_transfer_one() method.
rspi_assert_ssl() and rspi_negate_ssl() are absorbed into
rspi_prepare_message() and rspi_unprepare_message(), as they actually
enable/disable the whole SPI function, instead of just (de)asserting the
chip select line.
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
79d2349542f38663c3096f389115b1f131d6e564)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Geert Uytterhoeven [Fri, 24 Jan 2014 08:43:51 +0000 (09:43 +0100)]
spi: rspi: Remove unused mesg parameter from {send,receive}_pio()
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
91949a2d4a96195ccd37322fafe8d16c68dda86e)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Patrick Titiano [Fri, 28 Feb 2014 13:10:04 +0000 (14:10 +0100)]
thermal: rcar-thermal: update thermal zone only when temperature changes
Avoid updating the thermal zone in case an IRQ was triggered but the
temperature didn't effectively change.
Note this is not a driver issue.
Below is a captured debug trace illustrating the purpose of this patch:
out of 8 thermal zone updates, only 2 are actually necessary.
[ 41.120000] rcar_thermal_work(): cctemp=25000
[ 41.120000] rcar_thermal_work(): nctemp=30000
[ 41.120000] rcar_thermal_work(): temp is now 30000C, update thermal zone
[ 58.990000] rcar_thermal_work(): cctemp=30000
[ 58.990000] rcar_thermal_work(): nctemp=30000
[ 58.990000] rcar_thermal_work(): same temp, do not update thermal zone
[ 59.290000] rcar_thermal_work(): cctemp=30000
[ 59.290000] rcar_thermal_work(): nctemp=30000
[ 59.290000] rcar_thermal_work(): same temp, do not update thermal zone
[ 59.590000] rcar_thermal_work(): cctemp=30000
[ 59.590000] rcar_thermal_work(): nctemp=30000
[ 59.590000] rcar_thermal_work(): same temp, do not update thermal zone
[ 59.890000] rcar_thermal_work(): cctemp=30000
[ 59.890000] rcar_thermal_work(): nctemp=30000
[ 59.890000] rcar_thermal_work(): same temp, do not update thermal zone
[ 60.190000] rcar_thermal_work(): cctemp=30000
[ 60.190000] rcar_thermal_work(): nctemp=30000
[ 60.190000] rcar_thermal_work(): same temp, do not update thermal zone
[ 60.490000] rcar_thermal_work(): cctemp=30000
[ 60.490000] rcar_thermal_work(): nctemp=30000
[ 60.490000] rcar_thermal_work(): same temp, do not update thermal zone
[ 60.790000] rcar_thermal_work(): cctemp=30000
[ 60.790000] rcar_thermal_work(): nctemp=35000
[ 60.790000] rcar_thermal_work(): temp is now 35000C, update thermal zone
I suspect this may be due to sensor sampling accuracy / fluctuation,
but no formal proof.
Signed-off-by: Patrick Titiano <ptitiano@baylibre.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
(cherry picked from commit
9477165ec525d47abb1cb6523698e0cd89d65ddb)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Patrick Titiano [Fri, 28 Feb 2014 13:10:03 +0000 (14:10 +0100)]
thermal: rcar-thermal: fix same mask applied twice
Mask is already applied preceding the if statement.
Remove the second mask.
Signed-off-by: Patrick Titiano <ptitiano@baylibre.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
(cherry picked from commit
206c0cba095acbb91d552d220207d690c9b29594)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Wed, 23 Apr 2014 05:59:12 +0000 (14:59 +0900)]
ASoC: rsnd: call rsnd_dai_pointer_update() from outside of lock
rsnd_soc_dai_trigger() will be called
after rsnd_dai_pointer_update() function
which is using rsnd_lock().
Thus, it should be called from outside of rsnd_lock().
Kernel will be hangup without this patch.
Special thanks to Kataoka-san
Reported-by: Ryo Kataoka <ryo.kataoka.wt@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
836b31fe1a9791d84ed95783ed42ebd5719f7918)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Ben Dooks [Fri, 11 Apr 2014 01:16:33 +0000 (18:16 -0700)]
ASoC: rsnd: fix clock prepare/unprepare
As with the previous commit, before a clock can be used it must be prepared
for use. Change from clk_enable() and clk_disable() to the versions of the
calls which also prepare and un-prepare the clocks.
Will fix warnings from the clock code when this is used.
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
79861bbb759053a9b91026becc0915d0f1f8d37d)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Mon, 24 Mar 2014 04:23:42 +0000 (21:23 -0700)]
ASoC: rcar: bugfix: it cares about the non-src case
src might not exist.
kernel will be hung-up without this patch in such case.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
b1eac430b6a4bee6821273d9b41dd3593eb7830b)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Tue, 18 Mar 2014 02:29:55 +0000 (19:29 -0700)]
ASoC: rsnd: add DeviceTree support
Support for loading the Renesas R-Car sound driver via DeviceTree.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
90e8e50fce3585d6f9902701de08389b027dadc6)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Fri, 14 Mar 2014 00:56:43 +0000 (17:56 -0700)]
ASoC: rcar: fixup SND_SOC_DAIFMT_CBx_CFx flags
SND_SOC_DAIFMT_CBx_CFx means "codec" side master/slave mode.
Then, rcar will be master mode if it was SND_SOC_DAIFMT_CBS_CFS.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
e1508289404ab6ca28e0dc931612600f0441c417)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Tue, 4 Mar 2014 04:51:21 +0000 (20:51 -0800)]
ASoC: rsnd: rename scu to src
R-Car sound has SCU unit which has SRC/CTU/MIX/DVC,
and current rsnd driver has scu.c and scu module.
Current scu.c has SRC support only.
My first concept was control these feature on scu.c
but, it become difficult and un-understandable now.
This patch rename scu to src
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
ba9c949f797aa3af56303445812a452144c61c35)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Tue, 4 Mar 2014 04:51:11 +0000 (20:51 -0800)]
ASoC: rsnd: remove all rsnd_xxx_remove()
Now, rsnd_xxx_remove() do nothing.
remove these
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
9524be0e761edd9f3c020344677d914ed249d010)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Tue, 4 Mar 2014 04:51:03 +0000 (20:51 -0800)]
ASoC: rsnd: nothing to do on rsnd_dai_remove()
rsnd_dai_remove() called rsnd_path_exit(),
but these memory will be cleaned automatically.
Because it is created by devm_kzalloc().
nothing to do on rsnd_dai_remove()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
4076220767416b8b65009dd57eeb317c38d41baa)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Tue, 4 Mar 2014 04:50:49 +0000 (20:50 -0800)]
ASoC: rsnd: use mod probe method on SSI
Now, it can use .probe
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
ff8f30e688477beead6d1e648fb11f321220a4d7)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Tue, 4 Mar 2014 04:50:41 +0000 (20:50 -0800)]
ASoC: rsnd: use mod probe method on SCU
Now, it can use .probe
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
76c6fb5c49790da44d553f655182b426ade2c599)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Tue, 4 Mar 2014 04:50:33 +0000 (20:50 -0800)]
ASoC: rsnd: add probe/remove callback on rsnd_mod_ops
Each rsnd mod needs specific probe method,
and its best timing is DAI probe timing.
But current code runs it mod probe timing.
This patch adds new probe/remove callback to solve it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
7681f6ac6b6338932621f842d68e54f6267b785f)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Tue, 4 Mar 2014 04:50:24 +0000 (20:50 -0800)]
ASoC: rsnd: call rsnd_scu_ssi_mode_init() from SSI
Current R-Car sound driver is assuming that
SCU mod is used even though it is not needed.
Because scu.c is controlling SSIU too.
(it is Gen1 compatibility)
But, SCU mod will be really not used if new platform dai
feature was added.
Thus, rsnd_scu_ssi_mode_init() is called from SSI
directory by this patch.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
221bf523e31306c1095b28932e079950108e3887)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Tue, 4 Mar 2014 04:50:08 +0000 (20:50 -0800)]
ASoC: rsnd: add rsnd_scu_enable_ssi_irq()
Current R-Car sound driver is assuming that
SCU mod is used even though it is not needed.
Because scu.c is controlling SSIU too.
(it is Gen1 compatibility)
But, SCU mod will be really not used if new platform dai
feature was used.
Thus, SSIU irq setting is called from SSI
directory by this patch.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
b8cc41e9e8cc5beec9dcbe044cfc44aa0325d9e6)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Tue, 4 Mar 2014 04:50:00 +0000 (20:50 -0800)]
ASoC: rsnd: Get correct SCU ID
Current rsnd driver is assuming that SCU/SRU ID is
same as SSIU/SSI ID, because Gen1 can't select it.
But, Gen2 can select it.
The SCU/SRU/SSIU/SSI pair depends on the platform.
This patch get correct SCU ID from platform info.
To keep compatible, it still assuming SCU ID = SSI ID
if platform doesn't have info
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
389933d9f6e55a1ef3a71549c36f6283b9f8c145)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Tue, 4 Mar 2014 04:49:50 +0000 (20:49 -0800)]
ASoC: rsnd: add struct rsnd_dai_platform_info
R-Car sound DAI consists from SSI/SCU/SSIU/SRU...
Current R-Car sound DAI is decided from these settings,
but it is intuitively unclear, and is not good design for DT support.
This patch adds new rsnd_dai_platform_info to solve this issue.
But now, many platform is using this driver without
rsnd_dai_platform_info.
So, this patch still supports DAI settings via SSI to keep compatible.
It will be removed in next Linux version.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
78f13d0c5a2888564b2bed7f8433c8ec889997ff)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Mon, 3 Mar 2014 07:43:40 +0000 (23:43 -0800)]
ASoC: rsnd: share reg_field and reduce memory
Gen1/Gen2 code never be used in same time.
Thus, driver can share Gen1 only register and Gen2 only register.
It can reduce memory too.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
c82e1c8874e5abaf52f9ed886386cbe08ec98a5b)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Mon, 3 Mar 2014 07:43:33 +0000 (23:43 -0800)]
ASoC: rsnd: modify rsnd_adg_ssi_ws_timing_gen2() parameter
rsnd_adg_ssi_ws_timing_gen2() returns SSI WS timing,
and it used "mod" as parameter.
but, this "mod" is sometimes not ssi mod.
Get SSI mod from rsnd_dai_stream
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
8467dedc9dae3630a2ede49a43120af3ed54ba19)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Mon, 3 Mar 2014 07:43:26 +0000 (23:43 -0800)]
ASoC: rsnd: remove unused SSI_CONTROL
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
685fb3eb31445bd872ab30ae301404b2cac7cd75)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Mon, 3 Mar 2014 07:43:18 +0000 (23:43 -0800)]
ASoC: rsnd: use function pointer for each probe
R-Car sound consists of many devices.
It will have more device support in the future.
Thus, for each probe become now function pointer array.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
d1ac970f5de94bef9e094b46f016899d04e8178b)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Mon, 3 Mar 2014 07:43:11 +0000 (23:43 -0800)]
ASoC: rsnd: use devm_clk_get() instead of clk_get()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
468be93eb4e28c5710ed8acc1b938937707e537c)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Mon, 3 Mar 2014 07:43:03 +0000 (23:43 -0800)]
ASoC: rsnd: get ssi/scu from rsnd_dai_stream
Current driver is assuming that SSI id = SCU id.
But, now, it can get correct SSI/SCU from
rsnd_dai_stream. use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
374e5426377604a94d672650ef22dd2b4285de17)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Mon, 3 Mar 2014 07:42:55 +0000 (23:42 -0800)]
ASoC: rsnd: use mod array instead of list on rdai
struct rsnd_dai_stream used list for mod list.
It added only odd flexibility to current driver, and
it is a factor which makes extendibility difficult.
rsnd use mod array instead of list from now.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
a126021d144bae88a563db2b57b0ad5eb1ee66d9)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Mon, 3 Mar 2014 07:42:47 +0000 (23:42 -0800)]
ASoC: rsnd: run rsnd_path_init() when probe() timing
Current rsnd SSIU/SSI/SCU/SRU path is set
when playback/capture starts up.
But it is meaningless method, since the path is based
on platform and can be set in probe() timing.
This patch sets the path on probe() timing.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
9bfed6cf4fa2cd2c5e80431244348b0c5d933cf5)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Tue, 25 Feb 2014 06:15:33 +0000 (22:15 -0800)]
ASoC: rsnd: tidyup RSND_SSI_xxx flags
6f3ab6c1c022e7a4877d38940cd45ae7804a15e2
(ASoC: rsnd: remove pin sync option)
added unused RSND_SSI_CLK_FROM_ADG flag.
It should remove RSND_SSI_SYNC.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
697dce94ed37e0653e5bba593f11e2b14877cd63)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Tue, 25 Feb 2014 06:15:18 +0000 (22:15 -0800)]
ASoC: rsnd: unify rdai naming
struct rsnd_dai is called as "rdai",
but its size has been called as "dai_nr".
Unify these as "rdai"
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
ecba9e724c5775aebd3a28e831643160c7146e83)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Tue, 25 Feb 2014 06:15:07 +0000 (22:15 -0800)]
ASoC: rsnd: remove verbose debug message from scu/ssi
scu/ssi probe() already have more detail debug message.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
98455ed5ddbfbcbcd0adb300c6cb1964ed0a6931)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Tue, 25 Feb 2014 06:15:00 +0000 (22:15 -0800)]
ASoC: rsnd: remove verbose function parameter
priv has rcar_snd_info pointer.
having priv and info in same time is verbose.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
5da39cf30454bbf3e92f56935e7d137e5bd2c830)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Tue, 25 Feb 2014 06:14:41 +0000 (22:14 -0800)]
ASoC: rsnd: move rsnd_mod_call() macro
core.c is the only user of rsnd_mod_call() macro.
Move it to core.c from rsnd.h
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
d870a91e9d0eae524ac2da7cbdc7e399a71b86c4)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Tue, 25 Feb 2014 06:14:33 +0000 (22:14 -0800)]
ASoC: rsnd: move priv member settings to upper side
There is no big meaning, but preparation for platform dai support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
498480731e232d7c9a96a338924b5a275121e091)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Wed, 12 Feb 2014 05:05:26 +0000 (21:05 -0800)]
ASoC: rsnd: print error if there is SRC settings mismatch
rsnd request clock master if SRC is used
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
a2070feede404484296aace813b6c518582a3f8e)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Wed, 12 Feb 2014 05:04:12 +0000 (21:04 -0800)]
ASoC: rsnd: set DIV_EN register on rsnd_adg_set_convert_clk_gen2()
DIV_EN register enable bit is required when you use Gen2 SRC
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
ee2c828d21b2381c813df257235d3c635269e435)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Wed, 12 Feb 2014 01:15:51 +0000 (17:15 -0800)]
ASoC: rsnd: tidyup original for_each_rsnd_xxx macro
Current for_each_rsnd_xxx macro will read out-of-array's
memory after last loop operation.
It was not good C language operation, and the binary which was
compiled by (at least) gcc 4.8.1 is broken
This patch tidyup these issues
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
00463c113b6ba6506b4f1ebb9b3c5dd249f8750f)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Fri, 7 Feb 2014 08:53:06 +0000 (00:53 -0800)]
ASoC: rsnd: use device dependency clock
Current R-Car sound driver is using device
independent audio clock, but it is not good
design for DT support.
This patch adds device dependent clock support.
But, there are some platform which is using
independent audio clock.
It is still supported at this point,
but it will be removed soon.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
8691d0748e566f8708f7a9139e760134f5dc3130)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Fri, 24 Jan 2014 02:42:00 +0000 (18:42 -0800)]
ASoC: rsnd: add Gen2 SRC and DMAEngine support
Renesas sound Gen2 has SRC (= Sampling Rate Converter)
which needs 2 DMAC.
The data path image when you use SRC on Gen2 is
[mem] -> Audio-DMAC -> SRC -> Audio-DMAC-peri-peri -> SSIU -> SSI
This patch support SRC and DMAEnine.
It is tested on R-Car H2 Lager board
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
629509c5bc478c0343d94c8c70812396f44447fb)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Fri, 24 Jan 2014 02:41:51 +0000 (18:41 -0800)]
ASoC: rsnd: rsnd_ssi_probe() goes forwarder than rsnd_scu_probe()
rsnd_ssi_probe() goes forwarder than rsnd_scu_probe(),
since scu will need ssi information on Gen2
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
eb854f6dff24a59378acc8d8eda57a3543a25acc)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Fri, 24 Jan 2014 02:41:44 +0000 (18:41 -0800)]
ASoC: rsnd: remove SSI dependent DMAEngine callback
Renesas Gen2 sound will use 2 DMAC
which are Audio-DMAC, and Audio-DMAC-peri-peri.
Current driver has callback function for each DMAC,
because it assumed each DMAC needs special settings.
But it became clear that these can share settings.
This patch removes unnecessary callback
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
4686a0ad9aaee89495f181e5755d153e7fe7ffe6)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Fri, 24 Jan 2014 02:41:36 +0000 (18:41 -0800)]
ASoC: rsnd: extracts Gen1/Gen2 common parts
Renesas sound IP Gen1/Gen2 are similar, but different.
This patch extracts Gen1/Gen2 common and dependency parts,
and create Gen1/Gen2 ops to control it.
According to this structure, SSIU setup which
has been implemented on ssi.c can be moved to scu.c
(SRU/SSIU/SCU should be implemented on scu.c)
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
1b7b08efbe7419cc3e082f2b5ec8ae89f7af43d1)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Fri, 24 Jan 2014 02:41:17 +0000 (18:41 -0800)]
ASoC: rsnd: add rsnd_ssi_is_play()
SCU needs SSI direction if Gen2.
Add rsnd_ssi_is_play() function for it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
32f27ebf9b625df610c12408ea15bae37be75eaf)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Fri, 24 Jan 2014 02:41:10 +0000 (18:41 -0800)]
ASoC: rsnd: merge SRC clock timing/setting
SRC clock and timing setting register
exist in SRU and ADG on Gen1.
But, these are merged into ADG on Gen2.
Current driver is supporting Gen1 SRC only
at this point, but, above settings are
set as different function.
This patch merges these as preparation of Gen2 support.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
28dc4b63cdb96f2448a677320fcc0eb112e13e3f)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Fri, 24 Jan 2014 02:40:54 +0000 (18:40 -0800)]
ASoC: rsnd: rsnd_scu_hpbif_is_enable() become macro
rsnd_scu_hpbif_is_enable() is used only scu.c now.
It can be local macro
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
96c7c0d6f8c6e09e9123f0518130c047c5de40f6)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Fri, 24 Jan 2014 02:40:47 +0000 (18:40 -0800)]
ASoC: rsnd: Merge macros in scu.c
Merge #define lines, since these are defined
in the scattering place
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
39cf3c4064b8db25efe501fec8e3c48a578b4b58)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Fri, 24 Jan 2014 02:40:41 +0000 (18:40 -0800)]
ASoC: rsnd: clarify scu.c area
scu.c cares SRU(Gen1) / SCU(Gen2) / SSIU(Gen2)
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
c926b746055adfd915936c67244e635e9c7a3d84)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Fri, 24 Jan 2014 02:40:34 +0000 (18:40 -0800)]
ASoC: rsnd: SCU should be called before SSI
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
be213ac1af893410eb8256010edf136b4099e827)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Fri, 24 Jan 2014 02:40:27 +0000 (18:40 -0800)]
ASoC: rsnd: don't use schedule_work() when rsnd_dma_start()
rsnd_dma_start() is the function to start DMAEngine.
Current code is using schedule_work() for it,
but it breaks DMAC/SSI register setting timing.
Don't use schedule_work() on it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
f5cab3b8976d59c6166228874a5af3d87c94c723)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Fri, 24 Jan 2014 02:40:20 +0000 (18:40 -0800)]
ASoC: rsnd: fixup Gen2 module naming
Gen2 has SCU, not SRU
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
64de62b38641dec05905930024133726c540040e)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Fri, 24 Jan 2014 02:40:13 +0000 (18:40 -0800)]
ASoC: rsnd: non 0 is error on probe
Some xxx_probe() returns not only -Exx, but also PTR_ERR().
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
106d2eff563b2abdb34872cb8ec7b19766edaffc)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Fri, 24 Jan 2014 02:40:03 +0000 (18:40 -0800)]
ASoC: rsnd: remove duplicate *priv from rsnd_dma
*priv pointer exists under rsnd_mod,
and, it can get rsnd_mod pointer from rsnd_dma.
remove duplicate rsnd_dma :: priv
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
9b5ab573a81b9ac0df90b74d732651fdf8b24525)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Fri, 24 Jan 2014 02:39:56 +0000 (18:39 -0800)]
ASoC: rsnd: explain SRC bypass mode settings in comment
SRC bypass mode is useful for debugging.
This patch explains SRC bypass mode settings in comment
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
41c6221c39accdc4fe2b0c0fa196b6302b704e57)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Fri, 24 Jan 2014 02:39:48 +0000 (18:39 -0800)]
ASoC: rsnd: rename rsnd_scu_convert_rate_ctrl()
rsnd_scu_convert_rate_ctrl() is unclear naming,
and there is "rsnd_scu_convert_rate" variable.
These are confusable.
it renamed to rsnd_scu_set_convert_rate()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
f80e1c96339a45992b5dded0474288e52bd3b18d)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Fri, 24 Jan 2014 02:39:40 +0000 (18:39 -0800)]
ASoC: rsnd: remove ssiu from ssi.c
Now, SSI_MODE0/1 are controlled under scu.c
ssiu is no longer needed on ssi.c
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
dd27d808f9e084e7e9c4719c17f17d1fa35c45a6)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Fri, 24 Jan 2014 02:39:32 +0000 (18:39 -0800)]
ASoC: rsnd: SSI_MODE0/1 settings goes to scu.c
SRU (Gen1) / SCU (Gen2) / SSIU (Gen2) are controlled under scu.c.
(SCU + SSIU (Gen2) was SRU (Gen1))
And register of SSI_MODE0/1 are mapped on these IP.
But these have been implemented under ssi.c on this driver.
The naming is very confusable,
but it should be implemented under scu.c
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
7b5ce9759a60ebdffa1e76224ccb3d85bd06e4ac)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Fri, 24 Jan 2014 02:39:23 +0000 (18:39 -0800)]
ASoC: rsnd: remove pin sync option
Renesas Chip is supporting multi pin sound,
but the HW setting is very difficult and confusable.
But driver is supporting it halfway.
Remove SYNC option at this point.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
6f3ab6c1c022e7a4877d38940cd45ae7804a15e2)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Fri, 24 Jan 2014 02:39:12 +0000 (18:39 -0800)]
ASoC: rsnd: rsnd_dai_is_clk_master() can be shared
Current rsnd driver is using ssi local
rsnd_rdai_is_clk_master() for checking clock master.
But it can be rsnd_dai_is_clk_master(), and share in each file
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
e779a20da90b12d17af74fe544fafd814b66dc63)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Fri, 24 Jan 2014 02:38:50 +0000 (18:38 -0800)]
ASoC: rsnd: merge rsnd_scu_start/stop() and rsnd_scu_transfer_start/stop()
rsnd_scu_transfer_start/stop() are no longer needed.
merge into rsnd_scu_start/stop()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
e7ce74eaa76591e5a4905d0fc07a278533447b80)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Fri, 24 Jan 2014 02:38:42 +0000 (18:38 -0800)]
ASoC: rsnd: remove meaningless function parameter
struct rsnd_priv *priv on rsnd_scu_init/start/stop()
are no longer needed
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
47718dc7d8ca5f5509ac9beb13486642306bb36b)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Fri, 24 Jan 2014 02:38:33 +0000 (18:38 -0800)]
ASoC: rsnd: add rsnd_scu_init(), and separate init/start
Current scu.c has rsnd_scu_start(),
and, operation of initialization/start
are implemented in this function.
This patch adds new rsnd_scu_init() and separates
rsnd_scu_start(), since rsnd_mod_ops has .init/.start callbacks.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
a204d90c91208d9b63ba309a1c44f582751e58c9)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Fri, 24 Jan 2014 02:38:26 +0000 (18:38 -0800)]
ASoC: rsnd: control SCU ops in probe timing
SCU will be used if platform requested to use.
Current driver is checking it in runtime,
but, it can be decided in probe timing.
This patch do it
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
013f38fe260af6f505ad5da5f6b0db3e42ca1fbb)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Fri, 24 Jan 2014 02:38:17 +0000 (18:38 -0800)]
ASoC: rsnd: remove meaningless rsnd_ssi_non()
rsnd_ssi_non_ops callback functions are never called.
remove these meaningless callback
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
6acef1721c1046be8b5f44b839c28817cfbd66c6)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Fri, 24 Jan 2014 02:38:08 +0000 (18:38 -0800)]
ASoC: rsnd: cleanup debug information method
rsnd_mod debug information is implemented
in each callback functions now.
But, it can be implemented in rsnd_mod_call(),
and share this code.
This patch adds it
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
92d9587ede108a7e73f80d0767aedf2c4edb47d8)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Fri, 24 Jan 2014 02:37:39 +0000 (18:37 -0800)]
ASoC: rsnd: tidyup register naming of BUSIF_MODE
Gen1:SRU has only 1 BUSIF_MODE,
but Gen2:SSIU/SCU has SRCm_BUSIF_MODE, and SSIn_BUSIF_MODE.
This patch rename current BUSIF_MODE to SRC_BUSIF_MODE.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
0290d2a42cb476358303d05fbe2475dd50889907)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Laurent Pinchart [Tue, 1 Apr 2014 11:03:52 +0000 (13:03 +0200)]
drm/rcar-du: Handle encoder initialization failures
The rcar_du_encoder_init() function can fail and return an error code.
Don't ignore it.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit
d9961b22716ddf59ca307fe862f93ff0ea919952)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Mark Brown [Thu, 30 Jan 2014 18:57:20 +0000 (18:57 +0000)]
pinctrl: Quiet logging about missing DT nodes when not using DT
On systems which were not booted using DT it is entirely unsurprising that
device nodes don't have any DT information and this is going to happen for
every single device in the system. Make pinctrl be less chatty about this
situation by only logging in the case where we have DT.
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit
5d88dceac736a779fdf6208bbd0a06e81fe25300)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Brian Norris [Wed, 29 Jan 2014 21:39:43 +0000 (13:39 -0800)]
mtd: m25p80: add Macronix mx66l1g55g 1Gbit SPI flash
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
(cherry picked from commit
6f7db7f3203a0bd48170807adeb53dd401d29110)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Tue, 11 Feb 2014 08:51:18 +0000 (09:51 +0100)]
mtd: m25p80: add support for the Spansion s25fl008k chip
Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
(cherry picked from commit
bec44c45c245b38662f1e61bf0bde95fac1e7fb5)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Axel Lin [Tue, 21 Jan 2014 07:56:34 +0000 (15:56 +0800)]
mtd: m25p80: Use positive logic to check JEDEC ID
For slightly better readability.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
(cherry picked from commit
b2fda1296bb8e213a6bad3937326ae98c4c4773c)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Paul Gortmaker [Tue, 21 Jan 2014 21:22:52 +0000 (16:22 -0500)]
mtd: delete non-required instances of include <linux/init.h>
None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>. Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Brian Norris <computersforpeace@gmail.com>
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
[Brian: dropped one incorrect hunk]
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
(cherry picked from commit
3ea5b037e750274659648b58fb97426566a90373)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Geert Uytterhoeven [Tue, 21 Jan 2014 12:59:19 +0000 (13:59 +0100)]
mtd: m25p80: Enable Dual SPI read transfers for s25fl256s1 and s25fl512s
Spansion s25fl256s1 and s25fl512s support Dual SPI transfers, hence set the
M25P80_DUAL_READ flag.
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
(cherry picked from commit
f5e00838e83f6fc93f42c7a01b0c612031955b31)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Geert Uytterhoeven [Tue, 21 Jan 2014 12:59:18 +0000 (13:59 +0100)]
mtd: m25p80: Add dual read support
Add support for Dual SPI read transfers, which is supported by some
Spansion SPI FLASHes.
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
(cherry picked from commit
dbbafb74239e8296bc20f86366b3f38e13650900)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Geert Uytterhoeven [Thu, 27 Mar 2014 20:47:36 +0000 (21:47 +0100)]
gpio: rcar: Add helper variable dev = &pdev->dev
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: linux-gpio@vger.kernel.org
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit
b22978fc33dec72e5f8e17f90eb63ea9137aafd5)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Ben Dooks [Tue, 15 Apr 2014 16:06:34 +0000 (17:06 +0100)]
clk: shmobile: clk-mstp: change to using clock-indices
With the addition of clock-indices, we need to change the renesas
clock implementation to use these instead of the local definition
of "renesas,clock-indices".
Since this will break booting with older device trees, we add a
simple auto-detection of which properties are present.
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
(cherry picked from commit
8e33f91a0b84ae1964bef77cb92f5d41d97530c8)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Ben Dooks [Mon, 31 Mar 2014 17:47:27 +0000 (18:47 +0100)]
clk: shmobile: fix setting paretn clock rate
If the driver needs to change a clock rate, then it must be propogated
through the MSTP clock to the parent clock (such as shdi0 -> sd0). Without
this we cannot up-rate default clocks which are really slow (such as the
mmcif1 which defaults to 12MHz where it could be running at 97MHz)
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
(cherry picked from commit
e44df332f30bf3040c60c1ed6674d1431fdb48b9)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>