diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-19 14:37:22 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-19 14:37:22 -0400 |
| commit | 1d3c6ff44ad4b5f113602e153026a338f0f9b3ff (patch) | |
| tree | 1e1f2932634fc6d0e4acfe68496c1c727b83a13e /arch/arm/kernel/dma.c | |
| parent | 7c7cbaf5b82c418cd3b1dcf718f71d0e6057e639 (diff) | |
| parent | 717e7c2672e37253a4d3aa70e4716b5b0a658761 (diff) | |
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (224 commits)
ARM: remove 'select GENERIC_TIME'
ARM: 6136/1: ARCH_REQUIRE_GPIOLIB selects GENERIC_GPIO
ARM: 6074/1: oprofile: convert from sysdev to platform device
ARM: 6073/1: oprofile: remove old files and update KConfig
ARM: 6072/1: oprofile: use perf-events framework as backend
ARM: 6071/1: perf-events: allow modules to query the number of hardware counters
ARM: 6070/1: perf-events: add support for xscale PMUs
ARM: 6069/1: perf-events: use numeric ID to identify PMU
ARM: 6064/1: pmu: register IRQs at runtime
ARM: Optionally allow ARMv6 to use 'normal, bufferable' memory for DMA
ARM: 6134/1: Handle instruction cache maintenance fault properly
ARM: nwfpe: allow debugging output to be configured at runtime
ARM: rename mach_cpu_disable() to platform_cpu_disable()
ARM: 6132/1: PL330: Add common core driver
ARM: 6094/1: Extend cache-l2x0 to support the 16-way PL310
ARM: Move memory mapping into mmu.c
ARM: Ensure meminfo is sorted prior to sanity_check_meminfo
ARM: Remove useless linux/bootmem.h includes
ARM: convert /proc/cpu/aligment to seq_file
arm: use asm-generic/scatterlist.h
...
Diffstat (limited to 'arch/arm/kernel/dma.c')
| -rw-r--r-- | arch/arm/kernel/dma.c | 36 |
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 | } |
| 266 | EXPORT_SYMBOL(get_dma_residue); | 268 | EXPORT_SYMBOL(get_dma_residue); |
| 269 | |||
| 270 | #ifdef CONFIG_PROC_FS | ||
| 271 | static 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 | |||
| 283 | static int proc_dma_open(struct inode *inode, struct file *file) | ||
| 284 | { | ||
| 285 | return single_open(file, proc_dma_show, NULL); | ||
| 286 | } | ||
| 287 | |||
| 288 | static 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 | |||
| 295 | static 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 | ||
