122851890Sopenharmony_ci/**************************************************************************** 222851890Sopenharmony_ci **************************************************************************** 322851890Sopenharmony_ci *** 422851890Sopenharmony_ci *** This header was automatically generated from a Linux kernel header 522851890Sopenharmony_ci *** of the same name, to make information necessary for userspace to 622851890Sopenharmony_ci *** call into the kernel available to libc. It contains only constants, 722851890Sopenharmony_ci *** structures, and macros generated from the original header, and thus, 822851890Sopenharmony_ci *** contains no copyrightable information. 922851890Sopenharmony_ci *** 1022851890Sopenharmony_ci *** To edit the content of this header, modify the corresponding 1122851890Sopenharmony_ci *** source file (e.g. under external/kernel-headers/original/) then 1222851890Sopenharmony_ci *** run bionic/libc/kernel/tools/update_all.py 1322851890Sopenharmony_ci *** 1422851890Sopenharmony_ci *** Any manual change here will be lost the next time this script will 1522851890Sopenharmony_ci *** be run. You've been warned! 1622851890Sopenharmony_ci *** 1722851890Sopenharmony_ci **************************************************************************** 1822851890Sopenharmony_ci ****************************************************************************/ 1922851890Sopenharmony_ci#ifndef __XILINX_SDFEC_H__ 2022851890Sopenharmony_ci#define __XILINX_SDFEC_H__ 2122851890Sopenharmony_ci#include <linux/types.h> 2222851890Sopenharmony_ci#define XSDFEC_LDPC_SC_TABLE_ADDR_BASE (0x10000) 2322851890Sopenharmony_ci#define XSDFEC_LDPC_SC_TABLE_ADDR_HIGH (0x10400) 2422851890Sopenharmony_ci#define XSDFEC_LDPC_LA_TABLE_ADDR_BASE (0x18000) 2522851890Sopenharmony_ci#define XSDFEC_LDPC_LA_TABLE_ADDR_HIGH (0x19000) 2622851890Sopenharmony_ci#define XSDFEC_LDPC_QC_TABLE_ADDR_BASE (0x20000) 2722851890Sopenharmony_ci#define XSDFEC_LDPC_QC_TABLE_ADDR_HIGH (0x28000) 2822851890Sopenharmony_ci#define XSDFEC_SC_TABLE_DEPTH (XSDFEC_LDPC_SC_TABLE_ADDR_HIGH - XSDFEC_LDPC_SC_TABLE_ADDR_BASE) 2922851890Sopenharmony_ci#define XSDFEC_LA_TABLE_DEPTH (XSDFEC_LDPC_LA_TABLE_ADDR_HIGH - XSDFEC_LDPC_LA_TABLE_ADDR_BASE) 3022851890Sopenharmony_ci#define XSDFEC_QC_TABLE_DEPTH (XSDFEC_LDPC_QC_TABLE_ADDR_HIGH - XSDFEC_LDPC_QC_TABLE_ADDR_BASE) 3122851890Sopenharmony_cienum xsdfec_code { 3222851890Sopenharmony_ci XSDFEC_TURBO_CODE = 0, 3322851890Sopenharmony_ci XSDFEC_LDPC_CODE, 3422851890Sopenharmony_ci}; 3522851890Sopenharmony_cienum xsdfec_order { 3622851890Sopenharmony_ci XSDFEC_MAINTAIN_ORDER = 0, 3722851890Sopenharmony_ci XSDFEC_OUT_OF_ORDER, 3822851890Sopenharmony_ci}; 3922851890Sopenharmony_cienum xsdfec_turbo_alg { 4022851890Sopenharmony_ci XSDFEC_MAX_SCALE = 0, 4122851890Sopenharmony_ci XSDFEC_MAX_STAR, 4222851890Sopenharmony_ci XSDFEC_TURBO_ALG_MAX, 4322851890Sopenharmony_ci}; 4422851890Sopenharmony_cienum xsdfec_state { 4522851890Sopenharmony_ci XSDFEC_INIT = 0, 4622851890Sopenharmony_ci XSDFEC_STARTED, 4722851890Sopenharmony_ci XSDFEC_STOPPED, 4822851890Sopenharmony_ci XSDFEC_NEEDS_RESET, 4922851890Sopenharmony_ci XSDFEC_PL_RECONFIGURE, 5022851890Sopenharmony_ci}; 5122851890Sopenharmony_cienum xsdfec_axis_width { 5222851890Sopenharmony_ci XSDFEC_1x128b = 1, 5322851890Sopenharmony_ci XSDFEC_2x128b = 2, 5422851890Sopenharmony_ci XSDFEC_4x128b = 4, 5522851890Sopenharmony_ci}; 5622851890Sopenharmony_cienum xsdfec_axis_word_include { 5722851890Sopenharmony_ci XSDFEC_FIXED_VALUE = 0, 5822851890Sopenharmony_ci XSDFEC_IN_BLOCK, 5922851890Sopenharmony_ci XSDFEC_PER_AXI_TRANSACTION, 6022851890Sopenharmony_ci XSDFEC_AXIS_WORDS_INCLUDE_MAX, 6122851890Sopenharmony_ci}; 6222851890Sopenharmony_cistruct xsdfec_turbo { 6322851890Sopenharmony_ci __u32 alg; 6422851890Sopenharmony_ci __u8 scale; 6522851890Sopenharmony_ci}; 6622851890Sopenharmony_cistruct xsdfec_ldpc_params { 6722851890Sopenharmony_ci __u32 n; 6822851890Sopenharmony_ci __u32 k; 6922851890Sopenharmony_ci __u32 psize; 7022851890Sopenharmony_ci __u32 nlayers; 7122851890Sopenharmony_ci __u32 nqc; 7222851890Sopenharmony_ci __u32 nmqc; 7322851890Sopenharmony_ci __u32 nm; 7422851890Sopenharmony_ci __u32 norm_type; 7522851890Sopenharmony_ci __u32 no_packing; 7622851890Sopenharmony_ci __u32 special_qc; 7722851890Sopenharmony_ci __u32 no_final_parity; 7822851890Sopenharmony_ci __u32 max_schedule; 7922851890Sopenharmony_ci __u32 sc_off; 8022851890Sopenharmony_ci __u32 la_off; 8122851890Sopenharmony_ci __u32 qc_off; 8222851890Sopenharmony_ci __u32 * sc_table; 8322851890Sopenharmony_ci __u32 * la_table; 8422851890Sopenharmony_ci __u32 * qc_table; 8522851890Sopenharmony_ci __u16 code_id; 8622851890Sopenharmony_ci}; 8722851890Sopenharmony_cistruct xsdfec_status { 8822851890Sopenharmony_ci __u32 state; 8922851890Sopenharmony_ci __s8 activity; 9022851890Sopenharmony_ci}; 9122851890Sopenharmony_cistruct xsdfec_irq { 9222851890Sopenharmony_ci __s8 enable_isr; 9322851890Sopenharmony_ci __s8 enable_ecc_isr; 9422851890Sopenharmony_ci}; 9522851890Sopenharmony_cistruct xsdfec_config { 9622851890Sopenharmony_ci __u32 code; 9722851890Sopenharmony_ci __u32 order; 9822851890Sopenharmony_ci __u32 din_width; 9922851890Sopenharmony_ci __u32 din_word_include; 10022851890Sopenharmony_ci __u32 dout_width; 10122851890Sopenharmony_ci __u32 dout_word_include; 10222851890Sopenharmony_ci struct xsdfec_irq irq; 10322851890Sopenharmony_ci __s8 bypass; 10422851890Sopenharmony_ci __s8 code_wr_protect; 10522851890Sopenharmony_ci}; 10622851890Sopenharmony_cistruct xsdfec_stats { 10722851890Sopenharmony_ci __u32 isr_err_count; 10822851890Sopenharmony_ci __u32 cecc_count; 10922851890Sopenharmony_ci __u32 uecc_count; 11022851890Sopenharmony_ci}; 11122851890Sopenharmony_cistruct xsdfec_ldpc_param_table_sizes { 11222851890Sopenharmony_ci __u32 sc_size; 11322851890Sopenharmony_ci __u32 la_size; 11422851890Sopenharmony_ci __u32 qc_size; 11522851890Sopenharmony_ci}; 11622851890Sopenharmony_ci#define XSDFEC_MAGIC 'f' 11722851890Sopenharmony_ci#define XSDFEC_START_DEV _IO(XSDFEC_MAGIC, 0) 11822851890Sopenharmony_ci#define XSDFEC_STOP_DEV _IO(XSDFEC_MAGIC, 1) 11922851890Sopenharmony_ci#define XSDFEC_GET_STATUS _IOR(XSDFEC_MAGIC, 2, struct xsdfec_status) 12022851890Sopenharmony_ci#define XSDFEC_SET_IRQ _IOW(XSDFEC_MAGIC, 3, struct xsdfec_irq) 12122851890Sopenharmony_ci#define XSDFEC_SET_TURBO _IOW(XSDFEC_MAGIC, 4, struct xsdfec_turbo) 12222851890Sopenharmony_ci#define XSDFEC_ADD_LDPC_CODE_PARAMS _IOW(XSDFEC_MAGIC, 5, struct xsdfec_ldpc_params) 12322851890Sopenharmony_ci#define XSDFEC_GET_CONFIG _IOR(XSDFEC_MAGIC, 6, struct xsdfec_config) 12422851890Sopenharmony_ci#define XSDFEC_GET_TURBO _IOR(XSDFEC_MAGIC, 7, struct xsdfec_turbo) 12522851890Sopenharmony_ci#define XSDFEC_SET_ORDER _IOW(XSDFEC_MAGIC, 8, unsigned long) 12622851890Sopenharmony_ci#define XSDFEC_SET_BYPASS _IOW(XSDFEC_MAGIC, 9, bool) 12722851890Sopenharmony_ci#define XSDFEC_IS_ACTIVE _IOR(XSDFEC_MAGIC, 10, bool) 12822851890Sopenharmony_ci#define XSDFEC_CLEAR_STATS _IO(XSDFEC_MAGIC, 11) 12922851890Sopenharmony_ci#define XSDFEC_GET_STATS _IOR(XSDFEC_MAGIC, 12, struct xsdfec_stats) 13022851890Sopenharmony_ci#define XSDFEC_SET_DEFAULT_CONFIG _IO(XSDFEC_MAGIC, 13) 13122851890Sopenharmony_ci#endif 132