Merge Official Source

This commit is contained in:
CN_SZTL 2020-07-17 23:05:37 +08:00
commit c49f548fbe
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
103 changed files with 716 additions and 485 deletions

View File

@ -8,11 +8,11 @@ endif
LINUX_VERSION-4.14 = .187
LINUX_VERSION-4.19 = .131
LINUX_VERSION-5.4 = .51
LINUX_VERSION-5.4 = .52
LINUX_KERNEL_HASH-4.14.187 = 5b223475eaeea196aa7e127d3f253bca5c35d8afdc72ca75230ce1ecdd1454bd
LINUX_KERNEL_HASH-4.19.131 = 19dfb9f6cc4ba30104b65dcce7d78240a4ae188cb366747d5f8eae35e98964ba
LINUX_KERNEL_HASH-5.4.51 = 9e8bea8b4cd636726b7e495a3b467c8ffe96f8eddc159a45fe4a7e6e07a2069d
LINUX_KERNEL_HASH-5.4.52 = 037efa531120b1c20ff55e78cd3e17288b1804b3a57dc31de760837b3bea5d3a
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))

View File

@ -29,6 +29,13 @@ define U-Boot/clearfog
UBOOT_IMAGE:=u-boot-spl.kwb
endef
define U-Boot/helios4
NAME:=Kobol Helios 4
BUILD_DEVICES:=kobol_helios4
BUILD_SUBTARGET:=cortexa9
UBOOT_IMAGE:=u-boot-spl.kwb
endef
define U-Boot/uDPU
NAME:=Methode uDPU
BUILD_DEVICES:=methode_udpu
@ -37,6 +44,7 @@ endef
UBOOT_TARGETS:= \
clearfog \
helios4 \
uDPU
Build/Exports:=$(Host/Exports)

View File

@ -3,11 +3,11 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=nat46
PKG_MIRROR_HASH:=0627c7122ff7432aadb443e92e11a9ad7710add0ff512eebe17d7e3c041e0d2a
PKG_MIRROR_HASH:=24a22c8cb38983b55e7ad55c796f3835aa8702ad6f868953448e3b5e61ab6991
PKG_SOURCE_URL:=https://github.com/ayourtch/nat46.git
PKG_SOURCE_DATE:=2020-06-26
PKG_SOURCE_DATE:=2020-07-16
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=1182f30785e4274913f01a8c3d7e1b5437ae3819
PKG_SOURCE_VERSION:=ac712ad2bedf107329285af1909310675afe872d
PKG_MAINTAINER:=Hans Dedecker <dedeckeh@gmail.com>
PKG_LICENSE:=GPL-2.0

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=lzo
PKG_VERSION:=2.10
PKG_RELEASE:=3
PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.oberhumer.com/opensource/lzo/download/
@ -49,6 +49,8 @@ define Build/InstallDev
$(CP) $(PKG_INSTALL_DIR)/usr/include/lzo $(1)/usr/include/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/liblzo2.{a,so*} $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lzo2.pc $(1)/usr/lib/pkgconfig
$(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/lzo2.pc
$(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/lzo2.pc
endef
define Package/liblzo/install

View File

@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=dsl_cpe_control_danube
PKG_VERSION:=3.24.4.4
PKG_RELEASE:=7
PKG_RELEASE:=8
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/dsl_cpe_control-$(PKG_VERSION)
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/
@ -35,7 +35,7 @@ define Package/ltq-adsl-app
CATEGORY:=Network
TITLE:=Lantiq DSL userland tool
URL:=http://www.lantiq.com/
DEPENDS:=@(TARGET_lantiq_xway||TARGET_lantiq_xway_legacy||TARGET_lantiq_ase) +libpthread
DEPENDS:=@(TARGET_lantiq_xway||TARGET_lantiq_xway_legacy||TARGET_lantiq_ase) +libpthread +ltq-dsl-base
MENU:=1
endef

View File

@ -8,7 +8,7 @@ EXTRA_COMMANDS="dslstat lucistat"
EXTRA_HELP=" dslstat Get DSL status information
lucistat Get status information in lua friendly format"
[ -f /lib/functions/lantiq_dsl.sh ] && . /lib/functions/lantiq_dsl.sh
. /lib/functions/lantiq_dsl.sh
annex_b=10_00_10_00_00_04_00_00
annex_bdmt=10_00_00_00_00_00_00_00

View File

@ -9,7 +9,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=ltq-vdsl-app
PKG_VERSION:=4.17.18.6
PKG_RELEASE:=3
PKG_RELEASE:=4
PKG_BASE_NAME:=dsl_cpe_control
PKG_SOURCE:=$(PKG_BASE_NAME)_vrx-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
@ -28,7 +28,7 @@ define Package/ltq-vdsl-app
CATEGORY:=Network
TITLE:=Lantiq VDSL userland tool
URL:=http://www.lantiq.com/
DEPENDS:=@TARGET_lantiq_xrx200 +libpthread +librt
DEPENDS:=@TARGET_lantiq_xrx200 +libpthread +librt +ltq-dsl-base
endef
define Package/ltq-vdsl-app/description

View File

@ -8,7 +8,7 @@ EXTRA_COMMANDS="dslstat lucistat"
EXTRA_HELP=" dslstat Get DSL status information
lucistat Get status information in lua friendly format"
[ -f /lib/functions/lantiq_dsl.sh ] && . /lib/functions/lantiq_dsl.sh
. /lib/functions/lantiq_dsl.sh
#
# ITU-T G.997.1 (06/2012) - Section 7.3.1.1.1 (xTU transmission system enabling (XTSE))

View File

@ -0,0 +1,32 @@
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=ltq-dsl-base
PKG_RELEASE:=1
include $(INCLUDE_DIR)/package.mk
define Package/ltq-dsl-base
SECTION:=net
CATEGORY:=Network
TITLE:=DSL related files for Intel/Lantiq DSL Chipsets
URL:=http://openwrt.org/
DEPENDS:=@TARGET_lantiq +jshn
endef
define Package/ltq-dsl-base/description
This package contains DSL related files for Intel/Lantiq DSL Chipsets.
endef
define Build/Compile
endef
define Package/ltq-dsl-base/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,ltq-dsl-base))

View File

@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=procd
PKG_RELEASE:=3
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git
PKG_SOURCE_DATE:=2020-07-14
PKG_SOURCE_VERSION:=b2230e4ff28b29472d0a232fee5d9f4168390b52
PKG_MIRROR_HASH:=67dd91d469a2e996a6b350575cfc0accedcf9ac948feaeee0d665199820bb6b0
PKG_SOURCE_DATE:=2020-07-17
PKG_SOURCE_VERSION:=268126a3b159fbd488eb56ebbd19c7384f1aa8a5
PKG_MIRROR_HASH:=77f143f600570c26f9305a744e8cad9c799c71b7873b4cbcff3151c43d796671
CMAKE_INSTALL:=1
PKG_LICENSE:=GPL-2.0

View File

