History log of /linux-master/sound/soc/sh/fsi.c
Revision Date Author Comments
# 076357cd 19-Nov-2023 Christophe JAILLET <christophe.jaillet@wanadoo.fr>

ASoC: sh: convert not to use dma_request_slave_channel()

dma_request_slave_channel() is deprecated. dma_request_chan() should
be used directly instead.

Switch to the preferred function and update the error handling accordingly.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/1a837f96f056fa3dcb02a77afa5892d40b354cb1.1700417934.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>


# 340d79a1 06-Oct-2023 Rob Herring <robh@kernel.org>

ASoC: Explicitly include correct DT includes

The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it was merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> # for at91
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20231006-dt-asoc-header-cleanups-v3-1-13a4f0f7fee6@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# c4ccfe4e 11-Sep-2023 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: convert not to use asoc_xxx()

ASoC is now unified asoc_xxx() into snd_soc_xxx().
This patch convert asoc_xxx() to snd_soc_xxx().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87cyyos25y.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 08719f46 15-Mar-2023 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

ASoC: sh: fsi: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20230315150745.67084-131-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>


# 1e108e60 10-Mar-2023 Rob Herring <robh@kernel.org>

ASoC: Use of_property_present() for testing DT property presence

It is preferred to use typed property access functions (i.e.
of_property_read_<type> functions) rather than low-level
of_get_property/of_find_property functions for reading properties. As
part of this, convert of_get_property/of_find_property calls to the
recently added of_property_present() helper when we just want to test
for presence of a property and nothing more.

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230310144732.1546328-1-robh@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# adced680 19-May-2022 Charles Keepax <ckeepax@opensource.cirrus.com>

ASoC: sh: Rename set_fmt_new back to set_fmt

Now the core has been migrated across to the new direct clock
specification we can move the drivers back to the normal set_fmt
callback.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220519154318.2153729-48-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 2d4dd776 19-May-2022 Charles Keepax <ckeepax@opensource.cirrus.com>

ASoC: sh: Update to use set_fmt_new callback

As part of updating the core to directly tell drivers if they are clock
provider or consumer update these CPU side drivers to use the new direct
callback.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/20220519154318.2153729-21-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 405afed8 01-Mar-2022 Jiasheng Jiang <jiasheng@iscas.ac.cn>

ASoC: fsi: Add check for clk_enable

As the potential failure of the clk_enable(),
it should be better to check it and return error
if fails.

Fixes: ab6f6d85210c ("ASoC: fsi: add master clock control functions")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Link: https://lore.kernel.org/r/20220302062844.46869-1-jiasheng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>


# eb1e9b8f 18-Jun-2021 Flavio Suligoi <f.suligoi@asem.it>

ASoC: fsi: fix spelling mistake

Fix "thse" --> "these" in struct fsi_stream declaration.

Signed-off-by: Flavio Suligoi <f.suligoi@asem.it>
Link: https://lore.kernel.org/r/20210618085324.1038524-1-f.suligoi@asem.it
Signed-off-by: Mark Brown <broonie@kernel.org>


# af69f47d 26-May-2021 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: add .auto_selectable_formats support

By this patch, DAI format might be automatically selected
(Depends on paired DAI).

Link: https://lore.kernel.org/r/871rb3hypy.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/871racbx0w.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87bl8wnc5x.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 28ec78b0 19-Jul-2020 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: use asoc_substream_to_rtd()

Now we can use asoc_substream_to_rtd() macro,
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87mu3v0yuj.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# cf01245d 13-Jul-2020 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: don't use discriminatory terms for comment

fsi is using discriminatory terms for comment.
This patch removes it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87eepf3qqs.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 34a43780 22-Mar-2020 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/87eetjir4x.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 82dabf59 12-Feb-2020 Geert Uytterhoeven <geert+renesas@glider.be>

ASoC: sh: fsi: Restore devm_ioremap() alignment

The alignment of the continuation of the devm_ioremap() call in
fsi_probe() was broken. Join the lines, as all parameters can fit on a
single line.

Fixes: 4bdc0d676a643140 ("remove ioremap_nocache and devm_ioremap_nocache")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20200212085008.9652-1-geert+renesas@glider.be
Signed-off-by: Mark Brown <broonie@kernel.org>


# 4bdc0d67 06-Jan-2020 Christoph Hellwig <hch@lst.de>

remove ioremap_nocache and devm_ioremap_nocache

ioremap has provided non-cached semantics by default since the Linux 2.6
days, so remove the additional ioremap_nocache interface.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>


# e91f134c 10-Dec-2019 Takashi Iwai <tiwai@suse.de>

ASoC: sh: Drop superfluous ioctl PCM ops

ASoC PCM core deals the empty ioctl field now as default.
Let's kill the redundant lines.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20191210145406.21419-15-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>


# 55df47f2 10-Dec-2019 Takashi Iwai <tiwai@suse.de>

ASoC: fsi: Use managed buffer allocation

Clean up the driver with the new managed buffer allocation API.
The hw_params and hw_free callbacks became superfluous and got
dropped.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20191210142614.19405-8-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>


# be513045 01-Oct-2019 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: fsi: remove snd_pcm_ops

snd_pcm_ops is no longer needed.
Let's use component driver callback.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87zhij90fh.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# cb8cdb6f 17-Feb-2019 Colin Ian King <colin.king@canonical.com>

ASoC: fsi: fix spelling mistake "doens't" -> "doesn't"

There is a spelling mistake in a dev_err message. Fix it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# b76c7fe6 04-Feb-2019 Takashi Iwai <tiwai@suse.de>

ASoC: sh: Drop superfluous PCM preallocation error checks

snd_pcm_lib_preallocate_pages() and co always succeed, so the error
check is simply redundant. Drop it.

Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 134c875b 11-Jun-2018 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: convert to SPDX identifiers

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# f5a82fa6 28-Jan-2018 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: fsi: replace platform to component

Now platform can be replaced to component, let's do it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# b48cc1d9 04-Oct-2017 Geert Uytterhoeven <geert+renesas@glider.be>

ASoC: fsi: Use of_device_get_match_data() helper

Use the of_device_get_match_data() helper instead of open coding.
Note that when used with DT, there's always a valid match.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 5c2e035e 17-Aug-2017 Bhumika Goyal <bhumirks@gmail.com>

ASoC: sh: make snd_pcm_hardware const

