
-----Original Message----- From: Michael Walle michael@walle.cc Sent: Wednesday, January 20, 2021 12:44 AM To: Claudiu Manoil claudiu.manoil@nxp.com Cc: Joe Hershberger joe.hershberger@ni.com; Simon Glass sjg@chromium.org; Bin Meng bmeng.cn@gmail.com; u- boot@lists.denx.de; Vladimir Oltean vladimir.oltean@nxp.com; Alexandru Marginean alexandru.marginean@nxp.com Subject: Re: [PATCH v2 3/5] drivers: net: Add Felix DSA switch driver
[...]
- dsa_foreach_port(pdev, dev) {
This doesn't work for me. Seems like felix_init() is called before any ports are added via dsa_port_probe().
Indeed, looks like we need to extend dsa_ops with a per-port initialization callback (i.e. .port_init()). The general idea of the current dsa API is not to expose all the internal state data inside the dsa per-device uclass platform data, particularly udevice pointers have no place inside platform data structures (like was the case for the previous patch sets). So these per port felix initializations need to be addressed by extending the current API.
Thanks.