~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/sound/soc/codecs/aw88395/aw88395_lib.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0-only
  2 //
  3 // aw88395_lib.h  -- ACF bin parsing and check library file for aw88395
  4 //
  5 // Copyright (c) 2022-2023 AWINIC Technology CO., LTD
  6 //
  7 // Author: Bruce zhao <zhaolei@awinic.com>
  8 //
  9 
 10 #ifndef __AW88395_LIB_H__
 11 #define __AW88395_LIB_H__
 12 
 13 #define CHECK_REGISTER_NUM_OFFSET       (4)
 14 #define VALID_DATA_LEN                  (4)
 15 #define VALID_DATA_ADDR         (4)
 16 #define PARSE_DSP_REG_NUM               (4)
 17 #define REG_DATA_BYTP_LEN               (8)
 18 #define CHECK_DSP_REG_NUM               (12)
 19 #define DSP_VALID_DATA_LEN              (12)
 20 #define DSP_VALID_DATA_ADDR             (12)
 21 #define PARSE_SOC_APP_NUM               (8)
 22 #define CHECK_SOC_APP_NUM               (12)
 23 #define APP_DOWNLOAD_ADDR               (4)
 24 #define APP_VALID_DATA_LEN              (12)
 25 #define APP_VALID_DATA_ADDR             (12)
 26 #define BIN_NUM_MAX                     (100)
 27 #define HEADER_LEN                      (60)
 28 #define BIN_DATA_TYPE_OFFSET            (8)
 29 #define DATA_LEN                        (44)
 30 #define VALID_DATA_ADDR_OFFSET          (60)
 31 #define START_ADDR_OFFSET               (64)
 32 
 33 #define AW88395_FW_CHECK_PART           (10)
 34 #define HDADER_LEN                      (60)
 35 
 36 #define HEADER_VERSION_OFFSET           (4)
 37 
 38 enum bin_header_version_enum {
 39         HEADER_VERSION_V1 = 0x01000000,
 40 };
 41 
 42 enum data_type_enum {
 43         DATA_TYPE_REGISTER   = 0x00000000,
 44         DATA_TYPE_DSP_REG    = 0x00000010,
 45         DATA_TYPE_DSP_CFG    = 0x00000011,
 46         DATA_TYPE_SOC_REG    = 0x00000020,
 47         DATA_TYPE_SOC_APP    = 0x00000021,
 48         DATA_TYPE_DSP_FW     = 0x00000022,
 49         DATA_TYPE_MULTI_BINS = 0x00002000,
 50 };
 51 
 52 enum data_version_enum {
 53         DATA_VERSION_V1 = 0x00000001,
 54         DATA_VERSION_MAX,
 55 };
 56 
 57 struct bin_header_info {
 58         unsigned int check_sum;
 59         unsigned int header_ver;
 60         unsigned int bin_data_type;
 61         unsigned int bin_data_ver;
 62         unsigned int bin_data_len;
 63         unsigned int ui_ver;
 64         unsigned char chip_type[8];
 65         unsigned int reg_byte_len;
 66         unsigned int data_byte_len;
 67         unsigned int device_addr;
 68         unsigned int valid_data_len;
 69         unsigned int valid_data_addr;
 70 
 71         unsigned int reg_num;
 72         unsigned int reg_data_byte_len;
 73         unsigned int download_addr;
 74         unsigned int app_version;
 75         unsigned int header_len;
 76 };
 77 
 78 struct bin_container {
 79         unsigned int len;
 80         unsigned char data[];
 81 };
 82 
 83 struct aw_bin {
 84         unsigned char *p_addr;
 85         unsigned int all_bin_parse_num;
 86         unsigned int multi_bin_parse_num;
 87         unsigned int single_bin_parse_num;
 88         struct bin_header_info header_info[BIN_NUM_MAX];
 89         struct bin_container info;
 90 };
 91 
 92 #endif
 93 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php