Go to the documentation of this file.
97 #define MINOR_VERSION_NUM_MASK UFS_MASK(0xFFFF, 0)
98 #define MAJOR_VERSION_NUM_MASK UFS_MASK(0xFFFF, 16)
110 #define DEVICE_CLASS UFS_MASK(0xFFFF, 0)
111 #define DEVICE_ID UFS_MASK(0xFF, 24)
117 #define MANUFACTURE_ID_MASK UFS_MASK(0xFFFF, 0)
118 #define PRODUCT_ID_MASK UFS_MASK(0xFFFF, 16)
120 #define UFS_BIT(x) (1L << (x))
122 #define UTP_TRANSFER_REQ_COMPL UFS_BIT(0)
123 #define UIC_DME_END_PT_RESET UFS_BIT(1)
124 #define UIC_ERROR UFS_BIT(2)
125 #define UIC_TEST_MODE UFS_BIT(3)
126 #define UIC_POWER_MODE UFS_BIT(4)
127 #define UIC_HIBERNATE_EXIT UFS_BIT(5)
128 #define UIC_HIBERNATE_ENTER UFS_BIT(6)
129 #define UIC_LINK_LOST UFS_BIT(7)
130 #define UIC_LINK_STARTUP UFS_BIT(8)
131 #define UTP_TASK_REQ_COMPL UFS_BIT(9)
132 #define UIC_COMMAND_COMPL UFS_BIT(10)
133 #define DEVICE_FATAL_ERROR UFS_BIT(11)
134 #define CONTROLLER_FATAL_ERROR UFS_BIT(16)
135 #define SYSTEM_BUS_FATAL_ERROR UFS_BIT(17)
137 #define UFSHCD_ERROR_MASK (UIC_ERROR |\
138 DEVICE_FATAL_ERROR |\
139 CONTROLLER_FATAL_ERROR |\
140 SYSTEM_BUS_FATAL_ERROR)
142 #define INT_FATAL_ERRORS (DEVICE_FATAL_ERROR |\
143 CONTROLLER_FATAL_ERROR |\
144 SYSTEM_BUS_FATAL_ERROR)
147 #define DEVICE_PRESENT UFS_BIT(0)
148 #define UTP_TRANSFER_REQ_LIST_READY UFS_BIT(1)
149 #define UTP_TASK_REQ_LIST_READY UFS_BIT(2)
150 #define UIC_COMMAND_READY UFS_BIT(3)
151 #define HOST_ERROR_INDICATOR UFS_BIT(4)
152 #define DEVICE_ERROR_INDICATOR UFS_BIT(5)
153 #define UIC_POWER_MODE_CHANGE_REQ_STATUS_MASK UFS_MASK(0x7, 8)
156 #define CONTROLLER_ENABLE UFS_BIT(0)
157 #define CONTROLLER_DISABLE 0x0
160 #define UIC_PHY_ADAPTER_LAYER_ERROR UFS_BIT(31)
161 #define UIC_PHY_ADAPTER_LAYER_ERROR_CODE_MASK 0x1F
164 #define UIC_DATA_LINK_LAYER_ERROR UFS_BIT(31)
165 #define UIC_DATA_LINK_LAYER_ERROR_CODE_MASK 0x7FFF
166 #define UIC_DATA_LINK_LAYER_ERROR_PA_INIT 0x2000
169 #define UIC_NETWORK_LAYER_ERROR UFS_BIT(31)
170 #define UIC_NETWORK_LAYER_ERROR_CODE_MASK 0x7
173 #define UIC_TRANSPORT_LAYER_ERROR UFS_BIT(31)
174 #define UIC_TRANSPORT_LAYER_ERROR_CODE_MASK 0x7F
177 #define UIC_DME_ERROR UFS_BIT(31)
178 #define UIC_DME_ERROR_CODE_MASK 0x1
180 #define INT_AGGR_TIMEOUT_VAL_MASK 0xFF
181 #define INT_AGGR_COUNTER_THRESHOLD_MASK UFS_MASK(0x1F, 8)
182 #define INT_AGGR_COUNTER_AND_TIMER_RESET UFS_BIT(16)
183 #define INT_AGGR_STATUS_BIT UFS_BIT(20)
184 #define INT_AGGR_PARAM_WRITE UFS_BIT(24)
185 #define INT_AGGR_ENABLE UFS_BIT(31)
188 #define UTP_TRANSFER_REQ_LIST_RUN_STOP_BIT UFS_BIT(0)
191 #define UTP_TASK_REQ_LIST_RUN_STOP_BIT UFS_BIT(0)
194 #define COMMAND_OPCODE_MASK 0xFF
195 #define GEN_SELECTOR_INDEX_MASK 0xFFFF
197 #define MIB_ATTRIBUTE_MASK UFS_MASK(0xFFFF, 16)
198 #define RESET_LEVEL 0xFF
200 #define ATTR_SET_TYPE_MASK UFS_MASK(0xFF, 16)
201 #define CONFIG_RESULT_CODE_MASK 0xFF
202 #define GENERIC_ERROR_CODE_MASK 0xFF
237 #define MASK_UIC_COMMAND_RESULT 0xFF
239 #define INT_AGGR_COUNTER_THRESHOLD_VALUE (0x1F << 8)
240 #define INT_AGGR_TIMEOUT_VALUE (0x02)