aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/dma.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2010-05-20 14:37:23 -0400
committerTony Lindgren <tony@atomide.com>2010-05-20 14:37:23 -0400
commitf6304f5804f228b6c2fea9e3dfac25c5b2db9b38 (patch)
tree362b9b6a3bd32b868e5917a32d448ac75c5854df /arch/arm/kernel/dma.c
parent4fa73a1bf89ebea4eba8a9982b5f64d266d8b5e9 (diff)
parent6daa642d9b8ec762b3c5641cd5e5fa855a5405bf (diff)
Merge branch 'omap4-i2c-init' into omap-for-linus
Diffstat (limited to 'arch/arm/kernel/dma.c')
-rw-r--r--arch/arm/kernel/dma.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/arm/kernel/dma.c b/arch/arm/kernel/dma.c
index 7d5b9fb01e71..2c4a185f92cd 100644
--- a/arch/arm/kernel/dma.c
+++ b/arch/arm/kernel/dma.c
@@ -16,6 +16,8 @@
16#include <linux/spinlock.h> 16#include <linux/spinlock.h>
17#include <linux/errno.h> 17#include <linux/errno.h>
18#include <linux/scatterlist.h> 18#include <linux/scatterlist.h>
19#include <linux/seq_file.h>
20#include <linux/proc_fs.h>
19 21
20#include <asm/dma.h> 22#include <asm/dma.h>
21 23
@@ -264,3 +266,37 @@ int get_dma_residue(unsigned int chan)
264 return ret; 266 return ret;
265} 267}
266EXPORT_SYMBOL(get_dma_residue); 268EXPORT_SYMBOL(get_dma_residue);
269
270#ifdef CONFIG_PROC_FS
271static int proc_dma_show(struct seq_file *m, void *v)
272{
273 int i;
274
275 for (i = 0 ; i < MAX_DMA_CHANNELS ; i++) {
276 dma_t *dma = dma_channel(i);
277 if (dma && dma->lock)
278 seq_printf(m, "%2d: %s\n", i, dma->device_id);
279 }
280 return 0;
281}
282
283static int proc_dma_open(struct inode *inode, struct file *file)
284{
285 return single_open(file, proc_dma_show, NULL);
286}
287
288static const struct file_operations proc_dma_operations = {
289 .open = proc_dma_open,
290 .read = seq_read,
291 .llseek = seq_lseek,
292 .release = single_release,
293};
294
295static int __init proc_dma_init(void)
296{
297 proc_create("dma", 0, NULL, &proc_dma_operations);
298 return 0;
299}
300
301__initcall(proc_dma_init);
302#endif