@ -25,7 +25,7 @@ Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
static int __must_check __smsc95xx_read_reg(struct usbnet *dev, u32 index,
u32 *data, int in_pm)
{
@@ -1957,7 +1961,8 @@ static int smsc95xx_rx_fixup(struct usbn
@@ -1964,7 +1968,8 @@ static int smsc95xx_rx_fixup(struct usbn
if (dev->net->features & NETIF_F_RXCSUM)
smsc95xx_rx_csum_offload(skb);
skb_trim(skb, skb->len - 4); /* remove fcs */
@ -35,7 +35,7 @@ Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
return 1;
}
@@ -1975,7 +1980,8 @@ static int smsc95xx_rx_fixup(struct usbn
@@ -1982,7 +1987,8 @@ static int smsc95xx_rx_fixup(struct usbn
if (dev->net->features & NETIF_F_RXCSUM)
smsc95xx_rx_csum_offload(ax_skb);
skb_trim(ax_skb, ax_skb->len - 4); /* remove fcs */

View File

@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
config MODULES_TREE_LOOKUP
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -3107,9 +3107,11 @@ static int setup_load_info(struct load_i
@@ -3110,9 +3110,11 @@ static int setup_load_info(struct load_i
static int check_modinfo(struct module *mod, struct load_info *info, int flags)
{
@ -125,7 +125,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (flags & MODULE_INIT_IGNORE_VERMAGIC)
modmagic = NULL;
@@ -3130,6 +3132,7 @@ static int check_modinfo(struct module *
@@ -3133,6 +3135,7 @@ static int check_modinfo(struct module *
mod->name);
add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK);
}

View File

@ -106,7 +106,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#include <linux/mutex.h>
#include <linux/err.h>
#include <linux/of.h>
@@ -3125,3 +3126,5 @@ static int __init regmap_initcall(void)
@@ -3117,3 +3118,5 @@ static int __init regmap_initcall(void)
return 0;
}
postcore_initcall(regmap_initcall);

View File

@ -29,7 +29,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -2992,6 +2992,8 @@ static const struct seq_operations locks
@@ -2989,6 +2989,8 @@ static const struct seq_operations locks
static int __init proc_locks_init(void)
{

View File

@ -1,7 +1,5 @@
Index: linux-5.4.51/drivers/net/phy/Kconfig
===================================================================
--- linux-5.4.51.orig/drivers/net/phy/Kconfig
+++ linux-5.4.51/drivers/net/phy/Kconfig
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -587,6 +587,13 @@ config MDIO_IPQ40XX
This driver supports the MDIO interface found in Qualcomm
Atheros ipq40xx Soc chip.
@ -16,10 +14,8 @@ Index: linux-5.4.51/drivers/net/phy/Kconfig
endif # PHYLIB
config MICREL_KS8995MA
Index: linux-5.4.51/drivers/net/phy/Makefile
===================================================================
--- linux-5.4.51.orig/drivers/net/phy/Makefile
+++ linux-5.4.51/drivers/net/phy/Makefile
--- a/drivers/net/phy/Makefile
+++ b/drivers/net/phy/Makefile
@@ -70,6 +70,7 @@ ifdef CONFIG_HWMON
aquantia-objs += aquantia_hwmon.o
endif
@ -28,10 +24,8 @@ Index: linux-5.4.51/drivers/net/phy/Makefile
obj-$(CONFIG_AX88796B_PHY) += ax88796b.o
obj-$(CONFIG_AT803X_PHY) += at803x.o
obj-$(CONFIG_BCM63XX_PHY) += bcm63xx.o
Index: linux-5.4.51/drivers/net/phy/ar40xx.c
===================================================================
--- /dev/null
+++ linux-5.4.51/drivers/net/phy/ar40xx.c
+++ b/drivers/net/phy/ar40xx.c
@@ -0,0 +1,2118 @@
+/*
+ * Copyright (c) 2016, The Linux Foundation. All rights reserved.
@ -2184,10 +2178,8 @@ Index: linux-5.4.51/drivers/net/phy/ar40xx.c
+
+MODULE_DESCRIPTION("IPQ40XX ESS driver");
+MODULE_LICENSE("Dual BSD/GPL");
Index: linux-5.4.51/drivers/net/phy/ar40xx.h
===================================================================
--- /dev/null
+++ linux-5.4.51/drivers/net/phy/ar40xx.h
+++ b/drivers/net/phy/ar40xx.h
@@ -0,0 +1,342 @@
+/*
+ * Copyright (c) 2016, The Linux Foundation. All rights reserved.

View File

@ -3,7 +3,7 @@
@@ -18,6 +18,13 @@
reg = <0x00000000 0x20000000>;
};
+ aliases {
+ led-boot = &led_status_green;
+ led-failsafe = &led_status_red;
@ -17,13 +17,13 @@
@@ -95,12 +102,12 @@
leds {
compatible = "gpio-leds";
- status_green {
+ led_status_green: status_green {
label = "l-50:green:status";
gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
};
- status_red {
+ led_status_red: status_red {
label = "l-50:red:status";
@ -31,7 +31,7 @@
};
@@ -349,13 +356,8 @@
};
partition@100000 {
- label = "kernel-1";
- reg = <0x00100000 0x00800000>;
@ -43,5 +43,5 @@
+ label = "ubi";
+ reg = <0x00100000 0x07900000>;
};
partition@7a00000 {

View File

@ -0,0 +1,32 @@
#
# Copyright (C) 2013 OpenWrt.org
#
. /lib/functions/migrations.sh
do_internet_led_rename()
{
config_load system
[ -n $(config_get led_internet name) ] || return
[ -z $(config_get led_dsl name) ] || return
uci rename system.led_internet=led_dsl
uci set system.led_dsl.name=dsl
logger -t led-migration "internet led renamed to dsl"
}
case "$(board_name)" in
alphanetworks,asl56026|\
arcadyan,arv7519rw22|\
arcadyan,vg3503j|\
avm,fritz7360sl|\
bt,homehub-v5a)
do_internet_led_rename
;;
esac
migrations_apply system
exit 0

View File

@ -18,17 +18,11 @@ do_internet_led_rename()
}
case "$(board_name)" in
alphanetworks,asl56026|\
arcadyan,arv452cqw|\
arcadyan,arv7510pw22|\
arcadyan,arv7519rw22|\
arcadyan,arv752dpw|\
arcadyan,arv752dpw22|\
arcadyan,vg3503j|\
avm,fritz7360sl|\
bt,homehub-v2b|\
bt,homehub-v3a|\
bt,homehub-v5a)
bt,homehub-v3a)
do_internet_led_rename
;;
netgear,dgn3500|\

View File

@ -0,0 +1,28 @@
#
# Copyright (C) 2013 OpenWrt.org
#
. /lib/functions/migrations.sh
do_internet_led_rename()
{
config_load system
[ -n $(config_get led_internet name) ] || return
[ -z $(config_get led_dsl name) ] || return
uci rename system.led_internet=led_dsl
uci set system.led_dsl.name=dsl
logger -t led-migration "internet led renamed to dsl"
}
case "$(board_name)" in
arcadyan,arv452cqw)
do_internet_led_rename
;;
esac
migrations_apply system
exit 0

View File

@ -11,8 +11,6 @@ Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts
index dde50c8..9a93e9a 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts
@@ -13,6 +13,7 @@
@ -23,6 +21,3 @@ index dde50c8..9a93e9a 100644
aliases {
serial0 = &duart0;
--
2.7.4

View File

@ -143,9 +143,6 @@ Signed-off-by: chuanjia.liu <Chuanjia.Liu@mediatek.com>
2 files changed, 129 insertions(+), 53 deletions(-)
create mode 100644 Documentation/devicetree/bindings/pci/mediatek-pcie-cfg.yaml
diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-cfg.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie-cfg.yaml
new file mode 100644
index 000000000000..4d2835ab4858
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/mediatek-pcie-cfg.yaml
@@ -0,0 +1,38 @@
@ -187,8 +184,6 @@ index 000000000000..4d2835ab4858
+ reg = <0 0x1a140000 0 0x1000>;
+ };
+...
diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie.txt b/Documentation/devicetree/bindings/pci/mediatek-pcie.txt
index 7468d666763a..ddae110d4379 100644
--- a/Documentation/devicetree/bindings/pci/mediatek-pcie.txt
+++ b/Documentation/devicetree/bindings/pci/mediatek-pcie.txt
@@ -8,7 +8,7 @@ Required properties:

View File

@ -132,8 +132,6 @@ Signed-off-by: chuanjia.liu <Chuanjia.Liu@mediatek.com>
drivers/pci/controller/pcie-mediatek.c | 25 ++++++++++++++++++-------
1 file changed, 18 insertions(+), 7 deletions(-)
diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controller/pcie-mediatek.c
index cb982891b22b..2268d6073eb6 100644
--- a/drivers/pci/controller/pcie-mediatek.c
+++ b/drivers/pci/controller/pcie-mediatek.c
@@ -14,6 +14,7 @@
@ -167,8 +165,8 @@ index cb982891b22b..2268d6073eb6 100644
+ struct regmap *cfg;
struct clk *free_ck;
struct list_head ports;
@@ -650,7 +654,7 @@ static int mtk_pcie_setup_irq(struct mtk_pcie_port *port,
struct resource mem;
@@ -651,7 +655,7 @@ static int mtk_pcie_setup_irq(struct mtk
return err;
}
@ -177,9 +175,9 @@ index cb982891b22b..2268d6073eb6 100644
irq_set_chained_handler_and_data(port->irq,
mtk_pcie_intr_handler, port);
@@ -673,12 +677,11 @@ static int mtk_pcie_startup_port_v2(struct mtk_pcie_port *port)
if (!mem)
return -EINVAL;
@@ -666,12 +670,11 @@ static int mtk_pcie_startup_port_v2(stru
u32 val;
int err;
- /* MT7622 platforms need to enable LTSSM and ASPM from PCIe subsys */
- if (pcie->base) {
@ -195,7 +193,7 @@ index cb982891b22b..2268d6073eb6 100644
}
/* Assert all reset signals */
@@ -984,6 +987,7 @@ static int mtk_pcie_subsys_powerup(struct mtk_pcie *pcie)
@@ -977,6 +980,7 @@ static int mtk_pcie_subsys_powerup(struc
struct device *dev = pcie->dev;
struct platform_device *pdev = to_platform_device(dev);
struct resource *regs;
@ -203,7 +201,7 @@ index cb982891b22b..2268d6073eb6 100644
int err;
/* get shared registers, which are optional */
@@ -996,6 +1000,13 @@ static int mtk_pcie_subsys_powerup(struct mtk_pcie *pcie)
@@ -989,6 +993,13 @@ static int mtk_pcie_subsys_powerup(struc
}
}

View File

@ -144,11 +144,9 @@ Signed-off-by: chuanjia.liu <Chuanjia.Liu@mediatek.com>
arch/arm64/boot/dts/mediatek/mt7622.dtsi | 68 +++++++++++------
4 files changed, 96 insertions(+), 69 deletions(-)
diff --git a/arch/arm64/boot/dts/mediatek/mt2712e.dtsi b/arch/arm64/boot/dts/mediatek/mt2712e.dtsi
index 2cd8b33886e5..ab27ff4a869e 100644
--- a/arch/arm64/boot/dts/mediatek/mt2712e.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt2712e.dtsi
@@ -797,60 +797,73 @@
@@ -791,60 +791,73 @@
};
};
@ -253,11 +251,9 @@ index 2cd8b33886e5..ab27ff4a869e 100644
interrupt-controller;
#address-cells = <0>;
#interrupt-cells = <1>;
diff --git a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
index 83e10591e0e5..7574d88cc46a 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
@@ -207,18 +207,16 @@
@@ -294,18 +294,16 @@
};
};
@ -283,11 +279,9 @@ index 83e10591e0e5..7574d88cc46a 100644
};
&pio {
diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
index 339dc9f88f43..d5131c8b6a79 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -766,45 +766,41 @@
@@ -790,45 +790,41 @@
#reset-cells = <1>;
};
@ -350,7 +344,7 @@ index 339dc9f88f43..d5131c8b6a79 100644
interrupt-map-mask = <0 0 0 7>;
interrupt-map = <0 0 0 1 &pcie_intc0 0>,
<0 0 0 2 &pcie_intc0 1>,
@@ -816,15 +812,39 @@
@@ -840,15 +836,39 @@
#interrupt-cells = <1>;
};
};
@ -393,8 +387,8 @@ index 339dc9f88f43..d5131c8b6a79 100644
interrupt-map-mask = <0 0 0 7>;
interrupt-map = <0 0 0 1 &pcie_intc1 0>,
<0 0 0 2 &pcie_intc1 1>,
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts 2020-06-15 18:52:25.092948824 +0800
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts 2020-06-15 18:52:15.909094229 +0800
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -244,18 +244,16 @@
};
};

