
Hi Jagan,
-----Original Message----- From: Jagan Teki jagan@amarulasolutions.com Sent: Friday, July 1, 2022 8:05 PM To: Chin-Ting Kuo chin-ting_kuo@aspeedtech.com Subject: Re: [v4 07/12] spi-mem: Add dirmap API from Linux
On Tue, May 24, 2022 at 11:28 AM Chin-Ting Kuo chin-ting_kuo@aspeedtech.com wrote:
This adds the dirmap API originally introduced in Linux commit aa167f3 ("spi: spi-mem: Add a new API to support direct mapping"). This also includes several follow-up patches and fixes.
Changes from Linux include:
- Added Kconfig option
- Changed struct device to struct udevice
- Changed struct spi_mem to struct spi_slave
This patch is obtained from the following patch https://patchwork.ozlabs.org/project/uboot/patch/20210205043924.149504 -3-seanga2@gmail.com/
Signed-off-by: Chin-Ting Kuo chin-ting_kuo@aspeedtech.com Signed-off-by: Sean Anderson seanga2@gmail.com Acked-by: Pratyush Yadav p.yadav@ti.com
v2: Remove "#if CONFIG_SPI_DIRMAP" compile wrapper. v3: Fix a grammatical error in spi-mem.h.
drivers/spi/Kconfig | 10 ++ drivers/spi/spi-mem.c | 268
++++++++++++++++++++++++++++++++++++++++++
include/spi-mem.h | 79 +++++++++++++ 3 files changed, 357 insertions(+)
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index a616294910..297253714a 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -40,6 +40,16 @@ config SPI_MEM This extension is meant to simplify interaction with SPI
memories
by providing an high-level interface to send memory-like
commands.
+config SPI_DIRMAP
Look like the following code is not part of this if construct, we need that to build only when SPI_DIRMAP is defined otherwise it footprint increase for non-DIRMAPs. Also please take care of unnecessary code while copying from Linux and add SHA1 in the commit message.
Okay and I will take care the footprint for non-DITMAPs.
Chin-Ting
Jagan.