Make these const as they are only passed as the 2nd argument to the
function snd_soc_set_runtime_hwparams, which is const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# dd80627d 10-Aug-2017 Markus Elfring <elfring@users.sourceforge.net>

ASoC: fsi: Delete an error message for a failed memory allocation in fsi_probe()

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mark Brown <broonie@kernel.org>


# b23bd34c 13-Aug-2017 Arvind Yadav <arvind.yadav.cs@gmail.com>

ASoC: sh: constify snd_pcm_ops structures

snd_pcm_ops are not supposed to change at runtime. All functions
working with snd_pcm_ops provided by <sound/soc.h> work with
const snd_pcm_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 51772554 14-Aug-2017 Bhumika Goyal <bhumirks@gmail.com>

ASoC: sh: make snd_soc_platform_driver const

Make these const as they are either passed as the 2nd argument to
the function devm_snd_soc_register_platform or snd_soc_register_platform,
and the arguments are of type const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 4b2983da 16-Jul-2017 Gustavo A. R. Silva <gustavo@embeddedor.com>

ASoC: fsi: constify dev_pm_ops structure

This dev_pm_ops structure is only stored in the pm field of a
device_driver structure. This field is declared const, so
dev_pm_ops structures that have this property can be declared
as const also.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 3048e76c 16-May-2017 Geert Uytterhoeven <geert@linux-m68k.org>

ASoC: fsi: Move inline fsi_stream_is_play() before use

With gcc 4.1.2:

sound/soc/sh/fsi.c:304: warning: ‘fsi_stream_is_play’ declared inline after being called
sound/soc/sh/fsi.c:304: warning: previous declaration of ‘fsi_stream_is_play’ was here

Move fsi_stream_is_play() up to fix this, removing the need for a
forward declaration as well.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Mark Brown <broonie@kernel.org>


# e6e969f1 18-Nov-2015 Arnd Bergmann <arnd@arndb.de>

ASoC: sh: fix fsi build warnings for 64 bit

As this driver can now be compiled for ARM64, we get a new warning
as a result of passing a DMA filter data pointer through an 'int':

sound/soc/sh/fsi.c: In function 'fsi_dma_probe':
sound/soc/sh/fsi.c:1372:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
shdma_chan_filter, (void *)io->dma_id,

We already know that we only need the legacy filter function on
arch/sh, so we can hide the legacy DMA interface function
behind an #ifdef. This has the other advantage of no longer
depending on the shdma_chan_filter function to be visible.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>


# be9ae230 14-Jul-2015 Geert Uytterhoeven <geert+renesas@glider.be>

ASoC: fsi: Remove obsolete sh_fsi2 platform_device_id entry

