]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: dm: prepare rkmtd UCLASS
authorJohan Jonker <jbx6244@gmail.com>
Wed, 18 Oct 2023 14:00:40 +0000 (16:00 +0200)
committerKever Yang <kever.yang@rock-chips.com>
Tue, 24 Oct 2023 07:55:16 +0000 (15:55 +0800)
Prepare a rkmtd UCLASS in use for writing Rockchip boot blocks
in combination with existing userspace tools and rockusb command.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
disk/part.c
drivers/block/blk-uclass.c
include/dm/uclass-id.h

index 85244b09f3596375cb05d4836719ec7c016544e4..36b88205eca7475d05040be2b0924f67ddae74c2 100644 (file)
@@ -197,6 +197,7 @@ void dev_print(struct blk_desc *desc)
        case UCLASS_PVBLOCK:
        case UCLASS_HOST:
        case UCLASS_BLKMAP:
+       case UCLASS_RKMTD:
                printf ("Vendor: %s Rev: %s Prod: %s\n",
                        desc->vendor,
                        desc->revision,
@@ -330,6 +331,9 @@ static void print_part_header(const char *type, struct blk_desc *desc)
        case UCLASS_PVBLOCK:
                puts("PV BLOCK");
                break;
+       case UCLASS_RKMTD:
+               puts("RKMTD");
+               break;
        case UCLASS_VIRTIO:
                puts("VirtIO");
                break;
index f126547cc7e668a410cadc63da90a49d79ab5747..30ad5bbb002496476a17f262a2583fb141edee6d 100644 (file)
@@ -36,6 +36,7 @@ static struct {
        { UCLASS_VIRTIO, "virtio" },
        { UCLASS_PVBLOCK, "pvblock" },
        { UCLASS_BLKMAP, "blkmap" },
+       { UCLASS_RKMTD, "rkmtd" },
 };
 
 static enum uclass_id uclass_name_to_iftype(const char *uclass_idname)
index a6045f5cc8cc4c81b2ef842b4be52169f10f1678..5271e646bb16cafd0026287b47e16880dfb77a95 100644 (file)
@@ -121,6 +121,7 @@ enum uclass_id {
        UCLASS_REGULATOR,       /* Regulator device */
        UCLASS_REMOTEPROC,      /* Remote Processor device */
        UCLASS_RESET,           /* Reset controller device */
+       UCLASS_RKMTD,           /* Rockchip MTD device */
        UCLASS_RNG,             /* Random Number Generator */
        UCLASS_RTC,             /* Real time clock device */
        UCLASS_SCMI_AGENT,      /* Interface with an SCMI server */