]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: ti: j721e: evm: Drop board check for ESM
authorNishanth Menon <nm@ti.com>
Sat, 4 Nov 2023 07:21:40 +0000 (02:21 -0500)
committerTom Rini <trini@konsulko.com>
Wed, 22 Nov 2023 17:04:14 +0000 (12:04 -0500)
When config is enabled, the esm dt probe makes sense. Simplify by
dropping board specific checks.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
board/ti/j721e/evm.c

index d6a461d9d79919b9cc37dd55a6f5271b6807b942..f7ab15f1d73a82c0d3f399ab4d6686b8825d9ee8 100644 (file)
@@ -522,10 +522,8 @@ err_free_gpio:
 
 void spl_board_init(void)
 {
-#if defined(CONFIG_ESM_K3) || defined(CONFIG_ESM_PMIC)
        struct udevice *dev;
        int ret;
-#endif
 
        if ((IS_ENABLED(CONFIG_TARGET_J721E_A72_EVM) ||
             IS_ENABLED(CONFIG_TARGET_J7200_A72_EVM)) &&
@@ -534,24 +532,20 @@ void spl_board_init(void)
                        probe_daughtercards();
        }
 
-#ifdef CONFIG_ESM_K3
-       if (board_ti_k3_is("J721EX-PM2-SOM")) {
+       if (IS_ENABLED(CONFIG_ESM_K3)) {
                ret = uclass_get_device_by_driver(UCLASS_MISC,
                                                  DM_DRIVER_GET(k3_esm), &dev);
                if (ret)
                        printf("ESM init failed: %d\n", ret);
        }
-#endif
 
-#ifdef CONFIG_ESM_PMIC
-       if (board_ti_k3_is("J721EX-PM2-SOM")) {
+       if (IS_ENABLED(CONFIG_ESM_PMIC)) {
                ret = uclass_get_device_by_driver(UCLASS_MISC,
                                                  DM_DRIVER_GET(pmic_esm),
                                                  &dev);
                if (ret)
                        printf("ESM PMIC init failed: %d\n", ret);
        }
-#endif
        if ((IS_ENABLED(CONFIG_TARGET_J7200_A72_EVM) || IS_ENABLED(CONFIG_TARGET_J721E_A72_EVM)) &&
            IS_ENABLED(CONFIG_HBMC_AM654)) {
                struct udevice *dev;