aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-10-06 20:00:09 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-10-06 20:00:09 -0400
commitd880e5ad0df3c2e1d69bb356737a46abb5087d42 (patch)
treec90c8800de28c1a9cc8b59fe314a86ff80aa1eeb /include/linux
parent4c1fad64eff481982349f5795b9c198c532b0f13 (diff)
parentfbb6aacb078285f88e4a4a20399c6af8d61e0000 (diff)
Merge tag 'rproc-v4.9' of git://github.com/andersson/remoteproc
Pull remoteproc updates from Bjorn Andersson: "In addition to a slew of minor fixes and cleanups these patches refactor how we deal with remoteprocs that will be auto-booting themselves. That does clean up the remote resource handling but makes for additional work to clarify responsibilities and life cycles of resources. We also revise how module locking of remoteproc drivers work, so that they are locked as we hand out references to them to third parties, rather than only when booted by anyone. In addition to that we also introduce the Qualcomm Wireless Subsystem remoteproc driver" * tag 'rproc-v4.9' of git://github.com/andersson/remoteproc: (26 commits) remoteproc: Refactor rproc module locking remoteproc: Split driver and consumer dereferencing remoteproc: Correct resource handling upon boot failure remoteproc: Drop unnecessary NULL check remoteproc: core: transform struct fw_rsc_vdev_vring reserved field in pa remoteproc: Modify FW_RSC_ADDR_ANY definition remoteproc: qcom: wcnss: Fix return value check in wcnss_probe() remoteproc: qcom: Introduce WCNSS peripheral image loader dt-binding: remoteproc: Introduce Qualcomm WCNSS loader binding remoteproc: Only update table_ptr if we have a loaded table remoteproc: Move handling of cached table to boot/shutdown remoteproc: Move vdev handling to boot/shutdown remoteproc: Calculate max_notifyid during load remoteproc: Introduce auto-boot flag remoteproc/omap: revise a minor error trace message remoteproc/omap: fix various code formatting issues remoteproc: print hex numbers with a leading 0x format remoteproc: align code with open parenthesis remoteproc: fix bare unsigned type usage remoteproc: use variable names for sizeof() operator ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/platform_data/remoteproc-omap.h6
-rw-r--r--include/linux/remoteproc.h16
2 files changed, 11 insertions, 11 deletions
diff --git a/include/linux/platform_data/remoteproc-omap.h b/include/linux/platform_data/remoteproc-omap.h
index bfbd12b41162..71a1b2399c48 100644
--- a/include/linux/platform_data/remoteproc-omap.h
+++ b/include/linux/platform_data/remoteproc-omap.h
@@ -39,9 +39,9 @@ struct omap_rproc_pdata {
39 const char *firmware; 39 const char *firmware;
40 const char *mbox_name; 40 const char *mbox_name;
41 const struct rproc_ops *ops; 41 const struct rproc_ops *ops;
42 int (*device_enable) (struct platform_device *pdev); 42 int (*device_enable)(struct platform_device *pdev);
43 int (*device_shutdown) (struct platform_device *pdev); 43 int (*device_shutdown)(struct platform_device *pdev);
44 void(*set_bootaddr)(u32); 44 void (*set_bootaddr)(u32);
45}; 45};
46 46
47#if defined(CONFIG_OMAP_REMOTEPROC) || defined(CONFIG_OMAP_REMOTEPROC_MODULE) 47#if defined(CONFIG_OMAP_REMOTEPROC) || defined(CONFIG_OMAP_REMOTEPROC_MODULE)
diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h
index 1c457a8dd5a6..930023b7c825 100644
--- a/include/linux/remoteproc.h
+++ b/include/linux/remoteproc.h
@@ -118,7 +118,7 @@ enum fw_resource_type {
118 RSC_LAST = 4, 118 RSC_LAST = 4,
119}; 119};
120 120
121#define FW_RSC_ADDR_ANY (0xFFFFFFFFFFFFFFFF) 121#define FW_RSC_ADDR_ANY (-1)
122 122
123/** 123/**
124 * struct fw_rsc_carveout - physically contiguous memory request 124 * struct fw_rsc_carveout - physically contiguous memory request
@@ -241,7 +241,7 @@ struct fw_rsc_trace {
241 * @notifyid is a unique rproc-wide notify index for this vring. This notify 241 * @notifyid is a unique rproc-wide notify index for this vring. This notify
242 * index is used when kicking a remote processor, to let it know that this 242 * index is used when kicking a remote processor, to let it know that this
243 * vring is triggered. 243 * vring is triggered.
244 * @reserved: reserved (must be zero) 244 * @pa: physical address
245 * 245 *
246 * This descriptor is not a resource entry by itself; it is part of the 246 * This descriptor is not a resource entry by itself; it is part of the
247 * vdev resource type (see below). 247 * vdev resource type (see below).
@@ -255,7 +255,7 @@ struct fw_rsc_vdev_vring {
255 u32 align; 255 u32 align;
256 u32 num; 256 u32 num;
257 u32 notifyid; 257 u32 notifyid;
258 u32 reserved; 258 u32 pa;
259} __packed; 259} __packed;
260 260
261/** 261/**
@@ -409,7 +409,6 @@ enum rproc_crash_type {
409 * @max_notifyid: largest allocated notify id. 409 * @max_notifyid: largest allocated notify id.
410 * @table_ptr: pointer to the resource table in effect 410 * @table_ptr: pointer to the resource table in effect
411 * @cached_table: copy of the resource table 411 * @cached_table: copy of the resource table
412 * @table_csum: checksum of the resource table
413 * @has_iommu: flag to indicate if remote processor is behind an MMU 412 * @has_iommu: flag to indicate if remote processor is behind an MMU
414 */ 413 */
415struct rproc { 414struct rproc {
@@ -435,14 +434,14 @@ struct rproc {
435 struct idr notifyids; 434 struct idr notifyids;
436 int index; 435 int index;
437 struct work_struct crash_handler; 436 struct work_struct crash_handler;
438 unsigned crash_cnt; 437 unsigned int crash_cnt;
439 struct completion crash_comp; 438 struct completion crash_comp;
440 bool recovery_disabled; 439 bool recovery_disabled;
441 int max_notifyid; 440 int max_notifyid;
442 struct resource_table *table_ptr; 441 struct resource_table *table_ptr;
443 struct resource_table *cached_table; 442 struct resource_table *cached_table;
444 u32 table_csum;
445 bool has_iommu; 443 bool has_iommu;
444 bool auto_boot;
446}; 445};
447 446
448/* we currently support only two vrings per rvdev */ 447/* we currently support only two vrings per rvdev */
@@ -489,11 +488,12 @@ struct rproc_vdev {
489 488
490struct rproc *rproc_get_by_phandle(phandle phandle); 489struct rproc *rproc_get_by_phandle(phandle phandle);
491struct rproc *rproc_alloc(struct device *dev, const char *name, 490struct rproc *rproc_alloc(struct device *dev, const char *name,
492 const struct rproc_ops *ops, 491 const struct rproc_ops *ops,
493 const char *firmware, int len); 492 const char *firmware, int len);
494void rproc_put(struct rproc *rproc); 493void rproc_put(struct rproc *rproc);
495int rproc_add(struct rproc *rproc); 494int rproc_add(struct rproc *rproc);
496int rproc_del(struct rproc *rproc); 495int rproc_del(struct rproc *rproc);
496void rproc_free(struct rproc *rproc);
497 497
498int rproc_boot(struct rproc *rproc); 498int rproc_boot(struct rproc *rproc);
499void rproc_shutdown(struct rproc *rproc); 499void rproc_shutdown(struct rproc *rproc);