command: Remove the cmd_tbl_t typedef
[oweals/u-boot.git] / board / ti / j721e / evm.c
index aa2240b8523b9c8498ff74a07dfe39ff287e40f5..c4d1cddc1da6e8654b797775fd8da728a68c8147 100644 (file)
@@ -8,13 +8,19 @@
  */
 
 #include <common.h>
+#include <env.h>
+#include <fdt_support.h>
+#include <image.h>
 #include <init.h>
+#include <net.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/hardware.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <spl.h>
 #include <asm/arch/sys_proto.h>
+#include <dm.h>
+#include <dm/uclass-internal.h>
 
 #include "../common/board_detect.h"
 
@@ -343,5 +349,29 @@ int board_late_init(void)
 
 void spl_board_init(void)
 {
+#if defined(CONFIG_ESM_K3) || defined(CONFIG_ESM_PMIC)
+       struct udevice *dev;
+       int ret;
+#endif
+
        probe_daughtercards();
+
+#ifdef CONFIG_ESM_K3
+       if (board_ti_k3_is("J721EX-PM2-SOM")) {
+               ret = uclass_get_device_by_driver(UCLASS_MISC,
+                                                 DM_GET_DRIVER(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")) {
+               ret = uclass_get_device_by_driver(UCLASS_MISC,
+                                                 DM_GET_DRIVER(pmic_esm),
+                                                 &dev);
+               if (ret)
+                       printf("ESM PMIC init failed: %d\n", ret);
+       }
+#endif
 }