mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 06:01:23 +00:00
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>
This commit is contained in:
parent
ba7290e016
commit
a2b950ac7b
3 changed files with 88 additions and 20 deletions
|
@ -401,6 +401,9 @@ enum rproc_crash_type {
|
|||
* @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_csum: checksum of the resource table
|
||||
*/
|
||||
struct rproc {
|
||||
struct klist_node node;
|
||||
|
@ -429,9 +432,13 @@ struct rproc {
|
|||
struct completion crash_comp;
|
||||
bool recovery_disabled;
|
||||
int max_notifyid;
|
||||
struct resource_table *table_ptr;
|
||||
struct resource_table *cached_table;
|
||||
u32 table_csum;
|
||||
};
|
||||
|
||||
/* we currently support only two vrings per rvdev */
|
||||
|
||||
#define RVDEV_NUM_VRINGS 2
|
||||
|
||||
/**
|
||||
|
@ -464,6 +471,7 @@ struct rproc_vring {
|
|||
* @vring: the vrings for this vdev
|
||||
* @dfeatures: virtio device features
|
||||
* @gfeatures: virtio guest features
|
||||
* @rsc_offset: offset of the vdev's resource entry
|
||||
*/
|
||||
struct rproc_vdev {
|
||||
struct list_head node;
|
||||
|
@ -472,6 +480,7 @@ struct rproc_vdev {
|
|||
struct rproc_vring vring[RVDEV_NUM_VRINGS];
|
||||
unsigned long dfeatures;
|
||||
unsigned long gfeatures;
|
||||
u32 rsc_offset;
|
||||
};
|
||||
|
||||
struct rproc *rproc_alloc(struct device *dev, const char *name,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue