These can be used to fill information needed to configure master controller registers. Signed-off-by: Sourav Poddar <sourav.poddar@xxxxxx> --- drivers/mtd/devices/m25p80.c | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index 7dc2c14..6a27677 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c @@ -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. */ -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html