Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Greybus Firmware Management Header
0004  *
0005  * Copyright 2016 Google Inc.
0006  * Copyright 2016 Linaro Ltd.
0007  */
0008 
0009 #ifndef __FIRMWARE_H
0010 #define __FIRMWARE_H
0011 
0012 #include <linux/greybus.h>
0013 
0014 #define FW_NAME_PREFIX  "gmp_"
0015 
0016 /*
0017  * Length of the string in format: "FW_NAME_PREFIX""%08x_%08x_%08x_%08x_%s.tftf"
0018  *                                  (3 + 1 + 4 * (8 + 1) + 10 + 1 + 4 + 1)
0019  */
0020 #define FW_NAME_SIZE        56
0021 
0022 /* Firmware Management Protocol specific functions */
0023 int fw_mgmt_init(void);
0024 void fw_mgmt_exit(void);
0025 struct gb_connection *to_fw_mgmt_connection(struct device *dev);
0026 int gb_fw_mgmt_request_handler(struct gb_operation *op);
0027 int gb_fw_mgmt_connection_init(struct gb_connection *connection);
0028 void gb_fw_mgmt_connection_exit(struct gb_connection *connection);
0029 
0030 /* Firmware Download Protocol specific functions */
0031 int gb_fw_download_request_handler(struct gb_operation *op);
0032 int gb_fw_download_connection_init(struct gb_connection *connection);
0033 void gb_fw_download_connection_exit(struct gb_connection *connection);
0034 
0035 /* CAP Protocol specific functions */
0036 int cap_init(void);
0037 void cap_exit(void);
0038 int gb_cap_connection_init(struct gb_connection *connection);
0039 void gb_cap_connection_exit(struct gb_connection *connection);
0040 
0041 #endif /* __FIRMWARE_H */