mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Hawkins, Nick" <nick.hawkins@hpe.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "christophe.jaillet@wanadoo.fr" <christophe.jaillet@wanadoo.fr>,
	"simon.horman@corigine.com" <simon.horman@corigine.com>,
	"Verdun, Jean-Marie" <verdun@hpe.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"krzysztof.kozlowski+dt@linaro.org" 
	<krzysztof.kozlowski+dt@linaro.org>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/5] net: hpe: Add GXP UMAC MDIO
Date: Wed, 16 Aug 2023 00:55:56 +0000	[thread overview]
Message-ID: <75F51B6F-A477-4A2B-B40F-1CC894546CF2@hpe.com> (raw)
In-Reply-To: <0b227994-2577-4a74-b604-79410f5607b8@lunn.ch>

Greetings Andrew,

I have a follow up question below:

>> +static int umac_mdio_read(struct mii_bus *bus, int phy_id, int reg)
>> +{
>> + struct umac_mdio_priv *umac_mdio = bus->priv;
>> + unsigned int status;
>> + unsigned int value;
>> + int ret;
>> +
>> + status = __raw_readl(umac_mdio->base + UMAC_MII);
>> +
>> + status &= ~(UMAC_MII_PHY_ADDR_MASK | UMAC_MII_REG_ADDR_MASK);
>> + status |= ((phy_id << UMAC_MII_PHY_ADDR_SHIFT) &
>> + UMAC_MII_PHY_ADDR_MASK);
>> + status |= (reg & UMAC_MII_REG_ADDR_MASK);
>> + status |= UMAC_MII_MRNW; /* set bit for read mode */
>> + __raw_writel(status, umac_mdio->base + UMAC_MII);
>> +
>> + status |= UMAC_MII_MOWNER; /* set bit to activate mii transfer */
>> + __raw_writel(status, umac_mdio->base + UMAC_MII);


> I assume UMAC_MII_MOWNER must be set in a separate operation? But
> using __raw_writel() i'm not sure there is any barrier between the two
> writes.

Is there a function you would recommend using instead?

Thank you for the assistance,

-Nick Hawkins




  reply	other threads:[~2023-08-16  0:57 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-02 20:18 [PATCH v2 0/5] ARM: Add GXP UMAC Support nick.hawkins
2023-08-02 20:18 ` [PATCH v2 1/5] dt-bindings: net: Add HPE GXP UMAC MDIO nick.hawkins
2023-08-02 20:18 ` [PATCH v2 2/5] net: hpe: Add " nick.hawkins
2023-08-02 22:39   ` Andrew Lunn
2023-08-16  0:55     ` Hawkins, Nick [this message]
2023-08-16  1:29       ` Andrew Lunn
2023-08-02 22:42   ` Randy Dunlap
2023-08-03 11:39   ` Simon Horman
2023-08-02 20:18 ` [PATCH v2 3/5] dt-bindings: net: Add HPE GXP UMAC nick.hawkins
2023-08-02 22:45   ` Andrew Lunn
2023-08-03 15:52   ` Conor Dooley
2023-08-16 16:26     ` Hawkins, Nick
2023-08-17  8:55       ` Conor Dooley
2023-08-02 20:18 ` [PATCH v2 4/5] net: hpe: Add GXP UMAC Driver nick.hawkins
2023-08-02 23:20   ` Andrew Lunn
2023-08-04 20:55     ` Hawkins, Nick
2023-08-05  6:45       ` Andrew Lunn
2023-08-08 20:39         ` Hawkins, Nick
2023-08-08 20:54           ` Andrew Lunn
2023-08-09 23:55             ` Hawkins, Nick
2023-08-10  1:54               ` Andrew Lunn
2023-08-02 20:18 ` [PATCH v2 5/5] MAINTAINERS: HPE: Add GXP UMAC Networking Files nick.hawkins

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=75F51B6F-A477-4A2B-B40F-1CC894546CF2@hpe.com \
    --to=nick.hawkins@hpe.com \
    --cc=andrew@lunn.ch \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh+dt@kernel.org \
    --cc=simon.horman@corigine.com \
    --cc=verdun@hpe.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

all inboxes | Powered by JetHome®