[net-next PATCH v5 15/15] net: dpaa2-mac: Add ACPI support for DPAA2 MAC driver
Andy Shevchenko
andy.shevchenko at gmail.com
Mon Feb 8 11:21:22 EST 2021
On Mon, Feb 8, 2021 at 5:15 PM Calvin Johnson
<calvin.johnson at oss.nxp.com> wrote:
>
> Modify dpaa2_mac_connect() to support ACPI along with DT.
> Modify dpaa2_mac_get_node() to get the dpmac fwnode from either
> DT or ACPI.
>
> Replace of_get_phy_mode with fwnode_get_phy_mode to get
> phy-mode for a dpmac_node.
>
> Use helper function phylink_fwnode_phy_connect() to find phy_dev and
> connect to mac->phylink.
...
> + if (is_of_node(dev->parent->fwnode)) {
> + dpmacs = of_find_node_by_name(NULL, "dpmacs");
> + if (!dpmacs)
> + return NULL;
> + parent = of_fwnode_handle(dpmacs);
> + } else if (is_acpi_node(dev->parent->fwnode)) {
> + parent = dev->parent->fwnode;
dev_fwnode(dev->parent) ?
> + }
...
> + if (err) {
> continue;
> + } else if (id == dpmac_id) {
Useless 'else'
> + if (is_of_node(dev->parent->fwnode))
dev_fwnode() ?
> + of_node_put(dpmacs);
> + return child;
> + }
...
> + if (is_of_node(dev->parent->fwnode))
Ditto ?
> + of_node_put(dpmacs);
--
With Best Regards,
Andy Shevchenko
More information about the linux-arm-kernel
mailing list