]> asedeno.scripts.mit.edu Git - linux.git/commit
mtd: spi-nor: Add a ->setup() method
authorTudor Ambarus <tudor.ambarus@microchip.com>
Sun, 25 Aug 2019 19:48:36 +0000 (22:48 +0300)
committerTudor Ambarus <tudor.ambarus@microchip.com>
Wed, 28 Aug 2019 09:40:29 +0000 (12:40 +0300)
commit2d7ff858e5f683393f32b07e64e565877a2e4bcb
treee91f7536a04c2034a0266a4d926f7dddd4d808ee
parent36499596280359d34a0663afe0abbf34d80862e8
mtd: spi-nor: Add a ->setup() method

nor->params.setup() configures the SPI NOR memory. Useful for SPI NOR
flashes that have peculiarities to the SPI NOR standard, e.g.
different opcodes, specific address calculation, page size, etc.
Right now the only user will be the S3AN chips, but other
manufacturers can implement it if needed.

Move spi_nor_setup() related code in order to avoid a forward
declaration to spi_nor_default_setup().

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Vignesh Raghavendra <vigneshr@ti.com>
drivers/mtd/spi-nor/spi-nor.c
include/linux/mtd/spi-nor.h