mtd: rawnand: denali_dt: use UCLASS_MTD instead of UCLASS_MISC
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 30 Jan 2020 13:07:59 +0000 (22:07 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 31 Jan 2020 16:14:32 +0000 (01:14 +0900)
UCLASS_MTD is a better fit for NAND drivers.

Make NAND_DENALI_DT depend on DM_MTD, which is needed to compile
drivers/mtd/mtd-uclass.c

Also, make ARCH_UNIPHIER select DM_MTD because all the defconfig
of this platform enables NAND_DENALI_DT.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
arch/arm/Kconfig
drivers/mtd/nand/raw/Kconfig
drivers/mtd/nand/raw/denali_dt.c

index 123631516883115850c0b6f2143f9d321b1cecb8..f04b6a6d368e0b8482fd527bc72bd6b5e3425ca7 100644 (file)
@@ -1548,6 +1548,7 @@ config ARCH_UNIPHIER
        select DM_GPIO
        select DM_I2C
        select DM_MMC
+       select DM_MTD
        select DM_RESET
        select DM_SERIAL
        select DM_USB
index 7814d84ba01dd1f884efc4c1848b79b18046e079..23201ca720414bec9a7c308c3667e248e2eb696b 100644 (file)
@@ -116,7 +116,7 @@ config NAND_DENALI
 config NAND_DENALI_DT
        bool "Support Denali NAND controller as a DT device"
        select NAND_DENALI
-       depends on OF_CONTROL && DM
+       depends on OF_CONTROL && DM_MTD
        help
          Enable the driver for NAND flash on platforms using a Denali NAND
          controller as a DT device.
index 587e480faa1328ef95cd3d90cc638789657ee626..759ad40e517871e4b543ea33a37d49d4865e07b0 100644 (file)
@@ -160,7 +160,7 @@ static int denali_dt_probe(struct udevice *dev)
 
 U_BOOT_DRIVER(denali_nand_dt) = {
        .name = "denali-nand-dt",
-       .id = UCLASS_MISC,
+       .id = UCLASS_MTD,
        .of_match = denali_nand_dt_ids,
        .probe = denali_dt_probe,
        .priv_auto_alloc_size = sizeof(struct denali_nand_info),
@@ -171,7 +171,7 @@ void board_nand_init(void)
        struct udevice *dev;
        int ret;
 
-       ret = uclass_get_device_by_driver(UCLASS_MISC,
+       ret = uclass_get_device_by_driver(UCLASS_MTD,
                                          DM_GET_DRIVER(denali_nand_dt),
                                          &dev);
        if (ret && ret != -ENODEV)