diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-31 21:10:18 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-31 21:10:18 -0400 |
| commit | 08615d7d85e5aa02c05bf6c4dde87d940e7f85f6 (patch) | |
| tree | 18906149d313d25914160aca21cedf54b3a7e818 /include/linux/rio.h | |
| parent | 9fdadb2cbaf4b482dfd6086e8bd3d2db071a1702 (diff) | |
| parent | 0a4dd35c67b144d8ef9432120105f1aab9293ee9 (diff) | |
Merge branch 'akpm' (Andrew's patch-bomb)
Merge misc patches from Andrew Morton:
- the "misc" tree - stuff from all over the map
- checkpatch updates
- fatfs
- kmod changes
- procfs
- cpumask
- UML
- kexec
- mqueue
- rapidio
- pidns
- some checkpoint-restore feature work. Reluctantly. Most of it
delayed a release. I'm still rather worried that we don't have a
clear roadmap to completion for this work.
* emailed from Andrew Morton <akpm@linux-foundation.org>: (78 patches)
kconfig: update compression algorithm info
c/r: prctl: add ability to set new mm_struct::exe_file
c/r: prctl: extend PR_SET_MM to set up more mm_struct entries
c/r: procfs: add arg_start/end, env_start/end and exit_code members to /proc/$pid/stat
syscalls, x86: add __NR_kcmp syscall
fs, proc: introduce /proc/<pid>/task/<tid>/children entry
sysctl: make kernel.ns_last_pid control dependent on CHECKPOINT_RESTORE
aio/vfs: cleanup of rw_copy_check_uvector() and compat_rw_copy_check_uvector()
eventfd: change int to __u64 in eventfd_signal()
fs/nls: add Apple NLS
pidns: make killed children autoreap
pidns: use task_active_pid_ns in do_notify_parent
rapidio/tsi721: add DMA engine support
rapidio: add DMA engine support for RIO data transfers
ipc/mqueue: add rbtree node caching support
tools/selftests: add mq_perf_tests
ipc/mqueue: strengthen checks on mqueue creation
ipc/mqueue: correct mq_attr_ok test
ipc/mqueue: improve performance of send/recv
selftests: add mq_open_tests
...
Diffstat (limited to 'include/linux/rio.h')
| -rw-r--r-- | include/linux/rio.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/include/linux/rio.h b/include/linux/rio.h index 4d50611112ba..a90ebadd9da0 100644 --- a/include/linux/rio.h +++ b/include/linux/rio.h | |||
| @@ -20,6 +20,9 @@ | |||
| 20 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
| 21 | #include <linux/device.h> | 21 | #include <linux/device.h> |
| 22 | #include <linux/rio_regs.h> | 22 | #include <linux/rio_regs.h> |
| 23 | #ifdef CONFIG_RAPIDIO_DMA_ENGINE | ||
| 24 | #include <linux/dmaengine.h> | ||
| 25 | #endif | ||
| 23 | 26 | ||
| 24 | #define RIO_NO_HOPCOUNT -1 | 27 | #define RIO_NO_HOPCOUNT -1 |
| 25 | #define RIO_INVALID_DESTID 0xffff | 28 | #define RIO_INVALID_DESTID 0xffff |
| @@ -254,6 +257,9 @@ struct rio_mport { | |||
| 254 | u32 phys_efptr; | 257 | u32 phys_efptr; |
| 255 | unsigned char name[40]; | 258 | unsigned char name[40]; |
| 256 | void *priv; /* Master port private data */ | 259 | void *priv; /* Master port private data */ |
| 260 | #ifdef CONFIG_RAPIDIO_DMA_ENGINE | ||
| 261 | struct dma_device dma; | ||
| 262 | #endif | ||
| 257 | }; | 263 | }; |
| 258 | 264 | ||
| 259 | /** | 265 | /** |
| @@ -395,6 +401,47 @@ union rio_pw_msg { | |||
| 395 | u32 raw[RIO_PW_MSG_SIZE/sizeof(u32)]; | 401 | u32 raw[RIO_PW_MSG_SIZE/sizeof(u32)]; |
| 396 | }; | 402 | }; |
| 397 | 403 | ||
| 404 | #ifdef CONFIG_RAPIDIO_DMA_ENGINE | ||
| 405 | |||
| 406 | /** | ||
| 407 | * enum rio_write_type - RIO write transaction types used in DMA transfers | ||
| 408 | * | ||
| 409 | * Note: RapidIO specification defines write (NWRITE) and | ||
| 410 | * write-with-response (NWRITE_R) data transfer operations. | ||
| 411 | * Existing DMA controllers that service RapidIO may use one of these operations | ||
| 412 | * for entire data transfer or their combination with only the last data packet | ||
| 413 | * requires response. | ||
| 414 | */ | ||
| 415 | enum rio_write_type { | ||
| 416 | RDW_DEFAULT, /* default method used by DMA driver */ | ||
| 417 | RDW_ALL_NWRITE, /* all packets use NWRITE */ | ||
| 418 | RDW_ALL_NWRITE_R, /* all packets use NWRITE_R */ | ||
| 419 | RDW_LAST_NWRITE_R, /* last packet uses NWRITE_R, others - NWRITE */ | ||
| 420 | }; | ||
| 421 | |||
| 422 | struct rio_dma_ext { | ||
| 423 | u16 destid; | ||
| 424 | u64 rio_addr; /* low 64-bits of 66-bit RapidIO address */ | ||
| 425 | u8 rio_addr_u; /* upper 2-bits of 66-bit RapidIO address */ | ||
| 426 | enum rio_write_type wr_type; /* preferred RIO write operation type */ | ||
| 427 | }; | ||
| 428 | |||
| 429 | struct rio_dma_data { | ||
| 430 | /* Local data (as scatterlist) */ | ||
| 431 | struct scatterlist *sg; /* I/O scatter list */ | ||
| 432 | unsigned int sg_len; /* size of scatter list */ | ||
| 433 | /* Remote device address (flat buffer) */ | ||
| 434 | u64 rio_addr; /* low 64-bits of 66-bit RapidIO address */ | ||
| 435 | u8 rio_addr_u; /* upper 2-bits of 66-bit RapidIO address */ | ||
| 436 | enum rio_write_type wr_type; /* preferred RIO write operation type */ | ||
| 437 | }; | ||
| 438 | |||
| 439 | static inline struct rio_mport *dma_to_mport(struct dma_device *ddev) | ||
| 440 | { | ||
| 441 | return container_of(ddev, struct rio_mport, dma); | ||
| 442 | } | ||
| 443 | #endif /* CONFIG_RAPIDIO_DMA_ENGINE */ | ||
| 444 | |||
| 398 | /* Architecture and hardware-specific functions */ | 445 | /* Architecture and hardware-specific functions */ |
| 399 | extern int rio_register_mport(struct rio_mport *); | 446 | extern int rio_register_mport(struct rio_mport *); |
| 400 | extern int rio_open_inb_mbox(struct rio_mport *, void *, int, int); | 447 | extern int rio_open_inb_mbox(struct rio_mport *, void *, int, int); |