Since the removal of the r8a7740 legacy board code in commit
1fa59bda21c7fa36 ("ARM: shmobile: Remove legacy board code for
Armadillo-800 EVA"), all former users of the "sh_fsi2" platform device
name are only supported in generic DT-only ARM multi-platform builds.
The driver doesn't need to match platform devices by name anymore, hence
remove the corresponding platform_device_id entry.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 9a42ab04 31-Mar-2015 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

ASoC: fsi: mark several data structures as const

A driver's platform_device_id and device data should and can be const.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 3b6281cf 31-Mar-2015 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

ASoC: fsi: reorder code to make a forward declaration superfluous

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 1c6ae56c 29-Mar-2015 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

ASoC: fsi: fix license specification

According to the file header only GPL v2 applies to it. Fix the
MODULE_LICENSE parameter accordingly.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>


# c660c0a8 18-Mar-2015 Fabian Frederick <fabf@skynet.be>

ASoC: fsi: constify of_device_id array

of_device_id is always used as const.
(See driver.of_match_table and open firmware functions)

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 7c6cc8f2 16-Feb-2015 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: Configure DMA slave settings

Current FSI driver is assuming that dst_addr/src_addr of DMAEngine
will be set by platform data. But it should be set via
dmaengine_slave_config(). Special thanks to Arnd

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>


# 5b7cdc80 16-Feb-2015 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: remove slave_id settings for DMAEngine

Current fsi sets dma_slave_config :: slave_id field for DMAEngine,
but it is no longer needed. Let's remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>


# 0db54e74 02-Jan-2015 Lars-Peter Clausen <lars@metafoo.de>

ASoC: sh: Remove unnecessary snd_pcm_lib_preallocate_free_for_all()

The ALSA core takes care that all preallocated memory is freed when the PCM
itself is freed. There is no need to do this manually in the driver.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 180cf794 03-Jan-2015 Markus Elfring <elfring@users.sourceforge.net>

ASoC: fsi: Deletion of unnecessary checks before the function call "clk_enable"

The clk_enable() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mark Brown <broonie@kernel.org>


# e98c89e0 02-Dec-2014 Markus Elfring <elfring@users.sourceforge.net>

ASoC: fsi: Deletion of unnecessary checks before the function call "clk_disable"

The clk_disable() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mark Brown <broonie@kernel.org>


# c1b9b9b1 28-Oct-2014 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: remove unsupported PAUSE flag

FSI doesn't support PAUSE.
Remove SNDRV_PCM_INFO_PAUSE flags from snd_pcm_hardware info

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org


# 6c7d1dfc 17-Aug-2014 Lars-Peter Clausen <lars@metafoo.de>

ASoC: sh: Fix dma direction type

dmaengine_prep_slave_single() expects a enum dma_transfer_direction and not a
enum dma_data_direction. Since the integer representations of both DMA_TO_DEVICE
and DMA_MEM_TO_DEV aswell as DMA_FROM_DEVICE and DMA_DEV_TO_MEM have the same
value the code worked fine even though it was using the wrong type.

Fixes the following warnings from sparse:
sound/soc/sh/fsi.c:1307:42: warning: mixing different enum types
sound/soc/sh/fsi.c:1307:42: int enum dma_data_direction versus
sound/soc/sh/fsi.c:1307:42: int enum dma_transfer_direction

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>


# 8457e0e9 22-Jun-2014 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: use dmaengine_prep_dma_cyclic() for DMA transfer

Current FSI driver is using DMAEngine directly,
but, ASoC is requesting to use common DMA transfer method,
like snd_dmaengine_pcm_trigger() or dmaengine_pcm_ops.
It is difficult to switch at this point, since Renesas
driver is also supporting PIO transfer.
This patch uses dmaengine_prep_dma_cyclic() instead
of dmaengine_prep_slave_single().
It is used in requested method,
and is good first step to switch over.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>


# d403e249 22-Jun-2014 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: add fsi_pointer_update() for common pointer method

fsi PIO/DMA handler are using each own pointer update method,
but these can be share.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>


# ffb83e8c 22-Jun-2014 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: use SNDRV_DMA_TYPE_DEV for sound buffer

Current fsi driver is using SNDRV_DMA_TYPE_CONTINUOUS
for snd_pcm_lib_preallocate_pages_for_all().
But, it came from original dma-sh7760.c,
and no longer needed.
This patch exchange its parameter, and removed
original dma mapping and un-needed
dma_sync_single_xxx() from driver.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>


# 9f98cd69 19-Jun-2014 Lars-Peter Clausen <lars@metafoo.de>

ASoC: sh/fsi: Make one-bit bitfields unsigned

One-bit signed bitfields have two possible values: 0 and -1. This sometimes
leads to unexpected results (e.g. foo.bar = 1; foo.bar == 1 => false) which is
why it is recommended to make one-bit bitfields unsigned.

This fixes the following sparse warnings:
sound/soc/sh/fsi.c:267:25: error: dubious one-bit signed bitfield
sound/soc/sh/fsi.c:268:22: error: dubious one-bit signed bitfield
sound/soc/sh/fsi.c:269:20: error: dubious one-bit signed bitfield
sound/soc/sh/fsi.c:270:28: error: dubious one-bit signed bitfield
sound/soc/sh/fsi.c:271:26: error: dubious one-bit signed bitfield
sound/soc/sh/fsi.c:272:25: error: dubious one-bit signed bitfield

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>


# c7a507ee 13-Mar-2014 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: fixup SND_SOC_DAIFMT_CBx_CFx flags

SND_SOC_DAIFMT_CBx_CFx means "codec" side master/slave mode.
Then, FSI will be master mode if it was SND_SOC_DAIFMT_CBS_CFS.

This patch fixup platform settings too.
Then, it tidyups SND_SOC_DAIFMT_INV settings.

Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>


# a7ddf151 06-Jan-2014 Lars-Peter Clausen <lars@metafoo.de>

ASoC: sh: Don't set unused struct snd_pcm_hardware fields

The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>


# a0732782 10-Dec-2013 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: remove original filter from fsi_dma_probe()

Remove original filter from fsi_dma_probe(),
and use SH-DMA suitable filter.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>


# 53110a25 26-Aug-2013 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: reserve prefetch period on DMA transferring

Current FSI is supporting DMAEngine transfer,
but, it needs to use work queue.
Therefore, DMA transfer settings might be late if there is heavy task.
This patch reserves next period beforehand on DMA transfer function.
Android sound will be breaking up without this patch.

Tested-by: Tomohito Esaki <etom@igel.co.jp>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>


# c375b2d7 28-May-2013 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: fixup sparse errors

This patch fixup below sparse errors

${LINUX}/sound/soc/sh/fsi.c:1459:9: \
error: incompatible types in conditional expression (different base types)
${LINUX}/sound/soc/sh/fsi.c:1634:25: \
error: incompatible types in conditional expression (different base types)
${LINUX}/sound/soc/sh/fsi.c:1639:17: \
error: incompatible types in conditional expression (different base types)
${LINUX}/sound/soc/sh/fsi.c:2093:9: \
error: incompatible types in conditional expression (different base types)
${LINUX}/sound/soc/sh/fsi.c:2105:9: \
error: incompatible types in conditional expression (different base types)

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# da4f2f9e 14-Mar-2013 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: use snd_soc_register_component() instead of snd_soc_register_dais()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 9c337289 12-Mar-2013 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: remove unused irq

FSI is using devm_request_irq() from
1ddd82868cc888e008ed520465c172a6cdddd689
(ASoC: fsi: use devm_request_irq())

master->irq is no longer needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# e43fc6af 15-Jan-2013 Thierry Reding <thierry.reding@avionic-design.de>

ASoC: fsi: Remove __devinitconst

__devinitconst and friends have recently been removed and must not be
used anymore.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 9e7b6d60 10-Jan-2013 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: add device tree support

Support for loading the Renesas FSI driver via devicetree.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# fd974e52 27-Dec-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: don't use platform info pointer on probe()

Current FSI driver is using platform info pointer,
but it is not good design for DT support.
This patch made it not to use platform info pointer.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# abca7581 16-Dec-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: remove SH_FSI_xxx_INV flags

3449f5fab8c51e37a8a48bc2516588c615373191
(ASoC: fsi: add SND_SOC_DAIFMT_INV_xxx support)
added clock inversion support via snd_soc_dai_set_fmt().
Thus, this patch removed SH_FSI_xxx_INV and fsi_get_info()
from fsi driver, and modified platform settings to use new style.
Then, it cleaned up meaningless settings from platform.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 6cbdbffb 16-Dec-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: remove platform depended .set_rate() callback support

ab6f6d85210c4d0265cf48e9958c04e08595055a
(ASoC: fsi: add master clock control functions)
added driver level clock control functions.
And now, platform depended .set_rate() is no longer needed.
This patch removed unnecessary .set_rate() platform callback support.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 3449f5fa 16-Nov-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: add SND_SOC_DAIFMT_INV_xxx support

Current FSI driver is using platform information pointer,
but it is not good design for DT support.
This patch adds SND_SOC_DAIFMT_INV_xxx support,
and it is possible to independent from platform information pointer.

Old type SH_FSI_xxx_INV is still supported,
but it will be removed soon.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 2522acd2 16-Nov-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: stream mode become independent from platform flags

Current FSI driver is using platform information pointer,
but it is not good design for DT support.
This patch makes stream mode format
independent from platform information pointer.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# ab6340c4 16-Nov-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: master clock selection become independent from platform flags

Current FSI driver is using platform information pointer,
but it is not good design for DT support.
This patch makes master clock selection
independent from platform information pointer.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# c2052def 16-Nov-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: SPDIF format become independent from platform flags

Current FSI driver is using platform information pointer,
but it is not good design for DT support.
This patch makes spdif format
independent from platform information pointer.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 943fdadc 16-Nov-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: tidyup sh_fsi_platform_info pointer

Current FSI driver is requesting sh_fsi_platform_info pointer from platform,
and it didn't allowed NULL pointer.
This patch fixes it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 40f9118b 16-Nov-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: tidyup FSIA/B settings

This patch tidyup to use fsi pointer for FSIA/B settings

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# ab6f6d85 05-Nov-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: add master clock control functions

Current FSI driver required set_rate() platform callback function
to set audio clock if it was master mode,
because it seemed that CPG/FSI-DIV clocks calculation depend on
platform/board/cpu.
But it was calculable regardless of platform.
This patch supports audio clock calculation method,
but the sampling rate under 32kHz is not supported at this point.
Old type set_rate() is still supported now,
but it will be deleted on next version

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 80b4addc 30-Oct-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: care fsi_hw_start/stop() return value

Current FSI driver didn't care fsi_hw_start/stop() return value,
and it causes WARNING() call if SNDRV_PCM_TRIGGER_START failed.
This patch solved this issue

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# ddeb2d70 29-Oct-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: fsi_set_master_clk() was called from fsi_hw_xxx() only

Current FSI driver is using fsi_set_master_clk() if it needs system clock.
But this function was called from
fsi_hw_shutdown()/fsi_dai_trigger()/fsi_resume() without a sense of unity.
Because of this, sound playback after suspend failed sometimes.
To keep consistency, fsi_master_clk() was called from
fsi_hw_start/stop() only now.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 1ddd8286 03-Oct-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: use devm_request_irq()

This patch uses devm_request_irq() instead of request_irq()
and removed free_irq() from driver

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 2a8c8a56 02-Oct-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: fixup channels_min/max

FSI can support 1 - 8 channel input/output,
but current driver is supporting 2 channel format only.
This patch fixes channel mismatch

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 57451e43 03-Oct-2012 Guennadi Liakhovetski <g.liakhovetski@gmx.de>

ASoC: fsi: don't reschedule DMA from an atomic context

shdma doesn't support transfer re-scheduling or triggering from callbacks
or from atomic context. The fsi driver issues DMA transfers from a tasklet
context, which is a bug. To fix it convert tasklet to a work.

Reported-by: Do Q.Thang <dq-thang@jinso.co.jp>
Tested-by: Do Q.Thang <dq-thang@jinso.co.jp>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org


# 6ac4262f 10-Sep-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: convert to devm_xxx()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# dbd4e51c 10-Sep-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: tidyup: remove un-necessary operation from fsi_probe()

struct fsi_master *master became member of struct fsi_priv from
71f6e0645be42f93c0f90dfcc93b9d2d277c2ee6
(ASoC: sh_fsi: avoid using global variable)

So, master = NULL is not necessary on fsi_probe() now.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# c35e005f 10-Sep-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: fixup pm_runtime_disable() timing on fsi_probe()

pm_runtime_disable() error handling timing on fsi_probe() was wrong.
This patch fixes it up.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# b8373147 09-May-2012 Guennadi Liakhovetski <g.liakhovetski@gmx.de>

ASoC: fsi: prepare for conversion to the shdma base library

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>


# b1226dc5 25-May-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: use PIO handler if DMA handler was invalid

PIO handler is not good performance, but works on all platform.
So, switch to PIO handler if DMA handler was invalid case.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 5514efdf 29-May-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: use dmaengine helper functions

This patch used dmaengine helper functions instead of using hand setting.
And reduced local variables

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# fbe42f66 29-May-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: bugfix: ensure dma is terminated

FSI DMAEngine has to be stopped certainly at the start/stop time.
Without this patch, it will include noise on playback.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 4a1b09b7 29-May-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: bugfix: correct dma area

FSI driver is using dma_sync_single_xxx(),
but the dma area was not correct.
This patch fix it up.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# e42bb9bf 25-May-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: bugfix: enable master clock control on DMA stream

DMA stream handler didn't care about master clock.
This patch fixes it up.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 766812e6 17-May-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: fsi: enable chip specific data transfer mode

SupherH FSI2 can use special data transfer,
but it depends on CPU-FSI2 connection style.

We can use 16bit data stream mode if it was valid connection,
and it is required for 16bit data DMA transfer / SPDIF sound output.
We can use 24bit data transfer if it was invalid connection.

We can select connection type if CPU is SH7372,
and it is always valid connection if latest SuperH.

This patch adds new bus_option and fsi_bus_setup()
for supporting these feature.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# f33238e9 17-May-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: fsi: call fsi_hw_startup/shutdown from fsi_dai_trigger()

fsi_hw_startup/shutdown() needs the setup of bus width,
but it is impossible to get parameter of snd_pcm_runtime at this timing.
So, these functions are changed so that be called from fsi_dai_trigger().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 9c59dd34 17-May-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: fsi: use same format for IN/OUT

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 284c6f65 17-May-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: fsi: add fsi_version() and removed meaningless version check

This patch adds fsi_version() function for accessing version.

And there were some meaningless version check which never hit.
This patch removed it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 4d62ec12 17-May-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: fsi: use register field macro name on IN/OUT_DMAC

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# cdf27f37 17-Apr-2012 Paul Mundt <lethal@linux-sh.org>

ASoC: fsi: update for dmaengine prep_slave_sg fallout.

Leading up to the ->device_prep_slave_sg change in
185ecb5f4fd43911c35956d4cc7d94a1da30417f 'dmaengine: add context
parameter to prep_slave_sg and prep_dma_cyclic' a generic wrapper was
added in place to guard against the API change, though the fsi driver
wasn't updated in the process (presumably its dmaengine support hadn't
been merged yet at the time). This trivially switches over to the new
wrapper and gets it building again.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 7da9ced6 03-Feb-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: Add DMAEngine support

