diff options
author | Pratyush Yadav <p.yadav@ti.com> | 2021-06-26 00:47:14 +0530 |
---|---|---|
committer | Jagan Teki <jagan@amarulasolutions.com> | 2021-06-28 11:59:35 +0530 |
commit | 71025f013ccb2da5a39e60cec319f1fdef031d3d (patch) | |
tree | dbbb26b9ebb0a7f1184344b6cd6ddefd827b9929 /drivers/mtd/spi/Kconfig | |
parent | 8702188ce5479729c81863680fb8ac7fffbd6b6a (diff) | |
download | u-boot-71025f013ccb2da5a39e60cec319f1fdef031d3d.zip u-boot-71025f013ccb2da5a39e60cec319f1fdef031d3d.tar.gz u-boot-71025f013ccb2da5a39e60cec319f1fdef031d3d.tar.bz2 |
mtd: spi-nor-core: Rework hwcaps selection
The spi-mem layer provides a spi_mem_supports_op() function to check
whether a specific operation is supported by the controller or not.
This is much more accurate than the hwcaps selection logic based on
SPI_{RX,TX}_ flags.
Rework the hwcaps selection logic to use spi_mem_supports_op().
To make sure the build doesn't break for boards not using CONFIG_DM_SPI,
add a simple SPI_{RX,TX}_ based hwcaps selection logic in spi-mem-nodm
similar to spi_mem_default_supports_op(). This change is only
compile-tested.
To avoid SPL size problems on the x530 board, the old hwcaps selection
is still kept around. Leaving the code in-place was getting difficult to
read and understand, so the code is restructured to have it all in one
isolated function. As a result of this, the parameter hwcaps to
spi_nor_setup() is no longer needed. Remove it.
Based on the Linux commit c76f5089796a (mtd: spi-nor: Rework hwcaps
selection for the spi-mem case, 2019-08-06)
Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Diffstat (limited to 'drivers/mtd/spi/Kconfig')
-rw-r--r-- | drivers/mtd/spi/Kconfig | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mtd/spi/Kconfig b/drivers/mtd/spi/Kconfig index f8db8e5..a701167 100644 --- a/drivers/mtd/spi/Kconfig +++ b/drivers/mtd/spi/Kconfig @@ -88,6 +88,15 @@ config SPI_FLASH_SFDP_SUPPORT SPI NOR flashes using Serial Flash Discoverable Parameters (SFDP) tables as per JESD216 standard. +config SPI_FLASH_SMART_HWCAPS + bool "Smart hardware capability detection based on SPI MEM supports_op() hook" + default y + help + Enable support for smart hardware capability detection based on SPI + MEM supports_op() hook that lets controllers express whether they + can support a type of operation in a much more refined way compared + to using flags like SPI_RX_DUAL, SPI_TX_QUAD, etc. + config SPI_FLASH_BAR bool "SPI flash Bank/Extended address register support" help |