aboutsummaryrefslogtreecommitdiff
path: root/board/ti
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-03-14 17:40:36 -0400
committerTom Rini <trini@konsulko.com>2022-03-14 17:40:36 -0400
commit2abf048ab7b835787d6627423559832f2b18f253 (patch)
treeafed2c3a11ae600fec9b55ef8c50d5133b65ba87 /board/ti
parent7b958ede8c795501717b972b67473ea4cdc09b45 (diff)
parentc149bf41404e34014e37de32fac332892b11bd4a (diff)
downloadu-boot-2abf048ab7b835787d6627423559832f2b18f253.zip
u-boot-2abf048ab7b835787d6627423559832f2b18f253.tar.gz
u-boot-2abf048ab7b835787d6627423559832f2b18f253.tar.bz2
Merge tag 'v2022.04-rc4' into next
Prepare v2022.04-rc4
Diffstat (limited to 'board/ti')
-rw-r--r--board/ti/am65x/evm.c26
-rw-r--r--board/ti/j721e/evm.c28
2 files changed, 28 insertions, 26 deletions
diff --git a/board/ti/am65x/evm.c b/board/ti/am65x/evm.c
index fbe33cb..7182a8c 100644
--- a/board/ti/am65x/evm.c
+++ b/board/ti/am65x/evm.c
@@ -129,6 +129,7 @@ int ft_board_setup(void *blob, struct bd_info *bd)
}
#endif
+#ifdef CONFIG_TI_I2C_BOARD_DETECT
int do_board_detect(void)
{
int ret;
@@ -353,23 +354,26 @@ static int probe_daughtercards(void)
return 0;
}
+#endif
int board_late_init(void)
{
- struct ti_am6_eeprom *ep = TI_AM6_EEPROM_DATA;
+ if (IS_ENABLED(CONFIG_TI_I2C_BOARD_DETECT)) {
+ struct ti_am6_eeprom *ep = TI_AM6_EEPROM_DATA;
- setup_board_eeprom_env();
+ setup_board_eeprom_env();
- /*
- * The first MAC address for ethernet a.k.a. ethernet0 comes from
- * efuse populated via the am654 gigabit eth switch subsystem driver.
- * All the other ones are populated via EEPROM, hence continue with
- * an index of 1.
- */
- board_ti_am6_set_ethaddr(1, ep->mac_addr_cnt);
+ /*
+ * The first MAC address for ethernet a.k.a. ethernet0 comes from
+ * efuse populated via the am654 gigabit eth switch subsystem driver.
+ * All the other ones are populated via EEPROM, hence continue with
+ * an index of 1.
+ */
+ board_ti_am6_set_ethaddr(1, ep->mac_addr_cnt);
- /* Check for and probe any plugged-in daughtercards */
- probe_daughtercards();
+ /* Check for and probe any plugged-in daughtercards */
+ probe_daughtercards();
+ }
return 0;
}
diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c
index f479197..e6ff54c 100644
--- a/board/ti/j721e/evm.c
+++ b/board/ti/j721e/evm.c
@@ -397,36 +397,34 @@ void configure_serdes_torrent(void)
void configure_serdes_sierra(void)
{
- struct udevice *dev, *lnk_dev;
- struct phy serdes;
+ struct udevice *dev, *link_dev;
+ struct phy link;
int ret, count, i;
+ int link_count = 0;
if (!IS_ENABLED(CONFIG_PHY_CADENCE_SIERRA))
return;
- ret = uclass_get_device_by_driver(UCLASS_PHY,
+ ret = uclass_get_device_by_driver(UCLASS_MISC,
DM_DRIVER_GET(sierra_phy_provider),
&dev);
if (ret)
printf("Sierra init failed:%d\n", ret);
- serdes.dev = dev;
- serdes.id = 0;
-
count = device_get_child_count(dev);
for (i = 0; i < count; i++) {
- ret = device_get_child(dev, i, &lnk_dev);
+ ret = device_get_child(dev, i, &link_dev);
if (ret)
printf("probe of sierra child node %d failed\n", i);
- }
+ if (link_dev->driver->id == UCLASS_PHY) {
+ link.dev = link_dev;
+ link.id = link_count++;
- ret = generic_phy_init(&serdes);
- if (ret)
- printf("phy_init failed!!\n");
-
- ret = generic_phy_power_on(&serdes);
- if (ret)
- printf("phy_power_on failed !!\n");
+ ret = generic_phy_power_on(&link);
+ if (ret)
+ printf("phy_power_on failed !!\n");
+ }
+ }
}
#ifdef CONFIG_BOARD_LATE_INIT