Lines Matching +full:64 +full:- +full:byte
1 // SPDX-License-Identifier: GPL-2.0
7 #include <linux/mtd/spi-nor.h>
15 return -EOPNOTSUPP; in sst26vf_lock()
23 if (ofs != 0 || len != nor->params->size) in sst26vf_unlock()
24 return -EINVAL; in sst26vf_unlock()
26 ret = spi_nor_read_cr(nor, nor->bouncebuf); in sst26vf_unlock()
30 if (!(nor->bouncebuf[0] & SST26VF_CR_BPNV)) { in sst26vf_unlock()
31 dev_dbg(nor->dev, "Any block has been permanently locked\n"); in sst26vf_unlock()
32 return -EINVAL; in sst26vf_unlock()
40 return -EOPNOTSUPP; in sst26vf_is_locked()
51 nor->params->locking_ops = &sst26vf_locking_ops; in sst26vf_default_init()
59 /* SST -- large erase sizes are "overlays", "sectors" are 4K */
60 { "sst25vf040b", INFO(0xbf258d, 0, 64 * 1024, 8,
62 { "sst25vf080b", INFO(0xbf258e, 0, 64 * 1024, 16,
64 { "sst25vf016b", INFO(0xbf2541, 0, 64 * 1024, 32,
66 { "sst25vf032b", INFO(0xbf254a, 0, 64 * 1024, 64,
68 { "sst25vf064c", INFO(0xbf254b, 0, 64 * 1024, 128,
71 { "sst25wf512", INFO(0xbf2501, 0, 64 * 1024, 1,
73 { "sst25wf010", INFO(0xbf2502, 0, 64 * 1024, 2,
75 { "sst25wf020", INFO(0xbf2503, 0, 64 * 1024, 4,
77 { "sst25wf020a", INFO(0x621612, 0, 64 * 1024, 4, SECT_4K | SPI_NOR_HAS_LOCK) },
78 { "sst25wf040b", INFO(0x621613, 0, 64 * 1024, 8, SECT_4K | SPI_NOR_HAS_LOCK) },
79 { "sst25wf040", INFO(0xbf2504, 0, 64 * 1024, 8,
81 { "sst25wf080", INFO(0xbf2505, 0, 64 * 1024, 16,
83 { "sst26wf016b", INFO(0xbf2651, 0, 64 * 1024, 32,
86 { "sst26vf016b", INFO(0xbf2641, 0, 64 * 1024, 32,
88 { "sst26vf064b", INFO(0xbf2643, 0, 64 * 1024, 128,
101 dev_dbg(nor->dev, "to 0x%08x, len %zd\n", (u32)to, len); in sst_write()
111 nor->sst_write_second = false; in sst_write()
115 nor->program_opcode = SPINOR_OP_BP; in sst_write()
117 /* write one byte. */ in sst_write()
121 WARN(ret != 1, "While writing 1 byte written %i bytes\n", ret); in sst_write()
131 for (; actual < len - 1; actual += 2) { in sst_write()
132 nor->program_opcode = SPINOR_OP_AAI_WP; in sst_write()
143 nor->sst_write_second = true; in sst_write()
145 nor->sst_write_second = false; in sst_write()
155 /* Write out trailing byte if it exists. */ in sst_write()
161 nor->program_opcode = SPINOR_OP_BP; in sst_write()
165 WARN(ret != 1, "While writing 1 byte written %i bytes\n", ret); in sst_write()
182 if (nor->info->flags & SST_WRITE) in sst_post_sfdp_fixups()
183 nor->mtd._write = sst_write; in sst_post_sfdp_fixups()