OSDN Git Service

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)
commitbe192209d5a33c912caa4a05d6f92b89328d8db8
treea6578a57b53d223cf3b256c9b6fc3a2bea9b7a5e
parent8c8f97573eb3843ddd2d8cb95c80ce0243b17d7e
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