Lines Matching full:nor

7 #include <linux/mtd/spi-nor.h>
47 struct spi_nor *nor = mtd_to_spi_nor(mtd); in sst_write() local
51 dev_dbg(nor->dev, "to 0x%08x, len %zd\n", (u32)to, len); in sst_write()
53 ret = spi_nor_lock_and_prep(nor); in sst_write()
57 ret = spi_nor_write_enable(nor); in sst_write()
61 nor->sst_write_second = false; in sst_write()
65 nor->program_opcode = SPINOR_OP_BP; in sst_write()
68 ret = spi_nor_write_data(nor, to, 1, buf); in sst_write()
72 ret = spi_nor_wait_till_ready(nor); in sst_write()
82 nor->program_opcode = SPINOR_OP_AAI_WP; in sst_write()
85 ret = spi_nor_write_data(nor, to, 2, buf + actual); in sst_write()
89 ret = spi_nor_wait_till_ready(nor); in sst_write()
93 nor->sst_write_second = true; in sst_write()
95 nor->sst_write_second = false; in sst_write()
97 ret = spi_nor_write_disable(nor); in sst_write()
101 ret = spi_nor_wait_till_ready(nor); in sst_write()
107 ret = spi_nor_write_enable(nor); in sst_write()
111 nor->program_opcode = SPINOR_OP_BP; in sst_write()
112 ret = spi_nor_write_data(nor, to, 1, buf + actual); in sst_write()
116 ret = spi_nor_wait_till_ready(nor); in sst_write()
122 ret = spi_nor_write_disable(nor); in sst_write()
126 spi_nor_unlock_and_unprep(nor); in sst_write()
130 static void sst_default_init(struct spi_nor *nor) in sst_default_init() argument
132 nor->flags |= SNOR_F_HAS_LOCK; in sst_default_init()
135 static void sst_post_sfdp_fixups(struct spi_nor *nor) in sst_post_sfdp_fixups() argument
137 if (nor->info->flags & SST_WRITE) in sst_post_sfdp_fixups()
138 nor->mtd._write = sst_write; in sst_post_sfdp_fixups()