From: zhangqing <zhangqing@loongson.cn>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Jose Abreu <joabreu@synopsys.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Rob Herring <robh+dt@kernel.org>, Huacai Chen <chenhc@lemote.com>,
linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, netdev@vger.kernel.org,
Jiaxun Yang <jiaxun.yang@flygoat.com>
Subject: Re: [PATCH 1/4] stmmac: pci: Add dwmac support for Loongson
Date: Tue, 22 Jun 2021 10:10:26 +0800 [thread overview]
Message-ID: <d66e6af7-7384-41aa-76a7-7017f27d43cb@loongson.cn> (raw)
In-Reply-To: <YM//kGGAp3vz8OYb@lunn.ch>
On 06/21/2021 10:55 AM, Andrew Lunn wrote:
>> +static int loongson_dwmac_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>> +{
>> + struct plat_stmmacenet_data *plat;
>> + struct stmmac_resources res;
>> + int ret, i, mdio;
>> + struct device_node *np;
>> +
>> + np = dev_of_node(&pdev->dev);
>> +
>> + if (!np) {
>> + pr_info("dwmac_loongson_pci: No OF node\n");
>> + return -ENODEV;
>> + }
>> +
>> + if (!of_device_is_compatible(np, "loongson, pci-gmac")) {
>> + pr_info("dwmac_loongson_pci: Incompatible OF node\n");
>> + return -ENODEV;
>> + }
>> +
>> + plat = devm_kzalloc(&pdev->dev, sizeof(*plat), GFP_KERNEL);
>> + if (!plat)
>> + return -ENOMEM;
>> +
>> + if (plat->mdio_node) {
>> + dev_err(&pdev->dev, "Found MDIO subnode\n");
> It is an error is an MDIO node is found?
Hi,Andrew
Thanks for your advice,
Using dev_ DEG () is appropriate,
and other issues I will fix in v2.
Thanks,
-Qing
>
>> + mdio = true;
>> + }
>> +
> ...
>
>> +
>> + plat->phy_interface = device_get_phy_mode(&pdev->dev);
>> + if (plat->phy_interface < 0)
>> + dev_err(&pdev->dev, "phy_mode not found\n");
>> +
>> + plat->interface = PHY_INTERFACE_MODE_GMII;
> Seems odd you call device_get_phy_mode() but then have this hard coded
> PHY_INTERFACE_MODE_GMII?
>
> Andrew
prev parent reply other threads:[~2021-06-22 2:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-18 2:53 [PATCH 1/4] stmmac: pci: Add dwmac support for Loongson Qing Zhang
2021-06-18 2:53 ` [PATCH 2/4] MIPS: Loongson64: Add GMAC support for Loongson-2K1000 Qing Zhang
2021-06-21 2:59 ` Andrew Lunn
2021-06-18 2:53 ` [PATCH 3/4] MIPS: Loongson64: DTS: Add GMAC support for LS7A PCH Qing Zhang
2021-06-18 2:53 ` [PATCH 4/4] dt-bindings: dwmac: Add bindings for new Loongson SoC and bridge chip Qing Zhang
2021-06-21 2:55 ` [PATCH 1/4] stmmac: pci: Add dwmac support for Loongson Andrew Lunn
2021-06-22 2:10 ` zhangqing [this message]
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=d66e6af7-7384-41aa-76a7-7017f27d43cb@loongson.cn \
--to=zhangqing@loongson.cn \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew@lunn.ch \
--cc=chenhc@lemote.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=jiaxun.yang@flygoat.com \
--cc=joabreu@synopsys.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
--cc=robh+dt@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.