From 5cc4c624ec9a7d38dd95b0e36378a40a40eab261 Mon Sep 17 00:00:00 2001 From: Joseph Chen Date: Wed, 3 Jun 2020 09:22:45 +0800 Subject: [PATCH] dm: uclass: move new uclass id to the end This patch handles the issue in SPL: U-Boot SPL board initspl_early_init() - found match at 'rv1126_syscon' - found match at 'rv1126_syscon' - found match at 'syscon' - found match at 'rockchip_rv1126_pmucru' - found match at 'rockchip_rv1126_cru' - found match at 'ns16550_serial' - found match at 'rockchip_rk3288_dw_mshc' - found match at 'rk_nandc_v6' - found match at 'rockchip_sfc' - found match at 'spi_nand' - found match at 'spi_flash_std' - found match at 'rockchip_crypto_v2' - found match at 'rockchip_secure_otp_v2' Cannot find uclass for id 36: please add the UCLASS_DRIVER() declaration for this UCLASS_... id Missing uclass for driver rockchip_secure_otp_v2 secure_otp@0xff5d0000: ret=-96 dm_scan_fdt() failed: -96 dm_extended_scan_dt() failed: -96 dm_init_and_scan() returned error -96 spl_early_init() failed: -96 ...... The root cause is drivers/misc/rockchip-secure-otp-v2.S is pre-compile but not compile every time, it occupies the UCLASS_MISC id as 36. There are the same situation for other otp drivers, so let's move it to the end. Signed-off-by: Joseph Chen Change-Id: I58a2bec703c2af743d209192fefda6ff6167b01c --- include/dm/uclass-id.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/dm/uclass-id.h b/include/dm/uclass-id.h index dfe709611a..117bf7d4fe 100644 --- a/include/dm/uclass-id.h +++ b/include/dm/uclass-id.h @@ -37,7 +37,6 @@ enum uclass_id { UCLASS_DISPLAY, /* Display (e.g. DisplayPort, HDMI) */ UCLASS_DMA, /* Direct Memory Access */ UCLASS_ETH, /* Ethernet device */ - UCLASS_ETH_PHY, /* Ethernet PHY device */ UCLASS_GPIO, /* Bank of general-purpose I/O pins */ UCLASS_FIRMWARE, /* Firmware */ UCLASS_I2C, /* I2C bus */ @@ -52,7 +51,6 @@ enum uclass_id { UCLASS_LPC, /* x86 'low pin count' interface */ UCLASS_MAILBOX, /* Mailbox controller */ UCLASS_MASS_STORAGE, /* Mass storage device */ - UCLASS_MDIO, /* MDIO bus */ UCLASS_MISC, /* Miscellaneous device */ UCLASS_MMC, /* SD / MMC card or chip */ UCLASS_MOD_EXP, /* RSA Mod Exp device */ @@ -99,6 +97,7 @@ enum uclass_id { UCLASS_VIDEO_CONSOLE, /* Text console driver for video device */ UCLASS_VIDEO_CRTC, /* Display Controller */ UCLASS_WDT, /* Watchdot Timer driver */ + UCLASS_FG, /* Fuel gauge */ UCLASS_KEY, /* Key */ UCLASS_RC, /* Remote Controller */ @@ -106,6 +105,8 @@ enum uclass_id { UCLASS_DVFS, /* DVFS policy */ UCLASS_IO_DOMAIN, /* IO domain */ UCLASS_CRYPTO, /* Crypto */ + UCLASS_ETH_PHY, /* Ethernet PHY device */ + UCLASS_MDIO, /* MDIO bus */ UCLASS_COUNT, UCLASS_INVALID = -1, };