From: Joe Perches <joe@perches.com>
To: florinel.iordache@nxp.com, davem@davemloft.net,
netdev@vger.kernel.org, andrew@lunn.ch, f.fainelli@gmail.com,
hkallweit1@gmail.com, linux@armlinux.org.uk
Cc: devicetree@vger.kernel.org, linux-doc@vger.kernel.org,
robh+dt@kernel.org, mark.rutland@arm.com, kuba@kernel.org,
corbet@lwn.net, shawnguo@kernel.org, leoyang.li@nxp.com,
madalin.bucur@oss.nxp.com, ioana.ciornei@nxp.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 7/9] net: phy: enable qoriq backplane support
Date: Thu, 26 Mar 2020 13:03:42 -0700 [thread overview]
Message-ID: <ba3b1a69496eb08cb071dace96fd385ff8f838e7.camel@perches.com> (raw)
In-Reply-To: <1585230682-24417-8-git-send-email-florinel.iordache@nxp.com>
On Thu, 2020-03-26 at 15:51 +0200, Florinel Iordache wrote:
> Enable backplane support for qoriq family of devices
trivial notes:
> diff --git a/drivers/net/phy/backplane/qoriq_backplane.c b/drivers/net/phy/backplane/qoriq_backplane.c
[]
> +static int qoriq_backplane_probe(struct phy_device *bpphy)
> +{
> + static bool one_time_action = true;
> +
> + if (one_time_action) {
> + one_time_action = false;
> + pr_info("%s: QorIQ Backplane driver version %s\n",
> + QORIQ_BACKPLANE_DRIVER_NAME,
> + QORIQ_BACKPLANE_DRIVER_VERSION);
> + }
There is an existing mechanism for this:
pr_info_once("%s: ... %s\n", etc...);
[]
> +static int qoriq_backplane_config_init(struct phy_device *bpphy)
> +{
[]
> + for (i = 0; i < bp_phy->num_lanes; i++) {
[]
> + ret = of_address_to_resource(lane_node, 0, &res);
> + if (ret) {
> + bpdev_err(bpphy,
> + "could not obtain lane memory map for index=%d, ret = %d\n",
> + i, ret);
> + return ret;
This could use the new vsprintf %pe extension:
bpdev_err(bpphy,
"could not obtain lane memory map for index=%d, %pe\n",
i, ERR_PTR(ret));
> + ret = of_address_to_resource(serdes_node, 0, &res);
> + if (ret) {
> + bpdev_err(bpphy,
> + "could not obtain serdes memory map, ret = %d\n",
> + ret);
> + return ret;
%pe etc.
[]
> + for (i = 0; i < comp_no; i++) {
> + ret = of_property_read_string_index(serdes_node, "compatible",
> + i, &serdes_comp);
> + if (ret == 0) {
> + if (!strcasecmp(serdes_comp, "serdes-10g")) {
> + serdes_type = SERDES_10G;
> + break;
> + } else if (!strcasecmp(serdes_comp, "serdes-28g")) {
> + serdes_type = SERDES_28G;
> + break;
> + }
> + }
> + }
[]
> +static int qoriq_backplane_match_phy_device(struct phy_device *bpphy)
> +{
[]
> + for (i = 0; i < comp_no; i++) {
> + ret = of_property_read_string_index(serdes_node, "compatible",
> + i, &serdes_comp);
> + if (ret == 0) {
> + if (!strcasecmp(serdes_comp, "serdes-10g")) {
> + serdes_type = SERDES_10G;
> + break;
> + } else if (!strcasecmp(serdes_comp, "serdes-28g")) {
> + serdes_type = SERDES_28G;
> + break;
> + }
> + }
> + }
[]
Maybe add and use a helper function?
next prev parent reply other threads:[~2020-03-26 20:05 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-26 13:51 [PATCH net-next 0/9] net: ethernet backplane support Florinel Iordache
2020-03-26 13:51 ` [PATCH net-next 1/9] doc: net: add backplane documentation Florinel Iordache
2020-03-26 13:51 ` [PATCH net-next 2/9] dt-bindings: net: add backplane dt bindings Florinel Iordache
2020-03-27 1:04 ` Andrew Lunn
2020-03-27 12:06 ` Russell King - ARM Linux admin
2020-03-27 15:00 ` [EXT] " Florinel Iordache
2020-03-27 15:28 ` Russell King - ARM Linux admin
2020-03-27 15:44 ` Andrew Lunn
2020-03-27 17:35 ` Russell King - ARM Linux admin
2020-03-30 5:43 ` Madalin Bucur (OSS)
2020-03-30 15:39 ` Rob Herring
2020-03-26 13:51 ` [PATCH net-next 3/9] net: phy: add kr phy connection type Florinel Iordache
2020-03-27 0:15 ` Andrew Lunn
2020-03-27 12:01 ` Russell King - ARM Linux admin
2020-03-27 12:12 ` Madalin Bucur (OSS)
2020-03-27 12:40 ` Russell King - ARM Linux admin
2020-03-29 8:22 ` [EXT] " Florinel Iordache
2020-03-29 9:01 ` Russell King - ARM Linux admin
2020-03-27 0:32 ` Florian Fainelli
2020-03-26 13:51 ` [PATCH net-next 4/9] net: fman: add kr support for dpaa1 mac Florinel Iordache
2020-03-26 13:51 ` [PATCH net-next 5/9] net: dpaa2: add kr support for dpaa2 mac Florinel Iordache
2020-03-26 13:51 ` [PATCH net-next 7/9] net: phy: enable qoriq backplane support Florinel Iordache
2020-03-26 20:03 ` Joe Perches [this message]
2020-03-26 20:13 ` Andrew Lunn
2020-03-26 20:27 ` Joe Perches
2020-03-26 13:51 ` [PATCH net-next 8/9] net: phy: add bee algorithm for kr training Florinel Iordache
2020-03-26 13:51 ` [PATCH net-next 9/9] arm64: dts: add serdes and mdio description Florinel Iordache
2020-03-27 12:09 ` Russell King - ARM Linux admin
[not found] ` <1585230682-24417-7-git-send-email-florinel.iordache@nxp.com>
2020-03-26 18:53 ` [PATCH net-next 6/9] net: phy: add backplane kr driver support David Miller
2020-03-26 18:55 ` Joe Perches
2020-03-26 19:07 ` David Miller
2020-03-26 19:42 ` Joe Perches
2020-03-27 1:07 ` Andrew Lunn
2020-03-27 13:02 ` [EXT] " Florinel Iordache
2020-03-27 13:23 ` Andrew Lunn
2020-03-27 17:43 ` Florian Fainelli
2020-03-27 14:22 ` Andrew Lunn
2020-03-27 18:25 ` Joe Perches
2020-03-27 14:28 ` Andrew Lunn
2020-03-27 14:33 ` Andrew Lunn
2020-03-27 14:38 ` Andrew Lunn
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=ba3b1a69496eb08cb071dace96fd385ff8f838e7.camel@perches.com \
--to=joe@perches.com \
--cc=andrew@lunn.ch \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=florinel.iordache@nxp.com \
--cc=hkallweit1@gmail.com \
--cc=ioana.ciornei@nxp.com \
--cc=kuba@kernel.org \
--cc=leoyang.li@nxp.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=madalin.bucur@oss.nxp.com \
--cc=mark.rutland@arm.com \
--cc=netdev@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=shawnguo@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).