1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Support for Intel Camera Imaging ISP subsystem.
4 * Copyright (c) 2015, Intel Corporation.
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 #ifndef _SH_CSS_FIRMWARE_H_
17 #define _SH_CSS_FIRMWARE_H_
19 #include <system_local.h>
21 #include <ia_css_err.h>
22 #include <ia_css_acc_types.h>
24 /* This is for the firmware loaded from user space */
25 struct sh_css_fw_bi_file_h {
26 char version[64]; /* branch tag + week day + time */
27 int binary_nr; /* Number of binaries */
28 unsigned int h_size; /* sizeof(struct sh_css_fw_bi_file_h) */
31 extern struct ia_css_fw_info sh_css_sp_fw;
32 extern struct ia_css_blob_descr *sh_css_blob_info;
33 extern unsigned int sh_css_num_binaries;
36 *sh_css_get_fw_version(void);
40 sh_css_check_firmware_version(struct device *dev, const char *fw_data);
43 sh_css_load_firmware(struct device *dev, const char *fw_data,
44 unsigned int fw_size);
46 void sh_css_unload_firmware(void);
48 ia_css_ptr sh_css_load_blob(const unsigned char *blob, unsigned int size);
51 sh_css_load_blob_info(const char *fw, const struct ia_css_fw_info *bi,
52 struct ia_css_blob_descr *bd, unsigned int i);
54 #endif /* _SH_CSS_FIRMWARE_H_ */