Commit | Line | Data |
---|---|---|
f5fbb83f | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
ad85094b MCC |
2 | /* |
3 | * Support for Intel Camera Imaging ISP subsystem. | |
4 | * Copyright (c) 2015, Intel Corporation. | |
5 | * | |
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. | |
9 | * | |
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 | |
13 | * more details. | |
14 | */ | |
15 | ||
16 | #ifndef _SH_CSS_FIRMWARE_H_ | |
17 | #define _SH_CSS_FIRMWARE_H_ | |
18 | ||
f90e73ce | 19 | #include <system_local.h> |
ad85094b MCC |
20 | |
21 | #include <ia_css_err.h> | |
22 | #include <ia_css_acc_types.h> | |
23 | ||
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) */ | |
29 | }; | |
30 | ||
31 | extern struct ia_css_fw_info sh_css_sp_fw; | |
32 | #if defined(HAS_BL) | |
33 | extern struct ia_css_fw_info sh_css_bl_fw; | |
34 | #endif /* HAS_BL */ | |
35 | extern struct ia_css_blob_descr *sh_css_blob_info; | |
bdfe0beb | 36 | extern unsigned int sh_css_num_binaries; |
ad85094b MCC |
37 | |
38 | char | |
39 | *sh_css_get_fw_version(void); | |
40 | ||
93517ea0 | 41 | struct device; |
ad85094b | 42 | bool |
8568fe63 | 43 | sh_css_check_firmware_version(struct device *dev, const char *fw_data); |
ad85094b | 44 | |
41022d35 | 45 | int |
8568fe63 | 46 | sh_css_load_firmware(struct device *dev, const char *fw_data, |
ad85094b MCC |
47 | unsigned int fw_size); |
48 | ||
49 | void sh_css_unload_firmware(void); | |
50 | ||
100e8989 | 51 | ia_css_ptr sh_css_load_blob(const unsigned char *blob, unsigned int size); |
ad85094b | 52 | |
41022d35 | 53 | int |
eaa399eb MCC |
54 | sh_css_load_blob_info(const char *fw, const struct ia_css_fw_info *bi, |
55 | struct ia_css_blob_descr *bd, unsigned int i); | |
ad85094b MCC |
56 | |
57 | #endif /* _SH_CSS_FIRMWARE_H_ */ |