]> git.dujemihanovic.xyz Git - u-boot.git/commit
mtd: spi-nor-core: Add a ->setup() hook
authorPratyush Yadav <p.yadav@ti.com>
Fri, 25 Jun 2021 19:17:11 +0000 (00:47 +0530)
committerJagan Teki <jagan@amarulasolutions.com>
Mon, 28 Jun 2021 06:28:10 +0000 (11:58 +0530)
commit18b0de0f3be223cd2f468c03b5ea02e5f6bc6d82
treed1633442085eb56e287a9948c880104f8a942b4c
parent1af0334ab4effb0bd17c3b0cf1fc1b65ff4f3ef8
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>
drivers/mtd/spi/spi-nor-core.c
drivers/mtd/spi/spi-nor-tiny.c
include/linux/mtd/spi-nor.h