mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-16 09:54:35 +00:00
board: ti: j721s2: Initialize the ESM & PMIC ESM
Initialize the 3 instances of SOC ESM & PMIC ESM. This is needed for watchdog functionality. Signed-off-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Udit Kumar <u-kumar1@ti.com>
This commit is contained in:
parent
bda30f83f9
commit
6888dbf4bb
1 changed files with 23 additions and 0 deletions
|
@ -326,4 +326,27 @@ int board_late_init(void)
|
|||
|
||||
void spl_board_init(void)
|
||||
{
|
||||
struct udevice *dev;
|
||||
int ret;
|
||||
|
||||
if (IS_ENABLED(CONFIG_ESM_K3)) {
|
||||
const char * const esms[] = {"esm@700000", "esm@40800000", "esm@42080000"};
|
||||
|
||||
for (int i = 0; i < ARRAY_SIZE(esms); ++i) {
|
||||
ret = uclass_get_device_by_name(UCLASS_MISC, esms[i],
|
||||
&dev);
|
||||
if (ret) {
|
||||
printf("MISC init for %s failed: %d\n", esms[i], ret);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_ESM_PMIC) && ret == 0) {
|
||||
ret = uclass_get_device_by_driver(UCLASS_MISC,
|
||||
DM_DRIVER_GET(pmic_esm),
|
||||
&dev);
|
||||
if (ret)
|
||||
printf("ESM PMIC init failed: %d\n", ret);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue