mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 10:08:59 +00:00
3da861ccca
Refreshed all patches. The following patches were manually changed: * 610-netfilter_match_bypass_default_checks.patch * 611-netfilter_match_bypass_default_table.patch * 802-can-0002-can-rx-offload-fix-long-lines.patch * 802-can-0003-can-rx-offload-can_rx_offload_compare-fix-typo.patch * 802-can-0004-can-rx-offload-can_rx_offload_irq_offload_timestamp-.patch * 802-can-0005-can-rx-offload-can_rx_offload_reset-remove-no-op-fun.patch * 802-can-0006-can-rx-offload-Prepare-for-CAN-FD-support.patch * 802-can-0018-can-flexcan-use-struct-canfd_frame-for-CAN-classic-f.patch The can-dev.ko model was moved in the upstream kernel. Compile-tested on: x86/64, armvirt/64, ath79/generic Runtime-tested on: x86/64, armvirt/64, ath79/generic Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
57 lines
1.6 KiB
Diff
57 lines
1.6 KiB
Diff
From 6859d91549341c2ad769d482de58129f080c0f04 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
|
Date: Thu, 18 Mar 2021 09:01:43 +0100
|
|
Subject: [PATCH 2/2] net: dsa: bcm_sf2: fix BCM4908 RGMII reg(s)
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
BCM4908 has only 1 RGMII reg for controlling port 7.
|
|
|
|
Fixes: 73b7a6047971 ("net: dsa: bcm_sf2: support BCM4908's integrated switch")
|
|
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
|
|
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
---
|
|
drivers/net/dsa/bcm_sf2.c | 11 +++++++----
|
|
drivers/net/dsa/bcm_sf2_regs.h | 1 +
|
|
2 files changed, 8 insertions(+), 4 deletions(-)
|
|
|
|
--- a/drivers/net/dsa/bcm_sf2.c
|
|
+++ b/drivers/net/dsa/bcm_sf2.c
|
|
@@ -35,7 +35,12 @@ static u16 bcm_sf2_reg_rgmii_cntrl(struc
|
|
{
|
|
switch (priv->type) {
|
|
case BCM4908_DEVICE_ID:
|
|
- /* TODO */
|
|
+ switch (port) {
|
|
+ case 7:
|
|
+ return REG_RGMII_11_CNTRL;
|
|
+ default:
|
|
+ break;
|
|
+ }
|
|
break;
|
|
default:
|
|
switch (port) {
|
|
@@ -1079,9 +1084,7 @@ static const u16 bcm_sf2_4908_reg_offset
|
|
[REG_PHY_REVISION] = 0x14,
|
|
[REG_SPHY_CNTRL] = 0x24,
|
|
[REG_CROSSBAR] = 0xc8,
|
|
- [REG_RGMII_0_CNTRL] = 0xe0,
|
|
- [REG_RGMII_1_CNTRL] = 0xec,
|
|
- [REG_RGMII_2_CNTRL] = 0xf8,
|
|
+ [REG_RGMII_11_CNTRL] = 0x014c,
|
|
[REG_LED_0_CNTRL] = 0x40,
|
|
[REG_LED_1_CNTRL] = 0x4c,
|
|
[REG_LED_2_CNTRL] = 0x58,
|
|
--- a/drivers/net/dsa/bcm_sf2_regs.h
|
|
+++ b/drivers/net/dsa/bcm_sf2_regs.h
|
|
@@ -21,6 +21,7 @@ enum bcm_sf2_reg_offs {
|
|
REG_RGMII_0_CNTRL,
|
|
REG_RGMII_1_CNTRL,
|
|
REG_RGMII_2_CNTRL,
|
|
+ REG_RGMII_11_CNTRL,
|
|
REG_LED_0_CNTRL,
|
|
REG_LED_1_CNTRL,
|
|
REG_LED_2_CNTRL,
|