aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-s3c64xx/dev-audio.c
AgeCommit message (Collapse)AuthorFilesLines
2020-08-20ARM: s3c: move into a common directoryArnd Bergmann1-212/+0
s3c24xx and s3c64xx have a lot in common, but are split across three separate directories, which makes the interaction of the header files more complicated than necessary. Move all three directories into a new mach-s3c, with a minimal set of changes to each file. Signed-off-by: Arnd Bergmann <[email protected]> [krzk: Rebase, add s3c24xx and s3c64xx suffix to several files, add SPDX headers to new files, remove plat-samsung from MAINTAINERS] Co-developed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Krzysztof Kozlowski <[email protected]> https://lore.kernel.org/r/[email protected]
2020-08-17ARM: s3c: remove unneeded machine header includesKrzysztof Kozlowski1-1/+0
Not all units use the contents of mach/hardware.h and mach/dma.h. Remove these includes when not needed. Signed-off-by: Krzysztof Kozlowski <[email protected]> Acked-by: Arnd Bergmann <[email protected]>
2018-01-03ARM: S3C64XX: Add SPDX license identifiersKrzysztof Kozlowski1-9/+4
Replace GPL license statements with SPDX license identifiers (GPL-2.0 and GPL-2.0+). Signed-off-by: Krzysztof Kozlowski <[email protected]> Acked-by: Charles Keepax <[email protected]>
2017-02-23Merge tag 'armsoc-soc' of ↵Linus Torvalds1-19/+0
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC platform updates from Arnd Bergmann: "In the SoC branch we normally collect classic arch/arm/mach-* contents, i.e. C code changes for SoC platforms. This release cycle the diffstat is quite nice, in that we're removing 3x the amount of code that's being added. The main reason for this is that there's a removal of camera drivers for Freescale i.MX chips (driver was removed so the device registration isn't needed any more). There's also removal of display initialization code for OMAP that is no longer needed. The rest are mostly minor tweaks and cleanups; constification on Samsung platforms, cleanup of ux500 platform data, purge of other unused platform data/device seutp on i.MX and other good stuff. New SoC support this cycle is for two Allwinner platforms, H2+ and V3s" * tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (55 commits) ARM: ux500: remove deleted file from Makefile ARM: ep93xx: Disable TS-72xx watchdog before uncompressing ARM: ux500: cut some platform data MAINTAINERS: Update for the current location of the bcm2835 tree. ARM: davinci: remove BUG_ON() from da850_register_sata() ARM: davinci: da850: model the SATA refclk ARM: davinci: da850: add con_id for the SATA clock ARM: davinci: da8xx-dt: add OF_DEV_AUXDATA entry for SATA arm: mvebu: support for SMP on 98DX3336 SoC dt-bindings: video: exynos7-decon: Remove obsolete samsung,power-domain property soc: dove: constify reset_control_ops structures ARM: mv78xx0: fix possible PCI buffer overflow MAINTAINERS: transfer maintainership for the EZX platform ARM: shmobile: rcar-gen2: Add more register documentation ARM: tegra: paz00: Fix __initdata placement ARM: OMAP: clock: Remove unused mpurate cmdline option ARM: davinci: add skeleton for pdata-quirks arm: sunxi: add support for V3s SoC ARM: OMAP2+: omap_hwmod: Add support for earlycon arm: hisi: drop extern hip01_cpu_die ...
2016-12-29ARM: s3c64xx: Drop initialization of unused struct s3c_audio_pdata fieldsSylwester Nawrocki1-19/+0
Remove initialization of dma_{filter, playback, capture, capture_mic} fields where it is not used any more. Signed-off-by: Sylwester Nawrocki <[email protected]> Signed-off-by: Krzysztof Kozlowski <[email protected]>
2016-12-15ASoC: samsung: Remove tests of member addressKrzysztof Kozlowski1-3/+1
The driver was checking for non-NULL address of struct's members: - s3c_audio_pdata->type (union), - s3c_audio_pdata->type.i2s (embedded struct). This is pointless as these will be always non-NULL. The 's3c_audio_pdata' is always initialized in static memory so it will be zeroed. Additionally the 'type' member was an union with only one member. It is safe to reorganize the structures to get rid of useless union and checks for addresses to fix the coccinelle warning: >> sound/soc/samsung/i2s.c:1270:2-4: ERROR: test of a variable/field address Reported-by: kbuild test robot <[email protected]> Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2015-11-21ASoC: samsung: pass filter function as pointerArnd Bergmann1-0/+6
As we are now passing the filter data as pointers to the drivers, we can take the final step and also pass the filter function the same way. I'm keeping this change separate, as there it's less obvious that this is a net win. Upsides of this are: - The ASoC drivers are completely independent from the DMA engine implementation, which simplifies the Kconfig logic and in theory allows the same sound drivers to be built in a kernel that supports different kinds of dmaengine drivers. - Consistency with other subsystems and drivers On the other hand, we have a few downsides: - The s3c24xx-dma driver now needs to be built-in for the ac97 platform device to be instantiated on s3c2440. - samsung_dmaengine_pcm_config cannot be marked 'const' any more because the filter function pointer needs to be set at runtime. This is safe as long we don't have multiple different DMA engines in thet same system at runtime, but is nonetheless ugly. Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2015-11-18ASoC: samsung: pass DMA channels as pointersArnd Bergmann1-18/+23
ARM64 allmodconfig produces a bunch of warnings when building the samsung ASoC code: sound/soc/samsung/dmaengine.c: In function 'samsung_asoc_init_dma_data': sound/soc/samsung/dmaengine.c:53:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] playback_data->filter_data = (void *)playback->channel; sound/soc/samsung/dmaengine.c:60:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] capture_data->filter_data = (void *)capture->channel; We could easily shut up the warning by adding an intermediate cast, but there is a bigger underlying problem: The use of IORESOURCE_DMA to pass data from platform code to device drivers is dubious to start with, as what we really want is a pointer that can be passed into a filter function. Note that on s3c64xx, the pl08x DMA data is already a pointer, but gets cast to resource_size_t so we can pass it as a resource, and it then gets converted back to a pointer. In contrast, the data we pass for s3c24xx is an index into a device specific table, and we artificially convert that into a pointer for the filter function. Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-01-14ARM: S3C[24|64]xx: move includes back under <mach/> scopeLinus Walleij1-1/+1
When refactoring and breaking out the includes for the machine-specific GPIO configuration, two files were created in <linux/platform_data/gpio-samsung-s3c[24|64]xx.h>, but as that namespace shall be used for defining data exchanged between machines and drivers, using it for these broad macros and config settings is wrong. Move the headers back into the machine-local <mach/gpio-samsung.h> file and think about the next step. Reported-by: Arnd Bergmann <[email protected]> Cc: Tomasz Figa <[email protected]> Cc: Sylwester Nawrocki <[email protected]> Cc: Ben Dooks <[email protected]> Cc: Kukjin Kim <[email protected]> Cc: [email protected] Acked-by: Mark Brown <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Acked-by: Heiko Stuebner <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-12-20ARM: s3c64xx: get rid of custom <mach/gpio.h>Linus Walleij1-0/+1
This isolates the custom S3C64xx GPIO definition table to <linux/platform_data/gpio-samsung-s3x64xx.h> as this is used in a few different places in the kernel, removing the need to depend on the implicit inclusion of <mach/gpio.h> from <linux/gpio.h> and thus getting rid of a few nasty cross-dependencies. Also delete the CONFIG_SAMSUNG_GPIO_EXTRA stuff. Instead roof the number of GPIOs for this platform: First sum up all the GPIO banks from A to Q: 187 GPIOs. Add the 16 "board GPIOs" and the roof for SAMSUNG_GPIO_EXTRA, 128, so in total maximum 187+16+128 = 331 GPIOs, so let's take the same roof as for S3C24XX: 512. This way we can do away with the GPIO calculation macros for GPIO_BOARD_START, BOARD_NR_GPIOS and the definition of ARCH_NR_GPIOS. Cc: Mark Brown <[email protected]> [on Mini6410 board] Tested-by: Tomasz Figa <[email protected]> [for changes in mach-s3c64xx] Acked-by: Tomasz Figa <[email protected]> Tested-by: Mark Brown <[email protected]> Acked-by: Kukjin Kim <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2012-12-19ARM: S3C64XX: Add I2S clkdev supportPadmavathi Venna1-11/+0
I2S controller has an internal mux for RCLK source clks. The list of source clk names were passed through platform data in non-dt case. Register the existing RCLK source clocks with clkdev using generic connection id. This is required as part of adding DT support for I2S controller driver. Signed-off-by: Padmavathi Venna <[email protected]> Acked-by: Sangbeom Kim <[email protected]> Signed-off-by: Kukjin Kim <[email protected]>
2012-09-19ARM: samsung: move platform_data definitionsArnd Bergmann1-1/+1
Platform data for device drivers should be defined in include/linux/platform_data/*.h, not in the architecture and platform specific directories. This moves such data out of the samsung include directories Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Mark Brown <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Acked-by: Nicolas Pitre <[email protected]> Acked-by: Mauro Carvalho Chehab <[email protected]> Cc: Kukjin Kim <[email protected]> Cc: Kyungmin Park <[email protected]> Cc: Ben Dooks <[email protected]> Cc: Jeff Garzik <[email protected]> Cc: Guenter Roeck <[email protected]> Cc: "Wolfram Sang (embedded platforms)" <[email protected]> Cc: Dmitry Torokhov <[email protected]> Cc: Bryan Wu <[email protected]> Cc: Richard Purdie <[email protected]> Cc: Sylwester Nawrocki <[email protected]> Cc: Chris Ball <[email protected]> Cc: David Woodhouse <[email protected]> Cc: Grant Likely <[email protected]> Cc: Felipe Balbi <[email protected]> Cc: Alan Stern <[email protected]> Cc: Sangbeom Kim <[email protected]> Cc: Liam Girdwood <[email protected]> Cc: [email protected]
2012-05-12ARM: S3C64XX: Use common macro to define resources on dev-audio.cTushar Behera1-100/+20
Cc: Ben Dooks <[email protected]> Signed-off-by: Tushar Behera <[email protected]> Signed-off-by: Kukjin Kim <[email protected]>
2011-10-31arm: Add export.h to ARM specific files as required.Paul Gortmaker1-0/+1
These files all make use of one of the EXPORT_SYMBOL variants or the THIS_MODULE macro. So they will need <linux/export.h> Signed-off-by: Paul Gortmaker <[email protected]>
2010-11-23ASoC: Samsung: Rename AC97 platform deviceJassi Brar1-1/+1
Call the AC97 controller devices found in S3C, S5P and newer SoCs as 'samsung-ac97' rather than 's3c-ac97'. Signed-off-by: Jassi Brar <[email protected]> Acked-by: Kukjin Kim <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2010-11-23ARM: Samsung: Define common audio-dma deviceJassi Brar1-13/+0
The ASoC uses common DMA driver for Audio devices. So it makes sense to a common audio-dma device shared across all platforms. Signed-off-by: Jassi Brar <[email protected]> Acked-by: Kukjin Kim <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2010-11-23ASoC: Samsung: Rename DMA deviceJassi Brar1-1/+1
Some Samsung SoCs have a PCM(DSP) controller. So the name s3c24xx-pcm-audio for DMA driver is not very appropraite. This patch moves :- s3c24xx-pcm-audio -> samsung-audio Signed-off-by: Jassi Brar <[email protected]> Acked-by: Kukjin Kim <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2010-11-19ARM: S3C64XX: Upgrade platform device for I2SJassi Brar1-24/+32
Add more information to I2S platform_devices in order to prepare them for new controller driver. Signed-off-by: Jassi Brar <[email protected]> Acked-by: Mark Brown <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Kukjin Kim <[email protected]>
2010-11-19ARM: SAMSUNG: Rename s3c64xx I2S platform deviceJassi Brar1-3/+3
Since the I2S of S3C64XX and newer SoCs are incremental versions of each other with changes managable in a single driver, rename the 's3c64xx-iis' -> 'samsung-i2s' Signed-off-by: Jassi Brar <[email protected]> Acked-by: Mark Brown <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Kukjin Kim <[email protected]>
2010-10-28Merge branch 'for-rmk' of ↵Russell King1-46/+17
git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into devel-stable Conflicts: arch/arm/mach-s3c64xx/dev-audio.c
2010-10-23ARM: S3C64XX: Fix special function for IISv4 portMark Brown1-1/+1
When converting to use s3c_gpio_cfgpin_range() the function for the IISv4 block appears to have been typoed as 4 (the keypad) rather than 5 as it should be. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Kukjin Kim <[email protected]>
2010-10-23ARM: S3C64XX: Change to using s3c_gpio_cfgpin_range()Ben Dooks1-38/+15
Change the code setting ranges of GPIO pins using s3c_gpio_cfgpin() to use the recently introduced s3c_gpio_cfgpin_range(). Signed-off-by: Ben Dooks <[email protected]> Signed-off-by: Kukjin Kim <[email protected]>
2010-10-23ARM: S3C64XX: Change dev-audio.c to use S3C_GPIO_SFN() for special functionsBen Dooks1-42/+37
To aide in changing the gpio code, remove the use of pin-specific configs and move to using the S3C_GPIO_SFN() versions. Signed-off-by: Ben Dooks <[email protected]> Signed-off-by: Kukjin Kim <[email protected]>
2010-08-27ARM: S3C64XX: Fix fallthrough bug in i2sv3 gpio configuration, improve loggingDimitris Papastamos1-2/+5
If the platform device id is 1, the code will fallthrough the case and incorrectly return -EINVAL. Add a break to avoid fallthrough. Make logging slightly more verbose by including the device id. This fixes an issue only present in multi-component. Signed-off-by: Dimitris Papastamos <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2010-08-16Merge branch 'for-2.6.36' into for-2.6.37Mark Brown1-1/+1
Fairly simple conflicts, the most serious ones are the i.MX ones which I suspect now need another rename. Conflicts: arch/arm/mach-mx2/clock_imx27.c arch/arm/mach-mx2/devices.c arch/arm/mach-omap2/board-rx51-peripherals.c arch/arm/mach-omap2/board-zoom2.c sound/soc/fsl/mpc5200_dma.c sound/soc/fsl/mpc5200_dma.h sound/soc/fsl/mpc8610_hpcd.c sound/soc/pxa/spitz.c
2010-08-12ASoC: multi-component - ASoC Multi-Component SupportLiam Girdwood1-0/+13
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 <[email protected]> Some TLV320aic23 and Cirrus platform fixes. Signed-off-by: Ryan Mallon <[email protected]> TI CODEC and OMAP fixes Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Janusz Krzysztofik <[email protected]> Signed-off-by: Jarkko Nikula <[email protected]> Samsung platform and misc fixes :- Signed-off-by: Chanwoo Choi <[email protected]> Signed-off-by: Joonyoung Shim <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Reviewed-by: Jassi Brar <[email protected]> Signed-off-by: Seungwhan Youn <[email protected]> MPC8610 and PPC fixes. Signed-off-by: Timur Tabi <[email protected]> i.MX fixes and some core fixes. Signed-off-by: Sascha Hauer <[email protected]> J4740 platform fixes:- Signed-off-by: Lars-Peter Clausen <[email protected]> CC: Tony Lindgren <[email protected]> CC: Nicolas Ferre <[email protected]> CC: Kevin Hilman <[email protected]> CC: Sascha Hauer <[email protected]> CC: Atsushi Nemoto <[email protected]> CC: Kuninori Morimoto <[email protected]> CC: Daniel Gloeckner <[email protected]> CC: Manuel Lauss <[email protected]> CC: Mike Frysinger <[email protected]> CC: Arnaud Patard <[email protected]> CC: Wan ZongShun <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Liam Girdwood <[email protected]>
2010-08-06ARM: SAMSUNG: Fix on inclusion mach/gpio.h for Samsung SoCsKukjin Kim1-1/+1
This patch fixes on inclusion <mach/gpio.h> to <linux/gpio.h> Signed-off-by: Kukjin Kim <[email protected]> Cc: Ben Dooks <[email protected]>
2010-02-24ARM: S3C64XX: Add AC97 platform resourcesJassi Brar1-0/+78
This patch defines the platform device and the resources: IRQ, DMA and MEM, needed by the AC97 controller driver. Signed-off-by: Jassi Brar <[email protected]> Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Ben Dooks <[email protected]>
2010-02-20ARM: S3C64XX: Move device and device setup into mach-s3c64xxBen Dooks1-0/+257
Move the S3C64XX specific device and setup files into mach-s3c64xx as they are unlikely to be used outside of this code. Signed-off-by: Ben Dooks <[email protected]>