1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19 #ifndef UAPI_UFS_H_ 20 #define UAPI_UFS_H_ 21 #define MAX_QUERY_IDN 0x18 22 enum flag_idn { 23 QUERY_FLAG_IDN_FDEVICEINIT = 0x01, 24 QUERY_FLAG_IDN_PERMANENT_WPE = 0x02, 25 QUERY_FLAG_IDN_PWR_ON_WPE = 0x03, 26 QUERY_FLAG_IDN_BKOPS_EN = 0x04, 27 QUERY_FLAG_IDN_RESERVED1 = 0x05, 28 QUERY_FLAG_IDN_PURGE_ENABLE = 0x06, 29 QUERY_FLAG_IDN_RESERVED2 = 0x07, 30 QUERY_FLAG_IDN_FPHYRESOURCEREMOVAL = 0x08, 31 QUERY_FLAG_IDN_BUSY_RTC = 0x09, 32 QUERY_FLAG_IDN_MANUAL_GC_CONT = 0x0E, 33 }; 34 enum attr_idn { 35 QUERY_ATTR_IDN_BOOT_LU_EN = 0x00, 36 QUERY_ATTR_IDN_RESERVED = 0x01, 37 QUERY_ATTR_IDN_POWER_MODE = 0x02, 38 QUERY_ATTR_IDN_ACTIVE_ICC_LVL = 0x03, 39 QUERY_ATTR_IDN_OOO_DATA_EN = 0x04, 40 QUERY_ATTR_IDN_BKOPS_STATUS = 0x05, 41 QUERY_ATTR_IDN_PURGE_STATUS = 0x06, 42 QUERY_ATTR_IDN_MAX_DATA_IN = 0x07, 43 QUERY_ATTR_IDN_MAX_DATA_OUT = 0x08, 44 QUERY_ATTR_IDN_DYN_CAP_NEEDED = 0x09, 45 QUERY_ATTR_IDN_REF_CLK_FREQ = 0x0A, 46 QUERY_ATTR_IDN_CONF_DESC_LOCK = 0x0B, 47 QUERY_ATTR_IDN_MAX_NUM_OF_RTT = 0x0C, 48 QUERY_ATTR_IDN_EE_CONTROL = 0x0D, 49 QUERY_ATTR_IDN_EE_STATUS = 0x0E, 50 QUERY_ATTR_IDN_SECONDS_PASSED = 0x0F, 51 QUERY_ATTR_IDN_CNTX_CONF = 0x10, 52 QUERY_ATTR_IDN_CORR_PRG_BLK_NUM = 0x11, 53 QUERY_ATTR_IDN_MANUAL_GC_STATUS = 0x17, 54 }; 55 #define QUERY_ATTR_IDN_BOOT_LU_EN_MAX 0x02 56 enum desc_idn { 57 QUERY_DESC_IDN_DEVICE = 0x0, 58 QUERY_DESC_IDN_CONFIGURAION = 0x1, 59 QUERY_DESC_IDN_UNIT = 0x2, 60 QUERY_DESC_IDN_RFU_0 = 0x3, 61 QUERY_DESC_IDN_INTERCONNECT = 0x4, 62 QUERY_DESC_IDN_STRING = 0x5, 63 QUERY_DESC_IDN_RFU_1 = 0x6, 64 QUERY_DESC_IDN_GEOMETRY = 0x7, 65 QUERY_DESC_IDN_POWER = 0x8, 66 QUERY_DESC_IDN_HEALTH = 0x9, 67 QUERY_DESC_IDN_RFU_2 = 0xA, 68 QUERY_DESC_IDN_MAX, 69 }; 70 enum query_opcode { 71 UPIU_QUERY_OPCODE_NOP = 0x0, 72 UPIU_QUERY_OPCODE_READ_DESC = 0x1, 73 UPIU_QUERY_OPCODE_WRITE_DESC = 0x2, 74 UPIU_QUERY_OPCODE_READ_ATTR = 0x3, 75 UPIU_QUERY_OPCODE_WRITE_ATTR = 0x4, 76 UPIU_QUERY_OPCODE_READ_FLAG = 0x5, 77 UPIU_QUERY_OPCODE_SET_FLAG = 0x6, 78 UPIU_QUERY_OPCODE_CLEAR_FLAG = 0x7, 79 UPIU_QUERY_OPCODE_TOGGLE_FLAG = 0x8, 80 UPIU_QUERY_OPCODE_MAX, 81 }; 82 #define UPIU_QUERY_OPCODE_HIGH_HPB 0x5500 83 #define UPIU_QUERY_OPCODE_HIGH(opcode) ((opcode) >> 16) 84 #define UPIU_QUERY_OPCODE_LOW(opcode) ((opcode) & 0xffff) 85 #endif 86 87