Commit 99a560bd authored by Wu Hao's avatar Wu Hao Committed by Greg Kroah-Hartman

fpga: mgr: add compat_id support

This patch introduces compat_id support to fpga manager, it adds
a fpga_compat_id pointer to fpga manager data structure to allow
fpga manager drivers to save the compatibility id. This compat_id
could be used for compatibility checking before doing partial
reconfiguration to associated fpga regions.
Signed-off-by: default avatarWu Hao <hao.wu@intel.com>
Acked-by: default avatarAlan Tull <atull@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ecb5fbe2
...@@ -135,12 +135,24 @@ struct fpga_manager_ops { ...@@ -135,12 +135,24 @@ struct fpga_manager_ops {
#define FPGA_MGR_STATUS_IP_PROTOCOL_ERR BIT(3) #define FPGA_MGR_STATUS_IP_PROTOCOL_ERR BIT(3)
#define FPGA_MGR_STATUS_FIFO_OVERFLOW_ERR BIT(4) #define FPGA_MGR_STATUS_FIFO_OVERFLOW_ERR BIT(4)
/**
* struct fpga_compat_id - id for compatibility check
*
* @id_h: high 64bit of the compat_id
* @id_l: low 64bit of the compat_id
*/
struct fpga_compat_id {
u64 id_h;
u64 id_l;
};
/** /**
* struct fpga_manager - fpga manager structure * struct fpga_manager - fpga manager structure
* @name: name of low level fpga manager * @name: name of low level fpga manager
* @dev: fpga manager device * @dev: fpga manager device
* @ref_mutex: only allows one reference to fpga manager * @ref_mutex: only allows one reference to fpga manager
* @state: state of fpga manager * @state: state of fpga manager
* @compat_id: FPGA manager id for compatibility check.
* @mops: pointer to struct of fpga manager ops * @mops: pointer to struct of fpga manager ops
* @priv: low level driver private date * @priv: low level driver private date
*/ */
...@@ -149,6 +161,7 @@ struct fpga_manager { ...@@ -149,6 +161,7 @@ struct fpga_manager {
struct device dev; struct device dev;
struct mutex ref_mutex; struct mutex ref_mutex;
enum fpga_mgr_states state; enum fpga_mgr_states state;
struct fpga_compat_id *compat_id;
const struct fpga_manager_ops *mops; const struct fpga_manager_ops *mops;
void *priv; void *priv;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment