public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Kubiak <michal.kubiak@intel.com>
To: Bartosz Wawrzyniak <bwawrzyn@cisco.com>
Cc: <davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
	<pabeni@redhat.com>, <nicolas.ferre@microchip.com>,
	<claudiu.beznea@microchip.com>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <xe-linux-external@cisco.com>,
	<danielwa@cisco.com>, <olicht@cisco.com>, <mawierzb@cisco.com>
Subject: Re: [PATCH] net: macb: Set MDIO clock divisor for pclk higher than 160MHz
Date: Thu, 16 Mar 2023 11:35:57 +0100	[thread overview]
Message-ID: <ZBLxDZRuRjyJb7qN@localhost.localdomain> (raw)
In-Reply-To: <20230316100339.1302212-1-bwawrzyn@cisco.com>

On Thu, Mar 16, 2023 at 10:03:39AM +0000, Bartosz Wawrzyniak wrote:
> Currently macb sets clock divisor for pclk up to 160 MHz.
> Function gem_mdc_clk_div was updated to enable divisor
> for higher values of pclk.
> 
> Signed-off-by: Bartosz Wawrzyniak <bwawrzyn@cisco.com>
> ---
>  drivers/net/ethernet/cadence/macb.h      | 2 ++
>  drivers/net/ethernet/cadence/macb_main.c | 6 +++++-
>  2 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/cadence/macb.h b/drivers/net/ethernet/cadence/macb.h
> index 14dfec4db8f9..c1fc91c97cee 100644
> --- a/drivers/net/ethernet/cadence/macb.h
> +++ b/drivers/net/ethernet/cadence/macb.h
> @@ -692,6 +692,8 @@
>  #define GEM_CLK_DIV48				3
>  #define GEM_CLK_DIV64				4
>  #define GEM_CLK_DIV96				5
> +#define GEM_CLK_DIV128				6
> +#define GEM_CLK_DIV224				7
>  
>  /* Constants for MAN register */
>  #define MACB_MAN_C22_SOF			1
> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
> index 6e141a8bbf43..8708af6d25ed 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -2641,8 +2641,12 @@ static u32 gem_mdc_clk_div(struct macb *bp)
>  		config = GEM_BF(CLK, GEM_CLK_DIV48);
>  	else if (pclk_hz <= 160000000)
>  		config = GEM_BF(CLK, GEM_CLK_DIV64);
> -	else
> +	else if (pclk_hz <= 240000000)
>  		config = GEM_BF(CLK, GEM_CLK_DIV96);
> +	else if (pclk_hz <= 320000000)
> +		config = GEM_BF(CLK, GEM_CLK_DIV128);
> +	else
> +		config = GEM_BF(CLK, GEM_CLK_DIV224);
>  
>  	return config;
>  }

Hi,

The patch looks OK.

Thanks,
Michal

Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>

> -- 
> 2.33.0
> 

  reply	other threads:[~2023-03-16 10:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-16 10:03 [PATCH] net: macb: Set MDIO clock divisor for pclk higher than 160MHz Bartosz Wawrzyniak
2023-03-16 10:35 ` Michal Kubiak [this message]
2023-03-16 16:11 ` Nicolas Ferre
2023-03-16 19:34 ` Andrew Lunn
2023-03-17 14:02   ` Nicolas Ferre
2023-03-17 14:28     ` Andrew Lunn
2023-03-19  8:50 ` patchwork-bot+netdevbpf

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=ZBLxDZRuRjyJb7qN@localhost.localdomain \
    --to=michal.kubiak@intel.com \
    --cc=bwawrzyn@cisco.com \
    --cc=claudiu.beznea@microchip.com \
    --cc=danielwa@cisco.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mawierzb@cisco.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=olicht@cisco.com \
    --cc=pabeni@redhat.com \
    --cc=xe-linux-external@cisco.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