remoteproc updates for v4.16
This contains a few bug fixes and a cleanup up of the resource-table handling in the framework, which removes the need for drivers with no resource table to provide a fake one. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJaeJRAAAoJEAsfOT8Nma3FcwYP/jk/ubIEEF8Ne2ZRhcyT9J/2 4sT8NJhmtHIALOlQPtKcHv766ukFtzN4Xd8fUgHiivVMOrYBbfiuO1MNXXEq2kyf 7lWqC1eJRaa7wmlQumNw5aIOvJPuCu0oFd+K8CoKowLco32tURzJ9ANtYeXKTc/n KCk4KgigXRzlUP+J8TZ75Uop+N5WREGbqOHhP/J8+PYmHY+IxPN4K1CHlOBITpJz eLX+gs51UUKOFLGusVS5CLpUOYUc+bfWkGGeqRzMISCloSDkxdwIGuVa630VE1sJ QkxvvNbhQWmaaeBfplMhNHT7wHgE87c2P6mvABu5Rsf+u8V3o6JzbBW5XgxxT5uU QER4NRzZ/288vuOnr6FPvmR5ZZg9TaU/9Ef1vYNFEXR1uhquBmYulSbJ9FenM2up qQkVRQuLWYo5JLRWshVMvA0u+HGv7iA+kcGGBTfWJQgYJTG7ytmEamqoCchBOiM1 cGOxGVkSD5tt8XBvSUx6wsmEkBqU8MGKbf77XFhYDBJNU2ZLuoETPnj2+Wjh8Myo 5R1B0jBsWjGZ90AAXoKT2rbw2QeaADpFSneWKVbDEyTczmFDjQNZ5Qhuk1X1U3wq VZwmZwe2TsdaRZJhO+8SfdfspR71j2ollT1iLO2ESR5lbZZmouBm+EeW8c/ri8yW ei1bP8q5f2qYfSNga0hc =awTj -----END PGP SIGNATURE----- Merge tag 'rproc-v4.16' of git://github.com/andersson/remoteproc Pull remoteproc updates from Bjorn Andersson: "This contains a few bug fixes and a cleanup up of the resource-table handling in the framework, which removes the need for drivers with no resource table to provide a fake one" * tag 'rproc-v4.16' of git://github.com/andersson/remoteproc: remoteproc: Reset table_ptr on stop remoteproc: Drop dangling find_rsc_table dummies remoteproc: Move resource table load logic to find remoteproc: Don't handle empty resource table remoteproc: Merge rproc_ops and rproc_fw_ops remoteproc: Clone rproc_ops in rproc_alloc() remoteproc: Cache resource table size remoteproc: Remove depricated crash completion virtio_remoteproc: correct put_device virtio_device.dev
This commit is contained in:
commit
2deb41b245
11 changed files with 107 additions and 204 deletions
|
|
@ -324,6 +324,7 @@ struct rproc_mem_entry {
|
|||
};
|
||||
|
||||
struct rproc;
|
||||
struct firmware;
|
||||
|
||||
/**
|
||||
* struct rproc_ops - platform-specific device handlers
|
||||
|
|
@ -331,12 +332,24 @@ struct rproc;
|
|||
* @stop: power off the device
|
||||
* @kick: kick a virtqueue (virtqueue id given as a parameter)
|
||||
* @da_to_va: optional platform hook to perform address translations
|
||||
* @load_rsc_table: load resource table from firmware image
|
||||
* @find_loaded_rsc_table: find the loaded resouce table
|
||||
* @load: load firmeware to memory, where the remote processor
|
||||
* expects to find it
|
||||
* @sanity_check: sanity check the fw image
|
||||
* @get_boot_addr: get boot address to entry point specified in firmware
|
||||
*/
|
||||
struct rproc_ops {
|
||||
int (*start)(struct rproc *rproc);
|
||||
int (*stop)(struct rproc *rproc);
|
||||
void (*kick)(struct rproc *rproc, int vqid);
|
||||
void * (*da_to_va)(struct rproc *rproc, u64 da, int len);
|
||||
int (*load_rsc_table)(struct rproc *rproc, const struct firmware *fw);
|
||||
struct resource_table *(*find_loaded_rsc_table)(
|
||||
struct rproc *rproc, const struct firmware *fw);
|
||||
int (*load)(struct rproc *rproc, const struct firmware *fw);
|
||||
int (*sanity_check)(struct rproc *rproc, const struct firmware *fw);
|
||||
u32 (*get_boot_addr)(struct rproc *rproc, const struct firmware *fw);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -390,7 +403,6 @@ enum rproc_crash_type {
|
|||
* @priv: private data which belongs to the platform-specific rproc module
|
||||
* @ops: platform-specific start/stop rproc handlers
|
||||
* @dev: virtual device for refcounting and common remoteproc behavior
|
||||
* @fw_ops: firmware-specific handlers
|
||||
* @power: refcount of users who need this rproc powered up
|
||||
* @state: state of the device
|
||||
* @lock: lock which protects concurrent manipulations of the rproc
|
||||
|
|
@ -406,11 +418,11 @@ enum rproc_crash_type {
|
|||
* @index: index of this rproc device
|
||||
* @crash_handler: workqueue for handling a crash
|
||||
* @crash_cnt: crash counter
|
||||
* @crash_comp: completion used to sync crash handler and the rproc reload
|
||||
* @recovery_disabled: flag that state if recovery was disabled
|
||||
* @max_notifyid: largest allocated notify id.
|
||||
* @table_ptr: pointer to the resource table in effect
|
||||
* @cached_table: copy of the resource table
|
||||
* @table_sz: size of @cached_table
|
||||
* @has_iommu: flag to indicate if remote processor is behind an MMU
|
||||
*/
|
||||
struct rproc {
|
||||
|
|
@ -419,9 +431,8 @@ struct rproc {
|
|||
const char *name;
|
||||
char *firmware;
|
||||
void *priv;
|
||||
const struct rproc_ops *ops;
|
||||
struct rproc_ops *ops;
|
||||
struct device dev;
|
||||
const struct rproc_fw_ops *fw_ops;
|
||||
atomic_t power;
|
||||
unsigned int state;
|
||||
struct mutex lock;
|
||||
|
|
@ -437,11 +448,11 @@ struct rproc {
|
|||
int index;
|
||||
struct work_struct crash_handler;
|
||||
unsigned int crash_cnt;
|
||||
struct completion crash_comp;
|
||||
bool recovery_disabled;
|
||||
int max_notifyid;
|
||||
struct resource_table *table_ptr;
|
||||
struct resource_table *cached_table;
|
||||
size_t table_sz;
|
||||
bool has_iommu;
|
||||
bool auto_boot;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue