diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-17 20:17:33 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-17 20:17:33 +0300 |
commit | ea7531ac4a9d0b39edce43472147dc41cc2b7a34 (patch) | |
tree | c49d395de24f670bcf6cb5746af9e503b255e96b /arch/arm/plat-samsung/dma-ops.c | |
parent | 4025fa97ff39db054b47b9cdb9f3980480637668 (diff) | |
parent | 41e229a91207afc326f9a83ba33c098c8362d303 (diff) | |
download | linux-ea7531ac4a9d0b39edce43472147dc41cc2b7a34.tar.xz |
Merge tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC cleanups from Olof Johansson:
"This is a good healthy set of various code removals. Total net delta
is 8100 lines removed.
Among the larger cleanups are:
- Removal of old Samsung S3C DMA infrastructure by Arnd
- Removal of the non-DT version of the 'lager' board by Magnus Damm
- General stale code removal on OMAP and Davinci by Rickard Strandqvist
- Removal of non-DT support on am3517 platforms by Tony Lindgren
... plus several other cleanups of various platforms across the board"
* tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (47 commits)
ARM: sirf: drop redundant function and marco declaration
arm: omap: specify PMUs are for ARMv7 CPUs
arm: shmobile: specify PMUs are for ARMv7 CPUs
arm: iop: specify PMUs are for XScale CPUs
arm: pxa: specify PMUs are for XScale CPUs
arm: realview: specify PMU types
ARM: SAMSUNG: remove unused DMA infrastructure
ARM: OMAP3: Add back Kconfig option MACH_OMAP3517EVM for ASoC
ARM: davinci: Remove CDCE949 driver
ARM: at91: remove useless at91rm9200_set_type()
ARM: at91: remove useless at91rm9200_dt_initialize()
ARM: at91: move debug-macro.S into the common space
ARM: at91: remove useless at91_sysirq_mask_rtx
ARM: at91: remove useless config MACH_AT91SAM9_DT
ARM: at91: remove useless config MACH_AT91RM9200_DT
ARM: at91: remove unused mach/memory.h
ARM: at91: remove useless header file includes
ARM: at91: remove unneeded header file
rtc: at91/Kconfig: remove useless options
ARM: at91/Documentation: add a README for Atmel SoCs
...
Diffstat (limited to 'arch/arm/plat-samsung/dma-ops.c')
-rw-r--r-- | arch/arm/plat-samsung/dma-ops.c | 146 |
1 files changed, 0 insertions, 146 deletions
diff --git a/arch/arm/plat-samsung/dma-ops.c b/arch/arm/plat-samsung/dma-ops.c deleted file mode 100644 index 886326ee6f6c..000000000000 --- a/arch/arm/plat-samsung/dma-ops.c +++ /dev/null @@ -1,146 +0,0 @@ -/* linux/arch/arm/plat-samsung/dma-ops.c - * - * Copyright (c) 2011 Samsung Electronics Co., Ltd. - * http://www.samsung.com - * - * Samsung DMA Operations - * - * 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/errno.h> -#include <linux/amba/pl330.h> -#include <linux/scatterlist.h> -#include <linux/export.h> - -#include <mach/dma.h> - -#if defined(CONFIG_PL330_DMA) -#define dma_filter pl330_filter -#elif defined(CONFIG_S3C64XX_PL080) -#define dma_filter pl08x_filter_id -#endif - -static unsigned samsung_dmadev_request(enum dma_ch dma_ch, - struct samsung_dma_req *param, - struct device *dev, char *ch_name) -{ - dma_cap_mask_t mask; - - dma_cap_zero(mask); - dma_cap_set(param->cap, mask); - - if (dev->of_node) - return (unsigned)dma_request_slave_channel(dev, ch_name); - else - return (unsigned)dma_request_channel(mask, dma_filter, - (void *)dma_ch); -} - -static int samsung_dmadev_release(unsigned ch, void *param) -{ - dma_release_channel((struct dma_chan *)ch); - - return 0; -} - -static int samsung_dmadev_config(unsigned ch, - struct samsung_dma_config *param) -{ - struct dma_chan *chan = (struct dma_chan *)ch; - struct dma_slave_config slave_config; - - if (param->direction == DMA_DEV_TO_MEM) { - memset(&slave_config, 0, sizeof(struct dma_slave_config)); - slave_config.direction = param->direction; - slave_config.src_addr = param->fifo; - slave_config.src_addr_width = param->width; - slave_config.src_maxburst = 1; - dmaengine_slave_config(chan, &slave_config); - } else if (param->direction == DMA_MEM_TO_DEV) { - memset(&slave_config, 0, sizeof(struct dma_slave_config)); - slave_config.direction = param->direction; - slave_config.dst_addr = param->fifo; - slave_config.dst_addr_width = param->width; - slave_config.dst_maxburst = 1; - dmaengine_slave_config(chan, &slave_config); - } else { - pr_warn("unsupported direction\n"); - return -EINVAL; - } - - return 0; -} - -static int samsung_dmadev_prepare(unsigned ch, - struct samsung_dma_prep *param) -{ - struct scatterlist sg; - struct dma_chan *chan = (struct dma_chan *)ch; - struct dma_async_tx_descriptor *desc; - - switch (param->cap) { - case DMA_SLAVE: - sg_init_table(&sg, 1); - sg_dma_len(&sg) = param->len; - sg_set_page(&sg, pfn_to_page(PFN_DOWN(param->buf)), - param->len, offset_in_page(param->buf)); - sg_dma_address(&sg) = param->buf; - - desc = dmaengine_prep_slave_sg(chan, - &sg, 1, param->direction, DMA_PREP_INTERRUPT); - break; - case DMA_CYCLIC: - desc = dmaengine_prep_dma_cyclic(chan, param->buf, - param->len, param->period, param->direction, - DMA_PREP_INTERRUPT | DMA_CTRL_ACK); - break; - default: - dev_err(&chan->dev->device, "unsupported format\n"); - return -EFAULT; - } - - if (!desc) { - dev_err(&chan->dev->device, "cannot prepare cyclic dma\n"); - return -EFAULT; - } - - desc->callback = param->fp; - desc->callback_param = param->fp_param; - - dmaengine_submit((struct dma_async_tx_descriptor *)desc); - - return 0; -} - -static inline int samsung_dmadev_trigger(unsigned ch) -{ - dma_async_issue_pending((struct dma_chan *)ch); - - return 0; -} - -static inline int samsung_dmadev_flush(unsigned ch) -{ - return dmaengine_terminate_all((struct dma_chan *)ch); -} - -static struct samsung_dma_ops dmadev_ops = { - .request = samsung_dmadev_request, - .release = samsung_dmadev_release, - .config = samsung_dmadev_config, - .prepare = samsung_dmadev_prepare, - .trigger = samsung_dmadev_trigger, - .started = NULL, - .flush = samsung_dmadev_flush, - .stop = samsung_dmadev_flush, -}; - -void *samsung_dmadev_get_ops(void) -{ - return &dmadev_ops; -} -EXPORT_SYMBOL(samsung_dmadev_get_ops); |