From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Jacky Chou <jacky_chou@aspeedtech.com>
Cc: <andrew+netdev@lunn.ch>, <davem@davemloft.net>,
<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
<robh@kernel.org>, <krzk+dt@kernel.org>, <conor+dt@kernel.org>,
<p.zabel@pengutronix.de>, <ratbert@faraday-tech.com>,
<netdev@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [net-next 3/3] net: ftgmac100: Support for AST2700
Date: Thu, 7 Nov 2024 13:38:11 +0100 [thread overview]
Message-ID: <20241107133811.3109d98a@fedora.home> (raw)
In-Reply-To: <20241107111500.4066517-4-jacky_chou@aspeedtech.com>
Hi,
On Thu, 7 Nov 2024 19:15:00 +0800
Jacky Chou <jacky_chou@aspeedtech.com> wrote:
> The AST2700 is the 7th generation SoC from Aspeed, featuring three GPIO
> controllers that are support 64-bit DMA capability.
> Adding features is shown in the following list.
> 1.Support 64-bit DMA
> Add the high address (63:32) registers for description address and the
> description field for packet buffer with high address part.
> These registers and fields in legacy Aspeed SoC are reserved.
> This 64-bit DMA changing has verified on legacy Aspeed Soc, like
> AST2600.
Maybe each of these features should be in a dedicated patch ?
> 2.Set RMII pin strap in AST2700 compitable
compatible
> Use bit 20 of MAC 0x50 to represent the pin strap of AST2700 RMII and
> RGMII. Set to 1 is RMII pin, otherwise is RGMII.
> This bis is also reserved in legacy Aspeed SoC.
> Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>
[...]
> @@ -349,6 +354,10 @@ static void ftgmac100_start_hw(struct ftgmac100 *priv)
> if (priv->netdev->features & NETIF_F_HW_VLAN_CTAG_RX)
> maccr |= FTGMAC100_MACCR_RM_VLAN;
>
> + if (of_device_is_compatible(priv->dev->of_node, "aspeed,ast2700-mac") &&
> + priv->netdev->phydev->interface == PHY_INTERFACE_MODE_RMII)
> + maccr |= FTGMAC100_MACCR_RMII_ENABLE;
The driver code takes the assumption that netdev->phydev might be NULL,
I think you should therefore add an extra check here as well before
getting the interface mode.
Thanks,
Maxime
next prev parent reply other threads:[~2024-11-07 12:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-07 11:14 [net-next 0/3] Add Aspeed G7 FTGMAC100 support Jacky Chou
2024-11-07 11:14 ` [net-next 1/3] dt-bindings: net: ftgmac100: support for AST2700 Jacky Chou
2024-11-07 16:54 ` Conor Dooley
2024-11-07 11:14 ` [net-next 2/3] net: faraday: Add ARM64 in FTGMAC100 " Jacky Chou
2024-11-07 11:15 ` [net-next 3/3] net: ftgmac100: Support " Jacky Chou
2024-11-07 12:38 ` Maxime Chevallier [this message]
2024-11-14 1:46 ` 回覆: " Jacky Chou
2024-11-07 23:23 ` Andrew Lunn
2024-11-14 2:19 ` 回覆: " Jacky Chou
2024-11-14 2:43 ` Andrew Lunn
2024-11-14 6:26 ` 回覆: " Jacky Chou
2024-11-11 12:35 ` Simon Horman
2024-11-14 2:22 ` 回覆: " Jacky Chou
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=20241107133811.3109d98a@fedora.home \
--to=maxime.chevallier@bootlin.com \
--cc=andrew+netdev@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=jacky_chou@aspeedtech.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=pabeni@redhat.com \
--cc=ratbert@faraday-tech.com \
--cc=robh@kernel.org \
/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).