diff options
author | Pratyush Yadav <p.yadav@ti.com> | 2021-06-25 22:17:11 +0300 |
---|---|---|
committer | Jagan Teki <jagan@amarulasolutions.com> | 2021-06-28 09:28:10 +0300 |
commit | 18b0de0f3be223cd2f468c03b5ea02e5f6bc6d82 (patch) | |
tree | d1633442085eb56e287a9948c880104f8a942b4c /drivers/mtd/spi/spi-nor-tiny.c | |
parent | 1af0334ab4effb0bd17c3b0cf1fc1b65ff4f3ef8 (diff) | |
download | u-boot-18b0de0f3be223cd2f468c03b5ea02e5f6bc6d82.tar.xz |
mtd: spi-nor-core: Add a ->setup() hook
nor->setup() can be used by flashes to configure settings in case they
have any peculiarities that can't be easily expressed by the generic
spi-nor framework. This includes things like different opcodes, dummy
cycles, page size, uniform/non-uniform sector sizes, etc.
Move related declarations to avoid forward declarations.
Inspired by the Linux kernel's setup() hook.
Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
Diffstat (limited to 'drivers/mtd/spi/spi-nor-tiny.c')
-rw-r--r-- | drivers/mtd/spi/spi-nor-tiny.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/drivers/mtd/spi/spi-nor-tiny.c b/drivers/mtd/spi/spi-nor-tiny.c index b0aa97d324..70061f1a61 100644 --- a/drivers/mtd/spi/spi-nor-tiny.c +++ b/drivers/mtd/spi/spi-nor-tiny.c @@ -555,28 +555,6 @@ static int spansion_read_cr_quad_enable(struct spi_nor *nor) } #endif /* CONFIG_SPI_FLASH_SPANSION */ -struct spi_nor_read_command { - u8 num_mode_clocks; - u8 num_wait_states; - u8 opcode; - enum spi_nor_protocol proto; -}; - -enum spi_nor_read_command_index { - SNOR_CMD_READ, - SNOR_CMD_READ_FAST, - - /* Quad SPI */ - SNOR_CMD_READ_1_1_4, - - SNOR_CMD_READ_MAX -}; - -struct spi_nor_flash_parameter { - struct spi_nor_hwcaps hwcaps; - struct spi_nor_read_command reads[SNOR_CMD_READ_MAX]; -}; - static void spi_nor_set_read_settings(struct spi_nor_read_command *read, u8 num_mode_clocks, |