Lines Matching +full:16 +full:- +full:bit

4  * SPDX-License-Identifier: Apache-2.0
19 res->instr = packed >> 8; in extract_instr()
20 res->mode_clocks = (packed >> 5) & 0x07; in extract_instr()
21 res->wait_states = packed & 0x1F; in extract_instr()
31 int rv = -ENOTSUP; in jesd216_bfp_read_support()
35 if ((php->len_dw >= 15) in jesd216_bfp_read_support()
36 && (sys_le32_to_cpu(bfp->dw10[5]) & BIT(9))) { in jesd216_bfp_read_support()
41 if ((php->len_dw >= 19) in jesd216_bfp_read_support()
42 && (sys_le32_to_cpu(bfp->dw10[9]) & BIT(9))) { in jesd216_bfp_read_support()
50 if (sys_le32_to_cpu(bfp->dw1) & BIT(16)) { in jesd216_bfp_read_support()
51 uint32_t dw4 = sys_le32_to_cpu(bfp->dw4); in jesd216_bfp_read_support()
57 if (sys_le32_to_cpu(bfp->dw1) & BIT(22)) { in jesd216_bfp_read_support()
58 uint32_t dw3 = sys_le32_to_cpu(bfp->dw3); in jesd216_bfp_read_support()
60 rv = extract_instr(dw3 >> 16, res); in jesd216_bfp_read_support()
64 if (php->len_dw >= 17) { in jesd216_bfp_read_support()
65 uint32_t dw17 = sys_le32_to_cpu(bfp->dw10[7]); in jesd216_bfp_read_support()
68 rv = extract_instr(dw17 >> 16, res); in jesd216_bfp_read_support()
73 if (sys_le32_to_cpu(bfp->dw1) & BIT(20)) { in jesd216_bfp_read_support()
74 uint32_t dw4 = sys_le32_to_cpu(bfp->dw4); in jesd216_bfp_read_support()
76 rv = extract_instr(dw4 >> 16, res); in jesd216_bfp_read_support()
80 if (sys_le32_to_cpu(bfp->dw1) & BIT(21)) { in jesd216_bfp_read_support()
81 uint32_t dw3 = sys_le32_to_cpu(bfp->dw3); in jesd216_bfp_read_support()
87 if (php->len_dw >= 17) { in jesd216_bfp_read_support()
88 uint32_t dw17 = sys_le32_to_cpu(bfp->dw10[7]); in jesd216_bfp_read_support()
96 if (sys_le32_to_cpu(bfp->dw5) & BIT(0)) { in jesd216_bfp_read_support()
97 uint32_t dw6 = sys_le32_to_cpu(bfp->dw6); in jesd216_bfp_read_support()
99 rv = extract_instr(dw6 >> 16, res); in jesd216_bfp_read_support()
103 if (sys_le32_to_cpu(bfp->dw5) & BIT(4)) { in jesd216_bfp_read_support()
104 uint32_t dw7 = sys_le32_to_cpu(bfp->dw7); in jesd216_bfp_read_support()
106 rv = extract_instr(dw7 >> 16, res); in jesd216_bfp_read_support()
117 rv = -EINVAL; in jesd216_bfp_read_support()
130 const uint32_t *dwp = &bfp->dw8 + (idx - 1U) / 2U; in jesd216_bfp_erase()
135 dw >>= 16; in jesd216_bfp_erase()
143 return -EINVAL; in jesd216_bfp_erase()
145 etp->cmd = cmd; in jesd216_bfp_erase()
146 etp->exp = exp; in jesd216_bfp_erase()
158 if (php->len_dw < 10) { in jesd216_bfp_erase_type_times()
159 return -ENOTSUP; in jesd216_bfp_erase_type_times()
162 uint32_t dw10 = sys_le32_to_cpu(bfp->dw10[0]); in jesd216_bfp_erase_type_times()
164 /* Each 7-bit erase time entry has a 5-bit count in the lower in jesd216_bfp_erase_type_times()
165 * bits, and a 2-bit unit in the upper bits. The actual count in jesd216_bfp_erase_type_times()
168 * The entries start with ET1 at bit 4. The low four bits in jesd216_bfp_erase_type_times()
172 unsigned int count = 1 + ((dw10 >> (4 + (idx - 1) * 7)) & 0x1F); in jesd216_bfp_erase_type_times()
173 unsigned int units = ((dw10 >> (4 + 5 + (idx - 1) * 7)) & 0x03); in jesd216_bfp_erase_type_times()
180 case 0x01: /* 16 ms */ in jesd216_bfp_erase_type_times()
181 *typ_ms = count * 16; in jesd216_bfp_erase_type_times()
199 if (php->len_dw < 11) { in jesd216_bfp_decode_dw11()
200 return -ENOTSUP; in jesd216_bfp_decode_dw11()
203 uint32_t dw11 = sys_le32_to_cpu(bfp->dw10[1]); in jesd216_bfp_decode_dw11()
207 case 0x00: /* 16 ms */ in jesd216_bfp_decode_dw11()
208 value *= 16; in jesd216_bfp_decode_dw11()
220 res->chip_erase_ms = value; in jesd216_bfp_decode_dw11()
223 if (dw11 & BIT(23)) { in jesd216_bfp_decode_dw11()
226 res->byte_prog_addl_us = value; in jesd216_bfp_decode_dw11()
229 if (dw11 & BIT(18)) { in jesd216_bfp_decode_dw11()
232 res->byte_prog_first_us = value; in jesd216_bfp_decode_dw11()
235 if (dw11 & BIT(13)) { in jesd216_bfp_decode_dw11()
240 res->page_prog_us = value; in jesd216_bfp_decode_dw11()
242 res->page_size = BIT((dw11 >> 4) & 0x0F); in jesd216_bfp_decode_dw11()
243 res->typ_max_factor = 2 * (1 + (dw11 & 0x0F)); in jesd216_bfp_decode_dw11()
253 if (php->len_dw < 14) { in jesd216_bfp_decode_dw14()
254 return -ENOTSUP; in jesd216_bfp_decode_dw14()
257 uint32_t dw14 = sys_le32_to_cpu(bfp->dw10[4]); in jesd216_bfp_decode_dw14()
259 if (dw14 & BIT(31)) { in jesd216_bfp_decode_dw14()
260 return -ENOTSUP; in jesd216_bfp_decode_dw14()
263 res->enter_dpd_instr = (dw14 >> 23) & 0xFF; in jesd216_bfp_decode_dw14()
264 res->exit_dpd_instr = (dw14 >> 15) & 0xFF; in jesd216_bfp_decode_dw14()
283 res->exit_delay_ns = value; in jesd216_bfp_decode_dw14()
285 res->poll_options = (dw14 >> 2) & 0x3F; in jesd216_bfp_decode_dw14()
295 if (php->len_dw < 15) { in jesd216_bfp_decode_dw15()
296 return -ENOTSUP; in jesd216_bfp_decode_dw15()
299 uint32_t dw15 = sys_le32_to_cpu(bfp->dw10[5]); in jesd216_bfp_decode_dw15()
301 res->hold_reset_disable = (dw15 & BIT(23)) != 0U; in jesd216_bfp_decode_dw15()
302 res->qer = (dw15 >> 20) & 0x07; in jesd216_bfp_decode_dw15()
303 res->entry_044 = (dw15 >> 16) & 0x0F; in jesd216_bfp_decode_dw15()
304 res->exit_044 = (dw15 >> 10) & 0x3F; in jesd216_bfp_decode_dw15()
305 res->support_044 = (dw15 & BIT(9)) != 0U; in jesd216_bfp_decode_dw15()
306 res->enable_444 = (dw15 >> 4) & 0x1F; in jesd216_bfp_decode_dw15()
307 res->disable_444 = (dw15 >> 0) & 0x0F; in jesd216_bfp_decode_dw15()
317 if (php->len_dw < 16) { in jesd216_bfp_decode_dw16()
318 return -ENOTSUP; in jesd216_bfp_decode_dw16()
321 uint32_t dw16 = sys_le32_to_cpu(bfp->dw10[6]); in jesd216_bfp_decode_dw16()
323 res->enter_4ba = (dw16 >> 24) & 0xFF; in jesd216_bfp_decode_dw16()
324 res->exit_4ba = (dw16 >> 14) & 0x3FF; in jesd216_bfp_decode_dw16()
325 res->srrs_support = (dw16 >> 8) & 0x3F; in jesd216_bfp_decode_dw16()
326 res->sr1_interface = (dw16 >> 0) & 0x7F; in jesd216_bfp_decode_dw16()