ls1046a: fsl-fman failure
Renaud Barbier
Renaud.Barbier at ametek.com
Tue Jul 15 08:04:56 PDT 2025
I have recently moved to barebox v2025.06 and the ethernet driver is failing probing.
In the COMMIT below, dev_get_drvdata is replaced by the following function device_get_match_data:
const void *device_get_match_data(struct device *dev)
{
~ if (dev->of_id_entry) {
+ pr_err("%s A0 return 0x%p\n", __func__, dev->of_id_entry->data);
return dev->of_id_entry->data;
+ }
~ if (dev->id_entry) {
+ pr_err("%s A1 return 0x%p\n", __func__, dev->of_id_entry->data);
return (void *)dev->id_entry->driver_data;
+ }
+ pr_err("%s return 0x%p\n", __func__, NULL);
return NULL;
}
For my specific device, I get the following debug message:
ERROR: fsl-fman-port 1a8b000.port at 8b000.of: probe
ERROR: device_get_match_data A0 return 0x0000000000000000 (here dev->of_id_entry is not NULL and dev->of_id_entry->data is returned)
and from fsl_fman_port_probe:
ERROR: fsl-fman-port 1a8b000.port at 8b000.of: type = 0. This is a valid type: FMAN_PORT_TYPE_RX = 0
ERROR: fsl-fman-port 1a8b000.port at 8b000.of: out
COMMIT:
index f205de1929..84e7f20330 100644
--- a/drivers/net/fsl-fman.c
+++ b/drivers/net/fsl-fman.c
@@ -1085,15 +1085,14 @@ static int fsl_fman_mdio_probe(struct device *dev)
static int fsl_fman_port_probe(struct device *dev)
{
struct resource *iores;
- int ret;
struct fsl_fman_port *port;
unsigned long type;
dev_dbg(dev, "probe\n");
- ret = dev_get_drvdata(dev, (const void **)&type);
dev_err(dev, "type = %d\n", type); <==== type is 0 or 1 (FMAN_PORT_TYPE_RX or FMAN_PORT_TYPE_TX )
- if (ret)
- return ret;
+ type = (uintptr_t)device_get_match_data(dev);
+ if (!type) <==== HERE it bails out because type == 0
dev_err(dev, "out\n"); **
+ return -ENODEV;
More information about the barebox
mailing list