This patch supports DMAEngine to FSI driver.
It supports only Tx case at this point.
If platform/cpu doesn't support DMAEngine, FSI driver will
use PIO transfer.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 1987877d 08-Feb-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: fixup fsi_pointer() calculation method

current fsi_pointer() calculation was not correct for FSI driver.
This patch fix it up.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 83344027 03-Feb-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: add .init/.quit handler support

This is preparation for DMAEngine support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# fec691e7 03-Feb-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: PortA/B information was controlled by sh_fsi_port_info

Current FSI got each PortA/B parameter by porta_flags/portb_flags from platform.
And .set_rate function was shared for PortA/B.
This structure was not readable and not flexible.
This patch adds sh_fsi_port_info, and its own settings was added on each platform.
it is preparation for DMAEngine support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 97df8187 03-Feb-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: fsi_stream_is_working() care substream->runtime

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 180346ed 03-Feb-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: add .start_stop handler to fsi_stream_handler

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 938e2a8d 03-Feb-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: don't use is_play as a parameter of fsi functions

is_play should be kept as local valuable.
it prepare cleanup for DMAEngine support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 1b0ca1a0 03-Feb-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: tidyup: fsi_pio_xxx() are gathered

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 5e97313a 03-Feb-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: add fsi_stream_handler and PIO handler

This patch adds struct fsi_stream_handler and defined fsi_pio_push/pop_handler.
these are controled by fsi_steam_xxx() function.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 7b1b3331 03-Feb-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: use fsi_stream in fsi_get_current_fifo_samples() parameter

fsi_get_current_fifo_samples() uses fsi_stream instead of is_play.
This is just prepare cleanup for DMAEngine support.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# a449e467 03-Feb-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: re-define fsi_is_play() and fsi_stream_is_play()

This patch re-define fsi_is_play() and fsi_stream_is_play().
fsi_data_pop/push() function keeps direct value of "is_play" at this point,
but it will be removed soon.
This is just prepare cleanup for DMAEngine support.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 95b0cf05 03-Feb-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: modify fsi_pio_get_area() parameter and using position

This patch modify fsi_pio_get_area() parameter to use
struct fsi_stream, and used it on fsi_fifo_data_ctrl().
This is just prepare cleanup for DMAEngine support.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 8c415295 03-Feb-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: rename fsi_stream_push/pop() to fsi_stream_init/quit()

This is preparation for DMAEngine support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 41bba151 03-Feb-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: remove unnecessary parameter from fsi_hw_shutdown()

This is preparation for DMAEngine support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# b49e8027 03-Feb-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: tidyup: move fsi_fifo_init() onto fsi_hw_startup()

fsi_fifo_init() is called only from fsi_hw_startup()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# d78629e2 03-Feb-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: rename fsi_dma_soft_xxx() to fsi_pio_xxx()

This is preparation for DMAEngine support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 376cf38a 03-Feb-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: data push/pop calculation part was divided

Next transfer data size of "push" and "pop" had calculated on shared function.
But it was not readable code.
This patch divided it into for push, and for pop.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 4e62d84d 03-Feb-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: tidyup: fsi_stream_xx() functions were gathered

This patch gathered fsi_stream_xxx() functions in order to make it readable.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# c1e6f10e 03-Feb-2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: reduce runtime calculation by using pre-setting

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# bc122e34 25-Jan-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: fsi: Remove unneeded empty runtime PM callbacks

The runtime PM core no longer requires any callbacks so don't provide
empty ones for it any more.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 27f478a6 03-Dec-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Use core pm_runtime callbacks for fsi

Now that the core holds a pm_runtime reference to the device while the
link is active there is no need for the driver to do so.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# cb5e8738 24-Nov-2011 Axel Lin <axel.lin@gmail.com>

ASoC: Convert sh directory to module_platform_driver

Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 85e7652d 23-Nov-2011 Lars-Peter Clausen <lars@metafoo.de>

ASoC: Constify snd_soc_dai_ops structs

Commit 1ee46ebd("ASoC: Make the DAI ops constant in the DAI structure")
introduced the possibility to have constant DAI ops structures, yet this is
barley used in both existing drivers and also new drivers being submitted,
although none of them modifies its DAI ops structure. The later is not
surprising since existing drivers are often used as templates for new drivers.
So this patch just constifies all existing snd_soc_dai_ops structs to eliminate
the issue altogether.

The patch was generated with the following coccinelle semantic patch:
// <smpl>
@@
identifier ops;
@@
-struct snd_soc_dai_ops ops =
+const struct snd_soc_dai_ops ops =
{ ... };
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 65ff03f4 06-Nov-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: add valid data position control support

FSI2 can control valid data position, like
package in front/back or stream mode (16bit x 2).
But current fsi driver is assuming it was in-back.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 8918b843 31-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: fixup compile warning

This patch fixup below warning

${linux}/sound/soc/sh/fsi.c:442:3:\
warning: passing argument 1 of '__fsi_reg_read' makes pointer\
from integer without a cast
${linux}/sound/soc/sh/fsi.c:517:3: \
warning: passing argument 1 of '__fsi_reg_write' makes pointer\
from integer without a cast
${linux}/sound/soc/sh/fsi.c:663:3: \
warning: passing argument 1 of '__fsi_reg_mask_set' makes pointer\
from integer without a cast

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# da155d5b 14-Jul-2011 Paul Gortmaker <paul.gortmaker@windriver.com>

sound: Add module.h to the previously silent sound users

Lots of sound drivers were getting module.h via the implicit presence
of it in <linux/device.h> but we are going to clean that up. So
fix up those users now.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>


# ca7aceef 02-Oct-2011 Arnd Bergmann <arnd@arndb.de>

ASoC: sh: use correct __iomem annotations

This removes a few unnecessary type casts and avoids
sparse warnings.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 88e24c3a 22-Sep-2011 Yong Zhang <yong.zhang0@gmail.com>

sound: irq: Remove IRQF_DISABLED

Since commit [e58aa3d2: genirq: Run irq handlers with interrupts disabled],
We run all interrupt handlers with interrupts disabled
and we even check and yell when an interrupt handler
returns with interrupts enabled (see commit [b738a50a:
genirq: Warn when handler enables interrupts]).

So now this flag is a NOOP and can be removed.

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 552d1ef6 07-Jun-2011 Liam Girdwood <lrg@ti.com>

ASoC: core - Optimise and refactor pcm_new() to pass only rtd

Currently pcm_new() passes in 3 arguments :- card, pcm and DAI.

Refactor this to only pass in 1 argument (i.e. the rtd) since struct rtd contains
card, pcm and DAI along with other members too that are useful too.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 23ca8533 23-May-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: fsi: add fsi_hw_startup/shutdown

This patch is preparation of cleanup suspend/resume patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# cda828ca 23-May-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: fsi: cleanup suspend/resume

Current FSI driver was using saved_xxx variable for suspend/resume.
OTOH, the start and stop of power/clock are controlled by
fsi_hw_startup/fsi_hw_shutdown in current FSI driver.
The all necessary registers value are set by fsi_hw_startup.

