From: Andrew Lunn <andrew@lunn.ch>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 net-next 07/10] net: korina: Add support for device tree
Date: Fri, 16 Apr 2021 01:49:07 +0200 [thread overview]
Message-ID: <YHjQ8ylbX2X+QJHG@lunn.ch> (raw)
In-Reply-To: <20210414230648.76129-8-tsbogend@alpha.franken.de>
> - memcpy(dev->dev_addr, mac_addr, ETH_ALEN);
> + if (mac_addr) {
> + ether_addr_copy(dev->dev_addr, mac_addr);
> + } else {
> + u8 ofmac[ETH_ALEN];
> +
> + if (of_get_mac_address(pdev->dev.of_node, ofmac) == 0)
> + ether_addr_copy(dev->dev_addr, ofmac);
You should be able to skip the ether_addr_copy() by passing
dev->dev_addr directly to of_get_mac_address().
> + else
> + eth_hw_addr_random(dev);
> + }
>
> lp->rx_irq = platform_get_irq_byname(pdev, "korina_rx");
> lp->tx_irq = platform_get_irq_byname(pdev, "korina_tx");
> @@ -1146,8 +1157,21 @@ static int korina_remove(struct platform_device *pdev)
> return 0;
> }
>
> +#ifdef CONFIG_OF
> +static const struct of_device_id korina_match[] = {
> + {
> + .compatible = "idt,3243x-emac",
You need to document this compatible somewhere under Documentation/devicetree/binding
Andrew
next prev parent reply other threads:[~2021-04-15 23:49 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-14 23:06 [PATCH v3 net-next 00/10] net: Korina improvements Thomas Bogendoerfer
2021-04-14 23:06 ` [PATCH v3 net-next 01/10] net: korina: Fix MDIO functions Thomas Bogendoerfer
2021-04-15 23:17 ` Andrew Lunn
2021-04-14 23:06 ` [PATCH v3 net-next 02/10] net: korina: Use devres functions Thomas Bogendoerfer
2021-04-15 23:19 ` Andrew Lunn
2021-04-14 23:06 ` [PATCH v3 net-next 03/10] net: korina: Remove not needed cache flushes Thomas Bogendoerfer
2021-04-15 23:20 ` Andrew Lunn
2021-04-14 23:06 ` [PATCH v3 net-next 04/10] net: korina: Remove nested helpers Thomas Bogendoerfer
2021-04-15 23:21 ` Andrew Lunn
2021-04-14 23:06 ` [PATCH v3 net-next 05/10] net: korina: Use DMA API Thomas Bogendoerfer
2021-04-15 23:23 ` Andrew Lunn
2021-04-14 23:06 ` [PATCH v3 net-next 06/10] net: korina: Only pass mac address via platform data Thomas Bogendoerfer
2021-04-15 23:30 ` Andrew Lunn
2021-04-16 6:54 ` Thomas Bogendoerfer
2021-04-14 23:06 ` [PATCH v3 net-next 07/10] net: korina: Add support for device tree Thomas Bogendoerfer
2021-04-15 23:49 ` Andrew Lunn [this message]
2021-04-16 7:12 ` Thomas Bogendoerfer
2021-04-14 23:06 ` [PATCH v3 net-next 08/10] net: korina: Get mdio input clock via common clock framework Thomas Bogendoerfer
2021-04-15 23:52 ` Andrew Lunn
2021-04-14 23:06 ` [PATCH v3 net-next 09/10] net: korina: Make driver COMPILE_TESTable Thomas Bogendoerfer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YHjQ8ylbX2X+QJHG@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tsbogend@alpha.franken.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).