Commit | Line | Data |
---|---|---|
ad85094b MCC |
1 | /* |
2 | * Support for Intel Camera Imaging ISP subsystem. | |
3 | * Copyright (c) 2015, Intel Corporation. | |
4 | * | |
5 | * This program is free software; you can redistribute it and/or modify it | |
6 | * under the terms and conditions of the GNU General Public License, | |
7 | * version 2, as published by the Free Software Foundation. | |
8 | * | |
9 | * This program is distributed in the hope it will be useful, but WITHOUT | |
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
12 | * more details. | |
13 | */ | |
14 | ||
15 | #ifndef _SH_CSS_FIRMWARE_H_ | |
16 | #define _SH_CSS_FIRMWARE_H_ | |
17 | ||
18 | #include <system_types.h> | |
19 | ||
20 | #include <ia_css_err.h> | |
21 | #include <ia_css_acc_types.h> | |
22 | ||
23 | /* This is for the firmware loaded from user space */ | |
24 | struct sh_css_fw_bi_file_h { | |
25 | char version[64]; /* branch tag + week day + time */ | |
26 | int binary_nr; /* Number of binaries */ | |
27 | unsigned int h_size; /* sizeof(struct sh_css_fw_bi_file_h) */ | |
28 | }; | |
29 | ||
30 | extern struct ia_css_fw_info sh_css_sp_fw; | |
31 | #if defined(HAS_BL) | |
32 | extern struct ia_css_fw_info sh_css_bl_fw; | |
33 | #endif /* HAS_BL */ | |
34 | extern struct ia_css_blob_descr *sh_css_blob_info; | |
bdfe0beb | 35 | extern unsigned int sh_css_num_binaries; |
ad85094b MCC |
36 | |
37 | char | |
38 | *sh_css_get_fw_version(void); | |
39 | ||
40 | bool | |
8568fe63 | 41 | sh_css_check_firmware_version(struct device *dev, const char *fw_data); |
ad85094b MCC |
42 | |
43 | enum ia_css_err | |
8568fe63 | 44 | sh_css_load_firmware(struct device *dev, const char *fw_data, |
ad85094b MCC |
45 | unsigned int fw_size); |
46 | ||
47 | void sh_css_unload_firmware(void); | |
48 | ||
100e8989 | 49 | ia_css_ptr sh_css_load_blob(const unsigned char *blob, unsigned int size); |
ad85094b MCC |
50 | |
51 | enum ia_css_err | |
eaa399eb MCC |
52 | sh_css_load_blob_info(const char *fw, const struct ia_css_fw_info *bi, |
53 | struct ia_css_blob_descr *bd, unsigned int i); | |
ad85094b MCC |
54 | |
55 | #endif /* _SH_CSS_FIRMWARE_H_ */ |