Introduce mtdblock device
Subsystems (3)
v5 cover Introduce mtdblock device
Hello!
This series adds support for the mtdblock device, which allows to read/write data block by block. For example, it can now be used for BCB or Android AB command:
$ bcb load mtd 0 part_name
Tested only on SPI NAND, so bind is made only for
SPI NAND drivers.
---
Changes V1 -> V2 [1]:
- Drop patch [2].
- Add warning if bind NAND mtdblock device.
- Move documentation of mtdblock implementation from commit message to the source code.
- Remove __maybe_unused from mtd partition functions description.
- Use blk_enabled() instead of #ifdefs.
Changes V2 -> V3 [2]:
- Rebased over [3].
- Rename mtd_bread/bwrite -> mtd_blk_read/write.
- Fix GPL-2.0 license short name definiton in headers.
- Add empty line after MTD_ENTRY_NUMBERS define.
Changes V3 -> V4 [4]:
- Fix build warnings: use LBAF printf format string for lbaint_t types.
Changes V4 -> V5 [5]:
- Rebased over u-boot/master.
- Fix build errors and warnings if CONFIG_BLK isn't enabled.
- Fix failed tests in cases is mtdblock device isn't binded.
Links:
- [1] https://lore.kernel.org/all/[email protected]/
- [2] https://lore.kernel.org/all/[email protected]/
- [3] https://lore.kernel.org/u-boot/[email protected]/T/#u
- [4] https://lore.kernel.org/all/[email protected]/
- [5] https://lore.kernel.org/all/[email protected]/
Alexey Romanov (3):
disk: support MTD partitions
drivers: introduce mtdblock abstraction
spinand: bind mtdblock
disk/part.c | 3 +- drivers/block/blk-uclass.c | 1 + drivers/mtd/Kconfig | 1 + drivers/mtd/Makefile | 1 + drivers/mtd/mtdblock.c | 227 ++++++++++++++++++++++++++++++++++++ drivers/mtd/mtdpart.c | 76 ++++++++++++ drivers/mtd/nand/spi/core.c | 20 ++++ include/linux/mtd/mtd.h | 21 ++++ include/part.h | 3 + 9 files changed, 352 insertions(+), 1 deletion(-) create mode 100644 drivers/mtd/mtdblock.c
Signature · 1 line
2.34.1
PATCH v5 1/3 disk: support MTD partitions
Add new MTD partition driver, which can be useful with mtdblock driver combination.
--- disk/part.c | 3 +- drivers/mtd/Kconfig | 1 + drivers/mtd/mtdpart.c | 76 +++++++++++++++++++++++++++++++++++++++++++ include/part.h | 3 ++ 4 files changed, 82 insertions(+), 1 deletion(-)
disk/part.c +2 -1
@@ -305,7 +305,8 @@ static void print_part_header(const char *type, struct blk_desc *desc)CONFIG_IS_ENABLED (DOS_PARTITION ) || \CONFIG_IS_ENABLED (ISO_PARTITION ) || \CONFIG_IS_ENABLED (AMIGA_PARTITION ) || \ - CONFIG_IS_ENABLED(EFI_PARTITION) +CONFIG_IS_ENABLED (EFI_PARTITION ) || \ + CONFIG_IS_ENABLED(MTD_PARTITIONS)printf ("\nPartition Map for %s device %d -- Partition Type: %s\n\n" ,uclass_get_name (desc->uclass_id), desc->devnum, type);#endif /* any CONFIG_..._PARTITION */
drivers/mtd/Kconfig +1 -0
@@ -2,6 +2,7 @@ menu "MTD Support" config MTD_PARTITIONS bool + select PARTITIONS config MTD bool "Enable MTD layer"
drivers/mtd/mtdpart.c +76 -0
85 lines not on this page · raw message
include/part.h +3 -0
@@ -30,12 +30,15 @@ struct block_drvr {#define PART_TYPE_ISO 0x03#define PART_TYPE_AMIGA 0x04#define PART_TYPE_EFI 0x05 +#define PART_TYPE_MTD 0x06/* maximum number of partition entries supported by search */ #define DOS_ENTRY_NUMBERS 8#define ISO_ENTRY_NUMBERS 64#define MAC_ENTRY_NUMBERS 64#define AMIGA_ENTRY_NUMBERS 8 +#define MTD_ENTRY_NUMBERS 64 +/* * Type string for U-Boot bootable partitions */
Signature · 1 line
2.34.1
PATCH v5 2/3 drivers: introduce mtdblock abstraction
In reply to Alexey RomanovMTD block - abstraction over MTD subsystem, allowing to read and write in blocks using BLK UCLASS.
--- drivers/block/blk-uclass.c | 1 + drivers/mtd/Makefile | 1 + drivers/mtd/mtdblock.c | 227 +++++++++++++++++++++++++++++++++++++ include/linux/mtd/mtd.h | 21 ++++ 4 files changed, 250 insertions(+) create mode 100644 drivers/mtd/mtdblock.c
drivers/block/blk-uclass.c +1 -0
@@ -37,6 +37,7 @@ static struct { { UCLASS_PVBLOCK, "pvblock" }, { UCLASS_BLKMAP, "blkmap" }, { UCLASS_RKMTD, "rkmtd" }, + { UCLASS_MTD, "mtd" }, };static enum uclass_id uclass_name_to_iftype (const char *uclass_idname)
drivers/mtd/Makefile +1 -0
@@ -26,6 +26,7 @@ obj-y += onenand/ obj-y += spi/ obj-$(CONFIG_MTD_UBI) += ubi/ obj-$(CONFIG_NVMXIP) += nvmxip/ +obj-$(CONFIG_BLK) += mtdblock.o #SPL/TPL build else
drivers/mtd/mtdblock.c new file +227 -0
227 lines not on this page · raw message
include/linux/mtd/mtd.h +21 -0
@@ -26,6 +26,9 @@#include <dm/device.h> #endif #include <dm/ofnode.h> +#if IS_ENABLED (CONFIG_BLK ) +#include <blk.h> +#endif #define MAX_MTD_DEVICES 32#endif
@@ -412,6 +415,24 @@ int mtd_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen,int mtd_panic_write (struct mtd_info *mtd,loff_t to,size_t len,size_t *retlen,const u_char *buf); +#if CONFIG_IS_ENABLED (BLK ) +static inline struct mtd_info *blk_desc_to_mtd (struct blk_desc *bdesc) +{ +void *priv =dev_get_priv (bdesc->bdev); +if (!priv) +return NULL ; + +return *((struct mtd_info **)priv); +} + +int mtd_bind (struct udevice *dev,struct mtd_info **mtd); +#else +static inline struct mtd_info *blk_desc_to_mtd (struct blk_desc *bdesc) +{ +return NULL ; +} +#endif +int mtd_read_oob (struct mtd_info *mtd,loff_t from,struct mtd_oob_ops *ops);int mtd_write_oob (struct mtd_info *mtd,loff_t to,struct mtd_oob_ops *ops);
Signature · 1 line
2.34.1
PATCH v5 3/3 spinand: bind mtdblock
In reply to Alexey RomanovBind SPI-NAND driver to MTD block driver.
--- drivers/mtd/nand/spi/core.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
drivers/mtd/nand/spi/core.c +20 -0
@@ -34,6 +34,10 @@#include <linux/printk.h> #endif +struct spinand_plat { +struct mtd_info *mtd; +}; +/* SPI NAND index visible in MTD names */ static int spi_nand_idx;
@@ -1173,12 +1177,24 @@ static void spinand_cleanup(struct spinand_device *spinand)kfree (spinand->scratchbuf); } +static int spinand_bind (struct udevice *dev) +{ +if (blk_enabled ()) { +struct spinand_plat *plat =dev_get_plat (dev); + +return mtd_bind (dev, &plat->mtd); + } + +return 0 ; +} +static int spinand_probe (struct udevice *dev) {struct spinand_device *spinand =dev_get_priv (dev);struct spi_slave *slave =dev_get_parent_priv (dev);struct mtd_info *mtd =dev_get_uclass_priv (dev);struct nand_device *nand =spinand_to_nand (spinand); +struct spinand_plat *plat =dev_get_plat (dev);int ret;#ifndef __UBOOT__
@@ -1218,6 +1234,8 @@ static int spinand_probe(struct udevice *dev)if (ret) goto err_spinand_cleanup; + plat->mtd = mtd; +return 0 ; err_spinand_cleanup:
@@ -1287,4 +1305,6 @@ U_BOOT_DRIVER(spinand) = { .of_match = spinand_ids, .priv_auto = sizeof(struct spinand_device), .probe = spinand_probe, + .bind = spinand_bind, + .plat_auto = sizeof(struct spinand_plat), };
Signature · 1 line
2.34.1
Hi Alexey,
Quoted 74 lines · On Mon, Jun 3, 2024, 09:57 Alexey Romanov <[email protected]> wrote:
Hello!
This series adds support for the mtdblock device, which allows to read/write data block by block. For example, it can now be used for BCB or Android AB command:
$ bcb load mtd 0 part_nameTested only on SPI NAND, so bind is made only for
SPI NAND drivers.---
Changes V1 -> V2 [1]:
- Drop patch [2].
- Add warning if bind NAND mtdblock device.
- Move documentation of mtdblock implementation from commit message to the source code.
- Remove__maybe_unusedfrom mtd partition functions description.
- Useblk_enabled()instead of #ifdefs.Changes V2 -> V3 [2]:
- Rebased over [3].
- Rename mtd_bread/bwrite -> mtd_blk_read/write.
- Fix GPL-2.0 license short name definiton in headers.
- Add empty line afterMTD_ENTRY_NUMBERSdefine.Changes V3 -> V4 [4]:
- Fix build warnings: use LBAF printf format string for
lbaint_ttypes.Changes V4 -> V5 [5]:
- Rebased over u-boot/master.
- Fix build errors and warnings ifCONFIG_BLKisn't enabled.
- Fix failed tests in cases is mtdblock device isn't binded.Links:
- [1]
https://lore.kernel.org/all/[email protected]/
- [2]
https://lore.kernel.org/all/[email protected]/
- [3]
https://lore.kernel.org/u-boot/[email protected]/T/#u
- [4]
https://lore.kernel.org/all/[email protected]/
- [5]
https://lore.kernel.org/all/[email protected]/Alexey Romanov (3):
disk: support MTD partitions
drivers: introduce mtdblock abstraction
spinand: bind mtdblockdisk/part.c | 3 +- drivers/block/blk-uclass.c | 1 + drivers/mtd/Kconfig | 1 + drivers/mtd/Makefile | 1 + drivers/mtd/mtdblock.c | 227 ++++++++++++++++++++++++++++++++++++ drivers/mtd/mtdpart.c | 76 ++++++++++++ drivers/mtd/nand/spi/core.c | 20 ++++ include/linux/mtd/mtd.h | 21 ++++ include/part.h | 3 + 9 files changed, 352 insertions(+), 1 deletion(-) create mode 100644 drivers/mtd/mtdblock.c--
2.34.1
Hi Simon,
your message is empty.
Quoted 79 lines · Simon Glass
Hi Alexey,
Quoted 74 lines · On Mon, Jun 3, 2024, 09:57 Alexey Romanov <[email protected]> wrote:
Hello!
This series adds support for the mtdblock device, which allows to read/write data block by block. For example, it can now be used for BCB or Android AB command:
$ bcb load mtd 0 part_nameTested only on SPI NAND, so bind is made only for
SPI NAND drivers.---
Changes V1 -> V2 [1]:
- Drop patch [2].
- Add warning if bind NAND mtdblock device.
- Move documentation of mtdblock implementation from commit message to the source code.
- Remove__maybe_unusedfrom mtd partition functions description.
- Useblk_enabled()instead of #ifdefs.Changes V2 -> V3 [2]:
- Rebased over [3].
- Rename mtd_bread/bwrite -> mtd_blk_read/write.
- Fix GPL-2.0 license short name definiton in headers.
- Add empty line afterMTD_ENTRY_NUMBERSdefine.Changes V3 -> V4 [4]:
- Fix build warnings: use LBAF printf format string for
lbaint_ttypes.Changes V4 -> V5 [5]:
- Rebased over u-boot/master.
- Fix build errors and warnings ifCONFIG_BLKisn't enabled.
- Fix failed tests in cases is mtdblock device isn't binded.Links:
- [1]
https://lore.kernel.org/all/[email protected]/
- [2]
https://lore.kernel.org/all/[email protected]/
- [3]
https://lore.kernel.org/u-boot/[email protected]/T/#u
- [4]
https://lore.kernel.org/all/[email protected]/
- [5]
https://lore.kernel.org/all/[email protected]/Alexey Romanov (3):
disk: support MTD partitions
drivers: introduce mtdblock abstraction
spinand: bind mtdblockdisk/part.c | 3 +- drivers/block/blk-uclass.c | 1 + drivers/mtd/Kconfig | 1 + drivers/mtd/Makefile | 1 + drivers/mtd/mtdblock.c | 227 ++++++++++++++++++++++++++++++++++++ drivers/mtd/mtdpart.c | 76 ++++++++++++ drivers/mtd/nand/spi/core.c | 20 ++++ include/linux/mtd/mtd.h | 21 ++++ include/part.h | 3 + 9 files changed, 352 insertions(+), 1 deletion(-) create mode 100644 drivers/mtd/mtdblock.c--
2.34.1
Signature · 2 lines
Thank you, Alexey
Hi Alexey,
Quoted 85 lines · Alexey Romanov
Hi Simon,
your message is empty.Quoted 79 lines · Simon Glass
Hi Alexey,
Quoted 74 lines · On Mon, Jun 3, 2024, 09:57 Alexey Romanov <[email protected]> wrote:
Hello!
This series adds support for the mtdblock device, which allows to read/write data block by block. For example, it can now be used for BCB or Android AB command:
$ bcb load mtd 0 part_nameTested only on SPI NAND, so bind is made only for
SPI NAND drivers.---
Changes V1 -> V2 [1]:
- Drop patch [2].
- Add warning if bind NAND mtdblock device.
- Move documentation of mtdblock implementation from commit message to the source code.
- Remove__maybe_unusedfrom mtd partition functions description.
- Useblk_enabled()instead of #ifdefs.Changes V2 -> V3 [2]:
- Rebased over [3].
- Rename mtd_bread/bwrite -> mtd_blk_read/write.
- Fix GPL-2.0 license short name definiton in headers.
- Add empty line afterMTD_ENTRY_NUMBERSdefine.Changes V3 -> V4 [4]:
- Fix build warnings: use LBAF printf format string for
lbaint_ttypes.Changes V4 -> V5 [5]:
- Rebased over u-boot/master.
- Fix build errors and warnings ifCONFIG_BLKisn't enabled.
- Fix failed tests in cases is mtdblock device isn't binded.Links:
- [1]
https://lore.kernel.org/all/[email protected]/
- [2]
https://lore.kernel.org/all/[email protected]/
- [3]
https://lore.kernel.org/u-boot/[email protected]/T/#u
- [4]
https://lore.kernel.org/all/[email protected]/
- [5]
https://lore.kernel.org/all/[email protected]/Alexey Romanov (3):
disk: support MTD partitions
drivers: introduce mtdblock abstraction
spinand: bind mtdblockdisk/part.c | 3 +- drivers/block/blk-uclass.c | 1 + drivers/mtd/Kconfig | 1 + drivers/mtd/Makefile | 1 + drivers/mtd/mtdblock.c | 227 ++++++++++++++++++++++++++++++++++++ drivers/mtd/mtdpart.c | 76 ++++++++++++ drivers/mtd/nand/spi/core.c | 20 ++++ include/linux/mtd/mtd.h | 21 ++++ include/part.h | 3 + 9 files changed, 352 insertions(+), 1 deletion(-) create mode 100644 drivers/mtd/mtdblock.c--
2.34.1
Are you able to add a sandbox test for this code?
Regards,
Simon
Hi Alexey,
I'm still encountering errors raised by the CI:
$ tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w -E -W -e
--board ${TEST_PY_BD} ${OVERRIDE}
34Building current source for 1 boards (1 thread, 32 jobs per thread)
35 arm: + evb-ast2500
36+In file included from include/nand.h:19,
37+ from cmd/bootm.c:17:
38+include/linux/mtd/mtd.h:430:55: error: 'struct blk_desc' declared
inside parameter list will not be visible outside of this definition
or declaration [-Werror]
39+ 430 | static inline struct mtd_info *blk_desc_to_mtd(struct blk_desc *bdesc)Thanks and regards,
Dario
Quoted 94 lines · Simon Glass
Hi Alexey,
Quoted 85 lines · Alexey Romanov
Hi Simon,
your message is empty.Quoted 79 lines · Simon Glass
Hi Alexey,
Quoted 74 lines · On Mon, Jun 3, 2024, 09:57 Alexey Romanov <[email protected]> wrote:
Hello!
This series adds support for the mtdblock device, which allows to read/write data block by block. For example, it can now be used for BCB or Android AB command:
$ bcb load mtd 0 part_nameTested only on SPI NAND, so bind is made only for
SPI NAND drivers.---
Changes V1 -> V2 [1]:
- Drop patch [2].
- Add warning if bind NAND mtdblock device.
- Move documentation of mtdblock implementation from commit message to the source code.
- Remove__maybe_unusedfrom mtd partition functions description.
- Useblk_enabled()instead of #ifdefs.Changes V2 -> V3 [2]:
- Rebased over [3].
- Rename mtd_bread/bwrite -> mtd_blk_read/write.
- Fix GPL-2.0 license short name definiton in headers.
- Add empty line afterMTD_ENTRY_NUMBERSdefine.Changes V3 -> V4 [4]:
- Fix build warnings: use LBAF printf format string for
lbaint_ttypes.Changes V4 -> V5 [5]:
- Rebased over u-boot/master.
- Fix build errors and warnings ifCONFIG_BLKisn't enabled.
- Fix failed tests in cases is mtdblock device isn't binded.Links:
- [1]
https://lore.kernel.org/all/[email protected]/
- [2]
https://lore.kernel.org/all/[email protected]/
- [3]
https://lore.kernel.org/u-boot/[email protected]/T/#u
- [4]
https://lore.kernel.org/all/[email protected]/
- [5]
https://lore.kernel.org/all/[email protected]/Alexey Romanov (3):
disk: support MTD partitions
drivers: introduce mtdblock abstraction
spinand: bind mtdblockdisk/part.c | 3 +- drivers/block/blk-uclass.c | 1 + drivers/mtd/Kconfig | 1 + drivers/mtd/Makefile | 1 + drivers/mtd/mtdblock.c | 227 ++++++++++++++++++++++++++++++++++++ drivers/mtd/mtdpart.c | 76 ++++++++++++ drivers/mtd/nand/spi/core.c | 20 ++++ include/linux/mtd/mtd.h | 21 ++++ include/part.h | 3 + 9 files changed, 352 insertions(+), 1 deletion(-) create mode 100644 drivers/mtd/mtdblock.c--
2.34.1Are you able to add a sandbox test for this code?
Regards,
Simon
Signature · 17 lines
Dario Binacchi Senior Embedded Linux Developer [email protected] __________________________________ Amarula Solutions SRL Via Le Canevare 30, 31100 Treviso, Veneto, IT T. +39 042 243 5310 [email protected] www.amarulasolutions.com
Hello,
Quoted 3 lines · Dario Binacchi
Hi Alexey,
I'm still encountering errors raised by the CI:
I'm sorry. I tested my patches with GitHub + Azure Pipelines and didn't get any errors like that. I thought testing there uses buildman. I'll try to run it locally.
Quoted 132 lines
$ tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w -E -W -e --board ${TEST_PY_BD} ${OVERRIDE} 34Building current source for 1 boards (1 thread, 32 jobs per thread) 35 arm: + evb-ast2500 36+In file included from include/nand.h:19, 37+ from cmd/bootm.c:17: 38+include/linux/mtd/mtd.h:430:55: error: 'struct blk_desc' declared inside parameter list will not be visible outside of this definition or declaration [-Werror] 39+ 430 | static inline struct mtd_info *blk_desc_to_mtd(struct blk_desc *bdesc)Thanks and regards,
DarioQuoted 94 lines · Simon Glass
Hi Alexey,
Quoted 85 lines · Alexey Romanov
Hi Simon,
your message is empty.Quoted 79 lines · Simon Glass
Hi Alexey,
Quoted 74 lines · On Mon, Jun 3, 2024, 09:57 Alexey Romanov <[email protected]> wrote:
Hello!
This series adds support for the mtdblock device, which allows to read/write data block by block. For example, it can now be used for BCB or Android AB command:
$ bcb load mtd 0 part_nameTested only on SPI NAND, so bind is made only for
SPI NAND drivers.---
Changes V1 -> V2 [1]:
- Drop patch [2].
- Add warning if bind NAND mtdblock device.
- Move documentation of mtdblock implementation from commit message to the source code.
- Remove__maybe_unusedfrom mtd partition functions description.
- Useblk_enabled()instead of #ifdefs.Changes V2 -> V3 [2]:
- Rebased over [3].
- Rename mtd_bread/bwrite -> mtd_blk_read/write.
- Fix GPL-2.0 license short name definiton in headers.
- Add empty line afterMTD_ENTRY_NUMBERSdefine.Changes V3 -> V4 [4]:
- Fix build warnings: use LBAF printf format string for
lbaint_ttypes.Changes V4 -> V5 [5]:
- Rebased over u-boot/master.
- Fix build errors and warnings ifCONFIG_BLKisn't enabled.
- Fix failed tests in cases is mtdblock device isn't binded.Links:
- [1]
https://lore.kernel.org/all/[email protected]/
- [2]
https://lore.kernel.org/all/[email protected]/
- [3]
https://lore.kernel.org/u-boot/[email protected]/T/#u
- [4]
https://lore.kernel.org/all/[email protected]/
- [5]
https://lore.kernel.org/all/[email protected]/Alexey Romanov (3):
disk: support MTD partitions
drivers: introduce mtdblock abstraction
spinand: bind mtdblockdisk/part.c | 3 +- drivers/block/blk-uclass.c | 1 + drivers/mtd/Kconfig | 1 + drivers/mtd/Makefile | 1 + drivers/mtd/mtdblock.c | 227 ++++++++++++++++++++++++++++++++++++ drivers/mtd/mtdpart.c | 76 ++++++++++++ drivers/mtd/nand/spi/core.c | 20 ++++ include/linux/mtd/mtd.h | 21 ++++ include/part.h | 3 + 9 files changed, 352 insertions(+), 1 deletion(-) create mode 100644 drivers/mtd/mtdblock.c--
2.34.1Are you able to add a sandbox test for this code?
Regards,
SimonSignature · 17 lines
Dario Binacchi Senior Embedded Linux Developer [email protected] __________________________________ Amarula Solutions SRL Via Le Canevare 30, 31100 Treviso, Veneto, IT T. +39 042 243 5310 [email protected] www.amarulasolutions.com
Signature · 2 lines
Thank you, Alexey
Hi Simon,
Quoted 83 lines · Simon Glass
Hi Alexey,
Quoted 80 lines · Alexey Romanov
Hi Simon,
your message is empty.Quoted 75 lines · Simon Glass
Hi Alexey,
Quoted 70 lines · On Mon, Jun 3, 2024, 09:57 Alexey Romanov <[email protected]> wrote:
Hello!
This series adds support for the mtdblock device, which allows to read/write data block by block. For example, it can now be used for BCB or Android AB command:
$ bcb load mtd 0 part_nameTested only on SPI NAND, so bind is made only for
SPI NAND drivers.---
Changes V1 -> V2 [1]:
- Drop patch [2].
- Add warning if bind NAND mtdblock device.
- Move documentation of mtdblock implementation from commit message to the source code.
- Remove__maybe_unusedfrom mtd partition functions description.
- Useblk_enabled()instead of #ifdefs.Changes V2 -> V3 [2]:
- Rebased over [3].
- Rename mtd_bread/bwrite -> mtd_blk_read/write.
- Fix GPL-2.0 license short name definiton in headers.
- Add empty line afterMTD_ENTRY_NUMBERSdefine.Changes V3 -> V4 [4]:
- Fix build warnings: use LBAF printf format string for
lbaint_ttypes.Changes V4 -> V5 [5]:
- Rebased over u-boot/master.
- Fix build errors and warnings ifCONFIG_BLKisn't enabled.
- Fix failed tests in cases is mtdblock device isn't binded.Links:
- [1]
https://lore.kernel.org/all/[email protected]/
- [2]
https://lore.kernel.org/all/[email protected]/
- [3]
https://lore.kernel.org/u-boot/[email protected]/T/#u
- [4]
https://lore.kernel.org/all/[email protected]/
- [5]
https://lore.kernel.org/all/[email protected]/Alexey Romanov (3):
disk: support MTD partitions
drivers: introduce mtdblock abstraction
spinand: bind mtdblockdisk/part.c | 3 +- drivers/block/blk-uclass.c | 1 + drivers/mtd/Kconfig | 1 + drivers/mtd/Makefile | 1 + drivers/mtd/mtdblock.c | 227 ++++++++++++++++++++++++++++++++++++ drivers/mtd/mtdpart.c | 76 ++++++++++++ drivers/mtd/nand/spi/core.c | 20 ++++ include/linux/mtd/mtd.h | 21 ++++ include/part.h | 3 + 9 files changed, 352 insertions(+), 1 deletion(-) create mode 100644 drivers/mtd/mtdblock.c
Quoted 7 lines
Quoted 5 lines
Quoted 4 lines
Quoted 4 lines
--
2.34.1Are you able to add a sandbox test for this code?
I think no. mtd/ubi block devices at the moment binds to real SPI NAND devices, which makes it impossible and useless to test it with sandbox.
Quoted 3 lines
Regards,
Simon
Signature · 2 lines
Thank you, Alexey