aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-07-26 19:19:08 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-26 19:19:08 -0400
commita9197f903f72a81393932d452379c8847fade544 (patch)
treed5c6acae9e45efb664288be0d4ad99849ac0e20c /include/linux
parente2aed8dfa50bb061747eeb14e6af099554a03b76 (diff)
parent6bb697b6b06041d2d0affc862b17b4b443a107e0 (diff)
Merge tag 'remoteproc-for-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc
Pull remoteproc update from Ohad Ben-Cohen: - custom binary format support from Sjur Brændeland - groundwork for recovery and runtime pm support - some cleanups and API simplifications Fix up conflicts in drivers/remoteproc/remoteproc_core.c due to clashes with earlier cleanups by Sjur Brændeland (with part of the cleanups moved into the new remoteproc_elf_loader.c file). * tag 'remoteproc-for-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc: MAINTAINERS: add remoteproc's git remoteproc: Support custom firmware handlers remoteproc: Move Elf related functions to separate file remoteproc: Add function rproc_get_boot_addr remoteproc: Pass struct fw to load_segments and find_rsc_table. remoteproc: adopt the driver core's alloc/add/del/put naming remoteproc: remove the get_by_name/put API remoteproc: support non-iommu carveout assignment remoteproc: simplify unregister/free interfaces remoteproc: remove the now-redundant kref remoteproc: maintain a generic child device for each rproc remoteproc: allocate vrings on demand, free when not needed
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/remoteproc.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h
index f1ffabb978d3..131b53957b9f 100644
--- a/include/linux/remoteproc.h
+++ b/include/linux/remoteproc.h
@@ -36,7 +36,6 @@
36#define REMOTEPROC_H 36#define REMOTEPROC_H
37 37
38#include <linux/types.h> 38#include <linux/types.h>
39#include <linux/kref.h>
40#include <linux/klist.h> 39#include <linux/klist.h>
41#include <linux/mutex.h> 40#include <linux/mutex.h>
42#include <linux/virtio.h> 41#include <linux/virtio.h>
@@ -369,8 +368,8 @@ enum rproc_state {
369 * @firmware: name of firmware file to be loaded 368 * @firmware: name of firmware file to be loaded
370 * @priv: private data which belongs to the platform-specific rproc module 369 * @priv: private data which belongs to the platform-specific rproc module
371 * @ops: platform-specific start/stop rproc handlers 370 * @ops: platform-specific start/stop rproc handlers
372 * @dev: underlying device 371 * @dev: virtual device for refcounting and common remoteproc behavior
373 * @refcount: refcount of users that have a valid pointer to this rproc 372 * @fw_ops: firmware-specific handlers
374 * @power: refcount of users who need this rproc powered up 373 * @power: refcount of users who need this rproc powered up
375 * @state: state of the device 374 * @state: state of the device
376 * @lock: lock which protects concurrent manipulations of the rproc 375 * @lock: lock which protects concurrent manipulations of the rproc
@@ -383,6 +382,7 @@ enum rproc_state {
383 * @bootaddr: address of first instruction to boot rproc with (optional) 382 * @bootaddr: address of first instruction to boot rproc with (optional)
384 * @rvdevs: list of remote virtio devices 383 * @rvdevs: list of remote virtio devices
385 * @notifyids: idr for dynamically assigning rproc-wide unique notify ids 384 * @notifyids: idr for dynamically assigning rproc-wide unique notify ids
385 * @index: index of this rproc device
386 */ 386 */
387struct rproc { 387struct rproc {
388 struct klist_node node; 388 struct klist_node node;
@@ -391,8 +391,8 @@ struct rproc {
391 const char *firmware; 391 const char *firmware;
392 void *priv; 392 void *priv;
393 const struct rproc_ops *ops; 393 const struct rproc_ops *ops;
394 struct device *dev; 394 struct device dev;
395 struct kref refcount; 395 const struct rproc_fw_ops *fw_ops;
396 atomic_t power; 396 atomic_t power;
397 unsigned int state; 397 unsigned int state;
398 struct mutex lock; 398 struct mutex lock;
@@ -405,6 +405,7 @@ struct rproc {
405 u32 bootaddr; 405 u32 bootaddr;
406 struct list_head rvdevs; 406 struct list_head rvdevs;
407 struct idr notifyids; 407 struct idr notifyids;
408 int index;
408}; 409};
409 410
410/* we currently support only two vrings per rvdev */ 411/* we currently support only two vrings per rvdev */
@@ -450,15 +451,12 @@ struct rproc_vdev {
450 unsigned long gfeatures; 451 unsigned long gfeatures;
451}; 452};
452 453
453struct rproc *rproc_get_by_name(const char *name);
454void rproc_put(struct rproc *rproc);
455
456struct rproc *rproc_alloc(struct device *dev, const char *name, 454struct rproc *rproc_alloc(struct device *dev, const char *name,
457 const struct rproc_ops *ops, 455 const struct rproc_ops *ops,
458 const char *firmware, int len); 456 const char *firmware, int len);
459void rproc_free(struct rproc *rproc); 457void rproc_put(struct rproc *rproc);
460int rproc_register(struct rproc *rproc); 458int rproc_add(struct rproc *rproc);
461int rproc_unregister(struct rproc *rproc); 459int rproc_del(struct rproc *rproc);
462 460
463int rproc_boot(struct rproc *rproc); 461int rproc_boot(struct rproc *rproc);
464void rproc_shutdown(struct rproc *rproc); 462void rproc_shutdown(struct rproc *rproc);