mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-09-23 08:01:59 +00:00
board: ti: j721e: evm.c: Fix the probing of in Sierra SerDes0
Initialization and power on operations of links have been moved under the link device in the Sierra SerDes driver. Also, the UCLASS of sierra_phy_provider has been changed to UCLASS_MISC. Therefore, fix the probing of SerDes0 instance accordingly. Signed-off-by: Aswath Govindraju <a-govindraju@ti.com> Reviewed-by: Georgi Vlaev <g-vlaev@ti.com>
This commit is contained in:
parent
b78f81eb5d
commit
f4466ab9cc
1 changed files with 13 additions and 15 deletions
|
@ -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_power_on(&link);
|
||||
if (ret)
|
||||
printf("phy_power_on failed !!\n");
|
||||
}
|
||||
}
|
||||
|
||||
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");
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BOARD_LATE_INIT
|
||||
|
|
Loading…
Reference in a new issue