So, if fsi_hw_shutdown is called when "suspend" is generated,
and fsi_hw_startup is called at "resume",
the saved_xxx are not needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 4c481253 23-May-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: fsi: remove fsi_module_init/kill

FSIA/B ports is enabled by default when power-on,
and current FSI is supporting RuntimePM.
In addition, current fsi_module_init/kill doesn't care
simultaneous playback/recorde.
This mean FSI port control is not needed.
This patch remove fsi_module_init/kill

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 2da65892 23-May-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: fsi: make sure fsi_stream_push/pop access by spin lock

fsi_stream_push/pop might be called in same time.
This patch protect it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 9478e0b6 23-May-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: fsi: remove pm_runtime from fsi_dai_set_fmt.

pm_runtime_get/put_sync were used to access FSI register in fsi_dai_set_fmt
which is called when ALSA probe.
But this register value will disappear after pm_runtime_put_sync
if platform is supporting RuntimePM.
To solve this issue, this patch adds new variable for format,
and remove pm_runtime_get/put_sync from fsi_dai_set_fmt.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 2e651baf 23-May-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: fsi: tidyup unclear variable naming

Some variables on this driver were a unclear naming,
and were different unit (byte, frame, sample).
And some functions had wrong name
(ex. it returned "sample width" but name was "fsi_get_frame_width").
This patch tidy-up this issue, and the minimum unit become "sample".
Special thanks to Takashi YOSHII.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 1ddddd36 23-May-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: fsi: irq control moves to fsi_port_start/stop

Using fsi_irq_enable/disable in fsi_port_start/stop is very natural.
This patch is preparation of cleanup suspend/resume patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 4f56cde1 23-May-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: fsi: add fsi_set_master_clk

Current FSI driver is using set_rate call back function which is for
master mode.
By this patch, it is used from fsi_set_master_clk.
This patch is preparation of cleanup suspend/resume patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 0ffe296a 23-May-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: fsi: tidyup parameter of fsi_stream_push

It is possible to create buff_len and period_len
from substream->runtime.
This patch is preparation of tidyup unclear variable naming patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 1f5e2a31 20-Apr-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: fsi: Add module/port clock control function

The FIFO of each port were always working though it was not used
in current FSI driver.
This patch add module/port clock control function for fixing it.
This patch is also caring suspend/resume.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Simon Horman <simon@horms.net>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 106c79ec 20-Apr-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: fsi: add dev_pm_ops :: suspend/resume

Current FSI driver sets important settings when probing.
And it are not set again as long as driver is not bind again.
This mean FSI driver will lost it from register
if suspend/resume are happen.
This patch save important settings for suspend/resume.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Simon Horman <simon@horms.net>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 6a9ebad8 20-Apr-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: fsi: add fsi_is_clk_master function

If FSI port is clock master, it use set_rate function
which is callback from platform,
and it is not necessary to call it if FSI port is clock slave.
Current FSI driver called this callback if platform provide it.
This patch modify it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Simon Horman <simon@horms.net>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# b3c27b51 15-Apr-2011 Guennadi Liakhovetski <g.liakhovetski@gmx.de>

ASoC: add a module alias to the FSI driver

This patch enables FSI driver autoloading on sh-mobile systems.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Reviewed-by: Simon Horman <horms@verge.net.au
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# c40eb1e9 15-Apr-2011 Guennadi Liakhovetski <g.liakhovetski@gmx.de>

ALSA: add a module alias to the FSI driver

This patch enables FSI driver autoloading on sh-mobile systems.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Reviewed-by: Simon Horman <horms@verge.net.au>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# d985f27e 08-Apr-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: driver safely remove for against irq

free_irq and pm_runtime_disable should be called before
snd_soc_unregister_xxx

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# b9c9f967 08-Apr-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: modify vague PM control on probe

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 0b5ec87d 08-Apr-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: take care in failing case of dai register

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# f17c13ca 23-Jan-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: fsi: modify selection method of I2S/PCM/SPDIF format

Current format selection of FSI-codecs depended on platform information for FSI,
and chip default settings for codecs. It is not understandable/formal method.
This patch modify FSI and FSI-codecs to use snd_soc_dai_set_fmt.

But FSI can use I2S/PCM and SPDIF format today.
It can be selected to I2S/PCM by snd_soc_dai_set_fmt, but can not select SPDIF.
So, this patch change FSI platform information to have DAI/SPDIF mode.

If platform selects DAI mode (default),
FSI-codecs can select I2S/PCM by snd_soc_dai_set_fmt,
and if it is SPDIF mode, FSI become SPDIF format.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# d7c5762b 23-Jan-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: fsi: free from NULL pointer of struct sh_fsi_platform_info

Current FSI driver assumed master->info is not NULL.
This patch allow NULL in master->info

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 160afa7f 23-Jan-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: fsi: move chan_num from fsi_stream to fsi_priv

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 4d805f7b 19-Jan-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: fsi: Add snd_soc_dai_set_fmt support

This patch add snd_soc_dai_ops :: set_fmt to FSI driver and
select master/slave clock mode by snd_soc_dai_set_fmt on
fsi-xxx.c instead of platform infomation code.
This patch remove fsi_is_master function which is no longer needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 0d032c19 19-Jan-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: fsi: Add fsi_get_priv_frm_dai function

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 1ec9bc35 16-Dec-2010 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: fsi: Add over/under run counter

Current FSI driver had printed under/over run error
if status register have its error bit.
But runtime print cause the next error
because print out is slow.
This patch add error counter and print error when sound stop

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 9e261bbc 16-Dec-2010 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: fsi: move fsi_irq_enable function to fsi_dai_trigger

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 43fa95ca 03-Dec-2010 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: fsi: remove runtime register check from fsi_master_xxx

Current FSI driver was checking register range on fsi_master_xxx function.
This runtime check was added to avoid an illegal access
from wrong/mistake implementation.
But it is useless check under the correct implementation.
This patch escape runtime check by using macro technique.
If there is wrong implementation, it will be compile error.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# e8c8b631 03-Dec-2010 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: fsi: remove runtime register check from fsi_reg_xxx

Current FSI driver was checking register range on fsi_reg_xxx function.
This runtime check was added to avoid an illegal access
from wrong/mistake implementation.
But it is useless check under the correct implementation.
This patch escape runtime check by using macro technique.
If there is wrong implementation, it will be compile error.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 2b0e7302 03-Dec-2010 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: fsi: change fsi->mst_ctrl to master->a/b_mclk

There was a strange part where fsi->xxx had been used
for fsi_master_xxx function instead of master->xxx in current FSI.
This patch modify it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 48d78e58 03-Dec-2010 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: fsi: remove fsi_master_write

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# f7d711e3 03-Dec-2010 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: sh: fsi: clean up SPDIF defines

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 22de4e1f 19-Nov-2010 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ARM: mach-shmobile: ap4evb: FSI clock use proper process for ak4642

Current AP4 FSI didn't use set_rate for ak4642,
and used dummy rate when init.
And FSI driver was modified to always call set_rate.

The user which are using FSI set_rate is only AP4 now.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# d4bc99b9 23-Nov-2010 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ARM: mach-shmobile: ap4evb: FSI clock use proper process for HDMI

Current AP4 FSI set_rate function used bogus clock process
which didn't care enable/disable and clk->usecound.
To solve this issue, this patch also modify FSI driver to call
set_rate with enough options.
This patch modify it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 93193c2b 12-Oct-2010 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: simultaneous playback/recorde support

Current FSI driver had not cared about simultaneous
playback/capture on same port.
This patch add new fsi_stream struct to care it,

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 00545785 12-Oct-2010 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: Add fsi_is_play function

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# cf6edd00 11-Oct-2010 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: Add new macro and shift for PortA/B In/Out

Some FSI register have similar bit array for PortA/B and In/Out.
This patch add new macro and shift for it

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 75eda968 11-Oct-2010 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: avoid un-necessary status read

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# a68a3b4e 11-Oct-2010 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: remove un-necessary variable from fsi_dai_startup

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# cca1b235 11-Oct-2010 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: Add fsi_get_frame_width function

It is not so important for now.
But will be used in future.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 05c69450 05-Oct-2010 Guennadi Liakhovetski <g.liakhovetski@gmx.de>

ASoC: sh: fix build error: terminate the platform device ID list

Platform driver ID table must be zero-element terminated.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# d8b33534 16-Sep-2010 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: merge fsi_data_push/pop to fsi_fifo_data_ctrl

Current FSI driver had data push/pop functions.
But the main operation of these 2 were very similar.
This mean it is possible to merge these to 1 function.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 5bfb9ad0 16-Sep-2010 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: modify variable name to easy to understand

Current FSI driver is using
data-length / width / number / offset for variables.
But it was a very confusing name.

This patch rename them to easy to understand,
and add new functions for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# b9fde18c 16-Sep-2010 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: Add fsi_dma_soft_push/pop function

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# c8fe2574 16-Sep-2010 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: modify noisy comment out

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# c79eab3e 16-Sep-2010 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: Add fsi_dma_get_area

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# d85a6d7b 17-Sep-2010 Dzianis Kahanovich <mahatma@bspu.unibel.by>

ASoC: Add device table to SH FSI driver

Signed-off-by: Dzianis Kahanovich <mahatma@eu.by>
[Modified to move the location of the table]
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# f0fba2ad 17-Mar-2010 Liam Girdwood <lrg@slimlogic.co.uk>

ASoC: multi-component - ASoC Multi-Component Support

This patch extends the ASoC API to allow sound cards to have more than one
CODEC and more than one platform DMA controller. This is achieved by dividing
some current ASoC structures that contain both driver data and device data into
structures that only either contain device data or driver data. i.e.

struct snd_soc_codec ---> struct snd_soc_codec (device data)
+-> struct snd_soc_codec_driver (driver data)

struct snd_soc_platform ---> struct snd_soc_platform (device data)
+-> struct snd_soc_platform_driver (driver data)

struct snd_soc_dai ---> struct snd_soc_dai (device data)
+-> struct snd_soc_dai_driver (driver data)

struct snd_soc_device ---> deleted

This now allows ASoC to be more tightly aligned with the Linux driver model and
also means that every ASoC codec, platform and (platform) DAI is a kernel
device. ASoC component private data is now stored as device private data.

The ASoC sound card struct snd_soc_card has also been updated to store lists
of it's components rather than a pointer to a codec and platform. The PCM
runtime struct soc_pcm_runtime now has pointers to all its components.

This patch adds DAPM support for ASoC multi-component and removes struct
snd_soc_socdev from DAPM core. All DAPM calls are now made on a card, codec
or runtime PCM level basis rather than using snd_soc_socdev.

Other notable multi-component changes:-

* Stream operations now de-reference less structures.
* close_delayed work() now runs on a DAI basis rather than looping all DAIs
in a card.
* PM suspend()/resume() operations can now handle N CODECs and Platforms
per sound card.
* Added soc_bind_dai_link() to bind the component devices to the sound card.
* Added soc_dai_link_probe() and soc_dai_link_remove() to probe and remove
DAI link components.
* sysfs entries can now be registered per component per card.
* snd_soc_new_pcms() functionailty rolled into dai_link_probe().
* snd_soc_register_codec() now does all the codec list and mutex init.

This patch changes the probe() and remove() of the CODEC drivers as follows:-

o Make CODEC driver a platform driver
o Moved all struct snd_soc_codec list, mutex, etc initialiasation to core.
o Removed all static codec pointers (drivers now support > 1 codec dev)
o snd_soc_register_pcms() now done by core.
o snd_soc_register_dai() folded into snd_soc_register_codec().

CS4270 portions:
Acked-by: Timur Tabi <timur@freescale.com>

Some TLV320aic23 and Cirrus platform fixes.
Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>

TI CODEC and OMAP fixes
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>

Samsung platform and misc fixes :-
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Seungwhan Youn <sw.youn@samsung.com>

MPC8610 and PPC fixes.
Signed-off-by: Timur Tabi <timur@freescale.com>

i.MX fixes and some core fixes.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

J4740 platform fixes:-
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>

CC: Tony Lindgren <tony@atomide.com>
CC: Nicolas Ferre <nicolas.ferre@atmel.com>
CC: Kevin Hilman <khilman@deeprootsystems.com>
CC: Sascha Hauer <s.hauer@pengutronix.de>
CC: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
CC: Kuninori Morimoto <morimoto.kuninori@renesas.com>
CC: Daniel Gloeckner <dg@emlix.com>
CC: Manuel Lauss <mano@roarinelk.homelinux.net>
CC: Mike Frysinger <vapier.adi@gmail.com>
CC: Arnaud Patard <apatard@mandriva.com>
CC: Wan ZongShun <mcuos.com@gmail.com>

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>


