Lines Matching +full:64 +full:- +full:byte

1 // SPDX-License-Identifier: GPL-2.0
7 #include <linux/mtd/spi-nor.h>
11 /* SST flash_info mfr_flag. Used to specify SST byte programming. */
18 return -EOPNOTSUPP; in sst26vf_nor_lock()
26 if (ofs != 0 || len != nor->params->size) in sst26vf_nor_unlock()
27 return -EINVAL; in sst26vf_nor_unlock()
29 ret = spi_nor_read_cr(nor, nor->bouncebuf); in sst26vf_nor_unlock()
33 if (!(nor->bouncebuf[0] & SST26VF_CR_BPNV)) { in sst26vf_nor_unlock()
34 dev_dbg(nor->dev, "Any block has been permanently locked\n"); in sst26vf_nor_unlock()
35 return -EINVAL; in sst26vf_nor_unlock()
43 return -EOPNOTSUPP; in sst26vf_nor_is_locked()
54 nor->params->locking_ops = &sst26vf_nor_locking_ops; in sst26vf_nor_late_init()
64 /* SST -- large erase sizes are "overlays", "sectors" are 4K */
65 { "sst25vf040b", INFO(0xbf258d, 0, 64 * 1024, 8)
69 { "sst25vf080b", INFO(0xbf258e, 0, 64 * 1024, 16)
73 { "sst25vf016b", INFO(0xbf2541, 0, 64 * 1024, 32)
77 { "sst25vf032b", INFO(0xbf254a, 0, 64 * 1024, 64)
81 { "sst25vf064c", INFO(0xbf254b, 0, 64 * 1024, 128)
85 { "sst25wf512", INFO(0xbf2501, 0, 64 * 1024, 1)
89 { "sst25wf010", INFO(0xbf2502, 0, 64 * 1024, 2)
93 { "sst25wf020", INFO(0xbf2503, 0, 64 * 1024, 4)
97 { "sst25wf020a", INFO(0x621612, 0, 64 * 1024, 4)
100 { "sst25wf040b", INFO(0x621613, 0, 64 * 1024, 8)
103 { "sst25wf040", INFO(0xbf2504, 0, 64 * 1024, 8)
107 { "sst25wf080", INFO(0xbf2505, 0, 64 * 1024, 16)
111 { "sst26wf016b", INFO(0xbf2651, 0, 64 * 1024, 32)
114 { "sst26vf016b", INFO(0xbf2641, 0, 64 * 1024, 32)
120 { "sst26vf064b", INFO(0xbf2643, 0, 64 * 1024, 128)
133 dev_dbg(nor->dev, "to 0x%08x, len %zd\n", (u32)to, len); in sst_nor_write()
143 nor->sst_write_second = false; in sst_nor_write()
147 nor->program_opcode = SPINOR_OP_BP; in sst_nor_write()
149 /* write one byte. */ in sst_nor_write()
153 WARN(ret != 1, "While writing 1 byte written %i bytes\n", ret); in sst_nor_write()
163 for (; actual < len - 1; actual += 2) { in sst_nor_write()
164 nor->program_opcode = SPINOR_OP_AAI_WP; in sst_nor_write()
175 nor->sst_write_second = true; in sst_nor_write()
177 nor->sst_write_second = false; in sst_nor_write()
187 /* Write out trailing byte if it exists. */ in sst_nor_write()
193 nor->program_opcode = SPINOR_OP_BP; in sst_nor_write()
197 WARN(ret != 1, "While writing 1 byte written %i bytes\n", ret); in sst_nor_write()
214 if (nor->info->mfr_flags & SST_WRITE) in sst_nor_late_init()
215 nor->mtd._write = sst_nor_write; in sst_nor_late_init()