diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-21 11:34:25 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-21 11:34:25 -0800 |
commit | 460dc1eecf37263c8e3b17685ef236f0d236facb (patch) | |
tree | 1d20e367cefccddb969b48afaab140b8125cea4e /drivers/spi/spi-s3c64xx.c | |
parent | 024e4ec1856d57bb78c06ec903d29dcf716f5f47 (diff) | |
parent | b531f81b0d70ffbe8d70500512483227cc532608 (diff) |
Merge tag 'sound-3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai:
"The biggest change in this update is the unification of HD-audio codec
parsers. Now the HD-audio codec is parsed in a generic parser code
which is invoked by each HD-audio codec driver.
Some background information is found in David Henningsson's blog
entry:
http://voices.canonical.com/david.henningsson/2013/01/18/upcoming-changes-to-the-intel-hda-drivers/
Other than that, some random updates/fixes like USB-audio and a bunch
of small AoC updates as usual.
Highlights:
- Unification of HD-audio parser code (aka generic parser)
- Support of new Intel HD-audio controller, new IDT codecs
- Fixes for HD-audio HDMI audio hotplug
- Haswell HDMI audio fixup
- Support of Creative CA0132 DSP code
- A few fixes of HDSP driver
- USB-audio fix for Roland A-PRO, M-Audio FT C600
- Support PM for aloop driver (and fixes Oops)
- Compress API updates for gapless playback support
For ASoC part:
- Support for a wider range of hardware in the compressed stream code
- The ability to mute capture streams as well as playback streams
while inactive
- DT support for AK4642, FSI, Samsung I2S and WM8962
- AC'97 support for Tegra
- New driver for max98090, replacing the stub which was there
- A new driver from Dialog
Note that due to dependencies, DTification of DMA support for Samsung
platforms (used only by the and I2S driver and SPI) is merged here as
well."
Fix up trivial conflict in drivers/spi/spi-s3c64xx.c due to removed code
being changed.
* tag 'sound-3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (453 commits)
ALSA: usb: Fix Processing Unit Descriptor parsers
ALSA: hda - hdmi: Notify userspace when ELD control changes
ALSA: hda - hdmi: Protect ELD buffer
ALSA: hda - hdmi: Refactor hdmi_eld into parsed_hdmi_eld
ALSA: hda - hdmi: Do not expose eld data when eld is invalid
ALSA: hda - hdmi: ELD shouldn't be valid after unplug
ALSA: hda - Fix the silent speaker output on Fujitsu S7020 laptop
ALSA: hda - add quirks for mute LED on two HP machines
ALSA: usb/quirks, fix out-of-bounds access
ASoC: codecs: Add da7213 codec
ALSA: au88x0 - Define channel map for au88x0
ALSA: compress: add support for gapless playback
ALSA: hda - Remove speaker clicks on CX20549
ALSA: hda - Disable runtime PM for Intel 5 Series/3400
ALSA: hda - Increase badness for missing multi-io
ASoC: arizona: Automatically manage input mutes
ALSA: hda - Fix broken workaround for HDMI/SPDIF conflicts
ALSA: hda/ca0132 - Add missing \n to debug prints
ALSA: hda/ca0132 - Fix type of INVALID_CHIP_ADDRESS
ALSA: hda - update documentation for no-primary-hp fixup
...
Diffstat (limited to 'drivers/spi/spi-s3c64xx.c')
-rw-r--r-- | drivers/spi/spi-s3c64xx.c | 77 |
1 files changed, 23 insertions, 54 deletions
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 8f492ed317c..7cfbe9d3381 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -134,7 +134,6 @@ struct s3c64xx_spi_dma_data { unsigned ch; enum dma_transfer_direction direction; enum dma_ch dmach; - struct property *dma_prop; }; /** @@ -319,16 +318,15 @@ static void prepare_dma(struct s3c64xx_spi_dma_data *dma, static int acquire_dma(struct s3c64xx_spi_driver_data *sdd) { struct samsung_dma_req req; + struct device *dev = &sdd->pdev->dev; sdd->ops = samsung_dma_get_ops(); req.cap = DMA_SLAVE; req.client = &s3c64xx_spi_dma_client; - req.dt_dmach_prop = sdd->rx_dma.dma_prop; - sdd->rx_dma.ch = sdd->ops->request(sdd->rx_dma.dmach, &req); - req.dt_dmach_prop = sdd->tx_dma.dma_prop; - sdd->tx_dma.ch = sdd->ops->request(sdd->tx_dma.dmach, &req); + sdd->rx_dma.ch = sdd->ops->request(sdd->rx_dma.dmach, &req, dev, "rx"); + sdd->tx_dma.ch = sdd->ops->request(sdd->tx_dma.dmach, &req, dev, "tx"); return 1; } @@ -1053,49 +1051,6 @@ static void s3c64xx_spi_hwinit(struct s3c64xx_spi_driver_data *sdd, int channel) flush_fifo(sdd); } -static int s3c64xx_spi_get_dmares( - struct s3c64xx_spi_driver_data *sdd, bool tx) -{ - struct platform_device *pdev = sdd->pdev; - struct s3c64xx_spi_dma_data *dma_data; - struct property *prop; - struct resource *res; - char prop_name[15], *chan_str; - - if (tx) { - dma_data = &sdd->tx_dma; - dma_data->direction = DMA_MEM_TO_DEV; - chan_str = "tx"; - } else { - dma_data = &sdd->rx_dma; - dma_data->direction = DMA_DEV_TO_MEM; - chan_str = "rx"; - } - - if (!sdd->pdev->dev.of_node) { - res = platform_get_resource(pdev, IORESOURCE_DMA, tx ? 0 : 1); - if (!res) { - dev_err(&pdev->dev, "Unable to get SPI-%s dma resource\n", - chan_str); - return -ENXIO; - } - dma_data->dmach = res->start; - return 0; - } - - sprintf(prop_name, "%s-dma-channel", chan_str); - prop = of_find_property(pdev->dev.of_node, prop_name, NULL); - if (!prop) { - dev_err(&pdev->dev, "%s dma channel property not specified\n", - chan_str); - return -ENXIO; - } - - dma_data->dmach = DMACH_DT_PROP; - dma_data->dma_prop = prop; - return 0; -} - #ifdef CONFIG_OF static int s3c64xx_spi_parse_dt_gpio(struct s3c64xx_spi_driver_data *sdd) { @@ -1194,6 +1149,7 @@ static inline struct s3c64xx_spi_port_config *s3c64xx_spi_get_port_config( static int s3c64xx_spi_probe(struct platform_device *pdev) { struct resource *mem_res; + struct resource *res; struct s3c64xx_spi_driver_data *sdd; struct s3c64xx_spi_info *sci = pdev->dev.platform_data; struct spi_master *master; @@ -1252,13 +1208,26 @@ static int s3c64xx_spi_probe(struct platform_device *pdev) sdd->cur_bpw = 8; - ret = s3c64xx_spi_get_dmares(sdd, true); - if (ret) - goto err0; + if (!sdd->pdev->dev.of_node) { + res = platform_get_resource(pdev, IORESOURCE_DMA, 0); + if (!res) { + dev_err(&pdev->dev, "Unable to get SPI tx dma " + "resource\n"); + return -ENXIO; + } + sdd->tx_dma.dmach = res->start; - ret = s3c64xx_spi_get_dmares(sdd, false); - if (ret) - goto err0; + res = platform_get_resource(pdev, IORESOURCE_DMA, 1); + if (!res) { + dev_err(&pdev->dev, "Unable to get SPI rx dma " + "resource\n"); + return -ENXIO; + } + sdd->rx_dma.dmach = res->start; + } + + sdd->tx_dma.direction = DMA_MEM_TO_DEV; + sdd->rx_dma.direction = DMA_DEV_TO_MEM; master->dev.of_node = pdev->dev.of_node; master->bus_num = sdd->port_id; |