mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: filipp.dunsky@gmail.com
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v3 2/3] net: mdio: Add Cortina CS7542 bus controller
Date: Thu, 26 Nov 2026 16:31:14 +0100	[thread overview]
Message-ID: <97babf2e-02eb-4efb-8662-f960a36b9073@lunn.ch> (raw)
In-Reply-To: <20261126-b4-cs7542-mdio-v3-2-35739a0f3225@gmail.com>

> +#define PER_MDIO_CFG			0x00
> +#define   MDIO_CFG_MANUAL		BIT(0)

Just curious. If it is not manual, what does MDIO_CFG_AUTOMAGICAL do?

> +static int cs75xx_mdio_probe(struct platform_device *pdev)
> +{
> +	struct device *dev = &pdev->dev;
> +	struct cs75xx_mdio *priv;
> +	struct mii_bus *bus;
> +	u32 cfg;
> +
> +	bus = devm_mdiobus_alloc_size(dev, sizeof(*priv));
> +	if (!bus)
> +		return -ENOMEM;
> +
> +	priv = bus->priv;
> +	priv->base = devm_platform_ioremap_resource(pdev, 0);
> +	if (IS_ERR(priv->base))
> +		return PTR_ERR(priv->base);
> +
> +	cfg = readl(priv->base + PER_MDIO_CFG);
> +	/* The firmware configures the MDC rate; retain its prescaler. */
> +	cfg |= MDIO_CFG_MANUAL;
> +	writel(cfg, priv->base + PER_MDIO_CFG);

This comment is not obvious. I'm assuming the prescaler configuration
is also in PER_MDIO_CFG, but nothing here actually says that. 

/* The firmware configures the MDC rate; Perform a RMW in order to
 * retain the prescaler setting, which is in bits 24-42.
 */

???

	Andrew

  reply	other threads:[~2026-11-26 15:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26  9:27 [PATCH net-next v3 0/3] Add Cortina Systems CS7542 MDIO controller support Fil Dunsky via B4 Relay
2026-11-26  9:27 ` [PATCH net-next v3 1/3] dt-bindings: net: Add Cortina CS7542 MDIO controller Fil Dunsky via B4 Relay
2026-11-26  9:27 ` [PATCH net-next v3 2/3] net: mdio: Add Cortina CS7542 bus controller Fil Dunsky via B4 Relay
2026-11-26 15:31   ` Andrew Lunn [this message]
2026-11-26 15:46     ` Fil Dunsky
2026-11-26  9:27 ` [PATCH net-next v3 3/3] MAINTAINERS: Add Cortina CS7542 MDIO controller entry Fil Dunsky via B4 Relay

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=97babf2e-02eb-4efb-8662-f960a36b9073@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=andrew+netdev@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@kernel.org \
    --cc=filipp.dunsky@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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

all inboxes | Powered by JetHome®