From: Florian Fainelli <f.fainelli@gmail.com>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
netdev <netdev@vger.kernel.org>, Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>,
Antoine Tenart <antoine.tenart@bootlin.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>,
Alexandru Marginean <alexandru.marginean@nxp.com>,
Claudiu Manoil <claudiu.manoil@nxp.com>,
"Madalin Bucur (OSS)" <madalin.bucur@oss.nxp.com>,
radu-andrei.bulie@nxp.com, fido_max@inbox.ru,
Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH v2 net-next 05/13] net: mscc: ocelot: convert QSYS_SWITCH_PORT_MODE and SYS_PORT_MODE to regfields
Date: Sat, 30 May 2020 14:34:49 -0700 [thread overview]
Message-ID: <af464691-cf9c-130b-c565-620c0e2ab3fe@gmail.com> (raw)
In-Reply-To: <CA+h21hpEZchbE_weA_tZm-XW9o9uHU=7TvKhD2ZAYX7e5GootA@mail.gmail.com>
On 5/30/2020 2:25 PM, Vladimir Oltean wrote:
> Hi Florian,
>
> On Sun, 31 May 2020 at 00:18, Florian Fainelli <f.fainelli@gmail.com> wrote:
>>
>>
>>
>> On 5/30/2020 4:51 AM, Vladimir Oltean wrote:
>>> From: Vladimir Oltean <vladimir.oltean@nxp.com>
>>>
>>> Currently Felix and Ocelot share the same bit layout in these per-port
>>> registers, but Seville does not. So we need reg_fields for that.
>>>
>>> Actually since these are per-port registers, we need to also specify the
>>> number of ports, and register size per port, and use the regmap API for
>>> multiple ports.
>>>
>>> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
>>> ---
>>> Changes in v2:
>>> None.
>>
>> [snip]
>>
>>
>>> /* Core: Enable port for frame transfer */
>>> - ocelot_write_rix(ocelot, QSYS_SWITCH_PORT_MODE_INGRESS_DROP_MODE |
>>> - QSYS_SWITCH_PORT_MODE_SCH_NEXT_CFG(1) |
>>> - QSYS_SWITCH_PORT_MODE_PORT_ENA,
>>> - QSYS_SWITCH_PORT_MODE, port);
>>> + ocelot_fields_write(ocelot, port,
>>> + QSYS_SWITCH_PORT_MODE_INGRESS_DROP_MODE, 1);
>>> + ocelot_fields_write(ocelot, port,
>>> + QSYS_SWITCH_PORT_MODE_PORT_ENA, 1);
>>
>> I am a bit confused throughout this patch sometimes SCH_NEXT_CFG is set
>> to 1, sometimes not, this makes it a bit harder to review the
>> conversion, assuming this is fine:
>>
>> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
>> --
>> Florian
>
> Yes, this is a subtle point, but it's correct the way it is, and I
> didn't want to insist on the details of it, but now that you mentioned
> it, let's go.
> Seville does not have the QSYS_SWITCH_PORT_MODE_SCH_NEXT_CFG register
> field at all. And using the previous API (ocelot_write_rix), we were
> only writing 1 for Felix and Ocelot, which was their hardware-default
> value, so we weren't changing its value in practice. So the equivalent
> with ocelot_fields_write would be to simply not do anything at all for
> the SCH_NEXT_CFG field, which is actually something that is required
> if we want to support Seville too.
OK, thank you for providing these details.
--
Florian
next prev parent reply other threads:[~2020-05-30 21:34 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-30 11:51 [PATCH v2 net-next 00/13] New DSA driver for VSC9953 Seville switch Vladimir Oltean
2020-05-30 11:51 ` [PATCH v2 net-next 01/13] regmap: add helper for per-port regfield initialization Vladimir Oltean
2020-05-30 11:51 ` [PATCH v2 net-next 02/13] net: dsa: felix: set proper link speed in felix_phylink_mac_config Vladimir Oltean
2020-05-30 20:43 ` Florian Fainelli
2020-05-30 11:51 ` [PATCH v2 net-next 03/13] net: mscc: ocelot: convert port registers to regmap Vladimir Oltean
2020-05-30 20:45 ` Florian Fainelli
2020-05-30 11:51 ` [PATCH v2 net-next 04/13] soc/mscc: ocelot: add MII registers description Vladimir Oltean
2020-05-30 20:46 ` Florian Fainelli
2020-05-30 11:51 ` [PATCH v2 net-next 05/13] net: mscc: ocelot: convert QSYS_SWITCH_PORT_MODE and SYS_PORT_MODE to regfields Vladimir Oltean
2020-05-30 21:18 ` Florian Fainelli
2020-05-30 21:25 ` Vladimir Oltean
2020-05-30 21:34 ` Florian Fainelli [this message]
2020-05-30 11:51 ` [PATCH v2 net-next 06/13] net: dsa: felix: create a template for the DSA tags on xmit Vladimir Oltean
2020-05-30 21:31 ` Florian Fainelli
2020-05-30 21:39 ` Vladimir Oltean
2020-05-30 11:51 ` [PATCH v2 net-next 07/13] net: mscc: ocelot: split writes to pause frame enable bit and to thresholds Vladimir Oltean
2020-05-30 20:59 ` Florian Fainelli
2020-05-30 11:51 ` [PATCH v2 net-next 08/13] net: mscc: ocelot: disable flow control on NPI interface Vladimir Oltean
2020-05-30 20:58 ` Florian Fainelli
2020-05-30 11:51 ` [PATCH v2 net-next 09/13] net: mscc: ocelot: convert SYS_PAUSE_CFG register access to regfield Vladimir Oltean
2020-05-30 20:57 ` Florian Fainelli
2020-05-30 11:51 ` [PATCH v2 net-next 10/13] net: mscc: ocelot: extend watermark encoding function Vladimir Oltean
2020-05-30 20:58 ` Florian Fainelli
2020-05-30 11:51 ` [PATCH v2 net-next 11/13] net: dsa: felix: support half-duplex link modes Vladimir Oltean
2020-05-30 20:50 ` Florian Fainelli
2020-05-30 11:51 ` [PATCH v2 net-next 12/13] net: dsa: felix: move probing to felix_vsc9959.c Vladimir Oltean
2020-05-30 21:34 ` Florian Fainelli
2020-05-30 11:51 ` [PATCH v2 net-next 13/13] net: dsa: felix: introduce support for Seville VSC9953 switch Vladimir Oltean
2020-05-30 20:55 ` Florian Fainelli
2020-05-31 1:03 ` [PATCH v2 net-next 00/13] New DSA driver for VSC9953 Seville switch David Miller
2020-05-31 1:08 ` David Miller
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=af464691-cf9c-130b-c565-620c0e2ab3fe@gmail.com \
--to=f.fainelli@gmail.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=alexandru.marginean@nxp.com \
--cc=andrew@lunn.ch \
--cc=antoine.tenart@bootlin.com \
--cc=broonie@kernel.org \
--cc=claudiu.manoil@nxp.com \
--cc=davem@davemloft.net \
--cc=fido_max@inbox.ru \
--cc=madalin.bucur@oss.nxp.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=radu-andrei.bulie@nxp.com \
--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).