summaryrefslogtreecommitdiffstats
path: root/include/linux/remoteproc.h
diff options
context:
space:
mode:
authorOhad Ben-Cohen <ohad@wizery.com>2013-04-07 07:06:07 -0400
committerOhad Ben-Cohen <ohad@wizery.com>2013-04-07 07:06:07 -0400
commita2b950ac7b1e6442919ee9e79c4963e134698869 (patch)
tree7ecec79d66796b06db5c9d79144d17e1bc496bad /include/linux/remoteproc.h
parentba7290e01663787fcfc2bedaff6232359d4ff248 (diff)
remoteproc: perserve resource table data
Copy resource table from first to second firmware loading. After firmware is loaded to memory, update the vdevs resource pointer to the resource table kept in device memory. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Acked-by: Ido Yariv <ido@wizery.com> [rebase, terminology and style changes] Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Diffstat (limited to 'include/linux/remoteproc.h')
-rw-r--r--include/linux/remoteproc.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h
index faf33324c78f..b4cef16460f8 100644
--- a/include/linux/remoteproc.h
+++ b/include/linux/remoteproc.h
@@ -401,6 +401,9 @@ enum rproc_crash_type {
401 * @crash_comp: completion used to sync crash handler and the rproc reload 401 * @crash_comp: completion used to sync crash handler and the rproc reload
402 * @recovery_disabled: flag that state if recovery was disabled 402 * @recovery_disabled: flag that state if recovery was disabled
403 * @max_notifyid: largest allocated notify id. 403 * @max_notifyid: largest allocated notify id.
404 * @table_ptr: pointer to the resource table in effect
405 * @cached_table: copy of the resource table
406 * @table_csum: checksum of the resource table
404 */ 407 */
405struct rproc { 408struct rproc {
406 struct klist_node node; 409 struct klist_node node;
@@ -429,9 +432,13 @@ struct rproc {
429 struct completion crash_comp; 432 struct completion crash_comp;
430 bool recovery_disabled; 433 bool recovery_disabled;
431 int max_notifyid; 434 int max_notifyid;
435 struct resource_table *table_ptr;
436 struct resource_table *cached_table;
437 u32 table_csum;
432}; 438};
433 439
434/* we currently support only two vrings per rvdev */ 440/* we currently support only two vrings per rvdev */
441
435#define RVDEV_NUM_VRINGS 2 442#define RVDEV_NUM_VRINGS 2
436 443
437/** 444/**
@@ -464,6 +471,7 @@ struct rproc_vring {
464 * @vring: the vrings for this vdev 471 * @vring: the vrings for this vdev
465 * @dfeatures: virtio device features 472 * @dfeatures: virtio device features
466 * @gfeatures: virtio guest features 473 * @gfeatures: virtio guest features
474 * @rsc_offset: offset of the vdev's resource entry
467 */ 475 */
468struct rproc_vdev { 476struct rproc_vdev {
469 struct list_head node; 477 struct list_head node;
@@ -472,6 +480,7 @@ struct rproc_vdev {
472 struct rproc_vring vring[RVDEV_NUM_VRINGS]; 480 struct rproc_vring vring[RVDEV_NUM_VRINGS];
473 unsigned long dfeatures; 481 unsigned long dfeatures;
474 unsigned long gfeatures; 482 unsigned long gfeatures;
483 u32 rsc_offset;
475}; 484};
476 485
477struct rproc *rproc_alloc(struct device *dev, const char *name, 486struct rproc *rproc_alloc(struct device *dev, const char *name,