mtd: Implement MTD UCLASS (use SPINOR)
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest5 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | mtd: spi: Drop redundent SPI flash driverarch/ drivers/ include/ | +28 | 1 reply | |
| 2/5 | mtd: Add dm-mtd core opsdrivers/ include/ | +79 | 0 replies | |
| 3/5 | mtd: Add SPL_DM_MTD optiondrivers/ drivers/ | +9 | 0 replies | |
| 4/5 | mtd: Build mtd-uclass as objdrivers/ | +3 | 0 replies | |
| 5/5 | mtd: spi: Switch to MTD uclass (absolute UCLASS_SPI_FLASH)arch/ arch/ arch/ +10 more | +71 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/5] mtd: Implement MTD UCLASS (use SPINOR)
This was few years backlog work of mine, and it's been blocked to various reasons of having a priority to sync Linux MTD spinor code and most of the community developers are interested in feature-based Linux MTD sync/copy than full functional MTD driver model.
As years passing on to the driver model support the actual migration still seems a myth. So, let us not wait for too long to implement the basic driver model structure to MTD.
So, this series implement the MTD driver model in a fully functional way with all possible dm_mtd ops and necessary API to use SPINOR.
absolute spinor flow:sf.c => sf uclass => sf driver => spi-nor-core
- flash operations via dm_spi_flash_ops
updated spinor flow:sf.c => mtd uclass => mtd driver => spi-nor-core
- flash operations via mtd_ops (dm variant)
Future work:
- cleanup of spi_flash with spinor
- renaming of CONFIG option changes
- implement common mtd probe
- implement mtd flash interface types so that the respective ? commands like sf, mtd can make use of dm-mtd in the proper way.
Tested on real target with SPINOR test, and Boot.
Repo available at:
https://gitlab.denx.de/u-boot/custodians/u-boot-spi/-/tree/mtd
Any inputs?
Jagan.
Jagan Teki (5):
mtd: spi: Drop redundent SPI flash driver
mtd: Add dm-mtd core ops
mtd: Add SPL_DM_MTD option
mtd: Build mtd-uclass as obj
mtd: spi: Switch to MTD uclass (absolute UCLASS_SPI_FLASH)
arch/arm/mach-rockchip/spl-boot-order.c | 4 +- arch/x86/cpu/apollolake/spl.c | 68 +----------- arch/x86/lib/fsp2/fsp_init.c | 2 +- arch/x86/lib/fsp2/fsp_support.c | 7 +- arch/x86/lib/mrccache.c | 8 +- board/atmel/common/mac-spi-nor.c | 4 +- drivers/mtd/Kconfig | 8 ++ drivers/mtd/Makefile | 4 +- drivers/mtd/mtd-uclass.c | 38 +++++++ drivers/mtd/spi/Kconfig | 2 + drivers/mtd/spi/sandbox.c | 2 +- drivers/mtd/spi/sf-uclass.c | 135 ++++++++++-------------- drivers/mtd/spi/sf_dataflash.c | 25 +++-- include/dm/uclass-id.h | 1 - include/mtd.h | 41 +++++++ include/spi_flash.h | 65 +----------- test/dm/sf.c | 12 +-- 17 files changed, 189 insertions(+), 237 deletions(-)
Signature · 1 line
2.25.1