diff options
author | Tom Rini <trini@konsulko.com> | 2024-08-08 07:59:47 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-08-08 16:15:06 -0600 |
commit | eb8e25c000d185ece0136b13cca73084eb980253 (patch) | |
tree | 189b4ae3b03fc8f65848d3828eb47f38d33f4626 /disk/part.c | |
parent | b7d5ce05b1b52136af09cf34541c6a91079a4b86 (diff) | |
parent | 855f9b6241407d19f01d4245456be428b5d88f52 (diff) |
Merge tag 'u-boot-nand-20240808' of https://source.denx.de/u-boot/custodians/u-boot-nand-flash
This series adds support for the UBI block device, which allows to read/write
data block by block. The series was tested by Alexey Romanov on SPI NAND.
The patches pass the pipeline CI:
https://source.denx.de/u-boot/custodians/u-boot-nand-flash/-/pipelines/21933
Diffstat (limited to 'disk/part.c')
-rw-r--r-- | disk/part.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/disk/part.c b/disk/part.c index bc932526f90..706d77b3194 100644 --- a/disk/part.c +++ b/disk/part.c @@ -285,6 +285,13 @@ void part_init(struct blk_desc *desc) blkcache_invalidate(desc->uclass_id, desc->devnum); + if (desc->part_type != PART_TYPE_UNKNOWN) { + for (entry = drv; entry != drv + n_ents; entry++) { + if (entry->part_type == desc->part_type && !entry->test(desc)) + return; + } + } + desc->part_type = PART_TYPE_UNKNOWN; for (entry = drv; entry != drv + n_ents; entry++) { int ret; @@ -304,7 +311,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 */ |