]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: spi-nor: Add capability to disable flash quad mode
authorYicong Yang <yangyicong@hisilicon.com>
Mon, 6 Jul 2020 09:22:35 +0000 (17:22 +0800)
committerTudor Ambarus <tudor.ambarus@microchip.com>
Mon, 13 Jul 2020 09:09:43 +0000 (12:09 +0300)
commitf16ff8f509890501d5ae87c1759a3eebe3e566bd
treea6578a57b53d223cf3b256c9b6fc3a2bea9b7a5e
parentc71e0e7392e889379a7d24cde0dea61201c82a5c
mtd: spi-nor: Add capability to disable flash quad mode

Previous we didn't provide a way to disable the flash's quad mode.
Which means we cannot do some cleanup works when to remove or
poweroff the flash, like what set 4-byte address mode does in
spi_nor_restore().

Add the capability to disable the flash quad mode, by introducing
an enable flag in the flash parameters quad_enable() hooks and
related functions.

Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Pratyush Yadav <p.yadav@ti.com>
Link: https://lore.kernel.org/r/1594027356-19088-2-git-send-email-yangyicong@hisilicon.com
drivers/mtd/spi-nor/core.c
drivers/mtd/spi-nor/core.h