mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] net: macb: add tx clock rate for 10 MBit link
@ 2021-03-19 16:26 Michael Tretter
  2021-03-22  5:03 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Tretter @ 2021-03-19 16:26 UTC (permalink / raw)
  To: barebox; +Cc: m.tretter

If the phy reports a 10 MBit link, which can happen during link
negotiation, the macb prints a warning, because it does not know the
clock rate for the TX clock.

Implement setting the TX clock rate for 10 MBit to avoid the warnings.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
 drivers/net/macb.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 188dbf2d8c15..14a0b45322bf 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -269,6 +269,9 @@ static int macb_set_tx_clk(struct macb_device *macb, int speed)
 	}
 
 	switch (speed) {
+	case SPEED_10:
+		rate = 2500000;
+		break;
 	case SPEED_100:
 		rate = 25000000;
 		break;
-- 
2.29.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: macb: add tx clock rate for 10 MBit link
  2021-03-19 16:26 [PATCH] net: macb: add tx clock rate for 10 MBit link Michael Tretter
@ 2021-03-22  5:03 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2021-03-22  5:03 UTC (permalink / raw)
  To: Michael Tretter; +Cc: barebox

On Fri, Mar 19, 2021 at 05:26:05PM +0100, Michael Tretter wrote:
> If the phy reports a 10 MBit link, which can happen during link
> negotiation, the macb prints a warning, because it does not know the
> clock rate for the TX clock.
> 
> Implement setting the TX clock rate for 10 MBit to avoid the warnings.
> 
> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
> ---

Applied, thanks

Sascha

>  drivers/net/macb.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/macb.c b/drivers/net/macb.c
> index 188dbf2d8c15..14a0b45322bf 100644
> --- a/drivers/net/macb.c
> +++ b/drivers/net/macb.c
> @@ -269,6 +269,9 @@ static int macb_set_tx_clk(struct macb_device *macb, int speed)
>  	}
>  
>  	switch (speed) {
> +	case SPEED_10:
> +		rate = 2500000;
> +		break;
>  	case SPEED_100:
>  		rate = 25000000;
>  		break;
> -- 
> 2.29.2
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-22  5:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-19 16:26 [PATCH] net: macb: add tx clock rate for 10 MBit link Michael Tretter
2021-03-22  5:03 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox