[core] added per reset versioning

This commit is contained in:
Geoffrey McRae 2020-11-14 12:39:02 +11:00
parent 391f99195a
commit 78363b9353
5 changed files with 16 additions and 4 deletions

View File

@ -274,6 +274,7 @@ free_adev:
const struct vendor_reset_ops amd_navi10_ops =
{
.version = {1, 0},
.pre_reset = amd_common_pre_reset,
.reset = amd_navi10_reset,
.post_reset = amd_common_post_reset,

View File

@ -73,7 +73,8 @@ static int amd_polaris10_reset(struct vendor_reset_dev *vdev)
}
const struct vendor_reset_ops amd_polaris10_ops = {
.pre_reset = amd_common_pre_reset,
.reset = amd_polaris10_reset,
.post_reset = amd_common_post_reset,
};
.version = {1, 0},
.pre_reset = amd_common_pre_reset,
.reset = amd_polaris10_reset,
.post_reset = amd_common_post_reset,
};

View File

@ -283,6 +283,7 @@ free_adev:
}
const struct vendor_reset_ops amd_vega10_ops = {
.version = {1, 0},
.pre_reset = amd_common_pre_reset,
.reset = amd_vega10_reset,
.post_reset = amd_common_post_reset,

View File

@ -190,6 +190,7 @@ free_adev:
const struct vendor_reset_ops amd_vega20_ops =
{
.version = {1, 0},
.pre_reset = amd_common_pre_reset,
.reset = amd_vega20_reset,
.post_reset = amd_common_post_reset,

View File

@ -32,8 +32,16 @@ struct vendor_reset_dev
void *vendor_private;
};
struct vendor_reset_ver
{
unsigned int major;
unsigned int minor;
};
struct vendor_reset_ops
{
/* version of the reset operations for logging */
const struct vendor_reset_ver version;
/* any pre-reset ops to do, i.e., common code between devices */
int (*pre_reset)(struct vendor_reset_dev *);
/* the reset method for the device at the specified address */