mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
firmware: arm_ffa: Split up ffa_ops into info, message and memory operations
In preparation to make memory operations accessible for a non ffa_driver/device, it is better to split the ffa_ops into different categories of operations: info, message and memory. The info and memory are ffa_device independent and can be used without any associated ffa_device from a non ffa_driver. However, we don't export these info and memory APIs yet without the user. The first users of these APIs can export them. Link: https://lore.kernel.org/r/20220907145240.1683088-11-sudeep.holla@arm.com Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
This commit is contained in:
@@ -257,16 +257,28 @@ struct ffa_mem_ops_args {
|
||||
struct ffa_mem_region_attributes *attrs;
|
||||
};
|
||||
|
||||
struct ffa_ops {
|
||||
struct ffa_info_ops {
|
||||
u32 (*api_version_get)(void);
|
||||
int (*partition_info_get)(const char *uuid_str,
|
||||
struct ffa_partition_info *buffer);
|
||||
};
|
||||
|
||||
struct ffa_msg_ops {
|
||||
void (*mode_32bit_set)(struct ffa_device *dev);
|
||||
int (*sync_send_receive)(struct ffa_device *dev,
|
||||
struct ffa_send_direct_data *data);
|
||||
};
|
||||
|
||||
struct ffa_mem_ops {
|
||||
int (*memory_reclaim)(u64 g_handle, u32 flags);
|
||||
int (*memory_share)(struct ffa_mem_ops_args *args);
|
||||
int (*memory_lend)(struct ffa_mem_ops_args *args);
|
||||
};
|
||||
|
||||
struct ffa_ops {
|
||||
const struct ffa_info_ops *info_ops;
|
||||
const struct ffa_msg_ops *msg_ops;
|
||||
const struct ffa_mem_ops *mem_ops;
|
||||
};
|
||||
|
||||
#endif /* _LINUX_ARM_FFA_H */
|
||||
|
||||
Reference in New Issue
Block a user