alistair23-linux/arch/arm/mach-s3c24xx/dma-s3c2443.c
Linus Torvalds 9992ba7232 sound updates for v3.10-rc1
Mostly many small changes spread as seen in diffstat in sound/*
 directory by this update.  A significant change in the subsystem level
 is the introduction of snd_soc_component, which will help more generic
 handling of SoC and off-SoC components.
 
 Also, snd_BUG_ON() macro is enabled unconditionally now due to its
 misuses, so people might hit kernel warnings (it's a good thing for
 us).
 
 - compress-offload: support for capture by Charles Keepax
 - HD-audio: codec delay support by Dylan Reid
 - HD-audio: improvements/fixes in generic parser: better headphone mic
   and headset mic support, jack_modes hint consolidation, proper beep
   attach/detachment, generalized power filter controls by David
   Henningsson, et al
 - HD-audio: Improved management of HDMI codec pins/converters
 - HD-audio: Better pin/DAC assignment for VIA codecs
 - HD-audio: Haswell HDMI workarounds
 - HD-audio: ALC268 codec support, a few new quirks for Chromebooks
 - USB: regression fixes: USB-MIDI autopm fix, the recent ISO latency
   fix by Clemens Ladisch
 - USB: support for DSD formats by Daniel Mack
 - USB: A few UAC2 device endian/cock fixes by Eldad Zack
 - USB: quirks for Emu 192kHz support, Novation Twitch DJ controller,
   Yamaha THRxx devices
 - HDSPM: updates for TCO controls by Adrian Knoth
 - ASoC: Add a snd_soc_component object type for generic handling of
   SoC and off-SoC components by Kuninori Morimoto,
 - dmaengine: a large set of cleanups and conversions by Lars-Peter
   Clausen
 - ASoC DAPM: performance optimizations from Ryo Tsutsui
 - ASoC DAPM: support for mixer control sharing by Stephen Warren
 - ASoC: multiplatform ARM cleanups from Arnd Bergmann
 - ASoC: new codec drivers for AK5385 and TAS5086 from Daniel Mack
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABAgAGBQJRg2bUAAoJEGwxgFQ9KSmksasQAIq1ypbylrLA3vf7PUXmL7Jb
 hMtC5tzasZqJsIZ2fyhiZL8J5yQ78Z5dhjehFWlCbJEaKhsjZVyb67RpuK597b6K
 Ypa30OghbWuCoKjmaXK9AFTuijTxdefmewIJfgwVMYtgA5rBU70qt96NC/b/UQXk
 gEPI740i7EFJL2wfcqRpGoKGO1o80yMuKzIj3gHUZMFHYYhPgvVuGt9cCe3cXwLV
 IBT77PjMoGt1Q7iJQkX4DGlB5n526l1G8a6VptdCou0qyEWfhgSik5I3msNuAXte
 1KYE4zj0Rq4xqN28/D/eAF1o3q+X9aiLttGpG0sJLiwGagdWVFaXLyJDMhZxCbwz
 1F4k+B8UCucojw3HtNzoIQJezoRX2aHMjlAZ50b416hITkg5VQe5+sJBxpjIJo4I
 GSmizUiNahDk9jtI/PEGo7yr8CdRTY3v38mdZRGYxyWgJ1a8sNwQwqUdH6A0D/w6
 3wMp4Y9Zt8AK/kiWLLWvsDVvwRptqplrXistTvv4v2xVJgvU+klDsDpa5Lz7kG7Z
 q43RA4o+yWdG6d1hTgMXp7FGwUkcer7WKWEmAZsQmX03Q0zjZqMhfUwVUtaHIx9c
 6YipHdVMAJ0sz/dYrKnZ92hbZcXNj/A9zfqYWeFlA/18FCO6u4BXODBup8BLwyUm
 hfOv+M/q6haNA98GDHS9
 =sYiI
 -----END PGP SIGNATURE-----

Merge tag 'sound-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound updates from Takashi Iwai:
 "Mostly many small changes spread as seen in diffstat in sound/*
  directory by this update.  A significant change in the subsystem level
  is the introduction of snd_soc_component, which will help more generic
  handling of SoC and off-SoC components.

  Also, snd_BUG_ON() macro is enabled unconditionally now due to its
  misuses, so people might hit kernel warnings (it's a good thing for
  us).

   - compress-offload: support for capture by Charles Keepax
   - HD-audio: codec delay support by Dylan Reid
   - HD-audio: improvements/fixes in generic parser: better headphone
     mic and headset mic support, jack_modes hint consolidation, proper
     beep attach/detachment, generalized power filter controls by David
     Henningsson, et al
   - HD-audio: Improved management of HDMI codec pins/converters
   - HD-audio: Better pin/DAC assignment for VIA codecs
   - HD-audio: Haswell HDMI workarounds
   - HD-audio: ALC268 codec support, a few new quirks for Chromebooks
   - USB: regression fixes: USB-MIDI autopm fix, the recent ISO latency
     fix by Clemens Ladisch
   - USB: support for DSD formats by Daniel Mack
   - USB: A few UAC2 device endian/cock fixes by Eldad Zack
   - USB: quirks for Emu 192kHz support, Novation Twitch DJ controller,
     Yamaha THRxx devices
   - HDSPM: updates for TCO controls by Adrian Knoth
   - ASoC: Add a snd_soc_component object type for generic handling of
     SoC and off-SoC components by Kuninori Morimoto,
   - dmaengine: a large set of cleanups and conversions by Lars-Peter
     Clausen
   - ASoC DAPM: performance optimizations from Ryo Tsutsui
   - ASoC DAPM: support for mixer control sharing by Stephen Warren
   - ASoC: multiplatform ARM cleanups from Arnd Bergmann
   - ASoC: new codec drivers for AK5385 and TAS5086 from Daniel Mack"

* tag 'sound-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (315 commits)
  ALSA: usb-audio: caiaq: fix endianness bug in snd_usb_caiaq_maschine_dispatch
  ALSA: asihpi: add format support check in snd_card_asihpi_capture_formats
  ALSA: pcm_format_to_bits strong-typed conversion
  ALSA: compress: fix the states to check for allowing read
  ALSA: hda - Move Thinkpad X220 to use auto parser
  ALSA: USB: adjust for changed 3.8 USB API
  ALSA: usb - Avoid unnecessary sample rate changes on USB 2.0 clock sources
  sound: oss/dmabuf: use dma_map_single
  ALSA: ali5451: use mdelay instead of large udelay constants
  ALSA: hda - Add the support for ALC286 codec
  ALSA: usb-audio: USB quirk for Yamaha THR10C
  ALSA: usb-audio: USB quirk for Yamaha THR5A
  ALSA: usb-audio: USB quirk for Yamaha THR10
  ALSA: usb-audio: Fix autopm error during probing
  ALSA: snd-usb: try harder to find USB_DT_CS_ENDPOINT
  ALSA: sound kconfig typo
  ALSA: emu10k1: Fix dock firmware loading
  ASoC: ux500: forward declare msp_i2s_platform_data
  ASoC: davinci-mcasp: Add Support BCLK-to-LRCLK ratio for TDM modes
  ASoC: davinci-pcm, davinci-mcasp: Clean up active_serializers
  ...
2013-05-03 09:10:23 -07:00

179 lines
4.2 KiB
C

/* linux/arch/arm/mach-s3c2443/dma.c
*
* Copyright (c) 2007 Simtec Electronics
* Ben Dooks <ben@simtec.co.uk>
*
* S3C2443 DMA selection
*
* http://armlinux.simtec.co.uk/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/device.h>
#include <linux/serial_core.h>
#include <linux/io.h>
#include <mach/dma.h>
#include <plat/dma-s3c24xx.h>
#include <plat/cpu.h>
#include <plat/regs-serial.h>
#include <mach/regs-gpio.h>
#include <plat/regs-dma.h>
#include <mach/regs-lcd.h>
#include <plat/regs-spi.h>
#define MAP(x) { \
[0] = (x) | DMA_CH_VALID, \
[1] = (x) | DMA_CH_VALID, \
[2] = (x) | DMA_CH_VALID, \
[3] = (x) | DMA_CH_VALID, \
[4] = (x) | DMA_CH_VALID, \
[5] = (x) | DMA_CH_VALID, \
}
static struct s3c24xx_dma_map __initdata s3c2443_dma_mappings[] = {
[DMACH_XD0] = {
.name = "xdreq0",
.channels = MAP(S3C2443_DMAREQSEL_XDREQ0),
},
[DMACH_XD1] = {
.name = "xdreq1",
.channels = MAP(S3C2443_DMAREQSEL_XDREQ1),
},
[DMACH_SDI] = { /* only on S3C2443 */
.name = "sdi",
.channels = MAP(S3C2443_DMAREQSEL_SDI),
},
[DMACH_SPI0_RX] = {
.name = "spi0-rx",
.channels = MAP(S3C2443_DMAREQSEL_SPI0RX),
},
[DMACH_SPI0_TX] = {
.name = "spi0-tx",
.channels = MAP(S3C2443_DMAREQSEL_SPI0TX),
},
[DMACH_SPI1_RX] = { /* only on S3C2443/S3C2450 */
.name = "spi1-rx",
.channels = MAP(S3C2443_DMAREQSEL_SPI1RX),
},
[DMACH_SPI1_TX] = { /* only on S3C2443/S3C2450 */
.name = "spi1-tx",
.channels = MAP(S3C2443_DMAREQSEL_SPI1TX),
},
[DMACH_UART0] = {
.name = "uart0",
.channels = MAP(S3C2443_DMAREQSEL_UART0_0),
},
[DMACH_UART1] = {
.name = "uart1",
.channels = MAP(S3C2443_DMAREQSEL_UART1_0),
},
[DMACH_UART2] = {
.name = "uart2",
.channels = MAP(S3C2443_DMAREQSEL_UART2_0),
},
[DMACH_UART3] = {
.name = "uart3",
.channels = MAP(S3C2443_DMAREQSEL_UART3_0),
},
[DMACH_UART0_SRC2] = {
.name = "uart0",
.channels = MAP(S3C2443_DMAREQSEL_UART0_1),
},
[DMACH_UART1_SRC2] = {
.name = "uart1",
.channels = MAP(S3C2443_DMAREQSEL_UART1_1),
},
[DMACH_UART2_SRC2] = {
.name = "uart2",
.channels = MAP(S3C2443_DMAREQSEL_UART2_1),
},
[DMACH_UART3_SRC2] = {
.name = "uart3",
.channels = MAP(S3C2443_DMAREQSEL_UART3_1),
},
[DMACH_TIMER] = {
.name = "timer",
.channels = MAP(S3C2443_DMAREQSEL_TIMER),
},
[DMACH_I2S_IN] = {
.name = "i2s-sdi",
.channels = MAP(S3C2443_DMAREQSEL_I2SRX),
},
[DMACH_I2S_OUT] = {
.name = "i2s-sdo",
.channels = MAP(S3C2443_DMAREQSEL_I2STX),
},
[DMACH_PCM_IN] = {
.name = "pcm-in",
.channels = MAP(S3C2443_DMAREQSEL_PCMIN),
},
[DMACH_PCM_OUT] = {
.name = "pcm-out",
.channels = MAP(S3C2443_DMAREQSEL_PCMOUT),
},
[DMACH_MIC_IN] = {
.name = "mic-in",
.channels = MAP(S3C2443_DMAREQSEL_MICIN),
},
};
static void s3c2443_dma_select(struct s3c2410_dma_chan *chan,
struct s3c24xx_dma_map *map)
{
writel(map->channels[0] | S3C2443_DMAREQSEL_HW,
chan->regs + S3C2443_DMA_DMAREQSEL);
}
static struct s3c24xx_dma_selection __initdata s3c2443_dma_sel = {
.select = s3c2443_dma_select,
.dcon_mask = 0,
.map = s3c2443_dma_mappings,
.map_size = ARRAY_SIZE(s3c2443_dma_mappings),
};
static int __init s3c2443_dma_add(struct device *dev,
struct subsys_interface *sif)
{
s3c24xx_dma_init(6, IRQ_S3C2443_DMA0, 0x100);
return s3c24xx_dma_init_map(&s3c2443_dma_sel);
}
#ifdef CONFIG_CPU_S3C2416
/* S3C2416 DMA contains the same selection table as the S3C2443 */
static struct subsys_interface s3c2416_dma_interface = {
.name = "s3c2416_dma",
.subsys = &s3c2416_subsys,
.add_dev = s3c2443_dma_add,
};
static int __init s3c2416_dma_init(void)
{
return subsys_interface_register(&s3c2416_dma_interface);
}
arch_initcall(s3c2416_dma_init);
#endif
#ifdef CONFIG_CPU_S3C2443
static struct subsys_interface s3c2443_dma_interface = {
.name = "s3c2443_dma",
.subsys = &s3c2443_subsys,
.add_dev = s3c2443_dma_add,
};
static int __init s3c2443_dma_init(void)
{
return subsys_interface_register(&s3c2443_dma_interface);
}
arch_initcall(s3c2443_dma_init);
#endif