]> git.dujemihanovic.xyz Git - u-boot.git/commit
mtd: spi-nor: Respect flash's hwcaps in spi_nor_adjust_hwcaps()
authorBin Meng <bmeng.cn@gmail.com>
Fri, 30 Jul 2021 07:20:16 +0000 (15:20 +0800)
committerJagan Teki <jagan@amarulasolutions.com>
Tue, 3 Aug 2021 06:23:16 +0000 (11:53 +0530)
commit87e7219f9c6a30709ddf97b602983386f1b4cccf
tree59dee3a07f5a988e9c64e104b11e202fefcffbe7
parentcb42425aa1086f2a732dd2e0614acc0c993c869d
mtd: spi-nor: Respect flash's hwcaps in spi_nor_adjust_hwcaps()

The smart spi_nor_adjust_hwcaps() does not respect the SPI flash's
hwcaps, and only looks to the controller on what can be supported.

The flash's hwcaps needs to be AND'ed before checking.

Fixes: 71025f013ccb ("mtd: spi-nor-core: Rework hwcaps selection")
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Pratyush Yadav <p.yadav@ti.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
drivers/mtd/spi/spi-nor-core.c