Lines Matching refs:flash

39 	struct m25p *flash = nor->priv;  in m25p80_read_reg()  local
40 struct spi_device *spi = flash->spi; in m25p80_read_reg()
66 struct m25p *flash = nor->priv; in m25p80_write_reg() local
67 struct spi_device *spi = flash->spi; in m25p80_write_reg()
69 flash->command[0] = opcode; in m25p80_write_reg()
71 memcpy(&flash->command[1], buf, len); in m25p80_write_reg()
73 return spi_write(spi, flash->command, len + 1); in m25p80_write_reg()
79 struct m25p *flash = nor->priv; in m25p80_write() local
80 struct spi_device *spi = flash->spi; in m25p80_write()
90 flash->command[0] = nor->program_opcode; in m25p80_write()
91 m25p_addr2cmd(nor, to, flash->command); in m25p80_write()
93 t[0].tx_buf = flash->command; in m25p80_write()
125 struct m25p *flash = nor->priv; in m25p80_read() local
126 struct spi_device *spi = flash->spi; in m25p80_read()
137 flash->command[0] = nor->read_opcode; in m25p80_read()
138 m25p_addr2cmd(nor, from, flash->command); in m25p80_read()
140 t[0].tx_buf = flash->command; in m25p80_read()
157 struct m25p *flash = nor->priv; in m25p80_erase() local
160 flash->spi_nor.mtd.erasesize / 1024, (u32)offset); in m25p80_erase()
163 flash->command[0] = nor->erase_opcode; in m25p80_erase()
164 m25p_addr2cmd(nor, offset, flash->command); in m25p80_erase()
166 spi_write(flash->spi, flash->command, m25p_cmdsz(nor)); in m25p80_erase()
180 struct m25p *flash; in m25p_probe() local
188 flash = devm_kzalloc(&spi->dev, sizeof(*flash), GFP_KERNEL); in m25p_probe()
189 if (!flash) in m25p_probe()
192 nor = &flash->spi_nor; in m25p_probe()
203 nor->priv = flash; in m25p_probe()
205 spi_set_drvdata(spi, flash); in m25p_probe()
206 flash->spi = spi; in m25p_probe()
240 struct m25p *flash = spi_get_drvdata(spi); in m25p_remove() local
243 return mtd_device_unregister(&flash->spi_nor.mtd); in m25p_remove()