armbian-build/patch/kernel/archive/meson-6.12/0022-net-stmmac-dwmac-meson-Rename-the-SPEED_100-macro.patch
Dominik Wójt 5b29f4dd4b
meson: kernel update: legacy -> 6.6, current -> 6.12 (#7801)
* Add MXQ target. Copy HDMI fix from odroid-c1.
* meson8, MXQ: add boot from usb support, configurable dtb
* MXQ: remove boot logo
Built-in U-BOOT is used, so the logo will not be displayed anyway.
* meson: kernel update: legacy -> 6.6, current -> 6.12
* Change Odroid C1 and Onecloud to community supported as build now passes
---------
Co-authored-by: Igor Pecovnik <igor@armbian.com>
2025-02-08 23:08:34 +01:00

45 lines
1.4 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Date: Sat, 25 Dec 2021 04:07:05 +0100
Subject: net: stmmac: dwmac-meson: Rename the SPEED_100 macro
The SPEED_100 macro is part of the PREG_ETHERNET_ADDR0 register. Rename
it accordingly to make this relationship clear.
While here also add a comment what the SPEED_100 bit actually does.
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c
index 111111111111..222222222222 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c
@@ -15,7 +15,8 @@
#include "stmmac_platform.h"
-#define ETHMAC_SPEED_100 BIT(1)
+/* divides the input clock by 20 (= 0x0) or 2 (= 0x1) */
+#define PREG_ETHERNET_ADDR0_SPEED_100 BIT(1)
struct meson_dwmac {
struct device *dev;
@@ -31,10 +32,10 @@ static void meson6_dwmac_fix_mac_speed(void *priv, unsigned int speed, unsigned
switch (speed) {
case SPEED_10:
- val &= ~ETHMAC_SPEED_100;
+ val &= ~PREG_ETHERNET_ADDR0_SPEED_100;
break;
case SPEED_100:
- val |= ETHMAC_SPEED_100;
+ val |= PREG_ETHERNET_ADDR0_SPEED_100;
break;
}
--
Armbian