@@ -490,6 +490,23 @@ static inline int m25p80_dummy_cycles_read(struct m25p *flash)
}
/*
+ * This API can be used to transfer flash information to
+ * SPI controller which needs some of its registers to get
+ * configured on flash.
+ */
+static void m25p80_fill_flash_information(struct m25p *flash)
+{
+ struct spi_master *master = flash->spi->master;
+ u8 info[4];
+ info[0] = flash->read_opcode;
+ info[1] = flash->program_opcode;
+ info[2] = flash->addr_width;
+ info[3] = m25p80_dummy_cycles_read(flash);
+
+ master->configure_from_slave(flash->spi, info);
+}
+
+/*
* Read an address range from the flash chip. The address range
* may be any size provided it is within the physical boundaries.
*/
These can be used to fill information needed to configure master controller registers. Signed-off-by: Sourav Poddar <sourav.poddar@ti.com> --- drivers/mtd/devices/m25p80.c | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-)