Lines Matching refs:qryp

178 #define cfi_unpack_qry(qryp, data)					\
180 (qryp)->qry[0] = cfi_unpack_1(data[0x10]); \
181 (qryp)->qry[1] = cfi_unpack_1(data[0x11]); \
182 (qryp)->qry[2] = cfi_unpack_1(data[0x12]); \
183 (qryp)->id_pri = cfi_unpack_2(data[0x13], data[0x14]); \
184 (qryp)->addr_pri = cfi_unpack_2(data[0x15], data[0x16]); \
185 (qryp)->id_alt = cfi_unpack_2(data[0x17], data[0x18]); \
186 (qryp)->addr_alt = cfi_unpack_2(data[0x19], data[0x1a]); \
187 (qryp)->vcc_min = cfi_unpack_1(data[0x1b]); \
188 (qryp)->vcc_max = cfi_unpack_1(data[0x1c]); \
189 (qryp)->vpp_min = cfi_unpack_1(data[0x1d]); \
190 (qryp)->vpp_max = cfi_unpack_1(data[0x1e]); \
191 (qryp)->write_word_time_typ = cfi_unpack_1(data[0x1f]); \
192 (qryp)->write_nbyte_time_typ = cfi_unpack_1(data[0x20]); \
193 (qryp)->erase_blk_time_typ = cfi_unpack_1(data[0x21]); \
194 (qryp)->erase_chip_time_typ = cfi_unpack_1(data[0x22]); \
195 (qryp)->write_word_time_max = cfi_unpack_1(data[0x23]); \
196 (qryp)->write_nbyte_time_max = cfi_unpack_1(data[0x24]); \
197 (qryp)->erase_blk_time_max = cfi_unpack_1(data[0x25]); \
198 (qryp)->erase_chip_time_max = cfi_unpack_1(data[0x26]); \
199 (qryp)->device_size = cfi_unpack_1(data[0x27]); \
200 (qryp)->interface_code_desc = \
202 (qryp)->write_nbyte_size_max = \
204 (qryp)->erase_blk_regions = cfi_unpack_1(data[0x2c]); \
206 const u_int _n = (qryp)->erase_blk_regions; \
209 (qryp)->erase_blk_info[_r].y = \
211 (qryp)->erase_blk_info[_r].z = \
216 #define cfi_unpack_pri_0002(qryp, data) \
218 (qryp)->pri.cmd_0002.pri[0] = cfi_unpack_1(data[0x00]); \
219 (qryp)->pri.cmd_0002.pri[1] = cfi_unpack_1(data[0x01]); \
220 (qryp)->pri.cmd_0002.pri[2] = cfi_unpack_1(data[0x02]); \
221 (qryp)->pri.cmd_0002.version_maj = cfi_unpack_1(data[0x03]); \
222 (qryp)->pri.cmd_0002.version_min = cfi_unpack_1(data[0x04]); \
223 (qryp)->pri.cmd_0002.asupt = cfi_unpack_1(data[0x05]); \
224 (qryp)->pri.cmd_0002.erase_susp = cfi_unpack_1(data[0x06]); \
225 (qryp)->pri.cmd_0002.sector_prot = cfi_unpack_1(data[0x07]); \
226 (qryp)->pri.cmd_0002.tmp_sector_unprot = \
228 (qryp)->pri.cmd_0002.sector_prot_scheme = \
230 (qryp)->pri.cmd_0002.simul_op = cfi_unpack_1(data[0x0a]); \
231 (qryp)->pri.cmd_0002.burst_mode_type = cfi_unpack_1(data[0x0b]);\
232 (qryp)->pri.cmd_0002.page_mode_type = cfi_unpack_1(data[0x0c]); \
233 (qryp)->pri.cmd_0002.acc_min = cfi_unpack_1(data[0x0d]); \
234 (qryp)->pri.cmd_0002.acc_max = cfi_unpack_1(data[0x0e]); \
235 (qryp)->pri.cmd_0002.wp_prot = cfi_unpack_1(data[0x0f]); \
237 (qryp)->pri.cmd_0002.prog_susp = cfi_unpack_1(data[0x10]); \
238 (qryp)->pri.cmd_0002.unlock_bypass = cfi_unpack_1(data[0x11]); \
239 (qryp)->pri.cmd_0002.sss_size = cfi_unpack_1(data[0x12]); \
240 (qryp)->pri.cmd_0002.soft_feat = cfi_unpack_1(data[0x13]); \
241 (qryp)->pri.cmd_0002.page_size = cfi_unpack_1(data[0x14]); \
242 (qryp)->pri.cmd_0002.erase_susp_time_max = \
244 (qryp)->pri.cmd_0002.prog_susp_time_max = \
246 (qryp)->pri.cmd_0002.embhwrst_time_max = \
248 (qryp)->pri.cmd_0002.hwrst_time_max = \
254 struct cfi_query_data * const qryp = &cfi->cfi_qry_data; \
256 memset(qryp, 0, sizeof(*qryp)); \
257 cfi_unpack_qry(qryp, data); \
259 switch (qryp->id_pri) { \
261 if ((cfi_unpack_1(data[qryp->addr_pri + 0]) == 'P') && \
262 (cfi_unpack_1(data[qryp->addr_pri + 1]) == 'R') && \
263 (cfi_unpack_1(data[qryp->addr_pri + 2]) == 'I')) { \
264 type *pri_data = &data[qryp->addr_pri]; \
265 cfi_unpack_pri_0002(qryp, pri_data); \
831 struct cfi_query_data *qryp = &cfi->cfi_qry_data;
832 memset(qryp, 0, sizeof(*qryp));
833 qryp->id_pri = jt->jt_id_pri;
834 qryp->id_alt = jt->jt_id_alt;
835 qryp->interface_code_desc = jt->jt_interface_code_desc;
836 qryp->write_word_time_typ = jt->jt_write_word_time_typ;
837 qryp->write_nbyte_time_typ = jt->jt_write_nbyte_time_typ;
838 qryp->erase_blk_time_typ = jt->jt_erase_blk_time_typ;
839 qryp->erase_chip_time_typ = jt->jt_erase_chip_time_typ;
840 qryp->write_word_time_max = jt->jt_write_word_time_max;
841 qryp->write_nbyte_time_max = jt->jt_write_nbyte_time_max;
842 qryp->erase_blk_time_max = jt->jt_erase_blk_time_max;
843 qryp->erase_chip_time_max = jt->jt_erase_chip_time_max;
844 qryp->device_size = jt->jt_device_size;
845 qryp->interface_code_desc = jt->jt_interface_code_desc;
846 qryp->write_nbyte_size_max = jt->jt_write_nbyte_size_max;
847 qryp->erase_blk_regions = jt->jt_erase_blk_regions;
849 qryp->erase_blk_info[i] = jt->jt_erase_blk_info[i];
857 struct cfi_query_data * const qryp = &cfi->cfi_qry_data;
859 format_bytes(pbuf, sizeof(pbuf), 1 << qryp->device_size);
863 cfi_interface_desc_str(qryp->interface_code_desc));
866 cfi_interface_desc_str(qryp->interface_code_desc));
880 1 << qryp->write_nbyte_size_max);
882 qryp->erase_blk_regions);
883 for (u_int r=0; r < qryp->erase_blk_regions; r++) {
884 size_t sz = qryp->erase_blk_info[r].z ?
885 qryp->erase_blk_info[r].z * 256 : 128;
888 qryp->erase_blk_info[r].y + 1, pbuf);