linux/drivers/staging/media/atomisp/pci/sh_css_firmware.h
<<
>>
Prefs
   1/* SPDX-License-Identifier: GPL-2.0 */
   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
  19#include <system_local.h>
  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 */
  25struct  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
  31extern struct ia_css_fw_info     sh_css_sp_fw;
  32#if defined(HAS_BL)
  33extern struct ia_css_fw_info     sh_css_bl_fw;
  34#endif /* HAS_BL */
  35extern struct ia_css_blob_descr *sh_css_blob_info;
  36extern unsigned int sh_css_num_binaries;
  37
  38char
  39*sh_css_get_fw_version(void);
  40
  41struct device;
  42bool
  43sh_css_check_firmware_version(struct device *dev, const char *fw_data);
  44
  45int
  46sh_css_load_firmware(struct device *dev, const char *fw_data,
  47                     unsigned int fw_size);
  48
  49void sh_css_unload_firmware(void);
  50
  51ia_css_ptr sh_css_load_blob(const unsigned char *blob, unsigned int size);
  52
  53int
  54sh_css_load_blob_info(const char *fw, const struct ia_css_fw_info *bi,
  55                      struct ia_css_blob_descr *bd, unsigned int i);
  56
  57#endif /* _SH_CSS_FIRMWARE_H_ */
  58