mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-27 12:57:13 +00:00
net: fec: add fuse check
Add fuse check for fec. If the fuse indicates the module will not work in the SoC, let's fail the initialization. Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
parent
0bd3d911df
commit
3b26d527d3
1 changed files with 14 additions and 0 deletions
|
@ -1204,6 +1204,13 @@ int fecmxc_initialize_multi(bd_t *bd, int dev_id, int phy_id, uint32_t addr)
|
||||||
#endif
|
#endif
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
if (CONFIG_IS_ENABLED(IMX_MODULE_FUSE)) {
|
||||||
|
if (enet_fused((ulong)addr)) {
|
||||||
|
printf("SoC fuse indicates Ethernet@0x%x is unavailable.\n", addr);
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_FEC_MXC_MDIO_BASE
|
#ifdef CONFIG_FEC_MXC_MDIO_BASE
|
||||||
/*
|
/*
|
||||||
* The i.MX28 has two ethernet interfaces, but they are not equal.
|
* The i.MX28 has two ethernet interfaces, but they are not equal.
|
||||||
|
@ -1342,6 +1349,13 @@ static int fecmxc_probe(struct udevice *dev)
|
||||||
uint32_t start;
|
uint32_t start;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
if (CONFIG_IS_ENABLED(IMX_MODULE_FUSE)) {
|
||||||
|
if (enet_fused((ulong)priv->eth)) {
|
||||||
|
printf("SoC fuse indicates Ethernet@0x%lx is unavailable.\n", (ulong)priv->eth);
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_IMX8)) {
|
if (IS_ENABLED(CONFIG_IMX8)) {
|
||||||
ret = clk_get_by_name(dev, "ipg", &priv->ipg_clk);
|
ret = clk_get_by_name(dev, "ipg", &priv->ipg_clk);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue