]> git.sur5r.net Git - u-boot/commitdiff
dm: blk: part: Add UCLASS_NVME and IF_TYPE_NVME
authorZhikang Zhang <zhikang.zhang@nxp.com>
Thu, 3 Aug 2017 09:30:56 +0000 (02:30 -0700)
committerTom Rini <trini@konsulko.com>
Sun, 13 Aug 2017 19:17:30 +0000 (15:17 -0400)
This adds a new uclass id and block interface type for NVMe.

Signed-off-by: Zhikang Zhang <zhikang.zhang@nxp.com>
Signed-off-by: Wenbin Song <wenbin.song@nxp.com>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Jon Nettleton <jon@solid-run.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
disk/part.c
drivers/block/blk-uclass.c
include/blk.h
include/dm/uclass-id.h

index e640a55163f2d28f69bb869fd775317199b8154c..d76aa903a8c6deba137d710e6be320fe566056bb 100644 (file)
@@ -132,6 +132,7 @@ void dev_print (struct blk_desc *dev_desc)
        case IF_TYPE_SD:
        case IF_TYPE_MMC:
        case IF_TYPE_USB:
+       case IF_TYPE_NVME:
                printf ("Vendor: %s Rev: %s Prod: %s\n",
                        dev_desc->vendor,
                        dev_desc->revision,
@@ -263,7 +264,10 @@ static void print_part_header(const char *type, struct blk_desc *dev_desc)
                puts ("MMC");
                break;
        case IF_TYPE_HOST:
-               puts("HOST");
+               puts ("HOST");
+               break;
+       case IF_TYPE_NVME:
+               puts ("NVMe");
                break;
        default:
                puts ("UNKNOWN");
index 23f131b7ad74b0a363038ef5bcd0b667e871c082..a3737badec6df61ca318cfee975f6f95a6535191 100644 (file)
@@ -22,6 +22,7 @@ static const char *if_typename_str[IF_TYPE_COUNT] = {
        [IF_TYPE_SATA]          = "sata",
        [IF_TYPE_HOST]          = "host",
        [IF_TYPE_SYSTEMACE]     = "ace",
+       [IF_TYPE_NVME]          = "nvme",
 };
 
 static enum uclass_id if_type_uclass_id[IF_TYPE_COUNT] = {
@@ -34,6 +35,7 @@ static enum uclass_id if_type_uclass_id[IF_TYPE_COUNT] = {
        [IF_TYPE_SD]            = UCLASS_INVALID,
        [IF_TYPE_SATA]          = UCLASS_AHCI,
        [IF_TYPE_HOST]          = UCLASS_ROOT,
+       [IF_TYPE_NVME]          = UCLASS_NVME,
        [IF_TYPE_SYSTEMACE]     = UCLASS_INVALID,
 };
 
index 1e6239ac9e8676f4b3280a0a8229bea86d14aaab..61b56281b3150cc815a7385969ed6504d8d0d379 100644 (file)
@@ -31,6 +31,7 @@ enum if_type {
        IF_TYPE_SATA,
        IF_TYPE_HOST,
        IF_TYPE_SYSTEMACE,
+       IF_TYPE_NVME,
 
        IF_TYPE_COUNT,                  /* Number of interface types */
 };
index 2e6498b7dcd1126444b930b7dae880ae530e6523..1a501992db26b9ed555b712f0b53060d47ed7500 100644 (file)
@@ -52,6 +52,7 @@ enum uclass_id {
        UCLASS_MOD_EXP,         /* RSA Mod Exp device */
        UCLASS_MTD,             /* Memory Technology Device (MTD) device */
        UCLASS_NORTHBRIDGE,     /* Intel Northbridge / SDRAM controller */
+       UCLASS_NVME,            /* NVM Express device */
        UCLASS_PANEL,           /* Display panel, such as an LCD */
        UCLASS_PANEL_BACKLIGHT, /* Backlight controller for panel */
        UCLASS_PCH,             /* x86 platform controller hub */