From: Andrew Lunn <andrew@lunn.ch>
To: Qing Zhang <zhangqing@loongson.cn>
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: Mon, 21 Jun 2021 04:55:12 +0200 [thread overview]
Message-ID: <YM//kGGAp3vz8OYb@lunn.ch> (raw)
In-Reply-To: <20210618025337.5705-1-zhangqing@loongson.cn>
> +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?
> + 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
next prev parent reply other threads:[~2021-06-21 2:55 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 ` Andrew Lunn [this message]
2021-06-22 2:10 ` [PATCH 1/4] stmmac: pci: Add dwmac support for Loongson zhangqing
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=YM//kGGAp3vz8OYb@lunn.ch \
--to=andrew@lunn.ch \
--cc=alexandre.torgue@foss.st.com \
--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 \
--cc=zhangqing@loongson.cn \
/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).