Lines Matching full:nor
7 #include <linux/mtd/spi-nor.h>
24 * @nor: pointer to a 'struct spi_nor'
32 static int spi_nor_cypress_octal_dtr_enable(struct spi_nor *nor, bool enable) in spi_nor_cypress_octal_dtr_enable() argument
35 u8 *buf = nor->bouncebuf; in spi_nor_cypress_octal_dtr_enable()
40 ret = spi_nor_write_enable(nor); in spi_nor_cypress_octal_dtr_enable()
52 ret = spi_mem_exec_op(nor->spimem, &op); in spi_nor_cypress_octal_dtr_enable()
56 ret = spi_nor_wait_till_ready(nor); in spi_nor_cypress_octal_dtr_enable()
60 nor->read_dummy = 24; in spi_nor_cypress_octal_dtr_enable()
64 ret = spi_nor_write_enable(nor); in spi_nor_cypress_octal_dtr_enable()
82 spi_nor_spimem_setup_op(nor, &op, SNOR_PROTO_8_8_8_DTR); in spi_nor_cypress_octal_dtr_enable()
84 ret = spi_mem_exec_op(nor->spimem, &op); in spi_nor_cypress_octal_dtr_enable()
93 SPI_MEM_OP_DATA_IN(round_up(nor->info->id_len, 2), in spi_nor_cypress_octal_dtr_enable()
97 spi_nor_spimem_setup_op(nor, &op, SNOR_PROTO_8_8_8_DTR); in spi_nor_cypress_octal_dtr_enable()
99 ret = spi_mem_exec_op(nor->spimem, &op); in spi_nor_cypress_octal_dtr_enable()
103 if (memcmp(buf, nor->info->id, nor->info->id_len)) in spi_nor_cypress_octal_dtr_enable()
109 static void s28hs512t_default_init(struct spi_nor *nor) in s28hs512t_default_init() argument
111 nor->params->octal_dtr_enable = spi_nor_cypress_octal_dtr_enable; in s28hs512t_default_init()
112 nor->params->writesize = 16; in s28hs512t_default_init()
115 static void s28hs512t_post_sfdp_fixup(struct spi_nor *nor) in s28hs512t_post_sfdp_fixup() argument
121 if (nor->params->reads[SNOR_CMD_READ_8_8_8_DTR].opcode == 0) in s28hs512t_post_sfdp_fixup()
122 nor->params->reads[SNOR_CMD_READ_8_8_8_DTR].opcode = in s28hs512t_post_sfdp_fixup()
126 spi_nor_set_pp_settings(&nor->params->page_programs[SNOR_CMD_PP], in s28hs512t_post_sfdp_fixup()
132 spi_nor_set_pp_settings(&nor->params->page_programs[SNOR_CMD_PP_8_8_8_DTR], in s28hs512t_post_sfdp_fixup()
140 nor->params->rdsr_addr_nbytes = 4; in s28hs512t_post_sfdp_fixup()
143 static int s28hs512t_post_bfpt_fixup(struct spi_nor *nor, in s28hs512t_post_bfpt_fixup() argument
156 SPI_MEM_OP_DATA_IN(1, nor->bouncebuf, 1)); in s28hs512t_post_bfpt_fixup()
159 ret = spi_mem_exec_op(nor->spimem, &op); in s28hs512t_post_bfpt_fixup()
163 if (nor->bouncebuf[0] & SPINOR_REG_CYPRESS_CFR3V_PGSZ) in s28hs512t_post_bfpt_fixup()
164 nor->params->page_size = 512; in s28hs512t_post_bfpt_fixup()
166 nor->params->page_size = 256; in s28hs512t_post_bfpt_fixup()
178 s25fs_s_post_bfpt_fixups(struct spi_nor *nor, in s25fs_s_post_bfpt_fixups() argument
188 nor->params->page_size = 256; in s25fs_s_post_bfpt_fixups()
279 static void spansion_post_sfdp_fixups(struct spi_nor *nor) in spansion_post_sfdp_fixups() argument
281 if (nor->params->size <= SZ_16M) in spansion_post_sfdp_fixups()
284 nor->flags |= SNOR_F_4B_OPCODES; in spansion_post_sfdp_fixups()
286 nor->erase_opcode = SPINOR_OP_SE; in spansion_post_sfdp_fixups()
287 nor->mtd.erasesize = nor->info->sector_size; in spansion_post_sfdp_fixups()