Lines Matching refs:nor
21 w25q256_post_bfpt_fixups(struct spi_nor *nor, in w25q256_post_bfpt_fixups() argument
35 nor->flags |= SNOR_F_4B_OPCODES; in w25q256_post_bfpt_fixups()
151 static int winbond_nor_write_ear(struct spi_nor *nor, u8 ear) in winbond_nor_write_ear() argument
155 nor->bouncebuf[0] = ear; in winbond_nor_write_ear()
157 if (nor->spimem) { in winbond_nor_write_ear()
158 struct spi_mem_op op = WINBOND_NOR_WREAR_OP(nor->bouncebuf); in winbond_nor_write_ear()
160 spi_nor_spimem_setup_op(nor, &op, nor->reg_proto); in winbond_nor_write_ear()
162 ret = spi_mem_exec_op(nor->spimem, &op); in winbond_nor_write_ear()
164 ret = spi_nor_controller_ops_write_reg(nor, in winbond_nor_write_ear()
166 nor->bouncebuf, 1); in winbond_nor_write_ear()
170 dev_dbg(nor->dev, "error %d writing EAR\n", ret); in winbond_nor_write_ear()
184 static int winbond_nor_set_4byte_addr_mode(struct spi_nor *nor, bool enable) in winbond_nor_set_4byte_addr_mode() argument
188 ret = spi_nor_set_4byte_addr_mode(nor, enable); in winbond_nor_set_4byte_addr_mode()
197 ret = spi_nor_write_enable(nor); in winbond_nor_set_4byte_addr_mode()
201 ret = winbond_nor_write_ear(nor, 0); in winbond_nor_set_4byte_addr_mode()
205 return spi_nor_write_disable(nor); in winbond_nor_set_4byte_addr_mode()
216 static void winbond_nor_default_init(struct spi_nor *nor) in winbond_nor_default_init() argument
218 nor->params->set_4byte_addr_mode = winbond_nor_set_4byte_addr_mode; in winbond_nor_default_init()
221 static void winbond_nor_late_init(struct spi_nor *nor) in winbond_nor_late_init() argument
223 if (nor->params->otp.org->n_regions) in winbond_nor_late_init()
224 nor->params->otp.ops = &winbond_nor_otp_ops; in winbond_nor_late_init()