Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Jim Quinlan <james.quinlan@broadcom.com>
Cc: linux-pci@vger.kernel.org,
	"Nicolas Saenz Julienne" <nsaenz@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com>,
	"Cyril Brulebois" <kibi@debian.org>,
	"Stanimir Varbanov" <svarbanov@suse.de>,
	bcm-kernel-feedback-list@broadcom.com, jim2101024@gmail.com,
	"Florian Fainelli" <florian.fainelli@broadcom.com>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Rob Herring" <robh@kernel.org>,
	"moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE"
	<linux-rpi-kernel@lists.infradead.org>,
	"moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>,
	"open list" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 7/8] PCI: brcmstb: Make two changes in MDIO register fields
Date: Tue, 4 Mar 2025 20:39:24 +0530	[thread overview]
Message-ID: <20250304150924.a6ygwzca3lwgpt7h@thinkpad> (raw)
In-Reply-To: <20250214173944.47506-8-james.quinlan@broadcom.com>

On Fri, Feb 14, 2025 at 12:39:35PM -0500, Jim Quinlan wrote:
> The HW team has decided to "tighten" some field definitions in the MDIO
> packet format.  Fortunately these two changes may be made in a backwards
> compatible manner.
> 
> The CMD field used to be 12 bits and now is one.  This change is backwards
> compatible because the field's starting bit position is unchanged and the
> only commands we've used have values 0 and 1.
> 
> The PORT field's width has been changed from four to five bits.  When
> written, the new bit is not contiguous with the other four.  Fortunately,
> this change is backwards compatible because we have never used anything
> other than 0 for the port field's value.
> 
> Signed-off-by: Jim Quinlan <james.quinlan@broadcom.com>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

- Mani

> ---
>  drivers/pci/controller/pcie-brcmstb.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
> index 923ac1a03f85..cb897d4b2579 100644
> --- a/drivers/pci/controller/pcie-brcmstb.c
> +++ b/drivers/pci/controller/pcie-brcmstb.c
> @@ -175,8 +175,9 @@
>  #define MDIO_PORT0			0x0
>  #define MDIO_DATA_MASK			0x7fffffff
>  #define MDIO_PORT_MASK			0xf0000
> +#define MDIO_PORT_EXT_MASK		0x200000
>  #define MDIO_REGAD_MASK			0xffff
> -#define MDIO_CMD_MASK			0xfff00000
> +#define MDIO_CMD_MASK			0x00100000
>  #define MDIO_CMD_READ			0x1
>  #define MDIO_CMD_WRITE			0x0
>  #define MDIO_DATA_DONE_MASK		0x80000000
> @@ -327,6 +328,7 @@ static u32 brcm_pcie_mdio_form_pkt(int port, int regad, int cmd)
>  {
>  	u32 pkt = 0;
>  
> +	pkt |= FIELD_PREP(MDIO_PORT_EXT_MASK, port >> 4);
>  	pkt |= FIELD_PREP(MDIO_PORT_MASK, port);
>  	pkt |= FIELD_PREP(MDIO_REGAD_MASK, regad);
>  	pkt |= FIELD_PREP(MDIO_CMD_MASK, cmd);
> -- 
> 2.43.0
> 

-- 
மணிவண்ணன் சதாசிவம்


  parent reply	other threads:[~2025-03-04 16:13 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-14 17:39 [PATCH v2 0/8] PCI: brcmstb: Misc small tweaks and fixes Jim Quinlan
2025-02-14 17:39 ` [PATCH v2 1/8] PCI: brcmstb: Set gen limitation before link, not after Jim Quinlan
2025-02-20 17:27   ` Florian Fainelli
2025-03-04 14:51   ` Manivannan Sadhasivam
2025-02-14 17:39 ` [PATCH v2 2/8] PCI: brcmstb: Write to internal register to change link cap Jim Quinlan
2025-02-20 17:28   ` Florian Fainelli
2025-03-04 14:54   ` Manivannan Sadhasivam
2025-02-14 17:39 ` [PATCH v2 3/8] PCI: brcmstb: Do not assume that reg field starts at LSB Jim Quinlan
2025-02-20 17:29   ` Florian Fainelli
2025-03-04 14:57   ` Manivannan Sadhasivam
2025-02-14 17:39 ` [PATCH v2 4/8] PCI: brcmstb: Fix error path upon call of regulator_bulk_get() Jim Quinlan
2025-02-20 17:29   ` Florian Fainelli
2025-03-03 18:40   ` Bjorn Helgaas
2025-03-04 14:49     ` Jim Quinlan
2025-03-06 15:24       ` Jim Quinlan
2025-03-06 16:24         ` Bjorn Helgaas
2025-03-04 15:03   ` Manivannan Sadhasivam
2025-03-04 16:55     ` Jim Quinlan
2025-03-04 17:07       ` Manivannan Sadhasivam
2025-03-04 17:24         ` Jim Quinlan
2025-03-04 17:32           ` Manivannan Sadhasivam
2025-03-04 17:54             ` Krzysztof Wilczyński
2025-02-14 17:39 ` [PATCH v2 5/8] PCI: brcmstb: Fix potential premature regulator disabling Jim Quinlan
2025-02-20 17:30   ` Florian Fainelli
2025-03-04 15:04   ` Manivannan Sadhasivam
2025-02-14 17:39 ` [PATCH v2 6/8] PCI: brcmstb: Use same constant table for config space access Jim Quinlan
2025-02-20 18:14   ` Florian Fainelli
2025-03-04 15:08   ` Manivannan Sadhasivam
2025-03-04 16:37     ` Jim Quinlan
2025-03-04 16:58       ` Manivannan Sadhasivam
2025-03-04 17:37         ` Jim Quinlan
2025-03-05  5:47           ` Manivannan Sadhasivam
2025-02-14 17:39 ` [PATCH v2 7/8] PCI: brcmstb: Make two changes in MDIO register fields Jim Quinlan
2025-02-20 18:15   ` Florian Fainelli
2025-03-04 15:09   ` Manivannan Sadhasivam [this message]
2025-02-14 17:39 ` [PATCH v2 8/8] PCI: brcmstb: Clarify conversion of irq_domain_set_info() param Jim Quinlan
2025-02-20 18:15   ` Florian Fainelli
2025-03-04 15:10   ` Manivannan Sadhasivam
2025-03-01 14:48 ` [PATCH v2 0/8] PCI: brcmstb: Misc small tweaks and fixes Krzysztof Wilczyński
2025-03-04 16:10   ` Krzysztof Wilczyński

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=20250304150924.a6ygwzca3lwgpt7h@thinkpad \
    --to=manivannan.sadhasivam@linaro.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bhelgaas@google.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=james.quinlan@broadcom.com \
    --cc=jim2101024@gmail.com \
    --cc=kibi@debian.org \
    --cc=kw@linux.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=lpieralisi@kernel.org \
    --cc=nsaenz@kernel.org \
    --cc=robh@kernel.org \
    --cc=svarbanov@suse.de \
    /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