mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
board: ti: j721e: initialize ESM support
Initialize both ESM and ESM_PMIC support if available for the board. If support is not available for either, a warning is printed out. ESM signals are only properly routed on PM2 version of the J721E SOM, so only probe the drivers on this device. Signed-off-by: Tero Kristo <t-kristo@ti.com>
This commit is contained in:
parent
91600a6a84
commit
fa281f64a1
1 changed files with 26 additions and 0 deletions
|
@ -15,6 +15,8 @@
|
|||
#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 +345,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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue