1 /* 2 * Copyright (C) 2017 Amlogic, Inc. All rights reserved. 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that 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 * You should have received a copy of the GNU General Public License along 15 * with this program; if not, write to the Free Software Foundation, Inc., 16 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 * 18 * Description: 19 */ 20 #ifndef __VIDEO_FIRMWARE_HEADER_ 21 #define __VIDEO_FIRMWARE_HEADER_ 22 23 #include "../../../common/firmware/firmware_type.h" 24 #include <linux/amlogic/media/utils/vformat.h> 25 26 #define FW_LOAD_FORCE (0x1) 27 #define FW_LOAD_TRY (0X2) 28 29 struct firmware_s { 30 char name[32]; 31 unsigned int len; 32 char data[0]; 33 }; 34 35 extern int get_decoder_firmware_data(enum vformat_e type, 36 const char *file_name, char *buf, int size); 37 extern int get_data_from_name(const char *name, char *buf); 38 extern int get_firmware_data(unsigned int foramt, char *buf); 39 extern int video_fw_reload(int mode); 40 41 #endif 42