View File

@ -133,11 +133,9 @@ Signed-off-by: chuanjia.liu <Chuanjia.Liu@mediatek.com>
arch/arm/boot/dts/mt7629.dtsi | 23 +++++++++++++----------
2 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/arch/arm/boot/dts/mt7629-rfb.dts b/arch/arm/boot/dts/mt7629-rfb.dts
index 9980c10c6e29..eb536cbebd9b 100644
--- a/arch/arm/boot/dts/mt7629-rfb.dts
+++ b/arch/arm/boot/dts/mt7629-rfb.dts
@@ -140,9 +140,10 @@
@@ -171,9 +171,10 @@
};
};
@ -149,11 +147,9 @@ index 9980c10c6e29..eb536cbebd9b 100644
};
&pciephy1 {
diff --git a/arch/arm/boot/dts/mt7629.dtsi b/arch/arm/boot/dts/mt7629.dtsi
index 5cbb3d244c75..94567307b842 100644
--- a/arch/arm/boot/dts/mt7629.dtsi
+++ b/arch/arm/boot/dts/mt7629.dtsi
@@ -360,16 +360,21 @@
@@ -368,16 +368,21 @@
#reset-cells = <1>;
};
@ -181,7 +177,7 @@ index 5cbb3d244c75..94567307b842 100644
clocks = <&pciesys CLK_PCIE_P1_MAC_EN>,
<&pciesys CLK_PCIE_P0_AHB_EN>,
<&pciesys CLK_PCIE_P1_AUX_EN>,
@@ -390,21 +395,19 @@
@@ -398,21 +403,19 @@
power-domains = <&scpsys MT7622_POWER_DOMAIN_HIF0>;
bus-range = <0x00 0xff>;
ranges = <0x82000000 0 0x20000000 0x20000000 0 0x10000000>;

View File

@ -31,6 +31,7 @@ CONFIG_ARCH_USE_BUILTIN_BSWAP=y
CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y
CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
CONFIG_ARCH_WANT_LIBATA_LEDS=y
CONFIG_ARM=y
CONFIG_ARMADA_370_CLK=y
CONFIG_ARMADA_370_XP_IRQ=y
@ -64,6 +65,7 @@ CONFIG_ARM_UNWIND=y
CONFIG_ARM_VIRT_EXT=y
CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH=y
CONFIG_ATA=y
CONFIG_ATA_LEDS=y
CONFIG_ATAGS=y
CONFIG_AUTO_ZRELADDR=y
CONFIG_BLK_DEV_LOOP=y

View File

@ -37,6 +37,7 @@ CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y
CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y
CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
CONFIG_ARCH_WANT_LIBATA_LEDS=y
CONFIG_ARM=y
CONFIG_ARMADA_370_CLK=y
CONFIG_ARMADA_370_XP_IRQ=y
@ -69,6 +70,7 @@ CONFIG_ARM_UNWIND=y
CONFIG_ARM_VIRT_EXT=y
CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH=y
CONFIG_ATA=y
CONFIG_ATA_LEDS=y
CONFIG_ATAGS=y
CONFIG_AUTO_ZRELADDR=y
CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y

View File

@ -12,6 +12,9 @@ board=$(board_name)
boardname="${board##*,}"
case "$board" in
kobol,helios4)
ucidef_set_led_usbport "USB" "USB" "helios4:green:usb" "usb1-port1" "usb2-port1" "usb3-port1" "usb4-port1" "usb5-port1"
;;
linksys,wrt1200ac)
ucidef_set_led_netdev "wan" "WAN" "pca963x:caiman:white:wan" "wan"
ucidef_set_led_usbport "usb1" "USB 1" "pca963x:caiman:white:usb2" "usb1-port1"

View File

