]> git.dujemihanovic.xyz Git - u-boot.git/commit
mtd: spi-nor-core: Implement spi_nor_read_sfdp_dma_unsafe() for sfdp parse
authorVaishnav Achath <vaishnav.a@ti.com>
Fri, 3 Jun 2022 07:01:32 +0000 (12:31 +0530)
committerJagan Teki <jagan@edgeble.ai>
Thu, 14 Dec 2023 18:17:13 +0000 (23:47 +0530)
commit961c3e9f124c97350c470f65239e0d85aacf413b
tree128e7ad5f4f6f3e4261a916cc5b8809d73d2c9bd
parentb2906f5b61b988764807a24c1a3a41547e984096
mtd: spi-nor-core: Implement spi_nor_read_sfdp_dma_unsafe() for sfdp parse

During SFDP header parse and BFPT parse, structures in stack are used
to perform spi_nor_read_sfdp() which expects a dma-safe buffer.

This commit introduces spi_nor_read_sfdp_dma_unsafe() to wrap
spi_nor_read_sfdp() using a kmalloc'ed bounce buffer which is
the same implementation in Linux (drivers/mtd/spi-nor/sfdp.c).

Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com>
Reviewed-by: Pratyush Yadav <p.yadav@ti.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
drivers/mtd/spi/spi-nor-core.c