# 3bc28070 29-Jul-2010 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: Add new funtion for SPDIF

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 265c770d 27-Jul-2010 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: remove device id check

Current FSI driver id is not only 0

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# bced8f5a 27-Jul-2010 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: remove unnecessary clock processing

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# ccad7b44 12-Jul-2010 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: Fixup for master mode

This patch add hw_params to snd_soc_dai_ops,
because board specific set_rate is needed
when FSI was used as master mode.

This patch remove fsi_clk_ctrl from fsi_dai_startup,
because clock should be disabled before set_rate.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# d7854147 12-Jul-2010 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: Add pr_err for noticing unsupported access

This patch didn't use dev_err,
because it is difficult to get struct device here.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 73b92c1f 12-Jul-2010 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: Change struct fsi_regs to fsi_core

Many registers which were grouped by category were added in FSI2.
To make easy to switch FSI/FSI2, fsi_core was added instead of fsi_regs.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# a7ffb52b 12-Jul-2010 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: remove noisy CR_FMT macro

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# a09370cb 12-Jul-2010 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: remove un-used variable on fsi_dai_startup

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 63772783 12-Jul-2010 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: fixup wrong value setting order of TDM

channel size should be set before setting register value

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# b427b44c 12-Jul-2010 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: fsi: fixup clock inversion operation

Clock inversion should be specified by each flags bit.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 8600d700 14-Jun-2010 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: header cleanup for FSI

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 5a0e3ad6 24-Mar-2010 Tejun Heo <tj@kernel.org>

include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.

2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).

* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>


# cc780d38 25-Mar-2010 Kuninori Morimoto <morimoto.kuninori@renesas.com>

ASoC: fsi: Add FSI2 device support

ARM-SHMOBILE series have FIFO-buffered serial interface 2 (FSI2)
device which is advanced version of FSI.
This patch add simple support for it.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 4a942b45 25-Mar-2010 Kuninori Morimoto <morimoto.kuninori@renesas.com>

ASoC: fsi: Add FIFO size calculate

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 10ea76cc 22-Mar-2010 Kuninori Morimoto <morimoto.kuninori@renesas.com>

ASoC: fsi: IRQ related process had be united

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# feb58cff 24-Mar-2010 Kuninori Morimoto <morimoto.kuninori@renesas.com>

ASoC: fsi: ensures process inside master lock

Bit operation for fsi_master should be done inside master lock.
But soft-reset/interrupt operation were outside of it.
This patch modify this problem.
It still allow to INT_ST outside-operation on fsi_interrupt,
but it is not problem.
Because this register doesn't need the bit operation.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 47fc9a0a 22-Feb-2010 Kuninori Morimoto <morimoto.kuninori@renesas.com>

ASoC: fsi: Modify over/under run error settlement

In current FSI driver, playback function cares only overrun,
and capture function cares only underrun.

But playback function should had cared about underrun,
and capture function should had cared about overrun too.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 0f69d978 03-Feb-2010 Guennadi Liakhovetski <g.liakhovetski@gmx.de>

ASoC: fix compilation breakage in sound/soc/sh/fsi.c

ctrl_outl() has become void at some point, which breaks compilation of fsi.c.
Make writing functions void, as their output is anyway not evaluated, and use
__raw_writel and __raw_readl instead of deprecated ctrl_outl and ctrl_inl
respectively.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 8fc176d5 27-Jan-2010 Kuninori Morimoto <morimoto.kuninori@renesas.com>

ASoC: fsi: Add spin lock operation for accessing shared area

fsi_master_xxx function should be protected by spin lock,
because it are used from both FSI-A and FSI-B.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 59c3b003 27-Dec-2009 Kuninori Morimoto <morimoto.kuninori@renesas.com>

ASoC: fsi: Add over/under run error settlement

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 142e8174 27-Dec-2009 Kuninori Morimoto <morimoto.kuninori@renesas.com>

ASoC: fsi: Add fsi_get_dai to get snd_soc_dai

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 1c418d1f 27-Dec-2009 Kuninori Morimoto <morimoto.kuninori@renesas.com>

ASoC: fsi: Add over_period flag to prevent the misunderstanding

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# b6aa1793 16-Dec-2009 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

ASoC: sh: FSI:: don't check platform_get_irq's return value against zero

platform_get_irq returns -ENXIO on failure, so !irq was probably
always true. Better use (int)irq <= 0. Note that a return value of
zero is still handled as error even though this could mean irq0.

This is a followup to 305b3228f9ff4d59f49e6d34a7034d44ee8ce2f0 that
changed the return value of platform_get_irq from 0 to -ENXIO on error.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 71f6e064 01-Dec-2009 Kuninori Morimoto <morimoto.kuninori@renesas.com>

ASoC: sh_fsi: avoid using global variable

Current FSI driver use global variable to access device data.
But this style will be broken
if SuperH come with multiple FSI blocks in future.
To solve this problem, this patch use cpu_dai->private_data.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 785d1c45 30-Nov-2009 Kuninori Morimoto <morimoto.kuninori@renesas.com>

ASoC: sh: fsi: Add runtime PM support

This patch add support runtime PM.
Driver callbacks for Runtime PM are empty because
the device registers are always re-initialized after
pm_runtime_get_sync(). The Runtime PM functions replaces the
clock framework module stop bit handling in this driver.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 07102f3c 29-Oct-2009 Kuninori Morimoto <morimoto.kuninori@renesas.com>

ASoC: sh: FSI: Add capture support

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 9ddc9aa9 29-Oct-2009 Kuninori Morimoto <morimoto.kuninori@renesas.com>

ASoC: sh: FSI: Remove DMA support

SuperH FSI device have the hardware limitation to use DMA.
If DMA is used, LCD output will be broken.
Maybe there are some solution. But I don't know how to do it now.
This patch remove DMA support and use soft transfer.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# a4d7d550 20-Aug-2009 Kuninori Morimoto <morimoto.kuninori@renesas.com>

ASoC: Add SuperH FSI driver support for ALSA

This driver is very simple.
It support playback only now.
This patch is tested by ms7724se board.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>