@ -10,6 +10,7 @@ REQUIRE_IMAGE_METADATA=1
platform_check_image() {
case "$(board_name)" in
cznic,turris-omnia|\
kobol,helios4|\
solidrun,clearfog-base-a1|\
solidrun,clearfog-pro-a1)
platform_check_image_sdcard "$1"
@ -26,6 +27,7 @@ platform_do_upgrade() {
nand_do_upgrade "$1"
;;
cznic,turris-omnia|\
kobol,helios4|\
solidrun,clearfog-base-a1|\
solidrun,clearfog-pro-a1)
platform_do_upgrade_sdcard "$1"
@ -46,6 +48,7 @@ platform_do_upgrade() {
platform_copy_config() {
case "$(board_name)" in
cznic,turris-omnia|\
kobol,helios4|\
solidrun,clearfog-base-a1|\
solidrun,clearfog-pro-a1)
platform_copy_config_sdcard

View File

@ -51,6 +51,20 @@ define Device/globalscale_mirabox
endef
TARGET_DEVICES += globalscale_mirabox
define Device/kobol_helios4
DEVICE_VENDOR := Kobol
DEVICE_MODEL := Helios4
KERNEL_INSTALL := 1
KERNEL := kernel-bin
DEVICE_PACKAGES := mkf2fs e2fsprogs partx-utils
IMAGES := sdcard.img.gz
IMAGE/sdcard.img.gz := boot-scr | boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata
SOC := armada-388
UBOOT := helios4-u-boot-spl.kwb
BOOT_SCRIPT := clearfog
endef
TARGET_DEVICES += kobol_helios4
define Device/linksys
$(Device/NAND-128K)
DEVICE_VENDOR := Linksys

View File

@ -0,0 +1,28 @@
--- a/arch/arm/boot/dts/armada-388-helios4.dts
+++ b/arch/arm/boot/dts/armada-388-helios4.dts
@@ -15,6 +15,13 @@
model = "Helios4";
compatible = "kobol,helios4", "marvell,armada388",
"marvell,armada385", "marvell,armada380";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
memory {
device_type = "memory";
@@ -70,10 +77,9 @@
system-leds {
compatible = "gpio-leds";
- status-led {
+ led_status: status-led {
label = "helios4:green:status";
gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
- linux,default-trigger = "heartbeat";
default-state = "on";
};

View File

@ -0,0 +1,10 @@
--- a/arch/arm/mach-mvebu/Kconfig
+++ b/arch/arm/mach-mvebu/Kconfig
@@ -68,6 +68,7 @@
select HAVE_SMP
select MACH_MVEBU_V7
select PINCTRL_ARMADA_38X
+ select ARCH_WANT_LIBATA_LEDS
help
Say 'Y' here if you want your kernel to support boards based
on the Marvell Armada 380/385 SoC with device tree.

View File

@ -15,7 +15,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -1911,6 +1911,23 @@ static void mvneta_rxq_drop_pkts(struct
@@ -1913,6 +1913,23 @@ static void mvneta_rxq_drop_pkts(struct
}
}
@ -39,7 +39,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static inline
int mvneta_rx_refill_queue(struct mvneta_port *pp, struct mvneta_rx_queue *rxq)
{
@@ -2091,14 +2108,8 @@ static int mvneta_rx_swbm(struct napi_st
@@ -2093,14 +2110,8 @@ static int mvneta_rx_swbm(struct napi_st
rxq->left_size = 0;
}
@ -56,7 +56,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* return some buffers to hardware queue, one at a time is too slow */
refill = mvneta_rx_refill_queue(pp, rxq);
@@ -2221,14 +2232,8 @@ err_drop_frame:
@@ -2223,14 +2234,8 @@ err_drop_frame:
napi_gro_receive(napi, skb);
}
@ -73,7 +73,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Update rxq management counters */
mvneta_rxq_desc_num_update(pp, rxq, rx_done, rx_done);
@@ -2474,7 +2479,6 @@ static netdev_tx_t mvneta_tx(struct sk_b
@@ -2476,7 +2481,6 @@ static netdev_tx_t mvneta_tx(struct sk_b
out:
if (frags > 0) {
@ -81,7 +81,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct netdev_queue *nq = netdev_get_tx_queue(dev, txq_id);
netdev_tx_sent_queue(nq, len);
@@ -2489,10 +2493,7 @@ out:
@@ -2491,10 +2495,7 @@ out:
else
txq->pending += frags;

View File

@ -43,7 +43,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Registers */
#define MVNETA_RXQ_CONFIG_REG(q) (0x1400 + ((q) << 2))
@@ -605,6 +606,10 @@ struct mvneta_rx_queue {
@@ -607,6 +608,10 @@ struct mvneta_rx_queue {
u32 pkts_coal;
u32 time_coal;
@ -54,7 +54,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Virtual address of the RX buffer */
void **buf_virt_addr;
@@ -1823,23 +1828,21 @@ static int mvneta_rx_refill(struct mvnet
@@ -1825,23 +1830,21 @@ static int mvneta_rx_refill(struct mvnet
struct mvneta_rx_queue *rxq,
gfp_t gfp_mask)
{
@ -86,7 +86,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return 0;
}
@@ -1905,10 +1908,12 @@ static void mvneta_rxq_drop_pkts(struct
@@ -1907,10 +1910,12 @@ static void mvneta_rxq_drop_pkts(struct
if (!data || !(rx_desc->buf_phys_addr))
continue;
@ -102,7 +102,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
static void
@@ -2045,8 +2050,7 @@ static int mvneta_rx_swbm(struct napi_st
@@ -2047,8 +2052,7 @@ static int mvneta_rx_swbm(struct napi_st
skb_add_rx_frag(rxq->skb, frag_num, page,
frag_offset, frag_size,
PAGE_SIZE);
@ -112,7 +112,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
rxq->left_size -= frag_size;
}
} else {
@@ -2076,9 +2080,7 @@ static int mvneta_rx_swbm(struct napi_st
@@ -2078,9 +2082,7 @@ static int mvneta_rx_swbm(struct napi_st
frag_offset, frag_size,
PAGE_SIZE);
@ -123,7 +123,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
rxq->left_size -= frag_size;
}
} /* Middle or Last descriptor */
@@ -2845,11 +2847,54 @@ static int mvneta_poll(struct napi_struc
@@ -2847,11 +2849,54 @@ static int mvneta_poll(struct napi_struc
return rx_done;
}

View File

@ -27,7 +27,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -323,6 +323,11 @@
@@ -325,6 +325,11 @@
ETH_HLEN + ETH_FCS_LEN, \
cache_line_size())
@ -39,7 +39,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
#define IS_TSO_HEADER(txq, addr) \
((addr >= txq->tso_hdrs_phys) && \
(addr < txq->tso_hdrs_phys + txq->size * TSO_HEADER_SIZE))
@@ -648,7 +653,6 @@ static int txq_number = 8;
@@ -650,7 +655,6 @@ static int txq_number = 8;
static int rxq_def;
static int rx_copybreak __read_mostly = 256;
@ -47,7 +47,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* HW BM need that each port be identify by a unique ID */
static int global_port_id;
@@ -1840,7 +1844,7 @@ static int mvneta_rx_refill(struct mvnet
@@ -1842,7 +1846,7 @@ static int mvneta_rx_refill(struct mvnet
phys_addr = page_pool_get_dma_addr(page) + pp->rx_offset_correction;
dma_dir = page_pool_get_dma_dir(rxq->page_pool);
dma_sync_single_for_device(pp->dev->dev.parent, phys_addr,
@ -56,7 +56,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mvneta_rx_desc_fill(rx_desc, phys_addr, page, rxq);
return 0;
@@ -1958,30 +1962,102 @@ int mvneta_rx_refill_queue(struct mvneta
@@ -1960,30 +1964,102 @@ int mvneta_rx_refill_queue(struct mvneta
return i;
}
@ -169,7 +169,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
index = rx_desc - rxq->descs;
page = (struct page *)rxq->buf_virt_addr[index];
@@ -1989,100 +2065,30 @@ static int mvneta_rx_swbm(struct napi_st
@@ -1991,100 +2067,30 @@ static int mvneta_rx_swbm(struct napi_st
/* Prefetch header */
prefetch(data);
@ -275,7 +275,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
} /* Middle or Last descriptor */
if (!(rx_status & MVNETA_RXD_LAST_DESC))
@@ -2107,7 +2113,6 @@ static int mvneta_rx_swbm(struct napi_st
@@ -2109,7 +2115,6 @@ static int mvneta_rx_swbm(struct napi_st
/* clean uncomplete skb pointer in queue */
rxq->skb = NULL;
@ -283,7 +283,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
if (rcvd_pkts)
@@ -2968,7 +2973,7 @@ static void mvneta_rxq_hw_init(struct mv
@@ -2970,7 +2975,7 @@ static void mvneta_rxq_hw_init(struct mv
/* Set Offset */
mvneta_rxq_offset_set(pp, rxq, 0);
mvneta_rxq_buf_size_set(pp, rxq, PAGE_SIZE < SZ_64K ?
@ -292,7 +292,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
MVNETA_RX_BUF_SIZE(pp->pkt_size));
mvneta_rxq_bm_disable(pp, rxq);
mvneta_rxq_fill(pp, rxq, rxq->size);
@@ -4678,7 +4683,7 @@ static int mvneta_probe(struct platform_
@@ -4700,7 +4705,7 @@ static int mvneta_probe(struct platform_
SET_NETDEV_DEV(dev, &pdev->dev);
pp->id = global_port_id++;

View File

@ -42,7 +42,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Registers */
#define MVNETA_RXQ_CONFIG_REG(q) (0x1400 + ((q) << 2))
@@ -323,8 +324,10 @@
@@ -325,8 +326,10 @@
ETH_HLEN + ETH_FCS_LEN, \
cache_line_size())
@ -54,7 +54,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
#define MVNETA_SKB_SIZE(len) (SKB_DATA_ALIGN(len) + MVNETA_SKB_PAD)
#define MVNETA_MAX_RX_BUF_SIZE (PAGE_SIZE - MVNETA_SKB_PAD)
@@ -352,6 +355,11 @@ struct mvneta_statistic {
@@ -354,6 +357,11 @@ struct mvneta_statistic {
#define T_REG_64 64
#define T_SW 1
@ -66,7 +66,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static const struct mvneta_statistic mvneta_statistics[] = {
{ 0x3000, T_REG_64, "good_octets_received", },
{ 0x3010, T_REG_32, "good_frames_received", },
@@ -433,6 +441,8 @@ struct mvneta_port {
@@ -435,6 +443,8 @@ struct mvneta_port {
u32 cause_rx_tx;
struct napi_struct napi;
@ -75,7 +75,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Core clock */
struct clk *clk;
/* AXI clock */
@@ -1963,10 +1973,50 @@ int mvneta_rx_refill_queue(struct mvneta
@@ -1965,10 +1975,50 @@ int mvneta_rx_refill_queue(struct mvneta
}
static int
@ -127,7 +127,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
{
unsigned char *data = page_address(page);
int data_len = -MVNETA_MH_SIZE, len;
@@ -1986,7 +2036,26 @@ mvneta_swbm_rx_frame(struct mvneta_port
@@ -1988,7 +2038,26 @@ mvneta_swbm_rx_frame(struct mvneta_port
rx_desc->buf_phys_addr,
len, dma_dir);
@ -155,7 +155,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (unlikely(!rxq->skb)) {
netdev_err(dev,
"Can't allocate skb on queue %d\n",
@@ -1997,8 +2066,9 @@ mvneta_swbm_rx_frame(struct mvneta_port
@@ -1999,8 +2068,9 @@ mvneta_swbm_rx_frame(struct mvneta_port
}
page_pool_release_page(rxq->page_pool, page);
@ -167,7 +167,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mvneta_rx_csum(pp, rx_desc->status, rxq->skb);
rxq->left_size = rx_desc->data_size - len;
@@ -2032,7 +2102,7 @@ mvneta_swbm_add_rx_fragment(struct mvnet
@@ -2034,7 +2104,7 @@ mvneta_swbm_add_rx_fragment(struct mvnet
/* refill descriptor with new buffer later */
skb_add_rx_frag(rxq->skb,
skb_shinfo(rxq->skb)->nr_frags,
@ -176,7 +176,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
PAGE_SIZE);
}
page_pool_release_page(rxq->page_pool, page);
@@ -2047,11 +2117,18 @@ static int mvneta_rx_swbm(struct napi_st
@@ -2049,11 +2119,18 @@ static int mvneta_rx_swbm(struct napi_st
{
int rcvd_pkts = 0, rcvd_bytes = 0, rx_proc = 0;
struct net_device *dev = pp->dev;
@ -195,7 +195,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Fairness NAPI loop */
while (rx_proc < budget && rx_proc < rx_todo) {
struct mvneta_rx_desc *rx_desc = mvneta_rxq_next_desc_get(rxq);
@@ -2079,7 +2156,8 @@ static int mvneta_rx_swbm(struct napi_st
@@ -2081,7 +2158,8 @@ static int mvneta_rx_swbm(struct napi_st
continue;
}
@ -205,7 +205,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (err)
continue;
} else {
@@ -2114,6 +2192,10 @@ static int mvneta_rx_swbm(struct napi_st
@@ -2116,6 +2194,10 @@ static int mvneta_rx_swbm(struct napi_st
/* clean uncomplete skb pointer in queue */
rxq->skb = NULL;
}
@ -216,7 +216,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (rcvd_pkts)
mvneta_update_stats(pp, rcvd_pkts, rcvd_bytes, false);
@@ -2855,13 +2937,14 @@ static int mvneta_poll(struct napi_struc
@@ -2857,13 +2939,14 @@ static int mvneta_poll(struct napi_struc
static int mvneta_create_page_pool(struct mvneta_port *pp,
struct mvneta_rx_queue *rxq, int size)
{
@ -232,7 +232,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
};
int err;
@@ -3328,6 +3411,11 @@ static int mvneta_change_mtu(struct net_
@@ -3364,6 +3447,11 @@ static int mvneta_change_mtu(struct net_
mtu = ALIGN(MVNETA_RX_PKT_SIZE(mtu), 8);
}
@ -244,7 +244,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
dev->mtu = mtu;
if (!netif_running(dev)) {
@@ -3997,6 +4085,47 @@ static int mvneta_ioctl(struct net_devic
@@ -4029,6 +4117,47 @@ static int mvneta_ioctl(struct net_devic
return phylink_mii_ioctl(pp->phylink, ifr, cmd);
}
@ -292,7 +292,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Ethtool methods */
/* Set link ksettings (phy address, speed) for ethtools */
@@ -4393,6 +4522,7 @@ static const struct net_device_ops mvnet
@@ -4425,6 +4554,7 @@ static const struct net_device_ops mvnet
.ndo_fix_features = mvneta_fix_features,
.ndo_get_stats64 = mvneta_get_stats64,
.ndo_do_ioctl = mvneta_ioctl,
@ -300,7 +300,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
};
static const struct ethtool_ops mvneta_eth_tool_ops = {
@@ -4683,7 +4813,7 @@ static int mvneta_probe(struct platform_
@@ -4705,7 +4835,7 @@ static int mvneta_probe(struct platform_
SET_NETDEV_DEV(dev, &pdev->dev);
pp->id = global_port_id++;

View File

@ -16,7 +16,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -2036,6 +2036,9 @@ mvneta_swbm_rx_frame(struct mvneta_port
@@ -2038,6 +2038,9 @@ mvneta_swbm_rx_frame(struct mvneta_port
rx_desc->buf_phys_addr,
len, dma_dir);
@ -26,7 +26,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
xdp->data_hard_start = data;
xdp->data = data + MVNETA_SKB_HEADROOM + MVNETA_MH_SIZE;
xdp->data_end = xdp->data + data_len;
@@ -2133,14 +2136,10 @@ static int mvneta_rx_swbm(struct napi_st
@@ -2135,14 +2138,10 @@ static int mvneta_rx_swbm(struct napi_st
while (rx_proc < budget && rx_proc < rx_todo) {
struct mvneta_rx_desc *rx_desc = mvneta_rxq_next_desc_get(rxq);
u32 rx_status, index;

View File

@ -14,7 +14,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -563,6 +563,20 @@ struct mvneta_rx_desc {
@@ -565,6 +565,20 @@ struct mvneta_rx_desc {
};
#endif
@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct mvneta_tx_queue {
/* Number of this TX queue, in the range 0-7 */
u8 id;
@@ -578,8 +592,8 @@ struct mvneta_tx_queue {
@@ -580,8 +594,8 @@ struct mvneta_tx_queue {
int tx_stop_threshold;
int tx_wake_threshold;
@ -46,7 +46,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Index of last TX DMA descriptor that was inserted */
int txq_put_index;
@@ -1791,14 +1805,9 @@ static void mvneta_txq_bufs_free(struct
@@ -1793,14 +1807,9 @@ static void mvneta_txq_bufs_free(struct
int i;
for (i = 0; i < num; i++) {
@ -62,7 +62,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mvneta_txq_inc_get(txq);
@@ -1806,9 +1815,12 @@ static void mvneta_txq_bufs_free(struct
@@ -1808,9 +1817,12 @@ static void mvneta_txq_bufs_free(struct
dma_unmap_single(pp->dev->dev.parent,
tx_desc->buf_phys_addr,
tx_desc->data_size, DMA_TO_DEVICE);
@ -77,7 +77,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
netdev_tx_completed_queue(nq, pkts_compl, bytes_compl);
@@ -2333,16 +2345,19 @@ static inline void
@@ -2335,16 +2347,19 @@ static inline void
mvneta_tso_put_hdr(struct sk_buff *skb,
struct mvneta_port *pp, struct mvneta_tx_queue *txq)
{
@ -99,7 +99,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mvneta_txq_inc_put(txq);
}
@@ -2351,6 +2366,7 @@ mvneta_tso_put_data(struct net_device *d
@@ -2353,6 +2368,7 @@ mvneta_tso_put_data(struct net_device *d
struct sk_buff *skb, char *data, int size,
bool last_tcp, bool is_last)
{
@ -107,7 +107,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct mvneta_tx_desc *tx_desc;
tx_desc = mvneta_txq_next_desc_get(txq);
@@ -2364,7 +2380,8 @@ mvneta_tso_put_data(struct net_device *d
@@ -2366,7 +2382,8 @@ mvneta_tso_put_data(struct net_device *d
}
tx_desc->command = 0;
@ -117,7 +117,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (last_tcp) {
/* last descriptor in the TCP packet */
@@ -2372,7 +2389,7 @@ mvneta_tso_put_data(struct net_device *d
@@ -2374,7 +2391,7 @@ mvneta_tso_put_data(struct net_device *d
/* last descriptor in SKB */
if (is_last)
@ -126,7 +126,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
mvneta_txq_inc_put(txq);
return 0;
@@ -2457,6 +2474,7 @@ static int mvneta_tx_frag_process(struct
@@ -2459,6 +2476,7 @@ static int mvneta_tx_frag_process(struct
int i, nr_frags = skb_shinfo(skb)->nr_frags;
for (i = 0; i < nr_frags; i++) {
@ -134,7 +134,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
void *addr = skb_frag_address(frag);
@@ -2476,12 +2494,13 @@ static int mvneta_tx_frag_process(struct
@@ -2478,12 +2496,13 @@ static int mvneta_tx_frag_process(struct
if (i == nr_frags - 1) {
/* Last descriptor */
tx_desc->command = MVNETA_TXD_L_DESC | MVNETA_TXD_Z_PAD;
@ -150,7 +150,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mvneta_txq_inc_put(txq);
}
@@ -2509,6 +2528,7 @@ static netdev_tx_t mvneta_tx(struct sk_b
@@ -2511,6 +2530,7 @@ static netdev_tx_t mvneta_tx(struct sk_b
struct mvneta_port *pp = netdev_priv(dev);
u16 txq_id = skb_get_queue_mapping(skb);
struct mvneta_tx_queue *txq = &pp->txqs[txq_id];
@ -158,7 +158,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct mvneta_tx_desc *tx_desc;
int len = skb->len;
int frags = 0;
@@ -2541,16 +2561,17 @@ static netdev_tx_t mvneta_tx(struct sk_b
@@ -2543,16 +2563,17 @@ static netdev_tx_t mvneta_tx(struct sk_b
goto out;
}
@ -178,7 +178,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mvneta_txq_inc_put(txq);
tx_desc->command = tx_cmd;
/* Continue with other skb fragments */
@@ -3136,9 +3157,8 @@ static int mvneta_txq_sw_init(struct mvn
@@ -3138,9 +3159,8 @@ static int mvneta_txq_sw_init(struct mvn
txq->last_desc = txq->size - 1;
@ -190,7 +190,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
dma_free_coherent(pp->dev->dev.parent,
txq->size * MVNETA_DESC_ALIGNED_SIZE,
txq->descs, txq->descs_phys);
@@ -3150,7 +3170,7 @@ static int mvneta_txq_sw_init(struct mvn
@@ -3152,7 +3172,7 @@ static int mvneta_txq_sw_init(struct mvn
txq->size * TSO_HEADER_SIZE,
&txq->tso_hdrs_phys, GFP_KERNEL);
if (!txq->tso_hdrs) {
@ -199,7 +199,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
dma_free_coherent(pp->dev->dev.parent,
txq->size * MVNETA_DESC_ALIGNED_SIZE,
txq->descs, txq->descs_phys);
@@ -3203,7 +3223,7 @@ static void mvneta_txq_sw_deinit(struct
@@ -3205,7 +3225,7 @@ static void mvneta_txq_sw_deinit(struct
{
struct netdev_queue *nq = netdev_get_tx_queue(pp->dev, txq->id);

View File

@ -14,7 +14,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -1811,16 +1811,19 @@ static void mvneta_txq_bufs_free(struct
@@ -1813,16 +1813,19 @@ static void mvneta_txq_bufs_free(struct
mvneta_txq_inc_get(txq);
@ -41,7 +41,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
netdev_tx_completed_queue(nq, pkts_compl, bytes_compl);
@@ -1985,6 +1988,111 @@ int mvneta_rx_refill_queue(struct mvneta
@@ -1987,6 +1990,111 @@ int mvneta_rx_refill_queue(struct mvneta
}
static int
@ -153,7 +153,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mvneta_run_xdp(struct mvneta_port *pp, struct mvneta_rx_queue *rxq,
struct bpf_prog *prog, struct xdp_buff *xdp)
{
@@ -2006,6 +2114,11 @@ mvneta_run_xdp(struct mvneta_port *pp, s
@@ -2008,6 +2116,11 @@ mvneta_run_xdp(struct mvneta_port *pp, s
}
break;
}
@ -165,7 +165,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
default:
bpf_warn_invalid_xdp_action(act);
/* fall through */
@@ -4542,6 +4655,7 @@ static const struct net_device_ops mvnet
@@ -4574,6 +4687,7 @@ static const struct net_device_ops mvnet
.ndo_get_stats64 = mvneta_get_stats64,
.ndo_do_ioctl = mvneta_ioctl,
.ndo_bpf = mvneta_xdp,

View File

@ -21,7 +21,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -2165,7 +2165,7 @@ mvneta_swbm_rx_frame(struct mvneta_port
@@ -2167,7 +2167,7 @@ mvneta_swbm_rx_frame(struct mvneta_port
prefetch(data);
xdp->data_hard_start = data;
@ -30,7 +30,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
xdp->data_end = xdp->data + data_len;
xdp_set_data_meta_invalid(xdp);
@@ -2230,7 +2230,7 @@ mvneta_swbm_add_rx_fragment(struct mvnet
@@ -2232,7 +2232,7 @@ mvneta_swbm_add_rx_fragment(struct mvnet
/* refill descriptor with new buffer later */
skb_add_rx_frag(rxq->skb,
skb_shinfo(rxq->skb)->nr_frags,

View File

@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -2108,7 +2108,8 @@ mvneta_run_xdp(struct mvneta_port *pp, s
@@ -2110,7 +2110,8 @@ mvneta_run_xdp(struct mvneta_port *pp, s
err = xdp_do_redirect(pp->dev, xdp, prog);
if (err) {
ret = MVNETA_XDP_DROPPED;
@ -27,7 +27,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
} else {
ret = MVNETA_XDP_REDIR;
}
@@ -2117,7 +2118,8 @@ mvneta_run_xdp(struct mvneta_port *pp, s
@@ -2119,7 +2120,8 @@ mvneta_run_xdp(struct mvneta_port *pp, s
case XDP_TX:
ret = mvneta_xdp_xmit_back(pp, xdp);
if (ret != MVNETA_XDP_TX)

View File

@ -38,7 +38,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -4231,6 +4231,12 @@ static int mvneta_xdp_setup(struct net_d
@@ -4263,6 +4263,12 @@ static int mvneta_xdp_setup(struct net_d
return -EOPNOTSUPP;
}

View File

@ -20,7 +20,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -324,8 +324,7 @@
@@ -326,8 +326,7 @@
ETH_HLEN + ETH_FCS_LEN, \
cache_line_size())
@ -30,7 +30,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
#define MVNETA_SKB_PAD (SKB_DATA_ALIGN(sizeof(struct skb_shared_info) + \
MVNETA_SKB_HEADROOM))
#define MVNETA_SKB_SIZE(len) (SKB_DATA_ALIGN(len) + MVNETA_SKB_PAD)
@@ -1172,6 +1171,7 @@ bm_mtu_err:
@@ -1174,6 +1173,7 @@ bm_mtu_err:
mvneta_bm_pool_destroy(pp->bm_priv, pp->pool_short, 1 << pp->id);
pp->bm_priv = NULL;
@ -38,7 +38,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mvreg_write(pp, MVNETA_ACC_MODE, MVNETA_ACC_MODE_EXT1);
netdev_info(pp->dev, "fail to update MTU, fall back to software BM\n");
}
@@ -4954,7 +4954,6 @@ static int mvneta_probe(struct platform_
@@ -4976,7 +4976,6 @@ static int mvneta_probe(struct platform_
SET_NETDEV_DEV(dev, &pdev->dev);
pp->id = global_port_id++;
@ -46,7 +46,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Obtain access to BM resources if enabled and already initialized */
bm_node = of_parse_phandle(dn, "buffer-manager", 0);
@@ -4979,6 +4978,10 @@ static int mvneta_probe(struct platform_
@@ -5001,6 +5000,10 @@ static int mvneta_probe(struct platform_
}
of_node_put(bm_node);
@ -57,7 +57,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
err = mvneta_init(&pdev->dev, pp);
if (err < 0)
goto err_netdev;
@@ -5136,6 +5139,7 @@ static int mvneta_resume(struct device *
@@ -5154,6 +5157,7 @@ static int mvneta_resume(struct device *
err = mvneta_bm_port_init(pdev, pp);
if (err < 0) {
dev_info(&pdev->dev, "use SW buffer management\n");

View File

@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -4652,6 +4652,14 @@ static int mvneta_ethtool_set_eee(struct
@@ -4684,6 +4684,14 @@ static int mvneta_ethtool_set_eee(struct
return phylink_ethtool_set_eee(pp->phylink, eee);
}
@ -24,7 +24,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static const struct net_device_ops mvneta_netdev_ops = {
.ndo_open = mvneta_open,
.ndo_stop = mvneta_stop,
@@ -4662,6 +4670,7 @@ static const struct net_device_ops mvnet
@@ -4694,6 +4702,7 @@ static const struct net_device_ops mvnet
.ndo_fix_features = mvneta_fix_features,
.ndo_get_stats64 = mvneta_get_stats64,
.ndo_do_ioctl = mvneta_ioctl,

View File

@ -0,0 +1,28 @@
--- a/arch/arm/boot/dts/armada-388-helios4.dts
+++ b/arch/arm/boot/dts/armada-388-helios4.dts
@@ -15,6 +15,13 @@
model = "Helios4";
compatible = "kobol,helios4", "marvell,armada388",
"marvell,armada385", "marvell,armada380";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
memory {
device_type = "memory";
@@ -70,10 +77,9 @@
system-leds {
compatible = "gpio-leds";
- status-led {
+ led_status: status-led {
label = "helios4:green:status";
gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
- linux,default-trigger = "heartbeat";
default-state = "on";
};

View File

@ -0,0 +1,10 @@
--- a/arch/arm/mach-mvebu/Kconfig
+++ b/arch/arm/mach-mvebu/Kconfig
@@ -68,6 +68,7 @@
select HAVE_SMP
select MACH_MVEBU_V7
select PINCTRL_ARMADA_38X
+ select ARCH_WANT_LIBATA_LEDS
help
Say 'Y' here if you want your kernel to support boards based
on the Marvell Armada 380/385 SoC with device tree.

View File

@ -35,6 +35,10 @@
serial0 = &uartlite;
};
chosen {
bootargs = "console=ttyS0,57600";
};
pll: pll {
compatible = "mediatek,mt7621-pll", "syscon";

View File

@ -18,10 +18,6 @@
label-mac-device = &gmac0;
};
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";

View File

@ -16,10 +16,6 @@
led-upgrade = &led_run;
};
chosen {
bootargs = "console=ttyS0,57600";
};
keys {
compatible = "gpio-keys";

View File

@ -6,10 +6,6 @@
#include <dt-bindings/input/input.h>
/ {
chosen {
bootargs = "console=ttyS0,57600";
};
keys {
compatible = "gpio-keys";

View File

@ -17,10 +17,6 @@
led-upgrade = &led_power;
};
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";

View File

@ -13,10 +13,6 @@
led-upgrade = &led_power;
};
chosen {
bootargs = "console=ttyS0,57600";
};
keys {
compatible = "gpio-keys";

View File

@ -16,10 +16,6 @@
led-upgrade = &led_power;
};
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";

View File

@ -18,10 +18,6 @@
label-mac-device = &gmac0;
};
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";

View File

@ -16,10 +16,6 @@
led-upgrade = &led_power;
};
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";

View File

@ -17,10 +17,6 @@
label-mac-device = &gmac0;
};
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";

View File

@ -0,0 +1,40 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "mt7621_dlink_dir-8xx-a1.dtsi"
/ {
compatible = "dlink,dir-867-a1", "mediatek,mt7621-soc";
model = "D-Link DIR-867 A1";
aliases {
led-boot = &led_power_orange;
led-failsafe = &led_power_green;
led-running = &led_power_green;
led-upgrade = &led_net_orange;
};
leds {
compatible = "gpio-leds";
led_power_orange: power_orange {
label = "dir-867-a1:orange:power";
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
};
led_power_green: power_green {
label = "dir-867-a1:green:power";
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
led_net_orange: net_orange {
label = "dir-867-a1:orange:net";
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
};
net_green {
label = "dir-867-a1:green:net";
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
};
};
};

View File

@ -1,10 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "mt7621.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "mt7621_dlink_dir-8xx-a1.dtsi"
/ {
compatible = "dlink,dir-878-a1", "mediatek,mt7621-soc";
@ -15,11 +12,6 @@
led-failsafe = &led_power_green;
led-running = &led_power_green;
led-upgrade = &led_net_orange;
label-mac-device = &gmac0;
};
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
@ -45,137 +37,4 @@
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
wifi {
label = "wifi";
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RFKILL>;
};
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
factory: partition@40000 {
label = "factory";
reg = <0x40000 0x20000>;
read-only;
};
partition@60000 {
compatible = "sge,uimage";
label = "firmware";
reg = <0x60000 0xfa0000>;
};
};
};
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0000>;
ieee80211-freq-limit = <2400000 2500000>;
led {
led-active-low;
};
};
};
&pcie1 {
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x8000>;
ieee80211-freq-limit = <5000000 6000000>;
led {
led-active-low;
};
};
};
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan4";
};
port@1 {
status = "okay";
label = "lan3";
};
port@2 {
status = "okay";
label = "lan2";
};
port@3 {
status = "okay";
label = "lan1";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe006>;
};
};
};
&state_default {
gpio {
groups = "i2c", "uart3", "jtag", "wdt";
function = "gpio";
};
};

View File

@ -0,0 +1,54 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "mt7621_dlink_dir-8xx-a1.dtsi"
/ {
compatible = "dlink,dir-882-a1", "mediatek,mt7621-soc";
model = "D-Link DIR-882 A1";
aliases {
led-boot = &led_power_orange;
led-failsafe = &led_power_green;
led-running = &led_power_green;
led-upgrade = &led_net_orange;
};
leds {
compatible = "gpio-leds";
led_power_orange: power_orange {
label = "dir-882-a1:orange:power";
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
};
led_power_green: power_green {
label = "dir-882-a1:green:power";
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
led_net_orange: net_orange {
label = "dir-882-a1:orange:net";
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
};
net_green {
label = "dir-882-a1:green:net";
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
};
usb2 {
label = "dir-882-a1:green:usb2";
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
trigger-sources = <&ehci_port2>;
linux,default-trigger = "usbport";
};
usb3 {
label = "dir-882-a1:green:usb3";
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
trigger-sources = <&xhci_ehci_port1>;
linux,default-trigger = "usbport";
};
};
};

View File

@ -0,0 +1,145 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7621.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
aliases {
label-mac-device = &gmac0;
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
wifi {
label = "wifi";
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RFKILL>;
};
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
factory: partition@40000 {
label = "factory";
reg = <0x40000 0x20000>;
read-only;
};
partition@60000 {
compatible = "sge,uimage";
label = "firmware";
reg = <0x60000 0xfa0000>;
};
};
};
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0000>;
ieee80211-freq-limit = <2400000 2500000>;
led {
led-active-low;
};
};
};
&pcie1 {
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x8000>;
ieee80211-freq-limit = <5000000 6000000>;
led {
led-active-low;
};
};
};
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan4";
};
port@1 {
status = "okay";
label = "lan3";
};
port@2 {
status = "okay";
label = "lan2";
};
port@3 {
status = "okay";
label = "lan1";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe006>;
};
};
};
&state_default {
gpio {
groups = "i2c", "uart3", "jtag", "wdt";
function = "gpio";
};
};

View File

@ -18,10 +18,6 @@
label-mac-device = &gmac0;
};
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";

View File

@ -11,10 +11,6 @@
label-mac-device = &gmac0;
};
chosen {
bootargs = "console=ttyS0,57600";
};
keys {
compatible = "gpio-keys";

View File

@ -16,10 +16,6 @@
led-upgrade = &led_power_green;
};
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";

View File

@ -14,10 +14,6 @@
label-mac-device = &wan;
};
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";

View File

@ -16,10 +16,6 @@
led-upgrade = &led_power;
};
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";

View File

@ -10,10 +10,6 @@
compatible = "gehua,ghl-r-001", "mediatek,mt7621-soc";
model = "GeHua GHL-R-001";
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";

View File

@ -16,10 +16,6 @@
led-upgrade = &led_status;
};
chosen {
bootargs = "console=ttyS0,57600";
};
keys {
compatible = "gpio-keys";

View File

@ -16,10 +16,6 @@
led-upgrade = &led_status;
};
chosen {
bootargs = "console=ttyS0,57600";
};
keys {
compatible = "gpio-keys";

View File

@ -14,10 +14,6 @@
label-mac-device = &wan;
};
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";

View File

@ -17,10 +17,6 @@
led-upgrade = &led_power;
};
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";

View File

@ -18,10 +18,6 @@
label-mac-device = &gmac0;
};
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";

View File

@ -10,10 +10,6 @@
compatible = "iptime,a8004t", "mediatek,mt7621-soc";
model = "ipTIME A8004T";
chosen {
bootargs = "console=ttyS0,57600";
};
aliases {
led-boot = &led_cpu;
led-failsafe = &led_cpu;

View File

@ -18,10 +18,6 @@
label-mac-device = &wan;
};
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";

View File

@ -16,10 +16,6 @@
led-upgrade = &led_power;
};
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";

View File

@ -6,10 +6,6 @@
compatible = "mediatek,ap-mt7621a-v60", "mediatek,mt7621-soc";
model = "Mediatek AP-MT7621A-V60 EVB";
chosen {
bootargs = "console=ttyS0,57600";
};
sound {
compatible = "simple-audio-card";
simple-audio-card,name = "Audio-I2S";

View File

@ -5,10 +5,6 @@
/ {
compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc";
model = "Mediatek MT7621 evaluation board";
chosen {
bootargs = "console=ttyS0,57600";
};
};
&nand {

View File

@ -9,10 +9,6 @@
compatible = "mqmaker,witi", "mediatek,mt7621-soc";
model = "MQmaker WiTi";
chosen {
bootargs = "console=ttyS0,57600";
};
keys {
compatible = "gpio-keys";

View File

@ -17,10 +17,6 @@
label-mac-device = &gmac0;
};
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";

View File

@ -17,10 +17,6 @@
led-upgrade = &power_amber;
};
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";

View File

@ -16,10 +16,6 @@
label-mac-device = &gmac0;
};
chosen {
bootargs = "console=ttyS0,57600";
};
keys {
compatible = "gpio-keys";

View File

@ -12,10 +12,6 @@
label-mac-device = &gmac0;
};
chosen {
bootargs = "console=ttyS0,57600";
};
keys {
compatible = "gpio-keys";

View File

@ -16,10 +16,6 @@
label-mac-device = &gmac0;
};
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";

View File

@ -18,10 +18,6 @@
label-mac-device = &gmac0;
};
chosen {
bootargs = "console=ttyS0,57600";
};
keys {
compatible = "gpio-keys";

View File

@ -17,10 +17,6 @@
label-mac-device = &gmac0;
};
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";

View File

@ -16,10 +16,6 @@
led-upgrade = &led_blue;
};
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";

View File

@ -16,10 +16,6 @@
led-upgrade = &led_power;
};
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";

View File

@ -15,10 +15,6 @@
led-upgrade = &led_wps;
};
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";

View File

@ -9,10 +9,6 @@
compatible = "storylink,sap-g3200u3", "mediatek,mt7621-soc";
model = "STORYLiNK SAP-G3200U3";
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";

View File

@ -17,10 +17,6 @@
led-upgrade = &led_sys;
};
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";

View File

@ -16,10 +16,6 @@
led-upgrade = &led_power;
};
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";

View File

@ -10,10 +10,6 @@
label-mac-device = &gmac0;
};
chosen {
bootargs = "console=ttyS0,57600";
};
keys {
compatible = "gpio-keys";

View File

@ -8,10 +8,6 @@
label-mac-device = &gmac0;
};
chosen {
bootargs = "console=ttyS0,57600";
};
keys {
compatible = "gpio-keys";

View File

@ -8,10 +8,6 @@
label-mac-device = &wan;
};
chosen {
bootargs = "console=ttyS0,57600";
};
keys {
compatible = "gpio-keys";

View File

@ -6,7 +6,6 @@
#include <dt-bindings/input/input.h>
/ {
chosen {
bootargs = "console=ttyS0,115200n8";
};

View File

@ -17,10 +17,6 @@
label-mac-device = &gmac0;
};
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";

View File

@ -18,10 +18,6 @@
label-mac-device = &gmac0;
};
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";

View File

@ -31,6 +31,7 @@
#include <linux/lockdep.h>
#include <linux/workqueue.h>
#include <linux/of_device.h>
#include <asm/byteorder.h>
#include "mt7530.h"
@ -43,6 +44,8 @@
#endif
#define MT7530_MAX_VID 4095
#define MT7530_MIN_VID 0
#define MT7530_NUM_ARL_RECORDS 2048
#define ARL_LINE_LENGTH 30
#define MT7530_PORT_MIB_TXB_ID 2 /* TxGOC */
#define MT7530_PORT_MIB_RXB_ID 6 /* RxGOC */
@ -61,6 +64,20 @@
#define REG_ESW_VLAN_VAWD2 0x98
#define REG_ESW_VLAN_VTIM(x) (0x100 + 4 * ((x) / 2))
#define REG_ESW_WT_MAC_ATC 0x80
#define REG_ESW_TABLE_ATRD 0x8C
#define REG_ESW_TABLE_TSRA1 0x84
#define REG_ESW_TABLE_TSRA2 0x88
#define REG_MAC_ATC_START 0x8004
#define REG_MAC_ATC_NEXT 0x8005
#define REG_MAC_ATC_BUSY 0x8000U
#define REG_MAC_ATC_SRCH_HIT 0x2000U
#define REG_MAC_ATC_SRCH_END 0x4000U
#define REG_ATRD_VALID 0xff000000U
#define REG_ATRD_PORT_MASK 0xff0U
#define REG_ESW_VLAN_VAWD1_IVL_MAC BIT(30)
#define REG_ESW_VLAN_VAWD1_VTAG_EN BIT(28)
#define REG_ESW_VLAN_VAWD1_VALID BIT(0)
@ -212,6 +229,7 @@ struct mt7530_priv {
bool global_vlan_enable;
struct mt7530_vlan_entry vlan_entries[MT7530_NUM_VLANS];
struct mt7530_port_entry port_entries[MT7530_NUM_PORTS];
char arl_buf[MT7530_NUM_ARL_RECORDS * ARL_LINE_LENGTH + 1];
};
struct mt7530_mapping {
@ -865,6 +883,100 @@ static int mt7530_sw_get_mib(struct switch_dev *dev,
return 0;
}
static char *mt7530_print_arl_table_row(u32 atrd,
u32 mac1,
u32 mac2,
char *buf,
size_t *size)
{
int ret;
size_t port;
size_t i;
u8 port_map;
u8 mac[ETH_ALEN];
mac1 = ntohl(mac1);
mac2 = ntohl(mac2);
port_map = (u8)((atrd & REG_ATRD_PORT_MASK) >> 4);
memcpy(mac, &mac1, sizeof(mac1));
memcpy(mac + sizeof(mac1), &mac2, sizeof(mac) - sizeof(mac1));
for (port = 0, i = 1; port < MT7530_NUM_PORTS; ++port, i <<= 1) {
if (port_map & i) {
ret = snprintf(buf, *size, "Port %d: MAC %pM\n", port, mac);
if (ret >= *size || ret <= 0) {
*buf = 0;
buf = NULL;
goto out;
}
buf += ret;
*size = *size - ret;
}
}
out:
return buf;
}
static int mt7530_get_arl_table(struct switch_dev *dev,
const struct switch_attr *attr,
struct switch_val *val)
{
struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev);
char *buf = priv->arl_buf;
size_t size = sizeof(priv->arl_buf);
size_t count = 0;
size_t retry_times = 100;
int ret;
u32 atc;
ret = snprintf(buf, size, "address resolution table\n");
if (ret >= size || ret <= 0) {
priv->arl_buf[0] = 0;
goto out;
}
buf += ret;
size = size - ret;
mt7530_w32(priv, REG_ESW_WT_MAC_ATC, REG_MAC_ATC_START);
do {
atc = mt7530_r32(priv, REG_ESW_WT_MAC_ATC);
if (atc & REG_MAC_ATC_SRCH_HIT && !(atc & REG_MAC_ATC_BUSY)) {
u32 atrd;
++count;
atrd = mt7530_r32(priv, REG_ESW_TABLE_ATRD);
if (atrd & REG_ATRD_VALID) {
u32 mac1;
u32 mac2;
mac1 = mt7530_r32(priv, REG_ESW_TABLE_TSRA1);
mac2 = mt7530_r32(priv, REG_ESW_TABLE_TSRA2);
if (!(atc & REG_MAC_ATC_SRCH_END))
mt7530_w32(priv, REG_ESW_WT_MAC_ATC, REG_MAC_ATC_NEXT);
buf = mt7530_print_arl_table_row(atrd, mac1, mac2, buf, &size);
if (!buf) {
pr_warn("%s: too many addresses\n", __func__);
goto out;
}
} else if (!(atc & REG_MAC_ATC_SRCH_END)) {
mt7530_w32(priv, REG_ESW_WT_MAC_ATC, REG_MAC_ATC_NEXT);
}
} else {
--retry_times;
usleep_range(1000, 5000);
}
} while (!(atc & REG_MAC_ATC_SRCH_END) &&
count < MT7530_NUM_ARL_RECORDS &&
retry_times > 0);
out:
val->value.s = priv->arl_buf;
val->len = strlen(priv->arl_buf);
return 0;
}
static int mt7530_sw_get_port_mib(struct switch_dev *dev,
const struct switch_attr *attr,
struct switch_val *val)
@ -944,6 +1056,13 @@ static const struct switch_attr mt7530_global[] = {
.get = mt7530_get_mirror_monitor_port,
.max = MT7530_NUM_PORTS - 1
},
{
.type = SWITCH_TYPE_STRING,
.name = "arl_table",
.description = "Get ARL table",
.set = NULL,
.get = mt7530_get_arl_table,
},
};
static const struct switch_attr mt7621_port[] = {

Some files were not shown because too many files have changed in this diff Show More