2019-08-24 23:54:21 -06:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2016-04-27 22:36:38 -06:00
|
|
|
/*
|
|
|
|
* Greybus Firmware Management Header
|
|
|
|
*
|
|
|
|
* Copyright 2016 Google Inc.
|
|
|
|
* Copyright 2016 Linaro Ltd.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __FIRMWARE_H
|
|
|
|
#define __FIRMWARE_H
|
|
|
|
|
2019-08-24 23:54:27 -06:00
|
|
|
#include <linux/greybus.h>
|
2016-04-27 22:36:38 -06:00
|
|
|
|
2016-07-21 16:57:38 -06:00
|
|
|
#define FW_NAME_PREFIX "gmp_"
|
2016-07-20 11:11:37 -06:00
|
|
|
|
2016-08-11 14:27:25 -06:00
|
|
|
/*
|
|
|
|
* Length of the string in format: "FW_NAME_PREFIX""%08x_%08x_%08x_%08x_%s.tftf"
|
|
|
|
* (3 + 1 + 4 * (8 + 1) + 10 + 1 + 4 + 1)
|
|
|
|
*/
|
2016-08-11 14:27:23 -06:00
|
|
|
#define FW_NAME_SIZE 56
|
2016-07-20 11:11:37 -06:00
|
|
|
|
2016-05-14 12:12:21 -06:00
|
|
|
/* Firmware Management Protocol specific functions */
|
|
|
|
int fw_mgmt_init(void);
|
|
|
|
void fw_mgmt_exit(void);
|
|
|
|
struct gb_connection *to_fw_mgmt_connection(struct device *dev);
|
|
|
|
int gb_fw_mgmt_request_handler(struct gb_operation *op);
|
|
|
|
int gb_fw_mgmt_connection_init(struct gb_connection *connection);
|
|
|
|
void gb_fw_mgmt_connection_exit(struct gb_connection *connection);
|
|
|
|
|
2016-04-27 22:36:38 -06:00
|
|
|
/* Firmware Download Protocol specific functions */
|
|
|
|
int gb_fw_download_request_handler(struct gb_operation *op);
|
|
|
|
int gb_fw_download_connection_init(struct gb_connection *connection);
|
|
|
|
void gb_fw_download_connection_exit(struct gb_connection *connection);
|
|
|
|
|
2016-06-30 09:54:00 -06:00
|
|
|
/* CAP Protocol specific functions */
|
|
|
|
int cap_init(void);
|
|
|
|
void cap_exit(void);
|
|
|
|
int gb_cap_connection_init(struct gb_connection *connection);
|
|
|
|
void gb_cap_connection_exit(struct gb_connection *connection);
|
|
|
|
|
2016-04-27 22:36:38 -06:00
|
|
|
#endif /* __FIRMWARE_H */
|