devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: chunkeey@gmail.com
Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org,
	f.fainelli@gmail.com, vivien.didelot@gmail.com, andrew@lunn.ch,
	robh+dt@kernel.org, mark.rutland@arm.com
Subject: Re: [PATCH v3 3/3] net: dsa: qca8k: extend slave-bus implementations
Date: Wed, 20 Mar 2019 10:55:49 -0700 (PDT)	[thread overview]
Message-ID: <20190320.105549.1123356102719989957.davem@davemloft.net> (raw)
In-Reply-To: <20190319195419.12746-3-chunkeey@gmail.com>

From: Christian Lamparter <chunkeey@gmail.com>
Date: Tue, 19 Mar 2019 20:54:19 +0100

> This patch implements accessors for the QCA8337 MDIO access
> through the MDIO_MASTER register, which makes it possible to
> access the PHYs on slave-bus through the switch. In cases
> where the switch ports are already mapped via external
> "phy-phandles", the internal mdio-bus is disabled in order to
> prevent a duplicated discovery and enumeration of the same
> PHYs. Don't use mixed external and internal mdio-bus
> configurations, as this is not supported by the hardware.
> 
> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
> ---
> Changes from v2:
>  - Make it compatible with existing configurations
>  - make it clear that's sadly a either external or
>    internal mdio bus access.
> 
> Changes from v1:
>  - drop DT port <-> phy mapping
>  - added register definitions for the MDIO control register
>  - implemented new slave-mdio bus accessors
>  - DT-binding: fix switch's PSEUDO_PHY address. It's 0x10 not 0.
> 
> Old patch (+ discussion) for reference:
> <https://patchwork.ozlabs.org/patch/1036309/>

Would be great to get some review on this.

But I have a coding style change request:

> +static int
> +qca8k_setup_mdio_bus(struct qca8k_priv *priv)
> +{
> +	struct device_node *ports, *port;
> +	struct mii_bus *bus;
> +	u32 internal_mdio_mask = 0;
> +	u32 external_mdio_mask = 0;
> +	u32 reg;
> +	int err;

Reverse christmas tree ordering here please.

  reply	other threads:[~2019-03-20 17:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-19 19:54 [PATCH v3 1/3] dt-bindings: net: dsa: qca8k: fix example Christian Lamparter
2019-03-19 19:54 ` [PATCH v3 2/3] dt-bindings: net: dsa: qca8k: support internal mdio-bus Christian Lamparter
2019-03-20 18:04   ` Florian Fainelli
2019-03-19 19:54 ` [PATCH v3 3/3] net: dsa: qca8k: extend slave-bus implementations Christian Lamparter
2019-03-20 17:55   ` David Miller [this message]
2019-03-20 18:27   ` Florian Fainelli
2019-03-20 18:41     ` Christian Lamparter
2019-03-20 22:02     ` Christian Lamparter
2019-03-20 22:17       ` Florian Fainelli
2019-03-20 18:03 ` [PATCH v3 1/3] dt-bindings: net: dsa: qca8k: fix example Florian Fainelli

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=20190320.105549.1123356102719989957.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=andrew@lunn.ch \
    --cc=chunkeey@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=mark.rutland@arm.com \
    --cc=netdev@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=vivien.didelot@gmail.com \
    /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).