diff --git a/include/bpf.mk b/include/bpf.mk index 411763c4a2..ce30e24434 100644 --- a/include/bpf.mk +++ b/include/bpf.mk @@ -76,7 +76,7 @@ define CompileBPF -c $(1) -o $(patsubst %.c,%.bc,$(1)) $(LLVM_OPT) -O2 -mtriple=$(BPF_TARGET) < $(patsubst %.c,%.bc,$(1)) > $(patsubst %.c,%.opt,$(1)) $(LLVM_DIS) < $(patsubst %.c,%.opt,$(1)) > $(patsubst %.c,%.S,$(1)) - $(LLVM_LLC) -march=$(BPF_TARGET) -filetype=obj -o $(patsubst %.c,%.o,$(1)) < $(patsubst %.c,%.S,$(1)) + $(LLVM_LLC) -march=$(BPF_TARGET) -mcpu=v3 -filetype=obj -o $(patsubst %.c,%.o,$(1)) < $(patsubst %.c,%.S,$(1)) $(CP) $(patsubst %.c,%.o,$(1)) $(patsubst %.c,%.debug.o,$(1)) $(LLVM_STRIP) --strip-debug $(patsubst %.c,%.o,$(1)) endef diff --git a/include/kernel-version.mk b/include/kernel-version.mk index ccedcb18c0..08c4bc85d0 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -6,11 +6,11 @@ ifdef CONFIG_TESTING_KERNEL KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER) endif -LINUX_VERSION-5.4 = .162 -LINUX_VERSION-5.10 = .83 +LINUX_VERSION-5.4 = .167 +LINUX_VERSION-5.10 = .87 -LINUX_KERNEL_HASH-5.4.162 = c12d72ddaac78189305a5e98825295ecb02282970033b052276035e83189e25b -LINUX_KERNEL_HASH-5.10.83 = ef259a43f33ddb56001283f4f4e50af29b8a48fa066aed7371a90ebf38c29b70 +LINUX_KERNEL_HASH-5.4.167 = b4e43116217ee02009aba7eab3081e64560b81ce42bc6096fcd81257f470a5a7 +LINUX_KERNEL_HASH-5.10.87 = 03128b70f3063433cfab4ff4c7da288d7c045fe1eafa2a59081df4032fece64b remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) diff --git a/include/target.mk b/include/target.mk index c8f2464c98..05d70cb85e 100644 --- a/include/target.mk +++ b/include/target.mk @@ -248,6 +248,7 @@ ifeq ($(DUMP),1) endif ifeq ($(ARCH),powerpc64) CPU_TYPE ?= powerpc64 + CPU_CFLAGS_e5500:=-mcpu=e5500 CPU_CFLAGS_powerpc64:=-mcpu=powerpc64 endif ifeq ($(ARCH),sparc) diff --git a/package/boot/uboot-envtools/files/qoriq b/package/boot/uboot-envtools/files/qoriq new file mode 100644 index 0000000000..d024a7f008 --- /dev/null +++ b/package/boot/uboot-envtools/files/qoriq @@ -0,0 +1,19 @@ +[ -e /etc/config/ubootenv ] && exit 0 + +touch /etc/config/ubootenv + +. /lib/uboot-envtools.sh +. /lib/functions.sh + +board=$(board_name) + +case "$board" in +watchguard,firebox-m300) + ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x2000" "0x10000" + ;; +esac + +config_load ubootenv +config_foreach ubootenv_add_app_config ubootenv + +exit 0 diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk index fdcc089025..f712c95c8e 100644 --- a/package/kernel/linux/modules/other.mk +++ b/package/kernel/linux/modules/other.mk @@ -992,7 +992,7 @@ $(eval $(call KernelPackage,ptp)) define KernelPackage/ptp-qoriq SUBMENU:=$(OTHER_MENU) TITLE:=Freescale QorIQ PTP support - DEPENDS:=@TARGET_mpc85xx +kmod-ptp + DEPENDS:=@(TARGET_mpc85xx||TARGET_qoriq) +kmod-ptp KCONFIG:=CONFIG_PTP_1588_CLOCK_QORIQ FILES:=$(LINUX_DIR)/drivers/ptp/ptp-qoriq.ko AUTOLOAD:=$(call AutoProbe,ptp-qoriq) diff --git a/package/kernel/linux/modules/video.mk b/package/kernel/linux/modules/video.mk index c51f9676f3..c0d9b10558 100644 --- a/package/kernel/linux/modules/video.mk +++ b/package/kernel/linux/modules/video.mk @@ -451,18 +451,12 @@ $(eval $(call KernelPackage,drm-radeon)) define KernelPackage/video-core SUBMENU:=$(VIDEO_MENU) TITLE=Video4Linux support - DEPENDS:=@PCI_SUPPORT||USB_SUPPORT +PACKAGE_kmod-i2c-core:kmod-i2c-core + DEPENDS:=+PACKAGE_kmod-i2c-core:kmod-i2c-core KCONFIG:= \ CONFIG_MEDIA_SUPPORT \ CONFIG_MEDIA_CAMERA_SUPPORT=y \ CONFIG_VIDEO_DEV \ - CONFIG_VIDEO_V4L1=y \ - CONFIG_VIDEO_ALLOW_V4L1=y \ - CONFIG_VIDEO_CAPTURE_DRIVERS=y \ - CONFIG_V4L_USB_DRIVERS=y \ - CONFIG_V4L_PCI_DRIVERS=y \ - CONFIG_V4L_PLATFORM_DRIVERS=y \ - CONFIG_V4L_ISA_PARPORT_DRIVERS=y + CONFIG_V4L_PLATFORM_DRIVERS=y FILES:= \ $(LINUX_DIR)/drivers/media/$(V4L2_DIR)/videodev.ko AUTOLOAD:=$(call AutoLoad,60, videodev v4l2-common) diff --git a/package/kernel/mac80211/patches/subsys/311-mac80211-use-coarse-boottime-for-airtime-fairness-co.patch b/package/kernel/mac80211/patches/subsys/311-mac80211-use-coarse-boottime-for-airtime-fairness-co.patch new file mode 100644 index 0000000000..d4472ac83d --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/311-mac80211-use-coarse-boottime-for-airtime-fairness-co.patch @@ -0,0 +1,60 @@ +From: Felix Fietkau +Date: Tue, 14 Dec 2021 17:53:12 +0100 +Subject: [PATCH] mac80211: use coarse boottime for airtime fairness code + +The time values used by the airtime fairness code only need to be accurate +enough to cover station activity detection. +Using ktime_get_coarse_boottime_ns instead of ktime_get_boottime_ns will +drop the accuracy down to jiffies intervals, but at the same time saves +a lot of CPU cycles in a hot path + +Signed-off-by: Felix Fietkau +--- + +--- a/net/mac80211/tx.c ++++ b/net/mac80211/tx.c +@@ -3827,7 +3827,7 @@ struct ieee80211_txq *ieee80211_next_txq + { + struct ieee80211_local *local = hw_to_local(hw); + struct airtime_sched_info *air_sched; +- u64 now = ktime_get_boottime_ns(); ++ u64 now = ktime_get_coarse_boottime_ns(); + struct ieee80211_txq *ret = NULL; + struct airtime_info *air_info; + struct txq_info *txqi = NULL; +@@ -3954,7 +3954,7 @@ void ieee80211_update_airtime_weight(str + u64 weight_sum = 0; + + if (unlikely(!now)) +- now = ktime_get_boottime_ns(); ++ now = ktime_get_coarse_boottime_ns(); + + lockdep_assert_held(&air_sched->lock); + +@@ -3980,7 +3980,7 @@ void ieee80211_schedule_txq(struct ieee8 + struct ieee80211_local *local = hw_to_local(hw); + struct txq_info *txqi = to_txq_info(txq); + struct airtime_sched_info *air_sched; +- u64 now = ktime_get_boottime_ns(); ++ u64 now = ktime_get_coarse_boottime_ns(); + struct airtime_info *air_info; + u8 ac = txq->ac; + bool was_active; +@@ -4038,7 +4038,7 @@ static void __ieee80211_unschedule_txq(s + + if (!purge) + airtime_set_active(air_sched, air_info, +- ktime_get_boottime_ns()); ++ ktime_get_coarse_boottime_ns()); + + rb_erase_cached(&txqi->schedule_order, + &air_sched->active_txqs); +@@ -4126,7 +4126,7 @@ bool ieee80211_txq_may_transmit(struct i + if (RB_EMPTY_NODE(&txqi->schedule_order)) + goto out; + +- now = ktime_get_boottime_ns(); ++ now = ktime_get_coarse_boottime_ns(); + + /* Like in ieee80211_next_txq(), make sure the first station in the + * scheduling order is eligible for transmission to avoid starvation. diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 8210478c37..9af329b486 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -227,16 +227,17 @@ define KernelPackage/mt7915e endef define KernelPackage/mt7921-common + $(KernelPackage/mt76-default) TITLE:=MediaTek MT7615 wireless driver common code HIDDEN:=1 - DEPENDS+=@PCI_SUPPORT +kmod-mt76-core +kmod-mt76-connac + DEPENDS+=+kmod-mt76-connac +@DRIVER_11AX_SUPPORT FILES:= $(PKG_BUILD_DIR)/mt7921/mt7921-common.ko endef define KernelPackage/mt7921s $(KernelPackage/mt76-default) TITLE:=MediaTek MT7921s wireless driver - DEPENDS+=@PCI_SUPPORT +kmod-mt76-connac +kmod-mt76-sdio +kmod-mt7921-common + DEPENDS+=+kmod-mt76-sdio +kmod-mt7921-common FILES:= $(PKG_BUILD_DIR)/mt7921/mt7921s.ko AUTOLOAD:=$(call AutoProbe,mt7921s) endef @@ -244,7 +245,7 @@ endef define KernelPackage/mt7921e $(KernelPackage/mt76-default) TITLE:=MediaTek MT7921e wireless driver - DEPENDS+=@PCI_SUPPORT +kmod-mt76-connac +kmod-mt7921-common + DEPENDS+=@PCI_SUPPORT +kmod-mt7921-common FILES:= $(PKG_BUILD_DIR)/mt7921/mt7921e.ko AUTOLOAD:=$(call AutoProbe,mt7921e) endef diff --git a/package/libs/libunwind/Makefile b/package/libs/libunwind/Makefile index 7f79996d25..f129dafcbf 100644 --- a/package/libs/libunwind/Makefile +++ b/package/libs/libunwind/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libunwind PKG_VERSION:=1.5.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SAVANNAH/$(PKG_NAME) @@ -32,7 +32,7 @@ define Package/libunwind CATEGORY:=Libraries TITLE:=The libunwind project URL:=http://www.nongnu.org/libunwind/ - DEPENDS:=@((mips||mipsel||mips64||x86_64||arm||aarch64)||(USE_GLIBC&&(powerpc||i386))) +zlib + DEPENDS:=@((mips||mipsel||mips64||powerpc64||x86_64||arm||aarch64)||(USE_GLIBC&&(powerpc||i386))) +zlib ABI_VERSION:=8 endef diff --git a/package/libs/libunwind/patches/001-Don-t-force-exec_prefix-lib64-libdir-on-ppc64.patch b/package/libs/libunwind/patches/001-Don-t-force-exec_prefix-lib64-libdir-on-ppc64.patch new file mode 100644 index 0000000000..d6010ec0ae --- /dev/null +++ b/package/libs/libunwind/patches/001-Don-t-force-exec_prefix-lib64-libdir-on-ppc64.patch @@ -0,0 +1,29 @@ +From 0af7e7a53480ce8e1cf6cfb4e9fe071c1185ef31 Mon Sep 17 00:00:00 2001 +From: Matthias Diener +Date: Fri, 2 Jul 2021 12:36:10 -0500 +Subject: [PATCH] Don't force {exec_prefix}/lib64 libdir on ppc64 + +--- + configure.ac | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 9fadc163..0dec4ca6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -215,12 +215,6 @@ fi + AM_CONDITIONAL(USE_DWARF, [test x$use_dwarf = xyes]) + AC_MSG_RESULT([$use_dwarf]) + +-if test x$target_arch = xppc64; then +- libdir='${exec_prefix}/lib64' +- AC_MSG_NOTICE([PowerPC64 detected, lib will be installed ${libdir}]); +- AC_SUBST([libdir]) +-fi +- + AC_MSG_CHECKING([whether to restrict build to remote support]) + if test x$target_arch != x$host_arch; then + CPPFLAGS="${CPPFLAGS} -DUNW_REMOTE_ONLY" +-- +2.32.0 + diff --git a/package/libs/nettle/Makefile b/package/libs/nettle/Makefile index 3b4bd9d053..87853baa82 100644 --- a/package/libs/nettle/Makefile +++ b/package/libs/nettle/Makefile @@ -44,7 +44,8 @@ CONFIGURE_ARGS += \ --enable-fat \ --disable-openssl \ --disable-documentation \ - --enable-static + --enable-static \ + $(if $(CONFIG_powerpc64), $(if $(CONFIG_USE_MUSL),--disable-assembler)) ifeq ($(CONFIG_LIBNETTLE_MINI),y) CONFIGURE_ARGS += --enable-mini-gmp diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile index f01b50e5bc..4e892d8487 100644 --- a/package/libs/openssl/Makefile +++ b/package/libs/openssl/Makefile @@ -11,7 +11,7 @@ PKG_NAME:=openssl PKG_BASE:=1.1.1 PKG_BUGFIX:=l PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX) -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_USE_MIPS16:=0 ENGINES_DIR=engines-1.1 diff --git a/package/libs/openssl/patches/001-crypto-perlasm-ppc-xlate.pl-add-linux64v2-flavour.patch b/package/libs/openssl/patches/001-crypto-perlasm-ppc-xlate.pl-add-linux64v2-flavour.patch new file mode 100644 index 0000000000..bdc0509f8c --- /dev/null +++ b/package/libs/openssl/patches/001-crypto-perlasm-ppc-xlate.pl-add-linux64v2-flavour.patch @@ -0,0 +1,63 @@ +From 34ab13b7d8e3e723adb60be8142e38b7c9cd382a Mon Sep 17 00:00:00 2001 +From: Andy Polyakov +Date: Sun, 5 May 2019 18:25:50 +0200 +Subject: [PATCH] crypto/perlasm/ppc-xlate.pl: add linux64v2 flavour +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This is a big endian ELFv2 configuration. ELFv2 was already being +used for little endian, and big endian was traditionally ELFv1 +but there are practical configurations that use ELFv2 with big +endian nowadays (Adélie Linux, Void Linux, possibly Gentoo, etc.) + +Reviewed-by: Paul Dale +Reviewed-by: Richard Levitte +(Merged from https://github.com/openssl/openssl/pull/8883) +--- + crypto/perlasm/ppc-xlate.pl | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/crypto/perlasm/ppc-xlate.pl b/crypto/perlasm/ppc-xlate.pl +index e52f2f6ea6..5fcd0526df 100755 +--- a/crypto/perlasm/ppc-xlate.pl ++++ b/crypto/perlasm/ppc-xlate.pl +@@ -49,7 +49,7 @@ my $globl = sub { + /osx/ && do { $name = "_$name"; + last; + }; +- /linux.*(32|64le)/ ++ /linux.*(32|64(le|v2))/ + && do { $ret .= ".globl $name"; + if (!$$type) { + $ret .= "\n.type $name,\@function"; +@@ -80,7 +80,7 @@ my $globl = sub { + }; + my $text = sub { + my $ret = ($flavour =~ /aix/) ? ".csect\t.text[PR],7" : ".text"; +- $ret = ".abiversion 2\n".$ret if ($flavour =~ /linux.*64le/); ++ $ret = ".abiversion 2\n".$ret if ($flavour =~ /linux.*64(le|v2)/); + $ret; + }; + my $machine = sub { +@@ -186,7 +186,7 @@ my $vmr = sub { + + # Some ABIs specify vrsave, special-purpose register #256, as reserved + # for system use. +-my $no_vrsave = ($flavour =~ /aix|linux64le/); ++my $no_vrsave = ($flavour =~ /aix|linux64(le|v2)/); + my $mtspr = sub { + my ($f,$idx,$ra) = @_; + if ($idx == 256 && $no_vrsave) { +@@ -320,7 +320,7 @@ while($line=<>) { + if ($label) { + my $xlated = ($GLOBALS{$label} or $label); + print "$xlated:"; +- if ($flavour =~ /linux.*64le/) { ++ if ($flavour =~ /linux.*64(le|v2)/) { + if ($TYPES{$label} =~ /function/) { + printf "\n.localentry %s,0\n",$xlated; + } +-- +2.31.1 + diff --git a/package/libs/openssl/patches/110-openwrt_targets.patch b/package/libs/openssl/patches/110-openwrt_targets.patch index d0530b4661..828c14d21d 100644 --- a/package/libs/openssl/patches/110-openwrt_targets.patch +++ b/package/libs/openssl/patches/110-openwrt_targets.patch @@ -12,7 +12,7 @@ new file mode 100644 index 0000000000..86a86d31e4 --- /dev/null +++ b/Configurations/25-openwrt.conf -@@ -0,0 +1,48 @@ +@@ -0,0 +1,52 @@ +## Openwrt "CONFIG_ARCH" matching targets. + +# The targets need to end in '-openwrt' for the AFALG patch to work @@ -52,6 +52,10 @@ index 0000000000..86a86d31e4 + "linux-powerpc-openwrt" => { + inherit_from => [ "linux-ppc", "openwrt" ], + }, ++ "linux-powerpc64-openwrt" => { ++ inherit_from => [ "linux-ppc64", "openwrt" ], ++ perlasm_scheme => "linux64v2", ++ }, + "linux-x86_64-openwrt" => { + inherit_from => [ "linux-x86_64", "openwrt" ], + }, diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile index e4399b2473..10bb115041 100644 --- a/package/network/config/netifd/Makefile +++ b/package/network/config/netifd/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git -PKG_SOURCE_DATE:=2021-10-30 -PKG_SOURCE_VERSION:=8f82742ca4f47f459284f3a07323d04da72ea5f6 -PKG_MIRROR_HASH:=5e519bb1aec9bb30782213f32f19f12e874c909e42826618dd4332ded816d2fe +PKG_SOURCE_DATE:=2021-12-02 +PKG_SOURCE_VERSION:=5ca5e0b4d058a47d72ba4102acdcec826e203c41 +PKG_MIRROR_HASH:=8a1fd6b634a0390a5ee512483c924b3ea8fa3ea9fa863d0434e3e66949faccab PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-2.0 diff --git a/package/network/ipv6/odhcp6c/Makefile b/package/network/ipv6/odhcp6c/Makefile index 4fd9681e40..455ef3ae71 100644 --- a/package/network/ipv6/odhcp6c/Makefile +++ b/package/network/ipv6/odhcp6c/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=18 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcp6c.git -PKG_SOURCE_DATE:=2021-07-14 -PKG_SOURCE_VERSION:=94adc8bbfa5150d4c2ceb4e05ecd1840dfa3df08 -PKG_MIRROR_HASH:=ddc3b203b37d5f82b88f8dc70f0bfc1b34493cbcba6ed81815ccbe250350fe11 +PKG_SOURCE_DATE:=2021-12-05 +PKG_SOURCE_VERSION:=39b584bcac8770619b545d6ae344758f87028612 +PKG_MIRROR_HASH:=f2092bd3ff3481f842da6735f8e36e237e163e8b7cdec80a17385c31e064c8f0 PKG_MAINTAINER:=Hans Dedecker PKG_LICENSE:=GPL-2.0 diff --git a/package/network/services/hostapd/patches/370-ap_sta_support.patch b/package/network/services/hostapd/patches/370-ap_sta_support.patch index c5cad3bb8d..535164d802 100644 --- a/package/network/services/hostapd/patches/370-ap_sta_support.patch +++ b/package/network/services/hostapd/patches/370-ap_sta_support.patch @@ -235,13 +235,14 @@ --- a/hostapd/ctrl_iface.c +++ b/hostapd/ctrl_iface.c -@@ -2883,6 +2883,11 @@ static int hostapd_ctrl_iface_chan_switc +@@ -2883,6 +2883,12 @@ static int hostapd_ctrl_iface_chan_switc return 0; } + if (os_strstr(pos, " auto-ht")) { + settings.freq_params.ht_enabled = iface->conf->ieee80211n; + settings.freq_params.vht_enabled = iface->conf->ieee80211ac; ++ settings.freq_params.he_enabled = iface->conf->ieee80211ax; + } + for (i = 0; i < iface->num_bss; i++) { diff --git a/package/network/services/hostapd/patches/550-WNM-allow-specifying-dialog-token.patch b/package/network/services/hostapd/patches/550-WNM-allow-specifying-dialog-token.patch new file mode 100644 index 0000000000..6c080adc0e --- /dev/null +++ b/package/network/services/hostapd/patches/550-WNM-allow-specifying-dialog-token.patch @@ -0,0 +1,99 @@ +From 1b26807938815d0b0b266caf31d8ef0019607e64 Mon Sep 17 00:00:00 2001 +From: David Bauer +Date: Mon, 27 Sep 2021 15:41:48 +0200 +Subject: [PATCH] WNM: allow specifying dialog-token + +This commit adds the ability to specify the dialog token of a WNM BSS +Transition request frame via the hostapd control socket. + +FOr this, the new 'dialog_token' option can be used. It accepts values +as a 8 bit unsigned integer. If not specified, the dialog token is set +to 1 like before. + +Signed-off-by: David Bauer +--- + hostapd/ctrl_iface.c | 10 ++++++++-- + src/ap/wnm_ap.c | 11 ++++++----- + src/ap/wnm_ap.h | 4 ++-- + 3 files changed, 16 insertions(+), 9 deletions(-) + +--- a/hostapd/ctrl_iface.c ++++ b/hostapd/ctrl_iface.c +@@ -897,7 +897,7 @@ static int hostapd_ctrl_iface_bss_tm_req + const char *pos, *end; + int disassoc_timer = 0; + struct sta_info *sta; +- u8 req_mode = 0, valid_int = 0x01; ++ u8 req_mode = 0, valid_int = 0x01, dialog_token = 0x01; + u8 bss_term_dur[12]; + char *url = NULL; + int ret; +@@ -935,6 +935,12 @@ static int hostapd_ctrl_iface_bss_tm_req + valid_int = atoi(pos); + } + ++ pos = os_strstr(cmd, " dialog_token="); ++ if (pos) { ++ pos += 14; ++ dialog_token = atoi(pos); ++ } ++ + pos = os_strstr(cmd, " bss_term="); + if (pos) { + pos += 10; +@@ -1041,7 +1047,7 @@ static int hostapd_ctrl_iface_bss_tm_req + #endif /* CONFIG_MBO */ + + ret = wnm_send_bss_tm_req(hapd, sta, req_mode, disassoc_timer, +- valid_int, bss_term_dur, url, ++ valid_int, bss_term_dur, dialog_token, url, + nei_len ? nei_rep : NULL, nei_len, + mbo_len ? mbo : NULL, mbo_len); + #ifdef CONFIG_MBO +--- a/src/ap/wnm_ap.c ++++ b/src/ap/wnm_ap.c +@@ -788,8 +788,8 @@ int wnm_send_ess_disassoc_imminent(struc + + int wnm_send_bss_tm_req(struct hostapd_data *hapd, struct sta_info *sta, + u8 req_mode, int disassoc_timer, u8 valid_int, +- const u8 *bss_term_dur, const char *url, +- const u8 *nei_rep, size_t nei_rep_len, ++ const u8 *bss_term_dur, u8 dialog_token, ++ const char *url, const u8 *nei_rep, size_t nei_rep_len, + const u8 *mbo_attrs, size_t mbo_len) + { + u8 *buf, *pos; +@@ -797,8 +797,9 @@ int wnm_send_bss_tm_req(struct hostapd_d + size_t url_len; + + wpa_printf(MSG_DEBUG, "WNM: Send BSS Transition Management Request to " +- MACSTR " req_mode=0x%x disassoc_timer=%d valid_int=0x%x", +- MAC2STR(sta->addr), req_mode, disassoc_timer, valid_int); ++ MACSTR " req_mode=0x%x disassoc_timer=%d valid_int=0x%x " ++ "dialog_token=%x", ++ MAC2STR(sta->addr), req_mode, disassoc_timer, valid_int, dialog_token); + buf = os_zalloc(1000 + nei_rep_len + mbo_len); + if (buf == NULL) + return -1; +@@ -810,7 +811,7 @@ int wnm_send_bss_tm_req(struct hostapd_d + os_memcpy(mgmt->bssid, hapd->own_addr, ETH_ALEN); + mgmt->u.action.category = WLAN_ACTION_WNM; + mgmt->u.action.u.bss_tm_req.action = WNM_BSS_TRANS_MGMT_REQ; +- mgmt->u.action.u.bss_tm_req.dialog_token = 1; ++ mgmt->u.action.u.bss_tm_req.dialog_token = dialog_token; + mgmt->u.action.u.bss_tm_req.req_mode = req_mode; + mgmt->u.action.u.bss_tm_req.disassoc_timer = + host_to_le16(disassoc_timer); +--- a/src/ap/wnm_ap.h ++++ b/src/ap/wnm_ap.h +@@ -20,8 +20,8 @@ int wnm_send_ess_disassoc_imminent(struc + int disassoc_timer); + int wnm_send_bss_tm_req(struct hostapd_data *hapd, struct sta_info *sta, + u8 req_mode, int disassoc_timer, u8 valid_int, +- const u8 *bss_term_dur, const char *url, +- const u8 *nei_rep, size_t nei_rep_len, ++ const u8 *bss_term_dur, u8 dialog_token, ++ const char *url, const u8 *nei_rep, size_t nei_rep_len, + const u8 *mbo_attrs, size_t mbo_len); + void ap_sta_reset_steer_flag_timer(void *eloop_ctx, void *timeout_ctx); + int wnm_send_coloc_intf_req(struct hostapd_data *hapd, struct sta_info *sta, diff --git a/package/network/services/hostapd/patches/590-rrm-wnm-statistics.patch b/package/network/services/hostapd/patches/590-rrm-wnm-statistics.patch index feb3b091c1..737fdbb5d0 100644 --- a/package/network/services/hostapd/patches/590-rrm-wnm-statistics.patch +++ b/package/network/services/hostapd/patches/590-rrm-wnm-statistics.patch @@ -1,6 +1,6 @@ --- a/src/ap/hostapd.h +++ b/src/ap/hostapd.h -@@ -441,6 +441,21 @@ struct hostapd_sta_info { +@@ -148,6 +148,21 @@ struct hostapd_sae_commit_queue { }; /** @@ -19,26 +19,26 @@ +}; + +/** - * struct hostapd_iface - hostapd per-interface data structure + * struct hostapd_data - hostapd per-BSS data structure */ - struct hostapd_iface { -@@ -562,6 +577,9 @@ struct hostapd_iface { - u64 last_channel_time_busy; - u8 channel_utilization; + struct hostapd_data { +@@ -161,6 +176,9 @@ struct hostapd_data { + + u8 own_addr[ETH_ALEN]; + /* OpenWrt specific statistics */ + struct hostapd_openwrt_stats openwrt_stats; + - unsigned int chan_util_samples_sum; - unsigned int chan_util_num_sample_periods; - unsigned int chan_util_average; + int num_sta; /* number of entries in sta_list */ + struct sta_info *sta_list; /* STA info list head */ + #define STA_HASH_SIZE 256 --- a/src/ap/wnm_ap.c +++ b/src/ap/wnm_ap.c @@ -386,6 +386,7 @@ static int ieee802_11_send_bss_trans_mgm mgmt->u.action.u.bss_tm_req.validity_interval = 1; pos = mgmt->u.action.u.bss_tm_req.variable; -+ hapd->iface->openwrt_stats.wnm.bss_transition_request_tx++; ++ hapd->openwrt_stats.wnm.bss_transition_request_tx++; wpa_printf(MSG_DEBUG, "WNM: Send BSS Transition Management Request to " MACSTR " dialog_token=%u req_mode=0x%x disassoc_timer=%u " "validity_interval=%u", @@ -46,12 +46,12 @@ switch (action) { case WNM_BSS_TRANS_MGMT_QUERY: -+ hapd->iface->openwrt_stats.wnm.bss_transition_query_rx++; ++ hapd->openwrt_stats.wnm.bss_transition_query_rx++; ieee802_11_rx_bss_trans_mgmt_query(hapd, mgmt->sa, payload, plen); return 0; case WNM_BSS_TRANS_MGMT_RESP: -+ hapd->iface->openwrt_stats.wnm.bss_transition_response_rx++; ++ hapd->openwrt_stats.wnm.bss_transition_response_rx++; ieee802_11_rx_bss_trans_mgmt_resp(hapd, mgmt->sa, payload, plen); return 0; @@ -59,7 +59,7 @@ pos = mgmt->u.action.u.bss_tm_req.variable; -+ hapd->iface->openwrt_stats.wnm.bss_transition_request_tx++; ++ hapd->openwrt_stats.wnm.bss_transition_request_tx++; wpa_printf(MSG_DEBUG, "WNM: Send BSS Transition Management Request frame to indicate imminent disassociation (disassoc_timer=%d) to " MACSTR, disassoc_timer, MAC2STR(sta->addr)); if (hostapd_drv_send_mlme(hapd, buf, pos - buf, 0, NULL, 0, 0) < 0) { @@ -67,7 +67,7 @@ return -1; } -+ hapd->iface->openwrt_stats.wnm.bss_transition_request_tx++; ++ hapd->openwrt_stats.wnm.bss_transition_request_tx++; if (disassoc_timer) { /* send disassociation frame after time-out */ set_disassoc_timer(hapd, sta, disassoc_timer); @@ -75,7 +75,7 @@ } os_free(buf); -+ hapd->iface->openwrt_stats.wnm.bss_transition_request_tx++; ++ hapd->openwrt_stats.wnm.bss_transition_request_tx++; if (disassoc_timer) { /* send disassociation frame after time-out */ set_disassoc_timer(hapd, sta, disassoc_timer); @@ -85,7 +85,7 @@ } } -+ hapd->iface->openwrt_stats.rrm.neighbor_report_tx++; ++ hapd->openwrt_stats.rrm.neighbor_report_tx++; + hostapd_drv_send_action(hapd, hapd->iface->freq, 0, addr, wpabuf_head(buf), wpabuf_len(buf)); diff --git a/package/network/services/hostapd/patches/600-ubus_support.patch b/package/network/services/hostapd/patches/600-ubus_support.patch index bf2f8a52d1..58313f1ecd 100644 --- a/package/network/services/hostapd/patches/600-ubus_support.patch +++ b/package/network/services/hostapd/patches/600-ubus_support.patch @@ -515,7 +515,17 @@ --- a/src/ap/wnm_ap.c +++ b/src/ap/wnm_ap.c -@@ -463,7 +463,7 @@ static void ieee802_11_rx_bss_trans_mgmt +@@ -441,7 +441,8 @@ static void ieee802_11_rx_bss_trans_mgmt + wpa_hexdump(MSG_DEBUG, "WNM: BSS Transition Candidate List Entries", + pos, end - pos); + +- ieee802_11_send_bss_trans_mgmt_request(hapd, addr, dialog_token); ++ if (!hostapd_ubus_notify_bss_transition_query(hapd, addr, dialog_token, reason, pos, end - pos)) ++ ieee802_11_send_bss_trans_mgmt_request(hapd, addr, dialog_token); + } + + +@@ -463,7 +464,7 @@ static void ieee802_11_rx_bss_trans_mgmt size_t len) { u8 dialog_token, status_code, bss_termination_delay; @@ -524,7 +534,7 @@ int enabled = hapd->conf->bss_transition; struct sta_info *sta; -@@ -510,6 +510,7 @@ static void ieee802_11_rx_bss_trans_mgmt +@@ -510,6 +511,7 @@ static void ieee802_11_rx_bss_trans_mgmt wpa_printf(MSG_DEBUG, "WNM: not enough room for Target BSSID field"); return; } @@ -532,7 +542,7 @@ sta->agreed_to_steer = 1; eloop_cancel_timeout(ap_sta_reset_steer_flag_timer, hapd, sta); eloop_register_timeout(2, 0, ap_sta_reset_steer_flag_timer, -@@ -529,6 +530,10 @@ static void ieee802_11_rx_bss_trans_mgmt +@@ -529,6 +531,10 @@ static void ieee802_11_rx_bss_trans_mgmt MAC2STR(addr), status_code, bss_termination_delay); } diff --git a/package/network/services/hostapd/patches/751-qos_map_ignore_when_unsupported.patch b/package/network/services/hostapd/patches/751-qos_map_ignore_when_unsupported.patch new file mode 100644 index 0000000000..8af5a0a046 --- /dev/null +++ b/package/network/services/hostapd/patches/751-qos_map_ignore_when_unsupported.patch @@ -0,0 +1,12 @@ +--- a/src/ap/ap_drv_ops.c ++++ b/src/ap/ap_drv_ops.c +@@ -850,7 +850,8 @@ int hostapd_start_dfs_cac(struct hostapd + int hostapd_drv_set_qos_map(struct hostapd_data *hapd, + const u8 *qos_map_set, u8 qos_map_set_len) + { +- if (!hapd->driver || !hapd->driver->set_qos_map || !hapd->drv_priv) ++ if (!hapd->driver || !hapd->driver->set_qos_map || !hapd->drv_priv || ++ !(hapd->iface->drv_flags & WPA_DRIVER_FLAGS_QOS_MAPPING)) + return 0; + return hapd->driver->set_qos_map(hapd->drv_priv, qos_map_set, + qos_map_set_len); diff --git a/package/network/services/hostapd/src/src/ap/ubus.c b/package/network/services/hostapd/src/src/ap/ubus.c index db38ed2941..bcb80f4a33 100644 --- a/package/network/services/hostapd/src/src/ap/ubus.c +++ b/package/network/services/hostapd/src/src/ap/ubus.c @@ -432,14 +432,14 @@ hostapd_bss_get_status(struct ubus_context *ctx, struct ubus_object *obj, /* RRM */ rrm_table = blobmsg_open_table(&b, "rrm"); - blobmsg_add_u64(&b, "neighbor_report_tx", hapd->iface->openwrt_stats.rrm.neighbor_report_tx); + blobmsg_add_u64(&b, "neighbor_report_tx", hapd->openwrt_stats.rrm.neighbor_report_tx); blobmsg_close_table(&b, rrm_table); /* WNM */ wnm_table = blobmsg_open_table(&b, "wnm"); - blobmsg_add_u64(&b, "bss_transition_query_rx", hapd->iface->openwrt_stats.wnm.bss_transition_query_rx); - blobmsg_add_u64(&b, "bss_transition_request_tx", hapd->iface->openwrt_stats.wnm.bss_transition_request_tx); - blobmsg_add_u64(&b, "bss_transition_response_rx", hapd->iface->openwrt_stats.wnm.bss_transition_response_rx); + blobmsg_add_u64(&b, "bss_transition_query_rx", hapd->openwrt_stats.wnm.bss_transition_query_rx); + blobmsg_add_u64(&b, "bss_transition_request_tx", hapd->openwrt_stats.wnm.bss_transition_request_tx); + blobmsg_add_u64(&b, "bss_transition_response_rx", hapd->openwrt_stats.wnm.bss_transition_response_rx); blobmsg_close_table(&b, wnm_table); /* Airtime */ @@ -1291,7 +1291,8 @@ hostapd_rrm_beacon_req(struct ubus_context *ctx, struct ubus_object *obj, static int hostapd_bss_tr_send(struct hostapd_data *hapd, u8 *addr, bool disassoc_imminent, bool abridged, - u16 disassoc_timer, u8 validity_period, struct blob_attr *neighbors) + u16 disassoc_timer, u8 validity_period, u8 dialog_token, + struct blob_attr *neighbors) { struct blob_attr *cur; struct sta_info *sta; @@ -1351,7 +1352,7 @@ hostapd_bss_tr_send(struct hostapd_data *hapd, u8 *addr, bool disassoc_imminent, req_mode |= WNM_BSS_TM_REQ_DISASSOC_IMMINENT; if (wnm_send_bss_tm_req(hapd, sta, req_mode, disassoc_timer, validity_period, NULL, - NULL, nr, nr_len, NULL, 0)) + dialog_token, NULL, nr, nr_len, NULL, 0)) return UBUS_STATUS_UNKNOWN_ERROR; return 0; @@ -1364,6 +1365,7 @@ enum { BSS_TR_VALID_PERIOD, BSS_TR_NEIGHBORS, BSS_TR_ABRIDGED, + BSS_TR_DIALOG_TOKEN, __BSS_TR_DISASSOC_MAX }; @@ -1374,6 +1376,7 @@ static const struct blobmsg_policy bss_tr_policy[__BSS_TR_DISASSOC_MAX] = { [BSS_TR_VALID_PERIOD] = { "validity_period", BLOBMSG_TYPE_INT32 }, [BSS_TR_NEIGHBORS] = { "neighbors", BLOBMSG_TYPE_ARRAY }, [BSS_TR_ABRIDGED] = { "abridged", BLOBMSG_TYPE_BOOL }, + [BSS_TR_DIALOG_TOKEN] = { "dialog_token", BLOBMSG_TYPE_INT32 }, }; static int @@ -1387,6 +1390,7 @@ hostapd_bss_transition_request(struct ubus_context *ctx, struct ubus_object *obj u32 da_timer = 0; u32 valid_period = 0; u8 addr[ETH_ALEN]; + u32 dialog_token = 1; bool abridged; bool da_imminent; @@ -1404,11 +1408,14 @@ hostapd_bss_transition_request(struct ubus_context *ctx, struct ubus_object *obj if (tb[BSS_TR_VALID_PERIOD]) valid_period = blobmsg_get_u32(tb[BSS_TR_VALID_PERIOD]); + if (tb[BSS_TR_DIALOG_TOKEN]) + dialog_token = blobmsg_get_u32(tb[BSS_TR_DIALOG_TOKEN]); + da_imminent = !!(tb[BSS_TR_DA_IMMINENT] && blobmsg_get_bool(tb[BSS_TR_DA_IMMINENT])); abridged = !!(tb[BSS_TR_ABRIDGED] && blobmsg_get_bool(tb[BSS_TR_ABRIDGED])); return hostapd_bss_tr_send(hapd, addr, da_imminent, abridged, da_timer, valid_period, - tb[BSS_TR_NEIGHBORS]); + dialog_token, tb[BSS_TR_NEIGHBORS]); } enum { @@ -1452,7 +1459,7 @@ hostapd_wnm_disassoc_imminent(struct ubus_context *ctx, struct ubus_object *obj, abridged = !!(tb[WNM_DISASSOC_ABRIDGED] && blobmsg_get_bool(tb[WNM_DISASSOC_ABRIDGED])); return hostapd_bss_tr_send(hapd, addr, true, abridged, duration, duration, - tb[WNM_DISASSOC_NEIGHBORS]); + 1, tb[WNM_DISASSOC_NEIGHBORS]); } #endif @@ -1843,13 +1850,30 @@ void hostapd_ubus_notify_radar_detected(struct hostapd_iface *iface, int frequen } } +#ifdef CONFIG_WNM_AP +static void hostapd_ubus_notify_bss_transition_add_candidate_list( + const u8 *candidate_list, u16 candidate_list_len) +{ + char *cl_str; + int i; + + if (candidate_list_len == 0) + return; + + cl_str = blobmsg_alloc_string_buffer(&b, "candidate-list", candidate_list_len * 2 + 1); + for (i = 0; i < candidate_list_len; i++) + snprintf(&cl_str[i*2], 3, "%02X", candidate_list[i]); + blobmsg_add_string_buffer(&b); + +} +#endif + void hostapd_ubus_notify_bss_transition_response( struct hostapd_data *hapd, const u8 *addr, u8 dialog_token, u8 status_code, u8 bss_termination_delay, const u8 *target_bssid, const u8 *candidate_list, u16 candidate_list_len) { #ifdef CONFIG_WNM_AP - char *cl_str; u16 i; if (!hapd->ubus.obj.has_subscribers) @@ -1865,13 +1889,45 @@ void hostapd_ubus_notify_bss_transition_response( blobmsg_add_u8(&b, "bss-termination-delay", bss_termination_delay); if (target_bssid) blobmsg_add_macaddr(&b, "target-bssid", target_bssid); - if (candidate_list_len > 0) { - cl_str = blobmsg_alloc_string_buffer(&b, "candidate-list", candidate_list_len * 2 + 1); - for (i = 0; i < candidate_list_len; i++) - snprintf(&cl_str[i*2], 3, "%02X", candidate_list[i]); - blobmsg_add_string_buffer(&b); - } + + hostapd_ubus_notify_bss_transition_add_candidate_list(candidate_list, candidate_list_len); ubus_notify(ctx, &hapd->ubus.obj, "bss-transition-response", b.head, -1); #endif } + +int hostapd_ubus_notify_bss_transition_query( + struct hostapd_data *hapd, const u8 *addr, u8 dialog_token, u8 reason, + const u8 *candidate_list, u16 candidate_list_len) +{ +#ifdef CONFIG_WNM_AP + struct ubus_event_req ureq = {}; + char *cl_str; + u16 i; + + if (!hapd->ubus.obj.has_subscribers) + return 0; + + if (!addr) + return 0; + + blob_buf_init(&b, 0); + blobmsg_add_macaddr(&b, "address", addr); + blobmsg_add_u8(&b, "dialog-token", dialog_token); + blobmsg_add_u8(&b, "reason", reason); + hostapd_ubus_notify_bss_transition_add_candidate_list(candidate_list, candidate_list_len); + + if (!hapd->ubus.notify_response) { + ubus_notify(ctx, &hapd->ubus.obj, "bss-transition-query", b.head, -1); + return 0; + } + + if (ubus_notify_async(ctx, &hapd->ubus.obj, "bss-transition-query", b.head, &ureq.nreq)) + return 0; + + ureq.nreq.status_cb = ubus_event_cb; + ubus_complete_request(ctx, &ureq.nreq.req, 100); + + return ureq.resp; +#endif +} \ No newline at end of file diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index 0f0df8c68d..1a4d2c7096 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git -PKG_MIRROR_HASH:=e2c60679cc39549e01c2c8e64eeb78278edb92953ce24e74b73da9ac0f21fe3d -PKG_SOURCE_DATE:=2021-12-11 -PKG_SOURCE_VERSION:=bb95fe8df7115ab57792369c768927eafc042161 +PKG_MIRROR_HASH:=3ce6f5e2c12ae276af3ffe1755a495415f77184974206a44a3b083420aba52a8 +PKG_SOURCE_DATE:=2021-12-20 +PKG_SOURCE_VERSION:=129d050b9f5725ea4c54e1d906aba43eca95b860 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 @@ -72,13 +72,6 @@ define Package/procd-ujail TITLE:=OpenWrt process jail helper endef -define Package/procd-ujail-console - SECTION:=base - CATEGORY:=Base system - DEPENDS:=+procd-ujail +libubus +libubox - TITLE:=OpenWrt process jail console -endef - define Package/procd-seccomp SECTION:=base CATEGORY:=Base system @@ -146,11 +139,6 @@ define Package/procd-ujail/install $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ujail $(1)/sbin/ endef -define Package/procd-ujail-console/install - $(INSTALL_DIR) $(1)/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ujail-console $(1)/sbin/ -endef - define Package/procd-seccomp/install $(INSTALL_DIR) $(1)/sbin $(1)/lib $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libpreload-seccomp.so $(1)/lib @@ -173,6 +161,5 @@ endef $(eval $(call BuildPackage,procd)) $(eval $(call BuildPackage,procd-selinux)) $(eval $(call BuildPackage,procd-ujail)) -$(eval $(call BuildPackage,procd-ujail-console)) $(eval $(call BuildPackage,procd-seccomp)) $(eval $(call BuildPackage,uxc)) diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh index 3549a5a914..2284f55ed2 100644 --- a/package/system/procd/files/procd.sh +++ b/package/system/procd/files/procd.sh @@ -198,7 +198,6 @@ _procd_add_jail() { netns) json_add_boolean "netns" "1";; userns) json_add_boolean "userns" "1";; cgroupsns) json_add_boolean "cgroupsns" "1";; - console) json_add_boolean "console" "1";; esac done json_add_object "mount" diff --git a/target/linux/apm821xx/config-5.10 b/target/linux/apm821xx/config-5.10 index 22d34c3fce..a65185a0c0 100644 --- a/target/linux/apm821xx/config-5.10 +++ b/target/linux/apm821xx/config-5.10 @@ -41,14 +41,12 @@ CONFIG_CRC16=y CONFIG_CRC32_SLICEBY8=y CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_DEV_PPC4XX=y -CONFIG_CRYPTO_GF128MUL=y CONFIG_CRYPTO_HW=y CONFIG_CRYPTO_JITTERENTROPY=y CONFIG_CRYPTO_LIB_POLY1305_RSIZE=1 CONFIG_CRYPTO_LIB_SHA256=y CONFIG_CRYPTO_LZO=y # CONFIG_CRYPTO_MD5_PPC is not set -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG=y CONFIG_CRYPTO_RNG2=y # CONFIG_CRYPTO_SHA1_PPC is not set diff --git a/target/linux/archs38/config-5.10 b/target/linux/archs38/config-5.10 index af787f887e..5ba3877a64 100644 --- a/target/linux/archs38/config-5.10 +++ b/target/linux/archs38/config-5.10 @@ -71,22 +71,15 @@ CONFIG_COMMON_CLK=y CONFIG_COMPAT_32BIT_TIME=y CONFIG_CPU_RMAP=y CONFIG_CRC16=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y CONFIG_CRYPTO_CRC32C=y CONFIG_CRYPTO_DRBG=y CONFIG_CRYPTO_DRBG_HMAC=y CONFIG_CRYPTO_DRBG_MENU=y CONFIG_CRYPTO_ECHAINIV=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_JITTERENTROPY=y CONFIG_CRYPTO_LIB_SHA256=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y CONFIG_CRYPTO_NULL=y -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_RNG_DEFAULT=y diff --git a/target/linux/armvirt/64/config-5.10 b/target/linux/armvirt/64/config-5.10 index 51f3c3c952..27d86cf8a7 100644 --- a/target/linux/armvirt/64/config-5.10 +++ b/target/linux/armvirt/64/config-5.10 @@ -57,7 +57,6 @@ CONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=y CONFIG_CRYPTO_CHACHA20=y CONFIG_CRYPTO_CHACHA20_NEON=y CONFIG_CRYPTO_CRYPTD=y -CONFIG_CRYPTO_GF128MUL=y CONFIG_CRYPTO_GHASH_ARM64_CE=y CONFIG_CRYPTO_LIB_CHACHA_GENERIC=y CONFIG_CRYPTO_SHA1=y diff --git a/target/linux/armvirt/config-5.10 b/target/linux/armvirt/config-5.10 index 74b6957d94..c63b169607 100644 --- a/target/linux/armvirt/config-5.10 +++ b/target/linux/armvirt/config-5.10 @@ -26,15 +26,8 @@ CONFIG_CLONE_BACKWARDS=y CONFIG_COMMON_CLK=y CONFIG_CPU_RMAP=y CONFIG_CRC16=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y CONFIG_CRYPTO_CRC32=y CONFIG_CRYPTO_CRC32C=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG2=y CONFIG_DCACHE_WORD_ACCESS=y CONFIG_DEBUG_BUGVERBOSE=y @@ -91,7 +84,6 @@ CONFIG_IRQ_FORCED_THREADING=y CONFIG_IRQ_WORK=y CONFIG_JBD2=y CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOCK_SPIN_ON_OWNER=y CONFIG_MEMFD_CREATE=y diff --git a/target/linux/at91/sam9x/config-default b/target/linux/at91/sam9x/config-default index bd9d106f5b..e3d4c29e99 100644 --- a/target/linux/at91/sam9x/config-default +++ b/target/linux/at91/sam9x/config-default @@ -158,7 +158,6 @@ CONFIG_LEDS_PWM=y CONFIG_LEDS_TRIGGER_CPU=y CONFIG_LEDS_TRIGGER_GPIO=y CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LZO_COMPRESS=y CONFIG_LZO_DECOMPRESS=y diff --git a/target/linux/at91/sama5/config-default b/target/linux/at91/sama5/config-default index 852e5c95b7..e294fd9e3b 100644 --- a/target/linux/at91/sama5/config-default +++ b/target/linux/at91/sama5/config-default @@ -240,7 +240,6 @@ CONFIG_LEDS_PWM=y CONFIG_LEDS_TRIGGER_CPU=y CONFIG_LEDS_TRIGGER_GPIO=y CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCALVERSION_AUTO=y CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOG_BUF_SHIFT=16 diff --git a/target/linux/ath79/Makefile b/target/linux/ath79/Makefile index 4063867ce3..dd57d9fed9 100644 --- a/target/linux/ath79/Makefile +++ b/target/linux/ath79/Makefile @@ -8,8 +8,7 @@ SUBTARGETS:=generic mikrotik nand tiny FEATURES:=ramdisk squashfs usbgadget -KERNEL_PATCHVER:=5.4 -KERNEL_TESTING_PATCHVER:=5.10 +KERNEL_PATCHVER:=5.10 include $(INCLUDE_DIR)/target.mk diff --git a/target/linux/ath79/config-5.10 b/target/linux/ath79/config-5.10 index 786d70decf..12f51b08ce 100644 --- a/target/linux/ath79/config-5.10 +++ b/target/linux/ath79/config-5.10 @@ -91,7 +91,6 @@ CONFIG_IRQ_WORK=y CONFIG_LEDS_GPIO=y # CONFIG_LEDS_RESET is not set CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_MDIO_BITBANG=y CONFIG_MDIO_BUS=y diff --git a/target/linux/bcm27xx/bcm2708/config-5.10 b/target/linux/bcm27xx/bcm2708/config-5.10 index 8e8ae51443..56e076ba95 100644 --- a/target/linux/bcm27xx/bcm2708/config-5.10 +++ b/target/linux/bcm27xx/bcm2708/config-5.10 @@ -107,8 +107,6 @@ CONFIG_CPU_V6K=y CONFIG_CRC16=y CONFIG_CRYPTO_CRC32=y CONFIG_CRYPTO_CRC32C=y -CONFIG_CRYPTO_GF128MUL=y -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG2=y CONFIG_DCACHE_WORD_ACCESS=y CONFIG_DEBUG_BUGVERBOSE=y @@ -216,7 +214,6 @@ CONFIG_LEDS_GPIO=y CONFIG_LEDS_TRIGGER_ACTPWR=y CONFIG_LEDS_TRIGGER_INPUT=y CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOGO=y CONFIG_LOGO_LINUX_CLUT224=y diff --git a/target/linux/bcm27xx/bcm2709/config-5.10 b/target/linux/bcm27xx/bcm2709/config-5.10 index 7a645e6025..f15f6e3562 100644 --- a/target/linux/bcm27xx/bcm2709/config-5.10 +++ b/target/linux/bcm27xx/bcm2709/config-5.10 @@ -130,11 +130,9 @@ CONFIG_CRYPTO_DRBG=y CONFIG_CRYPTO_DRBG_HMAC=y CONFIG_CRYPTO_DRBG_MENU=y CONFIG_CRYPTO_ECB=y -CONFIG_CRYPTO_GF128MUL=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_JITTERENTROPY=y CONFIG_CRYPTO_LIB_SHA256=y -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_RNG_DEFAULT=y @@ -268,7 +266,6 @@ CONFIG_LEDS_GPIO=y CONFIG_LEDS_TRIGGER_ACTPWR=y CONFIG_LEDS_TRIGGER_INPUT=y CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOCK_SPIN_ON_OWNER=y CONFIG_LOGO=y diff --git a/target/linux/bcm27xx/bcm2710/config-5.10 b/target/linux/bcm27xx/bcm2710/config-5.10 index 4296bc5526..39c00762ba 100644 --- a/target/linux/bcm27xx/bcm2710/config-5.10 +++ b/target/linux/bcm27xx/bcm2710/config-5.10 @@ -131,11 +131,9 @@ CONFIG_CRYPTO_DRBG=y CONFIG_CRYPTO_DRBG_HMAC=y CONFIG_CRYPTO_DRBG_MENU=y CONFIG_CRYPTO_ECB=y -CONFIG_CRYPTO_GF128MUL=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_JITTERENTROPY=y CONFIG_CRYPTO_LIB_SHA256=y -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_RNG_DEFAULT=y @@ -263,7 +261,6 @@ CONFIG_LEDS_GPIO=y CONFIG_LEDS_TRIGGER_ACTPWR=y CONFIG_LEDS_TRIGGER_INPUT=y CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOCK_SPIN_ON_OWNER=y CONFIG_LOGO=y diff --git a/target/linux/bcm27xx/bcm2711/config-5.10 b/target/linux/bcm27xx/bcm2711/config-5.10 index bdbf093dd5..ed095231ae 100644 --- a/target/linux/bcm27xx/bcm2711/config-5.10 +++ b/target/linux/bcm27xx/bcm2711/config-5.10 @@ -135,11 +135,9 @@ CONFIG_CRYPTO_DRBG=y CONFIG_CRYPTO_DRBG_HMAC=y CONFIG_CRYPTO_DRBG_MENU=y CONFIG_CRYPTO_ECB=y -CONFIG_CRYPTO_GF128MUL=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_JITTERENTROPY=y CONFIG_CRYPTO_LIB_SHA256=y -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_RNG_DEFAULT=y @@ -270,7 +268,6 @@ CONFIG_LEDS_GPIO=y CONFIG_LEDS_TRIGGER_ACTPWR=y CONFIG_LEDS_TRIGGER_INPUT=y CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOCK_SPIN_ON_OWNER=y CONFIG_LOGO=y diff --git a/target/linux/bcm27xx/patches-5.10/950-0139-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch b/target/linux/bcm27xx/patches-5.10/950-0139-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch index dfd6e89b3d..6cc7482115 100644 --- a/target/linux/bcm27xx/patches-5.10/950-0139-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch +++ b/target/linux/bcm27xx/patches-5.10/950-0139-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch @@ -119,7 +119,7 @@ Signed-off-by: Jonathan Bell * non-error returns are a promise to giveback() the urb later * we drop ownership so next owner (or urb unlink) can get it */ -@@ -5366,6 +5463,7 @@ static const struct hc_driver xhci_hc_dr +@@ -5370,6 +5467,7 @@ static const struct hc_driver xhci_hc_dr .endpoint_reset = xhci_endpoint_reset, .check_bandwidth = xhci_check_bandwidth, .reset_bandwidth = xhci_reset_bandwidth, diff --git a/target/linux/bcm27xx/patches-5.10/950-0151-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch b/target/linux/bcm27xx/patches-5.10/950-0151-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch index 217b2117d4..fa76e0a822 100644 --- a/target/linux/bcm27xx/patches-5.10/950-0151-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch +++ b/target/linux/bcm27xx/patches-5.10/950-0151-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch @@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell #define USB_VENDOR_ID_BELKIN 0x050d #define USB_DEVICE_ID_FLIP_KVM 0x3201 -@@ -1268,6 +1271,9 @@ +@@ -1270,6 +1273,9 @@ #define USB_VENDOR_ID_XAT 0x2505 #define USB_DEVICE_ID_XAT_CSR 0x0220 @@ -53,7 +53,7 @@ Signed-off-by: Jonathan Bell { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_MULTI_TOUCH), HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL }, { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE2), HID_QUIRK_ALWAYS_POLL }, -@@ -193,6 +194,7 @@ static const struct hid_device_id hid_qu +@@ -194,6 +195,7 @@ static const struct hid_device_id hid_qu { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_QUAD_USB_JOYPAD), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE), HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_GROUP_AUDIO), HID_QUIRK_NOGET }, diff --git a/target/linux/bcm27xx/patches-5.10/950-0249-kbuild-Disable-gcc-plugins.patch b/target/linux/bcm27xx/patches-5.10/950-0249-kbuild-Disable-gcc-plugins.patch deleted file mode 100644 index f3a0b33a92..0000000000 --- a/target/linux/bcm27xx/patches-5.10/950-0249-kbuild-Disable-gcc-plugins.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 4c6ffdf90a3a982fa11676faf658eebfd000867b Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Wed, 8 Apr 2020 15:23:56 +0100 -Subject: [PATCH] kbuild: Disable gcc plugins - -The GCC plugin feature leads to different kernel configurations on what -ought to be equivalent build systems because they depend on the build -hosts native compilers rather than the cross compilers needed for the -target. This causes problems with module symbol version mismatches. - -Disable GCC plugins for all build hosts. - -Advanced build script hackery borrowed from a patch by milhouse. - -Signed-off-by: Phil Elwell ---- - scripts/gcc-plugin.sh | 1 + - 1 file changed, 1 insertion(+) - ---- a/scripts/gcc-plugin.sh -+++ b/scripts/gcc-plugin.sh -@@ -1,5 +1,6 @@ - #!/bin/sh - # SPDX-License-Identifier: GPL-2.0 -+exit 1 # Disable plugins - - set -e - diff --git a/target/linux/bcm27xx/patches-5.10/950-0323-media-i2c-Add-driver-for-Sony-IMX477-sensor.patch b/target/linux/bcm27xx/patches-5.10/950-0323-media-i2c-Add-driver-for-Sony-IMX477-sensor.patch index d24d8f51e5..bbfecb7ad6 100644 --- a/target/linux/bcm27xx/patches-5.10/950-0323-media-i2c-Add-driver-for-Sony-IMX477-sensor.patch +++ b/target/linux/bcm27xx/patches-5.10/950-0323-media-i2c-Add-driver-for-Sony-IMX477-sensor.patch @@ -25,7 +25,7 @@ Signed-off-by: Naushir Patuck --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -16347,6 +16347,14 @@ S: Maintained +@@ -16346,6 +16346,14 @@ S: Maintained T: git git://linuxtv.org/media_tree.git F: drivers/media/i2c/imx355.c diff --git a/target/linux/bcm27xx/patches-5.10/950-0355-xhci-quirks-add-link-TRB-quirk-for-VL805.patch b/target/linux/bcm27xx/patches-5.10/950-0355-xhci-quirks-add-link-TRB-quirk-for-VL805.patch index 5f451a01d4..ec889df411 100644 --- a/target/linux/bcm27xx/patches-5.10/950-0355-xhci-quirks-add-link-TRB-quirk-for-VL805.patch +++ b/target/linux/bcm27xx/patches-5.10/950-0355-xhci-quirks-add-link-TRB-quirk-for-VL805.patch @@ -32,7 +32,7 @@ Signed-off-by: Jonathan Bell if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c -@@ -659,6 +659,16 @@ void xhci_find_new_dequeue_state(struct +@@ -666,6 +666,16 @@ void xhci_find_new_dequeue_state(struct } while (!cycle_found || !td_last_trb_found); diff --git a/target/linux/bcm27xx/patches-5.10/950-0657-Documentation-devicetree-Add-documentation-for-imx37.patch b/target/linux/bcm27xx/patches-5.10/950-0657-Documentation-devicetree-Add-documentation-for-imx37.patch index 4116fa11c4..cd2c028d5e 100644 --- a/target/linux/bcm27xx/patches-5.10/950-0657-Documentation-devicetree-Add-documentation-for-imx37.patch +++ b/target/linux/bcm27xx/patches-5.10/950-0657-Documentation-devicetree-Add-documentation-for-imx37.patch @@ -132,7 +132,7 @@ Signed-off-by: David Plowman +... --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -16361,6 +16361,7 @@ M: Raspberry Pi Kernel Maintenance #include #include -@@ -252,8 +253,10 @@ static int dm_dp_mst_get_modes(struct dr +@@ -264,8 +265,10 @@ static int dm_dp_mst_get_modes(struct dr static struct drm_encoder * dm_mst_atomic_best_encoder(struct drm_connector *connector, diff --git a/target/linux/bcm27xx/patches-5.10/950-0733-usb-xhci-workaround-for-bogus-SET_DEQ_PENDING-endpoi.patch b/target/linux/bcm27xx/patches-5.10/950-0733-usb-xhci-workaround-for-bogus-SET_DEQ_PENDING-endpoi.patch index 8a76dd1b26..c0a4caad4b 100644 --- a/target/linux/bcm27xx/patches-5.10/950-0733-usb-xhci-workaround-for-bogus-SET_DEQ_PENDING-endpoi.patch +++ b/target/linux/bcm27xx/patches-5.10/950-0733-usb-xhci-workaround-for-bogus-SET_DEQ_PENDING-endpoi.patch @@ -26,7 +26,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c -@@ -4262,9 +4262,9 @@ void xhci_queue_new_dequeue_state(struct +@@ -4268,9 +4268,9 @@ void xhci_queue_new_dequeue_state(struct } ep = &xhci->devs[slot_id]->eps[ep_index]; if ((ep->ep_state & SET_DEQ_PENDING)) { diff --git a/target/linux/bcm4908/config-5.10 b/target/linux/bcm4908/config-5.10 index 9dcff4270f..48a91b3f0b 100644 --- a/target/linux/bcm4908/config-5.10 +++ b/target/linux/bcm4908/config-5.10 @@ -48,10 +48,8 @@ CONFIG_COMMON_CLK=y CONFIG_CPU_RMAP=y CONFIG_CRC16=y CONFIG_CRYPTO_DEFLATE=y -CONFIG_CRYPTO_GF128MUL=y CONFIG_CRYPTO_HASH_INFO=y CONFIG_CRYPTO_LZO=y -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_ZSTD=y CONFIG_DCACHE_WORD_ACCESS=y @@ -106,7 +104,6 @@ CONFIG_IRQ_FORCED_THREADING=y CONFIG_IRQ_WORK=y CONFIG_LEDS_GPIO=y CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOCK_SPIN_ON_OWNER=y CONFIG_LZO_COMPRESS=y diff --git a/target/linux/bcm53xx/config-5.10 b/target/linux/bcm53xx/config-5.10 index 57cc051b19..3dd0359113 100644 --- a/target/linux/bcm53xx/config-5.10 +++ b/target/linux/bcm53xx/config-5.10 @@ -94,10 +94,8 @@ CONFIG_CPU_TLB_V7=y CONFIG_CPU_V7=y CONFIG_CRC16=y CONFIG_CRYPTO_DEFLATE=y -CONFIG_CRYPTO_GF128MUL=y CONFIG_CRYPTO_HASH_INFO=y CONFIG_CRYPTO_LZO=y -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_ZSTD=y CONFIG_DCACHE_WORD_ACCESS=y @@ -174,7 +172,6 @@ CONFIG_IRQ_DOMAIN_HIERARCHY=y CONFIG_IRQ_FORCED_THREADING=y CONFIG_IRQ_WORK=y CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOCK_SPIN_ON_OWNER=y CONFIG_LZO_COMPRESS=y diff --git a/target/linux/bcm53xx/patches-5.4/033-v5.10-0001-ARM-dts-BCM5301X-Specify-PWM-in-the-DT.patch b/target/linux/bcm53xx/patches-5.4/033-v5.10-0001-ARM-dts-BCM5301X-Specify-PWM-in-the-DT.patch index 335378656c..760418a086 100644 --- a/target/linux/bcm53xx/patches-5.4/033-v5.10-0001-ARM-dts-BCM5301X-Specify-PWM-in-the-DT.patch +++ b/target/linux/bcm53xx/patches-5.4/033-v5.10-0001-ARM-dts-BCM5301X-Specify-PWM-in-the-DT.patch @@ -16,7 +16,7 @@ Signed-off-by: Florian Fainelli --- a/arch/arm/boot/dts/bcm5301x.dtsi +++ b/arch/arm/boot/dts/bcm5301x.dtsi -@@ -350,6 +350,14 @@ +@@ -352,6 +352,14 @@ }; }; @@ -31,7 +31,7 @@ Signed-off-by: Florian Fainelli mdio: mdio@18003000 { compatible = "brcm,iproc-mdio"; reg = <0x18003000 0x8>; -@@ -417,12 +425,12 @@ +@@ -419,12 +427,12 @@ function = "spi"; }; diff --git a/target/linux/bcm53xx/patches-5.4/033-v5.10-0002-ARM-dts-BCM5301X-Specify-uart2-in-the-DT.patch b/target/linux/bcm53xx/patches-5.4/033-v5.10-0002-ARM-dts-BCM5301X-Specify-uart2-in-the-DT.patch index 8cee6745ee..629e4bac24 100644 --- a/target/linux/bcm53xx/patches-5.4/033-v5.10-0002-ARM-dts-BCM5301X-Specify-uart2-in-the-DT.patch +++ b/target/linux/bcm53xx/patches-5.4/033-v5.10-0002-ARM-dts-BCM5301X-Specify-uart2-in-the-DT.patch @@ -12,7 +12,7 @@ Signed-off-by: Florian Fainelli --- a/arch/arm/boot/dts/bcm5301x.dtsi +++ b/arch/arm/boot/dts/bcm5301x.dtsi -@@ -392,6 +392,15 @@ +@@ -394,6 +394,15 @@ reg = <0x18105000 0x1000>; }; diff --git a/target/linux/bcm53xx/patches-5.4/033-v5.10-0003-ARM-dts-BCM5301X-Specify-pcie2-in-the-DT.patch b/target/linux/bcm53xx/patches-5.4/033-v5.10-0003-ARM-dts-BCM5301X-Specify-pcie2-in-the-DT.patch index d3e2fbcc9e..07b173702e 100644 --- a/target/linux/bcm53xx/patches-5.4/033-v5.10-0003-ARM-dts-BCM5301X-Specify-pcie2-in-the-DT.patch +++ b/target/linux/bcm53xx/patches-5.4/033-v5.10-0003-ARM-dts-BCM5301X-Specify-pcie2-in-the-DT.patch @@ -13,7 +13,7 @@ Signed-off-by: Florian Fainelli --- a/arch/arm/boot/dts/bcm5301x.dtsi +++ b/arch/arm/boot/dts/bcm5301x.dtsi -@@ -252,6 +252,10 @@ +@@ -254,6 +254,10 @@ reg = <0x00013000 0x1000>; }; diff --git a/target/linux/bcm53xx/patches-5.4/034-v5.11-0002-ARM-dts-BCM5301X-Harmonize-EHCI-OHCI-DT-nodes-name.patch b/target/linux/bcm53xx/patches-5.4/034-v5.11-0002-ARM-dts-BCM5301X-Harmonize-EHCI-OHCI-DT-nodes-name.patch index 271257c669..d6e5fca967 100644 --- a/target/linux/bcm53xx/patches-5.4/034-v5.11-0002-ARM-dts-BCM5301X-Harmonize-EHCI-OHCI-DT-nodes-name.patch +++ b/target/linux/bcm53xx/patches-5.4/034-v5.11-0002-ARM-dts-BCM5301X-Harmonize-EHCI-OHCI-DT-nodes-name.patch @@ -20,7 +20,7 @@ Signed-off-by: Florian Fainelli --- a/arch/arm/boot/dts/bcm5301x.dtsi +++ b/arch/arm/boot/dts/bcm5301x.dtsi -@@ -265,7 +265,7 @@ +@@ -267,7 +267,7 @@ interrupt-parent = <&gic>; @@ -29,7 +29,7 @@ Signed-off-by: Florian Fainelli #usb-cells = <0>; compatible = "generic-ehci"; -@@ -287,7 +287,7 @@ +@@ -289,7 +289,7 @@ }; }; diff --git a/target/linux/bcm53xx/patches-5.4/034-v5.11-0003-ARM-dts-BCM5310X-Harmonize-xHCI-DT-nodes-name.patch b/target/linux/bcm53xx/patches-5.4/034-v5.11-0003-ARM-dts-BCM5310X-Harmonize-xHCI-DT-nodes-name.patch index 08380d735c..2f9c8ce8c0 100644 --- a/target/linux/bcm53xx/patches-5.4/034-v5.11-0003-ARM-dts-BCM5310X-Harmonize-xHCI-DT-nodes-name.patch +++ b/target/linux/bcm53xx/patches-5.4/034-v5.11-0003-ARM-dts-BCM5310X-Harmonize-xHCI-DT-nodes-name.patch @@ -18,7 +18,7 @@ Signed-off-by: Florian Fainelli --- a/arch/arm/boot/dts/bcm5301x.dtsi +++ b/arch/arm/boot/dts/bcm5301x.dtsi -@@ -318,7 +318,7 @@ +@@ -320,7 +320,7 @@ interrupt-parent = <&gic>; diff --git a/target/linux/bcm53xx/patches-5.4/034-v5.11-0005-ARM-dts-BCM5301X-Use-corretc-pinctrl-compatible-for-.patch b/target/linux/bcm53xx/patches-5.4/034-v5.11-0005-ARM-dts-BCM5301X-Use-corretc-pinctrl-compatible-for-.patch index 3796967936..ddebdc4343 100644 --- a/target/linux/bcm53xx/patches-5.4/034-v5.11-0005-ARM-dts-BCM5301X-Use-corretc-pinctrl-compatible-for-.patch +++ b/target/linux/bcm53xx/patches-5.4/034-v5.11-0005-ARM-dts-BCM5301X-Use-corretc-pinctrl-compatible-for-.patch @@ -38,7 +38,7 @@ Signed-off-by: Florian Fainelli }; --- a/arch/arm/boot/dts/bcm5301x.dtsi +++ b/arch/arm/boot/dts/bcm5301x.dtsi -@@ -428,7 +428,7 @@ +@@ -430,7 +430,7 @@ #address-cells = <1>; #size-cells = <1>; diff --git a/target/linux/bcm53xx/patches-5.4/034-v5.11-0007-ARM-dts-BCM5301X-Move-CRU-devices-to-the-CRU-node.patch b/target/linux/bcm53xx/patches-5.4/034-v5.11-0007-ARM-dts-BCM5301X-Move-CRU-devices-to-the-CRU-node.patch index 6f763a2bf7..3c3db540d0 100644 --- a/target/linux/bcm53xx/patches-5.4/034-v5.11-0007-ARM-dts-BCM5301X-Move-CRU-devices-to-the-CRU-node.patch +++ b/target/linux/bcm53xx/patches-5.4/034-v5.11-0007-ARM-dts-BCM5301X-Move-CRU-devices-to-the-CRU-node.patch @@ -17,7 +17,7 @@ Signed-off-by: Florian Fainelli --- a/arch/arm/boot/dts/bcm5301x.dtsi +++ b/arch/arm/boot/dts/bcm5301x.dtsi -@@ -428,6 +428,26 @@ +@@ -430,6 +430,26 @@ #address-cells = <1>; #size-cells = <1>; @@ -44,7 +44,7 @@ Signed-off-by: Florian Fainelli pinctrl: pin-controller@1c0 { compatible = "brcm,bcm4708-pinmux"; reg = <0x1c0 0x24>; -@@ -454,32 +474,13 @@ +@@ -456,32 +476,13 @@ function = "uart1"; }; }; diff --git a/target/linux/bcm53xx/patches-5.4/034-v5.11-0010-ARM-dts-BCM5301X-Update-Ethernet-switch-node-name.patch b/target/linux/bcm53xx/patches-5.4/034-v5.11-0010-ARM-dts-BCM5301X-Update-Ethernet-switch-node-name.patch index 201aba913a..b3a774e340 100644 --- a/target/linux/bcm53xx/patches-5.4/034-v5.11-0010-ARM-dts-BCM5301X-Update-Ethernet-switch-node-name.patch +++ b/target/linux/bcm53xx/patches-5.4/034-v5.11-0010-ARM-dts-BCM5301X-Update-Ethernet-switch-node-name.patch @@ -21,7 +21,7 @@ Signed-off-by: Florian Fainelli --- a/arch/arm/boot/dts/bcm5301x.dtsi +++ b/arch/arm/boot/dts/bcm5301x.dtsi -@@ -483,7 +483,7 @@ +@@ -485,7 +485,7 @@ }; }; diff --git a/target/linux/bcm53xx/patches-5.4/034-v5.11-0011-ARM-dts-BCM5301X-Add-a-default-compatible-for-switch.patch b/target/linux/bcm53xx/patches-5.4/034-v5.11-0011-ARM-dts-BCM5301X-Add-a-default-compatible-for-switch.patch index 36a3b4c728..677e94f271 100644 --- a/target/linux/bcm53xx/patches-5.4/034-v5.11-0011-ARM-dts-BCM5301X-Add-a-default-compatible-for-switch.patch +++ b/target/linux/bcm53xx/patches-5.4/034-v5.11-0011-ARM-dts-BCM5301X-Add-a-default-compatible-for-switch.patch @@ -71,7 +71,7 @@ Signed-off-by: Florian Fainelli +}; --- a/arch/arm/boot/dts/bcm5301x.dtsi +++ b/arch/arm/boot/dts/bcm5301x.dtsi -@@ -484,7 +484,7 @@ +@@ -486,7 +486,7 @@ }; srab: ethernet-switch@18007000 { diff --git a/target/linux/bcm53xx/patches-5.4/034-v5.11-0012-ARM-dts-BCM5301X-Provide-defaults-ports-container-no.patch b/target/linux/bcm53xx/patches-5.4/034-v5.11-0012-ARM-dts-BCM5301X-Provide-defaults-ports-container-no.patch index 24689e998b..6e4f5f7bb8 100644 --- a/target/linux/bcm53xx/patches-5.4/034-v5.11-0012-ARM-dts-BCM5301X-Provide-defaults-ports-container-no.patch +++ b/target/linux/bcm53xx/patches-5.4/034-v5.11-0012-ARM-dts-BCM5301X-Provide-defaults-ports-container-no.patch @@ -155,7 +155,7 @@ Signed-off-by: Florian Fainelli label = "lan4"; --- a/arch/arm/boot/dts/bcm5301x.dtsi +++ b/arch/arm/boot/dts/bcm5301x.dtsi -@@ -490,6 +490,10 @@ +@@ -492,6 +492,10 @@ status = "disabled"; /* ports are defined in board DTS */ diff --git a/target/linux/bcm53xx/patches-5.4/036-v5.14-0001-ARM-dts-BCM5301X-Fix-NAND-nodes-names.patch b/target/linux/bcm53xx/patches-5.4/036-v5.14-0001-ARM-dts-BCM5301X-Fix-NAND-nodes-names.patch index 3a661062b6..48cceee743 100644 --- a/target/linux/bcm53xx/patches-5.4/036-v5.14-0001-ARM-dts-BCM5301X-Fix-NAND-nodes-names.patch +++ b/target/linux/bcm53xx/patches-5.4/036-v5.14-0001-ARM-dts-BCM5301X-Fix-NAND-nodes-names.patch @@ -53,7 +53,7 @@ Signed-off-by: Florian Fainelli #address-cells = <1>; --- a/arch/arm/boot/dts/bcm5301x.dtsi +++ b/arch/arm/boot/dts/bcm5301x.dtsi -@@ -501,7 +501,7 @@ +@@ -503,7 +503,7 @@ reg = <0x18004000 0x14>; }; diff --git a/target/linux/bcm53xx/patches-5.4/036-v5.14-0002-ARM-dts-BCM5301X-Fix-pinmux-subnodes-names.patch b/target/linux/bcm53xx/patches-5.4/036-v5.14-0002-ARM-dts-BCM5301X-Fix-pinmux-subnodes-names.patch index 1a342474a4..d8a4f87c38 100644 --- a/target/linux/bcm53xx/patches-5.4/036-v5.14-0002-ARM-dts-BCM5301X-Fix-pinmux-subnodes-names.patch +++ b/target/linux/bcm53xx/patches-5.4/036-v5.14-0002-ARM-dts-BCM5301X-Fix-pinmux-subnodes-names.patch @@ -28,7 +28,7 @@ Signed-off-by: Florian Fainelli }; --- a/arch/arm/boot/dts/bcm5301x.dtsi +++ b/arch/arm/boot/dts/bcm5301x.dtsi -@@ -458,18 +458,18 @@ +@@ -460,18 +460,18 @@ function = "spi"; }; diff --git a/target/linux/bcm53xx/patches-5.4/037-v5.15-0001-ARM-dts-BCM5301X-Fix-nodes-names.patch b/target/linux/bcm53xx/patches-5.4/037-v5.15-0001-ARM-dts-BCM5301X-Fix-nodes-names.patch index efcea1053f..e779d45645 100644 --- a/target/linux/bcm53xx/patches-5.4/037-v5.15-0001-ARM-dts-BCM5301X-Fix-nodes-names.patch +++ b/target/linux/bcm53xx/patches-5.4/037-v5.15-0001-ARM-dts-BCM5301X-Fix-nodes-names.patch @@ -50,7 +50,7 @@ Signed-off-by: Florian Fainelli compatible = "simple-bus"; ranges = <0x00000000 0x19000000 0x00023000>; #address-cells = <1>; -@@ -369,7 +369,7 @@ +@@ -371,7 +371,7 @@ #address-cells = <1>; }; @@ -59,7 +59,7 @@ Signed-off-by: Florian Fainelli compatible = "mdio-mux-mmioreg"; mdio-parent-bus = <&mdio>; #address-cells = <1>; -@@ -415,7 +415,7 @@ +@@ -417,7 +417,7 @@ status = "disabled"; }; diff --git a/target/linux/bcm53xx/patches-5.4/037-v5.15-0002-ARM-dts-BCM5301X-Fix-MDIO-mux-binding.patch b/target/linux/bcm53xx/patches-5.4/037-v5.15-0002-ARM-dts-BCM5301X-Fix-MDIO-mux-binding.patch index ee0adc0492..dc20720dbd 100644 --- a/target/linux/bcm53xx/patches-5.4/037-v5.15-0002-ARM-dts-BCM5301X-Fix-MDIO-mux-binding.patch +++ b/target/linux/bcm53xx/patches-5.4/037-v5.15-0002-ARM-dts-BCM5301X-Fix-MDIO-mux-binding.patch @@ -17,7 +17,7 @@ Signed-off-by: Florian Fainelli --- a/arch/arm/boot/dts/bcm5301x.dtsi +++ b/arch/arm/boot/dts/bcm5301x.dtsi -@@ -370,7 +370,7 @@ +@@ -372,7 +372,7 @@ }; mdio-mux@18003000 { diff --git a/target/linux/bcm53xx/patches-5.4/302-ARM-dts-BCM5301X-Update-Northstar-pinctrl-binding.patch b/target/linux/bcm53xx/patches-5.4/302-ARM-dts-BCM5301X-Update-Northstar-pinctrl-binding.patch index ca94f46652..8cbda68886 100644 --- a/target/linux/bcm53xx/patches-5.4/302-ARM-dts-BCM5301X-Update-Northstar-pinctrl-binding.patch +++ b/target/linux/bcm53xx/patches-5.4/302-ARM-dts-BCM5301X-Update-Northstar-pinctrl-binding.patch @@ -9,7 +9,7 @@ Signed-off-by: Rafał Miłecki --- a/arch/arm/boot/dts/bcm5301x.dtsi +++ b/arch/arm/boot/dts/bcm5301x.dtsi -@@ -422,7 +422,7 @@ +@@ -424,7 +424,7 @@ #size-cells = <1>; cru@100 { @@ -18,7 +18,7 @@ Signed-off-by: Rafał Miłecki reg = <0x100 0x1a4>; ranges; #address-cells = <1>; -@@ -448,10 +448,9 @@ +@@ -450,10 +450,9 @@ "sata1", "sata2"; }; diff --git a/target/linux/bcm63xx/config-5.10 b/target/linux/bcm63xx/config-5.10 index fd1b5c47b7..91dbbb4857 100644 --- a/target/linux/bcm63xx/config-5.10 +++ b/target/linux/bcm63xx/config-5.10 @@ -106,7 +106,6 @@ CONFIG_LEDS_BCM6328=y CONFIG_LEDS_BCM6358=y CONFIG_LEDS_GPIO=y CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y diff --git a/target/linux/bmips/config-5.10 b/target/linux/bmips/config-5.10 index 69a2ef74d9..bd54950210 100644 --- a/target/linux/bmips/config-5.10 +++ b/target/linux/bmips/config-5.10 @@ -59,15 +59,9 @@ CONFIG_CPU_SUPPORTS_HIGHMEM=y CONFIG_CRASH_DUMP=y CONFIG_CRC16=y CONFIG_CRYPTO_ACOMP2=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y CONFIG_CRYPTO_DEFLATE=y -CONFIG_CRYPTO_HASH2=y CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2 CONFIG_CRYPTO_LZO=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_ZSTD=y CONFIG_CSRC_R4K=y @@ -138,7 +132,6 @@ CONFIG_LEDS_BCM6328=y CONFIG_LEDS_BCM6358=y CONFIG_LEDS_GPIO=y CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LZO_COMPRESS=y CONFIG_LZO_DECOMPRESS=y diff --git a/target/linux/gemini/config-5.10 b/target/linux/gemini/config-5.10 index 7fdcc075e6..44c280a3aa 100644 --- a/target/linux/gemini/config-5.10 +++ b/target/linux/gemini/config-5.10 @@ -75,8 +75,6 @@ CONFIG_CRC32_SLICEBY8=y CONFIG_CRC_CCITT=y CONFIG_CRC_ITU_T=y CONFIG_CROSS_MEMORY_ATTACH=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y CONFIG_CRYPTO_CCM=y CONFIG_CRYPTO_CMAC=y CONFIG_CRYPTO_CRC32C=y @@ -88,21 +86,14 @@ CONFIG_CRYPTO_DRBG_MENU=y CONFIG_CRYPTO_ECB=y CONFIG_CRYPTO_ECHAINIV=y CONFIG_CRYPTO_GCM=y -CONFIG_CRYPTO_GF128MUL=y -CONFIG_CRYPTO_GHASH=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_HW=y CONFIG_CRYPTO_JITTERENTROPY=y CONFIG_CRYPTO_LIB_DES=y CONFIG_CRYPTO_LIB_SHA256=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y CONFIG_CRYPTO_MD4=y CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_NULL=y -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_RNG_DEFAULT=y @@ -243,7 +234,6 @@ CONFIG_KEYBOARD_DLINK_DIR685=y CONFIG_LDM_PARTITION=y CONFIG_LEDS_TRIGGER_DISK=y CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOGO=y CONFIG_LOGO_LINUX_CLUT224=y diff --git a/target/linux/generic/backport-5.10/600-v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch b/target/linux/generic/backport-5.10/600-v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch index 680b88d8d3..1fca4a5e74 100644 --- a/target/linux/generic/backport-5.10/600-v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch +++ b/target/linux/generic/backport-5.10/600-v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch @@ -18,7 +18,7 @@ Signed-off-by: David S. Miller --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -6802,15 +6802,10 @@ void __netif_napi_del(struct napi_struct +@@ -6805,15 +6805,10 @@ void __netif_napi_del(struct napi_struct } EXPORT_SYMBOL(__netif_napi_del); @@ -35,7 +35,7 @@ Signed-off-by: David S. Miller weight = n->weight; /* This NAPI_STATE_SCHED test is for avoiding a race -@@ -6830,7 +6825,7 @@ static int napi_poll(struct napi_struct +@@ -6833,7 +6828,7 @@ static int napi_poll(struct napi_struct n->poll, work, weight); if (likely(work < weight)) @@ -44,7 +44,7 @@ Signed-off-by: David S. Miller /* Drivers must not modify the NAPI state if they * consume the entire weight. In such cases this code -@@ -6839,7 +6834,7 @@ static int napi_poll(struct napi_struct +@@ -6842,7 +6837,7 @@ static int napi_poll(struct napi_struct */ if (unlikely(napi_disable_pending(n))) { napi_complete(n); @@ -53,7 +53,7 @@ Signed-off-by: David S. Miller } if (n->gro_bitmask) { -@@ -6857,12 +6852,29 @@ static int napi_poll(struct napi_struct +@@ -6860,12 +6855,29 @@ static int napi_poll(struct napi_struct if (unlikely(!list_empty(&n->poll_list))) { pr_warn_once("%s: Budget exhausted after napi rescheduled\n", n->dev ? n->dev->name : "backlog"); diff --git a/target/linux/generic/backport-5.10/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch b/target/linux/generic/backport-5.10/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch index ef94cc8e01..38e276ef72 100644 --- a/target/linux/generic/backport-5.10/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch +++ b/target/linux/generic/backport-5.10/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch @@ -131,7 +131,7 @@ Signed-off-by: David S. Miller static int __dev_open(struct net_device *dev, struct netlink_ext_ack *extack) { const struct net_device_ops *ops = dev->netdev_ops; -@@ -4264,6 +4286,21 @@ int gro_normal_batch __read_mostly = 8; +@@ -4267,6 +4289,21 @@ int gro_normal_batch __read_mostly = 8; static inline void ____napi_schedule(struct softnet_data *sd, struct napi_struct *napi) { @@ -153,7 +153,7 @@ Signed-off-by: David S. Miller list_add_tail(&napi->poll_list, &sd->poll_list); __raise_softirq_irqoff(NET_RX_SOFTIRQ); } -@@ -6755,6 +6792,12 @@ void netif_napi_add(struct net_device *d +@@ -6758,6 +6795,12 @@ void netif_napi_add(struct net_device *d set_bit(NAPI_STATE_NPSVC, &napi->state); list_add_rcu(&napi->dev_list, &dev->napi_list); napi_hash_add(napi); @@ -166,7 +166,7 @@ Signed-off-by: David S. Miller } EXPORT_SYMBOL(netif_napi_add); -@@ -6771,9 +6814,28 @@ void napi_disable(struct napi_struct *n) +@@ -6774,9 +6817,28 @@ void napi_disable(struct napi_struct *n) hrtimer_cancel(&n->timer); clear_bit(NAPI_STATE_DISABLE, &n->state); @@ -195,7 +195,7 @@ Signed-off-by: David S. Miller static void flush_gro_hash(struct napi_struct *napi) { int i; -@@ -6799,6 +6861,11 @@ void __netif_napi_del(struct napi_struct +@@ -6802,6 +6864,11 @@ void __netif_napi_del(struct napi_struct flush_gro_hash(napi); napi->gro_bitmask = 0; @@ -207,7 +207,7 @@ Signed-off-by: David S. Miller } EXPORT_SYMBOL(__netif_napi_del); -@@ -6880,6 +6947,51 @@ static int napi_poll(struct napi_struct +@@ -6883,6 +6950,51 @@ static int napi_poll(struct napi_struct return work; } diff --git a/target/linux/generic/backport-5.10/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch b/target/linux/generic/backport-5.10/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch index de1cd08df4..c3119a6e9b 100644 --- a/target/linux/generic/backport-5.10/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch +++ b/target/linux/generic/backport-5.10/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch @@ -57,7 +57,7 @@ Signed-off-by: David S. Miller * @n: NAPI context --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -4290,8 +4290,9 @@ static inline void ____napi_schedule(str +@@ -4293,8 +4293,9 @@ static inline void ____napi_schedule(str if (test_bit(NAPI_STATE_THREADED, &napi->state)) { /* Paired with smp_mb__before_atomic() in @@ -69,7 +69,7 @@ Signed-off-by: David S. Miller * wake_up_process() when it's not NULL. */ thread = READ_ONCE(napi->thread); -@@ -6765,6 +6766,49 @@ static void init_gro_hash(struct napi_st +@@ -6768,6 +6769,49 @@ static void init_gro_hash(struct napi_st napi->gro_bitmask = 0; } diff --git a/target/linux/generic/backport-5.10/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch b/target/linux/generic/backport-5.10/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch index a9e83a6d23..febef3e28a 100644 --- a/target/linux/generic/backport-5.10/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch +++ b/target/linux/generic/backport-5.10/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch @@ -45,7 +45,7 @@ Cc: Hannes Frederic Sowa enum gro_result { --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -4297,6 +4297,8 @@ static inline void ____napi_schedule(str +@@ -4300,6 +4300,8 @@ static inline void ____napi_schedule(str */ thread = READ_ONCE(napi->thread); if (thread) { @@ -54,7 +54,7 @@ Cc: Hannes Frederic Sowa wake_up_process(thread); return; } -@@ -6557,7 +6559,8 @@ bool napi_complete_done(struct napi_stru +@@ -6560,7 +6562,8 @@ bool napi_complete_done(struct napi_stru WARN_ON_ONCE(!(val & NAPIF_STATE_SCHED)); @@ -64,7 +64,7 @@ Cc: Hannes Frederic Sowa /* If STATE_MISSED was set, leave STATE_SCHED set, * because we will call napi->poll() one more time. -@@ -6993,16 +6996,25 @@ static int napi_poll(struct napi_struct +@@ -6996,16 +6999,25 @@ static int napi_poll(struct napi_struct static int napi_thread_wait(struct napi_struct *napi) { diff --git a/target/linux/generic/backport-5.10/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch b/target/linux/generic/backport-5.10/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch index d012f49bf5..1223b15c33 100644 --- a/target/linux/generic/backport-5.10/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch +++ b/target/linux/generic/backport-5.10/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch @@ -34,7 +34,7 @@ Signed-off-by: Jakub Kicinski --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -7000,7 +7000,7 @@ static int napi_thread_wait(struct napi_ +@@ -7003,7 +7003,7 @@ static int napi_thread_wait(struct napi_ set_current_state(TASK_INTERRUPTIBLE); @@ -43,7 +43,7 @@ Signed-off-by: Jakub Kicinski /* Testing SCHED_THREADED bit here to make sure the current * kthread owns this napi and could poll on this napi. * Testing SCHED bit is not enough because SCHED bit might be -@@ -7018,6 +7018,7 @@ static int napi_thread_wait(struct napi_ +@@ -7021,6 +7021,7 @@ static int napi_thread_wait(struct napi_ set_current_state(TASK_INTERRUPTIBLE); } __set_current_state(TASK_RUNNING); diff --git a/target/linux/generic/backport-5.10/610-v5.13-57-netfilter-flowtable-Set-offload-timeouts-according-t.patch b/target/linux/generic/backport-5.10/610-v5.13-57-netfilter-flowtable-Set-offload-timeouts-according-t.patch index 5410e2751a..1e82308eaa 100644 --- a/target/linux/generic/backport-5.10/610-v5.13-57-netfilter-flowtable-Set-offload-timeouts-according-t.patch +++ b/target/linux/generic/backport-5.10/610-v5.13-57-netfilter-flowtable-Set-offload-timeouts-according-t.patch @@ -64,8 +64,8 @@ Signed-off-by: Pablo Neira Ayuso return; + } - if (nf_flow_timeout_delta(ct->timeout) > (__s32)timeout) - ct->timeout = nfct_time_stamp + timeout; + if (nf_flow_timeout_delta(READ_ONCE(ct->timeout)) > (__s32)timeout) + WRITE_ONCE(ct->timeout, nfct_time_stamp + timeout); @@ -265,11 +268,35 @@ static const struct rhashtable_params nf .automatic_shrinking = true, }; diff --git a/target/linux/generic/backport-5.10/732-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch b/target/linux/generic/backport-5.10/732-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch index 196ff1dcba..794d87dc6e 100644 --- a/target/linux/generic/backport-5.10/732-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch +++ b/target/linux/generic/backport-5.10/732-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch @@ -272,7 +272,7 @@ Signed-off-by: David S. Miller void __iomem *descmap; const struct of_device_id *of_id = NULL; -@@ -1525,10 +1524,8 @@ static int altera_tse_probe(struct platf +@@ -1528,10 +1527,8 @@ static int altera_tse_probe(struct platf priv->rx_dma_buf_sz = ALTERA_RXDMABUFFER_SIZE; /* get default MAC address from device tree */ diff --git a/target/linux/generic/backport-5.4/600-v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch b/target/linux/generic/backport-5.4/600-v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch index 961140aabb..35aeb96251 100644 --- a/target/linux/generic/backport-5.4/600-v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch +++ b/target/linux/generic/backport-5.4/600-v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch @@ -18,7 +18,7 @@ Signed-off-by: David S. Miller --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -6322,15 +6322,10 @@ void netif_napi_del(struct napi_struct * +@@ -6325,15 +6325,10 @@ void netif_napi_del(struct napi_struct * } EXPORT_SYMBOL(netif_napi_del); @@ -35,7 +35,7 @@ Signed-off-by: David S. Miller weight = n->weight; /* This NAPI_STATE_SCHED test is for avoiding a race -@@ -6348,7 +6343,7 @@ static int napi_poll(struct napi_struct +@@ -6351,7 +6346,7 @@ static int napi_poll(struct napi_struct WARN_ON_ONCE(work > weight); if (likely(work < weight)) @@ -44,7 +44,7 @@ Signed-off-by: David S. Miller /* Drivers must not modify the NAPI state if they * consume the entire weight. In such cases this code -@@ -6357,7 +6352,7 @@ static int napi_poll(struct napi_struct +@@ -6360,7 +6355,7 @@ static int napi_poll(struct napi_struct */ if (unlikely(napi_disable_pending(n))) { napi_complete(n); @@ -53,7 +53,7 @@ Signed-off-by: David S. Miller } if (n->gro_bitmask) { -@@ -6375,12 +6370,29 @@ static int napi_poll(struct napi_struct +@@ -6378,12 +6373,29 @@ static int napi_poll(struct napi_struct if (unlikely(!list_empty(&n->poll_list))) { pr_warn_once("%s: Budget exhausted after napi rescheduled\n", n->dev ? n->dev->name : "backlog"); diff --git a/target/linux/generic/backport-5.4/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch b/target/linux/generic/backport-5.4/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch index c9bd4abb53..0c548f331a 100644 --- a/target/linux/generic/backport-5.4/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch +++ b/target/linux/generic/backport-5.4/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch @@ -131,7 +131,7 @@ Signed-off-by: David S. Miller static int __dev_open(struct net_device *dev, struct netlink_ext_ack *extack) { const struct net_device_ops *ops = dev->netdev_ops; -@@ -3885,6 +3907,21 @@ int gro_normal_batch __read_mostly = 8; +@@ -3888,6 +3910,21 @@ int gro_normal_batch __read_mostly = 8; static inline void ____napi_schedule(struct softnet_data *sd, struct napi_struct *napi) { @@ -153,7 +153,7 @@ Signed-off-by: David S. Miller list_add_tail(&napi->poll_list, &sd->poll_list); __raise_softirq_irqoff(NET_RX_SOFTIRQ); } -@@ -6276,6 +6313,12 @@ void netif_napi_add(struct net_device *d +@@ -6279,6 +6316,12 @@ void netif_napi_add(struct net_device *d set_bit(NAPI_STATE_NPSVC, &napi->state); list_add_rcu(&napi->dev_list, &dev->napi_list); napi_hash_add(napi); @@ -166,7 +166,7 @@ Signed-off-by: David S. Miller } EXPORT_SYMBOL(netif_napi_add); -@@ -6292,9 +6335,28 @@ void napi_disable(struct napi_struct *n) +@@ -6295,9 +6338,28 @@ void napi_disable(struct napi_struct *n) hrtimer_cancel(&n->timer); clear_bit(NAPI_STATE_DISABLE, &n->state); @@ -195,7 +195,7 @@ Signed-off-by: David S. Miller static void flush_gro_hash(struct napi_struct *napi) { int i; -@@ -6319,6 +6381,11 @@ void netif_napi_del(struct napi_struct * +@@ -6322,6 +6384,11 @@ void netif_napi_del(struct napi_struct * flush_gro_hash(napi); napi->gro_bitmask = 0; @@ -207,7 +207,7 @@ Signed-off-by: David S. Miller } EXPORT_SYMBOL(netif_napi_del); -@@ -6398,6 +6465,51 @@ static int napi_poll(struct napi_struct +@@ -6401,6 +6468,51 @@ static int napi_poll(struct napi_struct return work; } diff --git a/target/linux/generic/backport-5.4/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch b/target/linux/generic/backport-5.4/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch index d8b932978c..bdc34a15ea 100644 --- a/target/linux/generic/backport-5.4/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch +++ b/target/linux/generic/backport-5.4/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch @@ -57,7 +57,7 @@ Signed-off-by: David S. Miller * @n: NAPI context --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -3911,8 +3911,9 @@ static inline void ____napi_schedule(str +@@ -3914,8 +3914,9 @@ static inline void ____napi_schedule(str if (test_bit(NAPI_STATE_THREADED, &napi->state)) { /* Paired with smp_mb__before_atomic() in @@ -69,7 +69,7 @@ Signed-off-by: David S. Miller * wake_up_process() when it's not NULL. */ thread = READ_ONCE(napi->thread); -@@ -6290,6 +6291,49 @@ static void init_gro_hash(struct napi_st +@@ -6293,6 +6294,49 @@ static void init_gro_hash(struct napi_st napi->gro_bitmask = 0; } diff --git a/target/linux/generic/backport-5.4/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch b/target/linux/generic/backport-5.4/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch index 19c5a53a27..764f33e3fc 100644 --- a/target/linux/generic/backport-5.4/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch +++ b/target/linux/generic/backport-5.4/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch @@ -45,7 +45,7 @@ Cc: Hannes Frederic Sowa enum gro_result { --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -3918,6 +3918,8 @@ static inline void ____napi_schedule(str +@@ -3921,6 +3921,8 @@ static inline void ____napi_schedule(str */ thread = READ_ONCE(napi->thread); if (thread) { @@ -54,7 +54,7 @@ Cc: Hannes Frederic Sowa wake_up_process(thread); return; } -@@ -6078,7 +6080,8 @@ bool napi_complete_done(struct napi_stru +@@ -6081,7 +6083,8 @@ bool napi_complete_done(struct napi_stru WARN_ON_ONCE(!(val & NAPIF_STATE_SCHED)); @@ -64,7 +64,7 @@ Cc: Hannes Frederic Sowa /* If STATE_MISSED was set, leave STATE_SCHED set, * because we will call napi->poll() one more time. -@@ -6511,16 +6514,25 @@ static int napi_poll(struct napi_struct +@@ -6514,16 +6517,25 @@ static int napi_poll(struct napi_struct static int napi_thread_wait(struct napi_struct *napi) { diff --git a/target/linux/generic/backport-5.4/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch b/target/linux/generic/backport-5.4/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch index 108cf809f8..5c48fdf5c1 100644 --- a/target/linux/generic/backport-5.4/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch +++ b/target/linux/generic/backport-5.4/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch @@ -34,7 +34,7 @@ Signed-off-by: Jakub Kicinski --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -6518,7 +6518,7 @@ static int napi_thread_wait(struct napi_ +@@ -6521,7 +6521,7 @@ static int napi_thread_wait(struct napi_ set_current_state(TASK_INTERRUPTIBLE); @@ -43,7 +43,7 @@ Signed-off-by: Jakub Kicinski /* Testing SCHED_THREADED bit here to make sure the current * kthread owns this napi and could poll on this napi. * Testing SCHED bit is not enough because SCHED bit might be -@@ -6536,6 +6536,7 @@ static int napi_thread_wait(struct napi_ +@@ -6539,6 +6539,7 @@ static int napi_thread_wait(struct napi_ set_current_state(TASK_INTERRUPTIBLE); } __set_current_state(TASK_RUNNING); diff --git a/target/linux/generic/backport-5.4/700-v5.5-net-core-allow-fast-GRO-for-skbs-with-Ethernet-heade.patch b/target/linux/generic/backport-5.4/700-v5.5-net-core-allow-fast-GRO-for-skbs-with-Ethernet-heade.patch index 34ad5a1f4e..24b76cdca4 100644 --- a/target/linux/generic/backport-5.4/700-v5.5-net-core-allow-fast-GRO-for-skbs-with-Ethernet-heade.patch +++ b/target/linux/generic/backport-5.4/700-v5.5-net-core-allow-fast-GRO-for-skbs-with-Ethernet-heade.patch @@ -66,7 +66,7 @@ Signed-off-by: David S. Miller --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -5472,8 +5472,7 @@ static inline void skb_gro_reset_offset( +@@ -5475,8 +5475,7 @@ static inline void skb_gro_reset_offset( NAPI_GRO_CB(skb)->frag0 = NULL; NAPI_GRO_CB(skb)->frag0_len = 0; diff --git a/target/linux/generic/backport-5.4/782-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch b/target/linux/generic/backport-5.4/782-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch index ea77969f50..764fa79d25 100644 --- a/target/linux/generic/backport-5.4/782-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch +++ b/target/linux/generic/backport-5.4/782-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch @@ -272,7 +272,7 @@ Signed-off-by: David S. Miller void __iomem *descmap; const struct of_device_id *of_id = NULL; -@@ -1525,10 +1524,8 @@ static int altera_tse_probe(struct platf +@@ -1528,10 +1527,8 @@ static int altera_tse_probe(struct platf priv->rx_dma_buf_sz = ALTERA_RXDMABUFFER_SIZE; /* get default MAC address from device tree */ diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10 index a73e3b7a4c..151d3e13d9 100644 --- a/target/linux/generic/config-5.10 +++ b/target/linux/generic/config-5.10 @@ -900,7 +900,6 @@ CONFIG_CIFS_POSIX=y # CONFIG_CIFS_WEAK_PW_HASH is not set CONFIG_CIFS_XATTR=y # CONFIG_CIO_DAC is not set -CONFIG_CLANG_VERSION=0 # CONFIG_CLEANCACHE is not set # CONFIG_CLKSRC_VERSATILE is not set # CONFIG_CLK_HSDK is not set @@ -1125,7 +1124,7 @@ CONFIG_CRYPTO_CTR=y # CONFIG_CRYPTO_FCRYPT is not set # CONFIG_CRYPTO_FIPS is not set CONFIG_CRYPTO_GCM=y -# CONFIG_CRYPTO_GF128MUL is not set +CONFIG_CRYPTO_GF128MUL=y CONFIG_CRYPTO_GHASH=y # CONFIG_CRYPTO_GHASH_ARM64_CE is not set # CONFIG_CRYPTO_GHASH_ARM_CE is not set @@ -1165,6 +1164,7 @@ CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y # CONFIG_CRYPTO_MORUS640_SSE2 is not set # CONFIG_CRYPTO_NHPOLY1305_NEON is not set CONFIG_CRYPTO_NULL=y +CONFIG_CRYPTO_NULL2=y # CONFIG_CRYPTO_OFB is not set # CONFIG_CRYPTO_PCBC is not set # CONFIG_CRYPTO_PCOMP is not set diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4 index e22e657bb2..965533be90 100644 --- a/target/linux/generic/config-5.4 +++ b/target/linux/generic/config-5.4 @@ -852,7 +852,6 @@ CONFIG_CIFS_POSIX=y # CONFIG_CIFS_WEAK_PW_HASH is not set CONFIG_CIFS_XATTR=y # CONFIG_CIO_DAC is not set -CONFIG_CLANG_VERSION=0 # CONFIG_CLEANCACHE is not set # CONFIG_CLKSRC_VERSATILE is not set # CONFIG_CLK_HSDK is not set diff --git a/target/linux/generic/config-filter b/target/linux/generic/config-filter index 719487be5f..16daecf321 100644 --- a/target/linux/generic/config-filter +++ b/target/linux/generic/config-filter @@ -3,10 +3,12 @@ # CONFIG_ARCH_(ENABLE|HAS|HAVE|INLINE|SUPPORTS|USE|WANT|STACKWALK)_.* is not set # CONFIG_AS_.* is not set # CONFIG_CC_(CAN|HAS|IS|VERSION)_.* is not set +CONFIG_CLANG_VERSION=.* # CONFIG_GCC_VERSION is not set # CONFIG_HAVE_(?!(ARCH_TIMER|TCM|SMP)).* is not set # CONFIG_INLINE_.* is not set # CONFIG_LD_.* is not set +CONFIG_LLD_VERSION=.* CONFIG_PLUGIN_HOSTCC=".*" # CONFIG_SET_FS is not set # CONFIG_TASKS_.* is not set diff --git a/target/linux/generic/hack-5.10/721-net-phy-aquantia-enable-AQR112-and-AQR412.patch b/target/linux/generic/hack-5.10/721-net-phy-aquantia-enable-AQR112-and-AQR412.patch new file mode 100644 index 0000000000..882f20c6d1 --- /dev/null +++ b/target/linux/generic/hack-5.10/721-net-phy-aquantia-enable-AQR112-and-AQR412.patch @@ -0,0 +1,146 @@ +From 5f62951fba63a9f9cfff564209426bdea5fcc371 Mon Sep 17 00:00:00 2001 +From: Alex Marginean +Date: Tue, 27 Aug 2019 15:16:56 +0300 +Subject: [PATCH] drivers: net: phy: aquantia: enable AQR112 and AQR412 + +Adds support for AQR112 and AQR412 which is mostly based on existing code +with the addition of code configuring the protocol on system side. +This allows changing the system side protocol without having to deploy a +different firmware on the PHY. + +Signed-off-by: Alex Marginean +--- + drivers/net/phy/aquantia_main.c | 88 +++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 88 insertions(+) + +--- a/drivers/net/phy/aquantia_main.c ++++ b/drivers/net/phy/aquantia_main.c +@@ -20,9 +20,11 @@ + #define PHY_ID_AQR105 0x03a1b4a2 + #define PHY_ID_AQR106 0x03a1b4d0 + #define PHY_ID_AQR107 0x03a1b4e0 ++#define PHY_ID_AQR112 0x03a1b662 + #define PHY_ID_AQR113C 0x31c31c12 + #define PHY_ID_AQCS109 0x03a1b5c2 + #define PHY_ID_AQR405 0x03a1b4b0 ++#define PHY_ID_AQR412 0x03a1b712 + #define PHY_ID_AQR813 0x31c31cb2 + + #define MDIO_PHYXS_VEND_IF_STATUS 0xe812 +@@ -123,6 +125,29 @@ + #define VEND1_GLOBAL_INT_VEND_MASK_GLOBAL2 BIT(1) + #define VEND1_GLOBAL_INT_VEND_MASK_GLOBAL3 BIT(0) + ++/* registers in MDIO_MMD_VEND1 region */ ++#define AQUANTIA_VND1_GLOBAL_SC 0x000 ++#define AQUANTIA_VND1_GLOBAL_SC_LP BIT(0xb) ++ ++/* global start rate, the protocol associated with this speed is used by default ++ * on SI. ++ */ ++#define AQUANTIA_VND1_GSTART_RATE 0x31a ++#define AQUANTIA_VND1_GSTART_RATE_OFF 0 ++#define AQUANTIA_VND1_GSTART_RATE_100M 1 ++#define AQUANTIA_VND1_GSTART_RATE_1G 2 ++#define AQUANTIA_VND1_GSTART_RATE_10G 3 ++#define AQUANTIA_VND1_GSTART_RATE_2_5G 4 ++#define AQUANTIA_VND1_GSTART_RATE_5G 5 ++ ++/* SYSCFG registers for 100M, 1G, 2.5G, 5G, 10G */ ++#define AQUANTIA_VND1_GSYSCFG_BASE 0x31b ++#define AQUANTIA_VND1_GSYSCFG_100M 0 ++#define AQUANTIA_VND1_GSYSCFG_1G 1 ++#define AQUANTIA_VND1_GSYSCFG_2_5G 2 ++#define AQUANTIA_VND1_GSYSCFG_5G 3 ++#define AQUANTIA_VND1_GSYSCFG_10G 4 ++ + struct aqr107_hw_stat { + const char *name; + int reg; +@@ -243,6 +268,51 @@ static int aqr_config_aneg(struct phy_de + return genphy_c45_check_and_restart_aneg(phydev, changed); + } + ++static struct { ++ u16 syscfg; ++ int cnt; ++ u16 start_rate; ++} aquantia_syscfg[PHY_INTERFACE_MODE_MAX] = { ++ [PHY_INTERFACE_MODE_SGMII] = {0x04b, AQUANTIA_VND1_GSYSCFG_1G, ++ AQUANTIA_VND1_GSTART_RATE_1G}, ++ [PHY_INTERFACE_MODE_2500BASEX] = {0x144, AQUANTIA_VND1_GSYSCFG_2_5G, ++ AQUANTIA_VND1_GSTART_RATE_2_5G}, ++ [PHY_INTERFACE_MODE_XGMII] = {0x100, AQUANTIA_VND1_GSYSCFG_10G, ++ AQUANTIA_VND1_GSTART_RATE_10G}, ++ [PHY_INTERFACE_MODE_USXGMII] = {0x080, AQUANTIA_VND1_GSYSCFG_10G, ++ AQUANTIA_VND1_GSTART_RATE_10G}, ++}; ++ ++/* Sets up protocol on system side before calling aqr_config_aneg */ ++static int aqr_config_aneg_set_prot(struct phy_device *phydev) ++{ ++ int if_type = phydev->interface; ++ int i; ++ ++ if (!aquantia_syscfg[if_type].cnt) ++ return 0; ++ ++ /* set PHY in low power mode so we can configure protocols */ ++ phy_write_mmd(phydev, MDIO_MMD_VEND1, AQUANTIA_VND1_GLOBAL_SC, ++ AQUANTIA_VND1_GLOBAL_SC_LP); ++ mdelay(10); ++ ++ /* set the default rate to enable the SI link */ ++ phy_write_mmd(phydev, MDIO_MMD_VEND1, AQUANTIA_VND1_GSTART_RATE, ++ aquantia_syscfg[if_type].start_rate); ++ ++ for (i = 0; i <= aquantia_syscfg[if_type].cnt; i++) ++ phy_write_mmd(phydev, MDIO_MMD_VEND1, ++ AQUANTIA_VND1_GSYSCFG_BASE + i, ++ aquantia_syscfg[if_type].syscfg); ++ ++ /* wake PHY back up */ ++ phy_write_mmd(phydev, MDIO_MMD_VEND1, AQUANTIA_VND1_GLOBAL_SC, 0); ++ mdelay(10); ++ ++ return aqr_config_aneg(phydev); ++} ++ + static int aqr_config_intr(struct phy_device *phydev) + { + bool en = phydev->interrupts == PHY_INTERRUPT_ENABLED; +@@ -738,6 +808,22 @@ static struct phy_driver aqr_driver[] = + .get_stats = aqr107_get_stats, + .link_change_notify = aqr107_link_change_notify, + }, ++{ ++ PHY_ID_MATCH_MODEL(PHY_ID_AQR112), ++ .name = "Aquantia AQR112", ++ .config_aneg = aqr_config_aneg_set_prot, ++ .config_intr = aqr_config_intr, ++ .ack_interrupt = aqr_ack_interrupt, ++ .read_status = aqr107_read_status, ++}, ++{ ++ PHY_ID_MATCH_MODEL(PHY_ID_AQR412), ++ .name = "Aquantia AQR412", ++ .config_aneg = aqr_config_aneg_set_prot, ++ .config_intr = aqr_config_intr, ++ .ack_interrupt = aqr_ack_interrupt, ++ .read_status = aqr107_read_status, ++}, + }; + + module_phy_driver(aqr_driver); +@@ -748,9 +834,11 @@ static struct mdio_device_id __maybe_unu + { PHY_ID_MATCH_MODEL(PHY_ID_AQR105) }, + { PHY_ID_MATCH_MODEL(PHY_ID_AQR106) }, + { PHY_ID_MATCH_MODEL(PHY_ID_AQR107) }, ++ { PHY_ID_MATCH_MODEL(PHY_ID_AQR112) }, + { PHY_ID_MATCH_MODEL(PHY_ID_AQR113C) }, + { PHY_ID_MATCH_MODEL(PHY_ID_AQCS109) }, + { PHY_ID_MATCH_MODEL(PHY_ID_AQR405) }, ++ { PHY_ID_MATCH_MODEL(PHY_ID_AQR412) }, + { PHY_ID_MATCH_MODEL(PHY_ID_AQR813) }, + { } + }; diff --git a/target/linux/generic/hack-5.10/722-net-phy-aquantia-Add-AQR113-driver-support.patch b/target/linux/generic/hack-5.10/722-net-phy-aquantia-Add-AQR113-driver-support.patch new file mode 100644 index 0000000000..9bb7784b0e --- /dev/null +++ b/target/linux/generic/hack-5.10/722-net-phy-aquantia-Add-AQR113-driver-support.patch @@ -0,0 +1,43 @@ +From 2e677e4ae8f8330f68013163b060d0fda3a43095 Mon Sep 17 00:00:00 2001 +From: "Langer, Thomas" +Date: Fri, 9 Jul 2021 17:36:46 +0200 +Subject: [PATCH] PONRTSYS-8842: aquantia: Add AQR113 driver support + +Add a new entry for AQR113 PHY_ID +--- + drivers/net/phy/aquantia_main.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +--- a/drivers/net/phy/aquantia_main.c ++++ b/drivers/net/phy/aquantia_main.c +@@ -21,6 +21,7 @@ + #define PHY_ID_AQR106 0x03a1b4d0 + #define PHY_ID_AQR107 0x03a1b4e0 + #define PHY_ID_AQR112 0x03a1b662 ++#define PHY_ID_AQR113 0x31c31c40 + #define PHY_ID_AQR113C 0x31c31c12 + #define PHY_ID_AQCS109 0x03a1b5c2 + #define PHY_ID_AQR405 0x03a1b4b0 +@@ -817,6 +818,14 @@ static struct phy_driver aqr_driver[] = + .read_status = aqr_read_status, + }, + { ++ PHY_ID_MATCH_MODEL(PHY_ID_AQR113), ++ .name = "Aquantia AQR113", ++ .config_aneg = aqr_config_aneg, ++ .config_intr = aqr_config_intr, ++ .ack_interrupt = aqr_ack_interrupt, ++ .read_status = aqr107_read_status, ++}, ++{ + PHY_ID_MATCH_MODEL(PHY_ID_AQR412), + .name = "Aquantia AQR412", + .config_aneg = aqr_config_aneg_set_prot, +@@ -835,6 +844,7 @@ static struct mdio_device_id __maybe_unu + { PHY_ID_MATCH_MODEL(PHY_ID_AQR106) }, + { PHY_ID_MATCH_MODEL(PHY_ID_AQR107) }, + { PHY_ID_MATCH_MODEL(PHY_ID_AQR112) }, ++ { PHY_ID_MATCH_MODEL(PHY_ID_AQR113) }, + { PHY_ID_MATCH_MODEL(PHY_ID_AQR113C) }, + { PHY_ID_MATCH_MODEL(PHY_ID_AQCS109) }, + { PHY_ID_MATCH_MODEL(PHY_ID_AQR405) }, diff --git a/target/linux/generic/hack-5.10/723-net-phy-aquantia-add-PHY_IDs-for-AQR112-variants.patch b/target/linux/generic/hack-5.10/723-net-phy-aquantia-add-PHY_IDs-for-AQR112-variants.patch new file mode 100644 index 0000000000..b60d009241 --- /dev/null +++ b/target/linux/generic/hack-5.10/723-net-phy-aquantia-add-PHY_IDs-for-AQR112-variants.patch @@ -0,0 +1,55 @@ +From 3b92ee7b7899b6beffb2b484c58326e36612a873 Mon Sep 17 00:00:00 2001 +From: Daniel Golle +Date: Thu, 23 Dec 2021 14:52:56 +0000 +Subject: [PATCH] net: phy: aquantia: add PHY_ID for AQR112R + +As advised by Ian Chang this PHY is used in Puzzle devices. + +Signed-off-by: Daniel Golle +--- + drivers/net/phy/aquantia_main.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +--- a/drivers/net/phy/aquantia_main.c ++++ b/drivers/net/phy/aquantia_main.c +@@ -21,6 +21,8 @@ + #define PHY_ID_AQR106 0x03a1b4d0 + #define PHY_ID_AQR107 0x03a1b4e0 + #define PHY_ID_AQR112 0x03a1b662 ++#define PHY_ID_AQR112C 0x03a1b790 ++#define PHY_ID_AQR112R 0x31c31d12 + #define PHY_ID_AQR113 0x31c31c40 + #define PHY_ID_AQR113C 0x31c31c12 + #define PHY_ID_AQCS109 0x03a1b5c2 +@@ -818,6 +820,22 @@ static struct phy_driver aqr_driver[] = + .read_status = aqr107_read_status, + }, + { ++ PHY_ID_MATCH_MODEL(PHY_ID_AQR112C), ++ .name = "Aquantia AQR112C", ++ .config_aneg = aqr_config_aneg_set_prot, ++ .config_intr = aqr_config_intr, ++ .ack_interrupt = aqr_ack_interrupt, ++ .read_status = aqr107_read_status, ++}, ++{ ++ PHY_ID_MATCH_MODEL(PHY_ID_AQR112R), ++ .name = "Aquantia AQR112R", ++ .config_aneg = aqr_config_aneg_set_prot, ++ .config_intr = aqr_config_intr, ++ .ack_interrupt = aqr_ack_interrupt, ++ .read_status = aqr107_read_status, ++}, ++{ + PHY_ID_MATCH_MODEL(PHY_ID_AQR113), + .name = "Aquantia AQR113", + .config_aneg = aqr_config_aneg, +@@ -844,6 +862,8 @@ static struct mdio_device_id __maybe_unu + { PHY_ID_MATCH_MODEL(PHY_ID_AQR106) }, + { PHY_ID_MATCH_MODEL(PHY_ID_AQR107) }, + { PHY_ID_MATCH_MODEL(PHY_ID_AQR112) }, ++ { PHY_ID_MATCH_MODEL(PHY_ID_AQR112C) }, ++ { PHY_ID_MATCH_MODEL(PHY_ID_AQR112R) }, + { PHY_ID_MATCH_MODEL(PHY_ID_AQR113) }, + { PHY_ID_MATCH_MODEL(PHY_ID_AQR113C) }, + { PHY_ID_MATCH_MODEL(PHY_ID_AQCS109) }, diff --git a/target/linux/generic/hack-5.4/902-debloat_proc.patch b/target/linux/generic/hack-5.4/902-debloat_proc.patch index 042588a623..198b03768b 100644 --- a/target/linux/generic/hack-5.4/902-debloat_proc.patch +++ b/target/linux/generic/hack-5.4/902-debloat_proc.patch @@ -158,7 +158,7 @@ Signed-off-by: Felix Fietkau IPC_SEM_IDS, sysvipc_sem_proc_show); --- a/ipc/shm.c +++ b/ipc/shm.c -@@ -144,6 +144,8 @@ pure_initcall(ipc_ns_init); +@@ -154,6 +154,8 @@ pure_initcall(ipc_ns_init); void __init shm_init(void) { diff --git a/target/linux/generic/pending-5.10/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-5.10/680-NET-skip-GRO-for-foreign-MAC-addresses.patch index 6f11ba18f5..e64e0421e1 100644 --- a/target/linux/generic/pending-5.10/680-NET-skip-GRO-for-foreign-MAC-addresses.patch +++ b/target/linux/generic/pending-5.10/680-NET-skip-GRO-for-foreign-MAC-addresses.patch @@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau __u16 tc_index; /* traffic control index */ --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -6059,6 +6059,9 @@ static enum gro_result dev_gro_receive(s +@@ -6062,6 +6062,9 @@ static enum gro_result dev_gro_receive(s int same_flow; int grow; @@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau if (netif_elide_gro(skb->dev)) goto normal; -@@ -8036,6 +8039,48 @@ static void __netdev_adjacent_dev_unlink +@@ -8039,6 +8042,48 @@ static void __netdev_adjacent_dev_unlink &upper_dev->adj_list.lower); } @@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau static int __netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev, bool master, void *upper_priv, void *upper_info, -@@ -8087,6 +8132,7 @@ static int __netdev_upper_dev_link(struc +@@ -8090,6 +8135,7 @@ static int __netdev_upper_dev_link(struc if (ret) return ret; @@ -99,7 +99,7 @@ Signed-off-by: Felix Fietkau ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, &changeupper_info.info); ret = notifier_to_errno(ret); -@@ -8183,6 +8229,7 @@ static void __netdev_upper_dev_unlink(st +@@ -8186,6 +8232,7 @@ static void __netdev_upper_dev_unlink(st __netdev_adjacent_dev_unlink_neighbour(dev, upper_dev); @@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, &changeupper_info.info); -@@ -8969,6 +9016,7 @@ int dev_set_mac_address(struct net_devic +@@ -8972,6 +9019,7 @@ int dev_set_mac_address(struct net_devic if (err) return err; dev->addr_assign_type = NET_ADDR_SET; diff --git a/target/linux/generic/pending-5.10/834-ledtrig-libata.patch b/target/linux/generic/pending-5.10/834-ledtrig-libata.patch index fddec74d96..e43a97bfe8 100644 --- a/target/linux/generic/pending-5.10/834-ledtrig-libata.patch +++ b/target/linux/generic/pending-5.10/834-ledtrig-libata.patch @@ -65,7 +65,7 @@ Signed-off-by: Daniel Golle /** * ata_build_rw_tf - Build ATA taskfile for given read/write request * @tf: Target ATA taskfile -@@ -4545,6 +4558,9 @@ struct ata_queued_cmd *ata_qc_new_init(s +@@ -4547,6 +4560,9 @@ struct ata_queued_cmd *ata_qc_new_init(s if (tag < 0) return NULL; } @@ -75,7 +75,7 @@ Signed-off-by: Daniel Golle qc = __ata_qc_from_tag(ap, tag); qc->tag = qc->hw_tag = tag; -@@ -5323,6 +5339,9 @@ struct ata_port *ata_port_alloc(struct a +@@ -5325,6 +5341,9 @@ struct ata_port *ata_port_alloc(struct a ap->stats.unhandled_irq = 1; ap->stats.idle_irq = 1; #endif @@ -85,7 +85,7 @@ Signed-off-by: Daniel Golle ata_sff_port_init(ap); return ap; -@@ -5358,6 +5377,12 @@ static void ata_host_release(struct kref +@@ -5360,6 +5379,12 @@ static void ata_host_release(struct kref kfree(ap->pmp_link); kfree(ap->slave_link); @@ -98,7 +98,7 @@ Signed-off-by: Daniel Golle kfree(ap); host->ports[i] = NULL; } -@@ -5764,7 +5789,23 @@ int ata_host_register(struct ata_host *h +@@ -5766,7 +5791,23 @@ int ata_host_register(struct ata_host *h host->ports[i]->print_id = atomic_inc_return(&ata_print_id); host->ports[i]->local_port_no = i + 1; } diff --git a/target/linux/generic/pending-5.4/642-net-8021q-support-hardware-flow-table-offload.patch b/target/linux/generic/pending-5.4/642-net-8021q-support-hardware-flow-table-offload.patch index d67cad7159..cfcc28af3e 100644 --- a/target/linux/generic/pending-5.4/642-net-8021q-support-hardware-flow-table-offload.patch +++ b/target/linux/generic/pending-5.4/642-net-8021q-support-hardware-flow-table-offload.patch @@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau #include "vlan.h" #include "vlanproc.h" #include -@@ -744,6 +749,27 @@ static int vlan_dev_get_iflink(const str +@@ -747,6 +752,27 @@ static int vlan_dev_get_iflink(const str return real_dev->ifindex; } @@ -49,7 +49,7 @@ Signed-off-by: Felix Fietkau static const struct ethtool_ops vlan_ethtool_ops = { .get_link_ksettings = vlan_ethtool_get_link_ksettings, .get_drvinfo = vlan_ethtool_get_drvinfo, -@@ -782,6 +808,9 @@ static const struct net_device_ops vlan_ +@@ -785,6 +811,9 @@ static const struct net_device_ops vlan_ #endif .ndo_fix_features = vlan_dev_fix_features, .ndo_get_iflink = vlan_dev_get_iflink, diff --git a/target/linux/generic/pending-5.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/pending-5.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch index 06227cfafe..8cf36addeb 100644 --- a/target/linux/generic/pending-5.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch +++ b/target/linux/generic/pending-5.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch @@ -157,7 +157,7 @@ Signed-off-by: Jonas Gorski case RTN_THROW: case RTN_UNREACHABLE: default: -@@ -4434,6 +4453,17 @@ static int ip6_pkt_prohibit_out(struct n +@@ -4453,6 +4472,17 @@ static int ip6_pkt_prohibit_out(struct n return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES); } @@ -175,7 +175,7 @@ Signed-off-by: Jonas Gorski /* * Allocate a dst for local (unicast / anycast) address. */ -@@ -4914,7 +4944,8 @@ static int rtm_to_fib6_config(struct sk_ +@@ -4933,7 +4963,8 @@ static int rtm_to_fib6_config(struct sk_ if (rtm->rtm_type == RTN_UNREACHABLE || rtm->rtm_type == RTN_BLACKHOLE || rtm->rtm_type == RTN_PROHIBIT || @@ -185,7 +185,7 @@ Signed-off-by: Jonas Gorski cfg->fc_flags |= RTF_REJECT; if (rtm->rtm_type == RTN_LOCAL) -@@ -6037,6 +6068,8 @@ static int ip6_route_dev_notify(struct n +@@ -6056,6 +6087,8 @@ static int ip6_route_dev_notify(struct n #ifdef CONFIG_IPV6_MULTIPLE_TABLES net->ipv6.ip6_prohibit_entry->dst.dev = dev; net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev); @@ -194,7 +194,7 @@ Signed-off-by: Jonas Gorski net->ipv6.ip6_blk_hole_entry->dst.dev = dev; net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev); #endif -@@ -6048,6 +6081,7 @@ static int ip6_route_dev_notify(struct n +@@ -6067,6 +6100,7 @@ static int ip6_route_dev_notify(struct n in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev); #ifdef CONFIG_IPV6_MULTIPLE_TABLES in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev); @@ -202,7 +202,7 @@ Signed-off-by: Jonas Gorski in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev); #endif } -@@ -6240,6 +6274,8 @@ static int __net_init ip6_route_net_init +@@ -6259,6 +6293,8 @@ static int __net_init ip6_route_net_init #ifdef CONFIG_IPV6_MULTIPLE_TABLES net->ipv6.fib6_has_custom_rules = false; @@ -211,7 +211,7 @@ Signed-off-by: Jonas Gorski net->ipv6.ip6_prohibit_entry = kmemdup(&ip6_prohibit_entry_template, sizeof(*net->ipv6.ip6_prohibit_entry), GFP_KERNEL); -@@ -6250,11 +6286,21 @@ static int __net_init ip6_route_net_init +@@ -6269,11 +6305,21 @@ static int __net_init ip6_route_net_init ip6_template_metrics, true); INIT_LIST_HEAD(&net->ipv6.ip6_prohibit_entry->rt6i_uncached); @@ -234,7 +234,7 @@ Signed-off-by: Jonas Gorski net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops; dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst, ip6_template_metrics, true); -@@ -6278,6 +6324,8 @@ out: +@@ -6297,6 +6343,8 @@ out: return ret; #ifdef CONFIG_IPV6_MULTIPLE_TABLES @@ -243,7 +243,7 @@ Signed-off-by: Jonas Gorski out_ip6_prohibit_entry: kfree(net->ipv6.ip6_prohibit_entry); out_ip6_null_entry: -@@ -6297,6 +6345,7 @@ static void __net_exit ip6_route_net_exi +@@ -6316,6 +6364,7 @@ static void __net_exit ip6_route_net_exi kfree(net->ipv6.ip6_null_entry); #ifdef CONFIG_IPV6_MULTIPLE_TABLES kfree(net->ipv6.ip6_prohibit_entry); @@ -251,7 +251,7 @@ Signed-off-by: Jonas Gorski kfree(net->ipv6.ip6_blk_hole_entry); #endif dst_entries_destroy(&net->ipv6.ip6_dst_ops); -@@ -6374,6 +6423,9 @@ void __init ip6_route_init_special_entri +@@ -6393,6 +6442,9 @@ void __init ip6_route_init_special_entri init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev; init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); diff --git a/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch index 45f643b650..9795a99bb5 100644 --- a/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch +++ b/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch @@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau __u16 tc_index; /* traffic control index */ --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -5538,6 +5538,9 @@ static enum gro_result dev_gro_receive(s +@@ -5541,6 +5541,9 @@ static enum gro_result dev_gro_receive(s int same_flow; int grow; @@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau if (netif_elide_gro(skb->dev)) goto normal; -@@ -7481,6 +7484,48 @@ static void __netdev_adjacent_dev_unlink +@@ -7484,6 +7487,48 @@ static void __netdev_adjacent_dev_unlink &upper_dev->adj_list.lower); } @@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau static int __netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev, bool master, void *upper_priv, void *upper_info, -@@ -7531,6 +7576,7 @@ static int __netdev_upper_dev_link(struc +@@ -7534,6 +7579,7 @@ static int __netdev_upper_dev_link(struc if (ret) return ret; @@ -99,7 +99,7 @@ Signed-off-by: Felix Fietkau ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, &changeupper_info.info); ret = notifier_to_errno(ret); -@@ -7624,6 +7670,7 @@ void netdev_upper_dev_unlink(struct net_ +@@ -7627,6 +7673,7 @@ void netdev_upper_dev_unlink(struct net_ __netdev_adjacent_dev_unlink_neighbour(dev, upper_dev); @@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, &changeupper_info.info); -@@ -8354,6 +8401,7 @@ int dev_set_mac_address(struct net_devic +@@ -8357,6 +8404,7 @@ int dev_set_mac_address(struct net_devic if (err) return err; dev->addr_assign_type = NET_ADDR_SET; diff --git a/target/linux/generic/pending-5.4/834-ledtrig-libata.patch b/target/linux/generic/pending-5.4/834-ledtrig-libata.patch index f33ceec126..2c876ae55e 100644 --- a/target/linux/generic/pending-5.4/834-ledtrig-libata.patch +++ b/target/linux/generic/pending-5.4/834-ledtrig-libata.patch @@ -65,7 +65,7 @@ Signed-off-by: Daniel Golle /** * ata_build_rw_tf - Build ATA taskfile for given read/write request * @tf: Target ATA taskfile -@@ -5149,6 +5162,9 @@ struct ata_queued_cmd *ata_qc_new_init(s +@@ -5151,6 +5164,9 @@ struct ata_queued_cmd *ata_qc_new_init(s if (tag < 0) return NULL; } @@ -75,7 +75,7 @@ Signed-off-by: Daniel Golle qc = __ata_qc_from_tag(ap, tag); qc->tag = qc->hw_tag = tag; -@@ -6085,6 +6101,9 @@ struct ata_port *ata_port_alloc(struct a +@@ -6087,6 +6103,9 @@ struct ata_port *ata_port_alloc(struct a ap->stats.unhandled_irq = 1; ap->stats.idle_irq = 1; #endif @@ -85,7 +85,7 @@ Signed-off-by: Daniel Golle ata_sff_port_init(ap); return ap; -@@ -6120,6 +6139,12 @@ static void ata_host_release(struct kref +@@ -6122,6 +6141,12 @@ static void ata_host_release(struct kref kfree(ap->pmp_link); kfree(ap->slave_link); @@ -98,7 +98,7 @@ Signed-off-by: Daniel Golle kfree(ap); host->ports[i] = NULL; } -@@ -6583,7 +6608,23 @@ int ata_host_register(struct ata_host *h +@@ -6585,7 +6610,23 @@ int ata_host_register(struct ata_host *h host->ports[i]->print_id = atomic_inc_return(&ata_print_id); host->ports[i]->local_port_no = i + 1; } diff --git a/target/linux/imx/config-5.10 b/target/linux/imx/config-5.10 index f8fd0437bb..c3b5743a3a 100644 --- a/target/linux/imx/config-5.10 +++ b/target/linux/imx/config-5.10 @@ -114,7 +114,6 @@ CONFIG_CRYPTO_DRBG_HMAC=y CONFIG_CRYPTO_DRBG_MENU=y CONFIG_CRYPTO_ECB=y CONFIG_CRYPTO_ENGINE=y -CONFIG_CRYPTO_GF128MUL=y CONFIG_CRYPTO_HASH_INFO=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_HW=y @@ -123,7 +122,6 @@ CONFIG_CRYPTO_LIB_CHACHA_GENERIC=y CONFIG_CRYPTO_LIB_DES=y CONFIG_CRYPTO_LIB_SHA256=y CONFIG_CRYPTO_LZO=y -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_RNG_DEFAULT=y @@ -238,7 +236,6 @@ CONFIG_JBD2=y # CONFIG_JFFS2_FS is not set CONFIG_KEYS=y CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOCK_SPIN_ON_OWNER=y CONFIG_LZO_COMPRESS=y diff --git a/target/linux/ipq40xx/config-5.10 b/target/linux/ipq40xx/config-5.10 index 779c86fc95..64f0e54d41 100644 --- a/target/linux/ipq40xx/config-5.10 +++ b/target/linux/ipq40xx/config-5.10 @@ -113,7 +113,6 @@ CONFIG_CRYPTO_DRBG=y CONFIG_CRYPTO_DRBG_HMAC=y CONFIG_CRYPTO_DRBG_MENU=y CONFIG_CRYPTO_ECB=y -CONFIG_CRYPTO_GF128MUL=y CONFIG_CRYPTO_HASH_INFO=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_HW=y @@ -121,7 +120,6 @@ CONFIG_CRYPTO_JITTERENTROPY=y CONFIG_CRYPTO_LIB_DES=y CONFIG_CRYPTO_LIB_SHA256=y CONFIG_CRYPTO_LZO=y -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_RNG_DEFAULT=y @@ -228,7 +226,6 @@ CONFIG_LEDS_LP5562=y CONFIG_LEDS_LP55XX_COMMON=y CONFIG_LEDS_TLC591XX=y CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOCK_SPIN_ON_OWNER=y CONFIG_LZO_COMPRESS=y diff --git a/target/linux/ipq806x/config-5.10 b/target/linux/ipq806x/config-5.10 index f2880b5d66..35da3dd3c2 100644 --- a/target/linux/ipq806x/config-5.10 +++ b/target/linux/ipq806x/config-5.10 @@ -99,24 +99,17 @@ CONFIG_CRC16=y # CONFIG_CRC32_SARWATE is not set CONFIG_CRC32_SLICEBY8=y CONFIG_CRYPTO_ACOMP2=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_DEV_QCOM_RNG=y CONFIG_CRYPTO_DRBG=y CONFIG_CRYPTO_DRBG_HMAC=y CONFIG_CRYPTO_DRBG_MENU=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y CONFIG_CRYPTO_HASH_INFO=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_HW=y CONFIG_CRYPTO_JITTERENTROPY=y CONFIG_CRYPTO_LIB_SHA256=y CONFIG_CRYPTO_LZO=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_SHA256=y @@ -220,7 +213,6 @@ CONFIG_KRAITCC=y CONFIG_KRAIT_CLOCKS=y CONFIG_KRAIT_L2_ACCESSORS=y CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOCK_SPIN_ON_OWNER=y CONFIG_LZO_COMPRESS=y diff --git a/target/linux/kirkwood/config-5.10 b/target/linux/kirkwood/config-5.10 index eb34762966..fbb8916c15 100644 --- a/target/linux/kirkwood/config-5.10 +++ b/target/linux/kirkwood/config-5.10 @@ -67,12 +67,10 @@ CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_DES=y CONFIG_CRYPTO_DEV_MARVELL=y CONFIG_CRYPTO_DEV_MARVELL_CESA=y -CONFIG_CRYPTO_GF128MUL=y CONFIG_CRYPTO_HASH_INFO=y CONFIG_CRYPTO_HW=y CONFIG_CRYPTO_LIB_DES=y CONFIG_CRYPTO_LZO=y -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_ZSTD=y CONFIG_DEBUG_LL=y @@ -144,7 +142,6 @@ CONFIG_LEDS_GPIO=y CONFIG_LEDS_NETXBIG=y CONFIG_LEDS_NS2=y CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LZO_COMPRESS=y CONFIG_LZO_DECOMPRESS=y diff --git a/target/linux/lantiq/config-5.10 b/target/linux/lantiq/config-5.10 index 674ad3b078..a830689e23 100644 --- a/target/linux/lantiq/config-5.10 +++ b/target/linux/lantiq/config-5.10 @@ -37,8 +37,6 @@ CONFIG_CPU_R4K_CACHE_TLB=y CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y CONFIG_CPU_SUPPORTS_HIGHMEM=y CONFIG_CPU_SUPPORTS_MSA=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2 CONFIG_CRYPTO_RNG2=y CONFIG_CSRC_R4K=y @@ -130,7 +128,6 @@ CONFIG_LANTIQ_WDT=y # CONFIG_LANTIQ_XRX200 is not set CONFIG_LEDS_GPIO=y CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y diff --git a/target/linux/lantiq/xrx200/config-5.10 b/target/linux/lantiq/xrx200/config-5.10 index a00da04848..4dfd55274a 100644 --- a/target/linux/lantiq/xrx200/config-5.10 +++ b/target/linux/lantiq/xrx200/config-5.10 @@ -6,14 +6,9 @@ CONFIG_CPU_MIPSR2_IRQ_VI=y CONFIG_CPU_RMAP=y CONFIG_CRC16=y CONFIG_CRYPTO_ACOMP2=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_HASH_INFO=y CONFIG_CRYPTO_LZO=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_ZSTD=y CONFIG_EXTRA_FIRMWARE="lantiq/xrx200_phy11g_a14.bin lantiq/xrx200_phy11g_a22.bin lantiq/xrx200_phy22f_a14.bin lantiq/xrx200_phy22f_a22.bin" CONFIG_EXTRA_FIRMWARE_DIR="firmware" diff --git a/target/linux/layerscape/armv7/config-5.10 b/target/linux/layerscape/armv7/config-5.10 index 0b539d8b27..0ec201030f 100644 --- a/target/linux/layerscape/armv7/config-5.10 +++ b/target/linux/layerscape/armv7/config-5.10 @@ -150,10 +150,8 @@ CONFIG_CROSS_MEMORY_ATTACH=y CONFIG_CRYPTO_CRC32=y CONFIG_CRYPTO_CRC32C=y CONFIG_CRYPTO_DEFLATE=y -CONFIG_CRYPTO_GF128MUL=y CONFIG_CRYPTO_HASH_INFO=y CONFIG_CRYPTO_LZO=y -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_ZSTD=y CONFIG_DCACHE_WORD_ACCESS=y @@ -329,7 +327,6 @@ CONFIG_KERNEL_GZIP=y CONFIG_KEXEC=y CONFIG_KEXEC_CORE=y CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCALVERSION_AUTO=y CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOCK_SPIN_ON_OWNER=y diff --git a/target/linux/layerscape/armv8_64b/config-5.10 b/target/linux/layerscape/armv8_64b/config-5.10 index 585efe096a..aa4be18f05 100644 --- a/target/linux/layerscape/armv8_64b/config-5.10 +++ b/target/linux/layerscape/armv8_64b/config-5.10 @@ -181,13 +181,11 @@ CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=y CONFIG_CRYPTO_DEV_FSL_DPAA2_CAAM=y CONFIG_CRYPTO_ECB=y CONFIG_CRYPTO_ENGINE=y -CONFIG_CRYPTO_GF128MUL=y CONFIG_CRYPTO_HASH_INFO=y CONFIG_CRYPTO_HW=y CONFIG_CRYPTO_LIB_DES=y CONFIG_CRYPTO_LIB_SHA256=y CONFIG_CRYPTO_LZO=y -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_RSA=y @@ -427,7 +425,6 @@ CONFIG_KEYBOARD_GPIO=y CONFIG_KSM=y CONFIG_LIBCRC32C=y CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCALVERSION_AUTO=y CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOCK_SPIN_ON_OWNER=y diff --git a/target/linux/layerscape/patches-5.4/301-arch-0008-arm-add-new-non-shareable-ioremap.patch b/target/linux/layerscape/patches-5.4/301-arch-0008-arm-add-new-non-shareable-ioremap.patch index 85a4478cd8..c09efca570 100644 --- a/target/linux/layerscape/patches-5.4/301-arch-0008-arm-add-new-non-shareable-ioremap.patch +++ b/target/linux/layerscape/patches-5.4/301-arch-0008-arm-add-new-non-shareable-ioremap.patch @@ -47,7 +47,7 @@ Signed-off-by: Roy Pledge MT_LOW_VECTORS, --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c -@@ -399,6 +399,13 @@ void __iomem *ioremap_wc(resource_size_t +@@ -401,6 +401,13 @@ void __iomem *ioremap_wc(resource_size_t } EXPORT_SYMBOL(ioremap_wc); diff --git a/target/linux/layerscape/patches-5.4/701-net-0238-net-mscc-ocelot-break-apart-ocelot_vlan_port_apply.patch b/target/linux/layerscape/patches-5.4/701-net-0238-net-mscc-ocelot-break-apart-ocelot_vlan_port_apply.patch index bb34e5db2c..f3db7da458 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0238-net-mscc-ocelot-break-apart-ocelot_vlan_port_apply.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0238-net-mscc-ocelot-break-apart-ocelot_vlan_port_apply.patch @@ -226,7 +226,7 @@ Signed-off-by: David S. Miller return 0; } -@@ -1306,6 +1331,7 @@ static int ocelot_port_attr_set(struct n +@@ -1303,6 +1328,7 @@ static int ocelot_port_attr_set(struct n struct switchdev_trans *trans) { struct ocelot_port *ocelot_port = netdev_priv(dev); @@ -234,7 +234,7 @@ Signed-off-by: David S. Miller int err = 0; switch (attr->id) { -@@ -1317,8 +1343,8 @@ static int ocelot_port_attr_set(struct n +@@ -1314,8 +1340,8 @@ static int ocelot_port_attr_set(struct n ocelot_port_attr_ageing_set(ocelot_port, attr->u.ageing_time); break; case SWITCHDEV_ATTR_ID_BRIDGE_VLAN_FILTERING: @@ -245,7 +245,7 @@ Signed-off-by: David S. Miller break; case SWITCHDEV_ATTR_ID_BRIDGE_MC_DISABLED: ocelot_port_attr_mc_set(ocelot_port, !attr->u.mc_disabled); -@@ -1520,20 +1546,20 @@ static int ocelot_port_bridge_join(struc +@@ -1517,20 +1543,20 @@ static int ocelot_port_bridge_join(struc return 0; } @@ -273,7 +273,7 @@ Signed-off-by: David S. Miller } static void ocelot_set_aggr_pgids(struct ocelot *ocelot) -@@ -1687,11 +1713,8 @@ static int ocelot_netdevice_port_event(s +@@ -1684,11 +1710,8 @@ static int ocelot_netdevice_port_event(s err = ocelot_port_bridge_join(ocelot_port, info->upper_dev); else @@ -287,7 +287,7 @@ Signed-off-by: David S. Miller } if (netif_is_lag_master(info->upper_dev)) { if (info->linking) -@@ -2009,6 +2032,7 @@ int ocelot_probe_port(struct ocelot *oce +@@ -2006,6 +2029,7 @@ int ocelot_probe_port(struct ocelot *oce { struct ocelot_port *ocelot_port; struct net_device *dev; @@ -295,7 +295,7 @@ Signed-off-by: David S. Miller int err; dev = alloc_etherdev(sizeof(struct ocelot_port)); -@@ -2044,7 +2068,15 @@ int ocelot_probe_port(struct ocelot *oce +@@ -2041,7 +2065,15 @@ int ocelot_probe_port(struct ocelot *oce } /* Basic L2 initialization */ diff --git a/target/linux/layerscape/patches-5.4/701-net-0240-net-mscc-ocelot-break-out-fdb-operations-into-abstra.patch b/target/linux/layerscape/patches-5.4/701-net-0240-net-mscc-ocelot-break-out-fdb-operations-into-abstra.patch index 118b91e700..a6f81ba84b 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0240-net-mscc-ocelot-break-out-fdb-operations-into-abstra.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0240-net-mscc-ocelot-break-out-fdb-operations-into-abstra.patch @@ -236,7 +236,7 @@ Signed-off-by: David S. Miller return ret; } -@@ -1129,9 +1161,9 @@ static const struct net_device_ops ocelo +@@ -1123,9 +1155,9 @@ static const struct net_device_ops ocelo .ndo_get_phys_port_name = ocelot_port_get_phys_port_name, .ndo_set_mac_address = ocelot_port_set_mac_address, .ndo_get_stats64 = ocelot_get_stats64, diff --git a/target/linux/layerscape/patches-5.4/701-net-0241-net-mscc-ocelot-change-prototypes-of-hwtstamping-ioc.patch b/target/linux/layerscape/patches-5.4/701-net-0241-net-mscc-ocelot-change-prototypes-of-hwtstamping-ioc.patch index f5f1452cd6..730e6a72ce 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0241-net-mscc-ocelot-change-prototypes-of-hwtstamping-ioc.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0241-net-mscc-ocelot-change-prototypes-of-hwtstamping-ioc.patch @@ -57,7 +57,7 @@ Signed-off-by: David S. Miller break; default: return -ERANGE; -@@ -1136,8 +1136,9 @@ static int ocelot_hwstamp_set(struct oce +@@ -1130,8 +1130,9 @@ static int ocelot_hwstamp_set(struct oce static int ocelot_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { @@ -69,7 +69,7 @@ Signed-off-by: David S. Miller /* The function is only used for PTP operations for now */ if (!ocelot->ptp) -@@ -1145,9 +1146,9 @@ static int ocelot_ioctl(struct net_devic +@@ -1139,9 +1140,9 @@ static int ocelot_ioctl(struct net_devic switch (cmd) { case SIOCSHWTSTAMP: diff --git a/target/linux/layerscape/patches-5.4/701-net-0242-net-mscc-ocelot-change-prototypes-of-switchdev-port-.patch b/target/linux/layerscape/patches-5.4/701-net-0242-net-mscc-ocelot-change-prototypes-of-switchdev-port-.patch index 5cf09039df..dc5847c528 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0242-net-mscc-ocelot-change-prototypes-of-switchdev-port-.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0242-net-mscc-ocelot-change-prototypes-of-switchdev-port-.patch @@ -19,7 +19,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c -@@ -1285,26 +1285,20 @@ static const struct ethtool_ops ocelot_e +@@ -1282,26 +1282,20 @@ static const struct ethtool_ops ocelot_e .get_ts_info = ocelot_get_ts_info, }; @@ -53,7 +53,7 @@ Signed-off-by: David S. Miller /* Fallthrough */ case BR_STATE_LEARNING: port_cfg |= ANA_PORT_PORT_CFG_LEARN_ENA; -@@ -1312,19 +1306,18 @@ static int ocelot_port_attr_stp_state_se +@@ -1309,19 +1303,18 @@ static int ocelot_port_attr_stp_state_se default: port_cfg &= ~ANA_PORT_PORT_CFG_LEARN_ENA; @@ -78,7 +78,7 @@ Signed-off-by: David S. Miller for (i = 0; i < ocelot->num_phys_ports; i++) { unsigned long bond_mask = ocelot->lags[i]; -@@ -1332,7 +1325,7 @@ static int ocelot_port_attr_stp_state_se +@@ -1329,7 +1322,7 @@ static int ocelot_port_attr_stp_state_se if (!bond_mask) continue; @@ -87,7 +87,7 @@ Signed-off-by: David S. Miller mask &= ~bond_mask; break; } -@@ -1340,47 +1333,55 @@ static int ocelot_port_attr_stp_state_se +@@ -1337,47 +1330,55 @@ static int ocelot_port_attr_stp_state_se ocelot_write_rix(ocelot, BIT(ocelot->num_phys_ports) | mask, @@ -162,7 +162,7 @@ Signed-off-by: David S. Miller } static int ocelot_port_attr_set(struct net_device *dev, -@@ -1389,22 +1390,23 @@ static int ocelot_port_attr_set(struct n +@@ -1386,22 +1387,23 @@ static int ocelot_port_attr_set(struct n { struct ocelot_port *ocelot_port = netdev_priv(dev); struct ocelot *ocelot = ocelot_port->ocelot; diff --git a/target/linux/layerscape/patches-5.4/701-net-0243-net-mscc-ocelot-refactor-struct-ocelot_port-out-of-f.patch b/target/linux/layerscape/patches-5.4/701-net-0243-net-mscc-ocelot-refactor-struct-ocelot_port-out-of-f.patch index 2e05090c7c..8850f57103 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0243-net-mscc-ocelot-refactor-struct-ocelot_port-out-of-f.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0243-net-mscc-ocelot-refactor-struct-ocelot_port-out-of-f.patch @@ -83,7 +83,7 @@ Signed-off-by: David S. Miller return 0; } -@@ -1586,11 +1586,9 @@ static int ocelot_port_obj_del(struct ne +@@ -1583,11 +1583,9 @@ static int ocelot_port_obj_del(struct ne return ret; } @@ -96,7 +96,7 @@ Signed-off-by: David S. Miller if (!ocelot->bridge_mask) { ocelot->hw_bridge_dev = bridge; } else { -@@ -1600,17 +1598,14 @@ static int ocelot_port_bridge_join(struc +@@ -1597,17 +1595,14 @@ static int ocelot_port_bridge_join(struc return -ENODEV; } @@ -116,7 +116,7 @@ Signed-off-by: David S. Miller ocelot->bridge_mask &= ~BIT(port); if (!ocelot->bridge_mask) -@@ -1679,14 +1674,12 @@ static void ocelot_setup_lag(struct ocel +@@ -1676,14 +1671,12 @@ static void ocelot_setup_lag(struct ocel } } @@ -133,7 +133,7 @@ Signed-off-by: David S. Miller rcu_read_lock(); for_each_netdev_in_bond_rcu(bond, ndev) { -@@ -1701,17 +1694,17 @@ static int ocelot_port_lag_join(struct o +@@ -1698,17 +1691,17 @@ static int ocelot_port_lag_join(struct o /* If the new port is the lowest one, use it as the logical port from * now on */ @@ -156,7 +156,7 @@ Signed-off-by: David S. Miller } ocelot_setup_lag(ocelot, lag); -@@ -1720,34 +1713,32 @@ static int ocelot_port_lag_join(struct o +@@ -1717,34 +1710,32 @@ static int ocelot_port_lag_join(struct o return 0; } @@ -200,7 +200,7 @@ Signed-off-by: David S. Miller ocelot_set_aggr_pgids(ocelot); } -@@ -1763,24 +1754,26 @@ static int ocelot_netdevice_port_event(s +@@ -1760,24 +1751,26 @@ static int ocelot_netdevice_port_event(s struct netdev_notifier_changeupper_info *info) { struct ocelot_port *ocelot_port = netdev_priv(dev); @@ -231,7 +231,7 @@ Signed-off-by: David S. Miller info->upper_dev); } break; -@@ -2138,7 +2131,7 @@ int ocelot_probe_port(struct ocelot *oce +@@ -2135,7 +2128,7 @@ int ocelot_probe_port(struct ocelot *oce REW_PORT_VLAN_CFG, port); /* Enable vcap lookups */ diff --git a/target/linux/layerscape/patches-5.4/701-net-0244-net-mscc-ocelot-separate-net_device-related-items-ou.patch b/target/linux/layerscape/patches-5.4/701-net-0244-net-mscc-ocelot-separate-net_device-related-items-ou.patch index f582cb43cd..774e8d0bfe 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0244-net-mscc-ocelot-separate-net_device-related-items-ou.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0244-net-mscc-ocelot-separate-net_device-related-items-ou.patch @@ -518,7 +518,7 @@ Signed-off-by: David S. Miller ppid->id_len = sizeof(ocelot->base_mac); memcpy(&ppid->id, &ocelot->base_mac, ppid->id_len); -@@ -1136,9 +1154,9 @@ static int ocelot_hwstamp_set(struct oce +@@ -1130,9 +1148,9 @@ static int ocelot_hwstamp_set(struct oce static int ocelot_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { @@ -531,7 +531,7 @@ Signed-off-by: David S. Miller /* The function is only used for PTP operations for now */ if (!ocelot->ptp) -@@ -1175,8 +1193,8 @@ static const struct net_device_ops ocelo +@@ -1169,8 +1187,8 @@ static const struct net_device_ops ocelo static void ocelot_get_strings(struct net_device *netdev, u32 sset, u8 *data) { @@ -542,7 +542,7 @@ Signed-off-by: David S. Miller int i; if (sset != ETH_SS_STATS) -@@ -1230,8 +1248,9 @@ static void ocelot_check_stats_work(stru +@@ -1224,8 +1242,9 @@ static void ocelot_check_stats_work(stru static void ocelot_get_ethtool_stats(struct net_device *dev, struct ethtool_stats *stats, u64 *data) { @@ -554,7 +554,7 @@ Signed-off-by: David S. Miller int i; /* check and update now */ -@@ -1239,13 +1258,13 @@ static void ocelot_get_ethtool_stats(str +@@ -1233,13 +1252,13 @@ static void ocelot_get_ethtool_stats(str /* Copy all counters */ for (i = 0; i < ocelot->num_stats; i++) @@ -571,7 +571,7 @@ Signed-off-by: David S. Miller if (sset != ETH_SS_STATS) return -EOPNOTSUPP; -@@ -1255,8 +1274,8 @@ static int ocelot_get_sset_count(struct +@@ -1249,8 +1268,8 @@ static int ocelot_get_sset_count(struct static int ocelot_get_ts_info(struct net_device *dev, struct ethtool_ts_info *info) { @@ -582,7 +582,7 @@ Signed-off-by: David S. Miller if (!ocelot->ptp) return ethtool_op_get_ts_info(dev, info); -@@ -1388,9 +1407,9 @@ static int ocelot_port_attr_set(struct n +@@ -1385,9 +1404,9 @@ static int ocelot_port_attr_set(struct n const struct switchdev_attr *attr, struct switchdev_trans *trans) { @@ -595,7 +595,7 @@ Signed-off-by: David S. Miller int err = 0; switch (attr->id) { -@@ -1402,8 +1421,8 @@ static int ocelot_port_attr_set(struct n +@@ -1399,8 +1418,8 @@ static int ocelot_port_attr_set(struct n ocelot_port_attr_ageing_set(ocelot, port, attr->u.ageing_time); break; case SWITCHDEV_ATTR_ID_BRIDGE_VLAN_FILTERING: @@ -606,7 +606,7 @@ Signed-off-by: David S. Miller break; case SWITCHDEV_ATTR_ID_BRIDGE_MC_DISABLED: ocelot_port_attr_mc_set(ocelot, port, !attr->u.mc_disabled); -@@ -1468,15 +1487,17 @@ static int ocelot_port_obj_add_mdb(struc +@@ -1465,15 +1484,17 @@ static int ocelot_port_obj_add_mdb(struc const struct switchdev_obj_port_mdb *mdb, struct switchdev_trans *trans) { @@ -628,7 +628,7 @@ Signed-off-by: David S. Miller mc = ocelot_multicast_get(ocelot, mdb->addr, vid); if (!mc) { -@@ -1500,7 +1521,7 @@ static int ocelot_port_obj_add_mdb(struc +@@ -1497,7 +1518,7 @@ static int ocelot_port_obj_add_mdb(struc ocelot_mact_forget(ocelot, addr, vid); } @@ -637,7 +637,7 @@ Signed-off-by: David S. Miller addr[2] = mc->ports << 0; addr[1] = mc->ports << 8; -@@ -1510,14 +1531,16 @@ static int ocelot_port_obj_add_mdb(struc +@@ -1507,14 +1528,16 @@ static int ocelot_port_obj_add_mdb(struc static int ocelot_port_obj_del_mdb(struct net_device *dev, const struct switchdev_obj_port_mdb *mdb) { @@ -658,7 +658,7 @@ Signed-off-by: David S. Miller mc = ocelot_multicast_get(ocelot, mdb->addr, vid); if (!mc) -@@ -1529,7 +1552,7 @@ static int ocelot_port_obj_del_mdb(struc +@@ -1526,7 +1549,7 @@ static int ocelot_port_obj_del_mdb(struc addr[0] = 0; ocelot_mact_forget(ocelot, addr, vid); @@ -667,7 +667,7 @@ Signed-off-by: David S. Miller if (!mc->ports) { list_del(&mc->list); devm_kfree(ocelot->dev, mc); -@@ -1683,9 +1706,9 @@ static int ocelot_port_lag_join(struct o +@@ -1680,9 +1703,9 @@ static int ocelot_port_lag_join(struct o rcu_read_lock(); for_each_netdev_in_bond_rcu(bond, ndev) { @@ -679,7 +679,7 @@ Signed-off-by: David S. Miller } rcu_read_unlock(); -@@ -1753,20 +1776,23 @@ static int ocelot_netdevice_port_event(s +@@ -1750,20 +1773,23 @@ static int ocelot_netdevice_port_event(s unsigned long event, struct netdev_notifier_changeupper_info *info) { @@ -707,7 +707,7 @@ Signed-off-by: David S. Miller } if (netif_is_lag_master(info->upper_dev)) { if (info->linking) -@@ -2082,21 +2108,23 @@ int ocelot_probe_port(struct ocelot *oce +@@ -2079,21 +2105,23 @@ int ocelot_probe_port(struct ocelot *oce void __iomem *regs, struct phy_device *phy) { diff --git a/target/linux/layerscape/patches-5.4/701-net-0245-net-mscc-ocelot-refactor-ethtool-callbacks.patch b/target/linux/layerscape/patches-5.4/701-net-0245-net-mscc-ocelot-refactor-ethtool-callbacks.patch index 655f60b6d9..7b979d556b 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0245-net-mscc-ocelot-refactor-ethtool-callbacks.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0245-net-mscc-ocelot-refactor-ethtool-callbacks.patch @@ -13,7 +13,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c -@@ -1191,10 +1191,9 @@ static const struct net_device_ops ocelo +@@ -1185,10 +1185,9 @@ static const struct net_device_ops ocelo .ndo_do_ioctl = ocelot_ioctl, }; @@ -26,7 +26,7 @@ Signed-off-by: David S. Miller int i; if (sset != ETH_SS_STATS) -@@ -1205,6 +1204,16 @@ static void ocelot_get_strings(struct ne +@@ -1199,6 +1198,16 @@ static void ocelot_get_strings(struct ne ETH_GSTRING_LEN); } @@ -43,7 +43,7 @@ Signed-off-by: David S. Miller static void ocelot_update_stats(struct ocelot *ocelot) { int i, j; -@@ -1245,12 +1254,8 @@ static void ocelot_check_stats_work(stru +@@ -1239,12 +1248,8 @@ static void ocelot_check_stats_work(stru OCELOT_STATS_CHECK_DELAY); } @@ -57,7 +57,7 @@ Signed-off-by: David S. Miller int i; /* check and update now */ -@@ -1261,25 +1266,37 @@ static void ocelot_get_ethtool_stats(str +@@ -1255,25 +1260,37 @@ static void ocelot_get_ethtool_stats(str *data++ = ocelot->stats[port * ocelot->num_stats + i]; } @@ -100,7 +100,7 @@ Signed-off-by: David S. Miller info->phc_index = ocelot->ptp_clock ? ptp_clock_index(ocelot->ptp_clock) : -1; info->so_timestamping |= SOF_TIMESTAMPING_TX_SOFTWARE | -@@ -1295,13 +1312,26 @@ static int ocelot_get_ts_info(struct net +@@ -1292,13 +1309,26 @@ static int ocelot_get_ts_info(struct net return 0; } diff --git a/target/linux/layerscape/patches-5.4/701-net-0247-net-mscc-ocelot-move-port-initialization-into-separa.patch b/target/linux/layerscape/patches-5.4/701-net-0247-net-mscc-ocelot-move-port-initialization-into-separa.patch index 2df6afb20b..a6bbdd67fe 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0247-net-mscc-ocelot-move-port-initialization-into-separa.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0247-net-mscc-ocelot-move-port-initialization-into-separa.patch @@ -15,7 +15,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c -@@ -2135,6 +2135,28 @@ static int ocelot_init_timestamp(struct +@@ -2132,6 +2132,28 @@ static int ocelot_init_timestamp(struct return 0; } @@ -44,7 +44,7 @@ Signed-off-by: David S. Miller int ocelot_probe_port(struct ocelot *ocelot, u8 port, void __iomem *regs, struct phy_device *phy) -@@ -2142,7 +2164,6 @@ int ocelot_probe_port(struct ocelot *oce +@@ -2139,7 +2161,6 @@ int ocelot_probe_port(struct ocelot *oce struct ocelot_port_private *priv; struct ocelot_port *ocelot_port; struct net_device *dev; @@ -52,7 +52,7 @@ Signed-off-by: David S. Miller int err; dev = alloc_etherdev(sizeof(struct ocelot_port_private)); -@@ -2170,32 +2191,14 @@ int ocelot_probe_port(struct ocelot *oce +@@ -2167,32 +2188,14 @@ int ocelot_probe_port(struct ocelot *oce ocelot_mact_learn(ocelot, PGID_CPU, dev->dev_addr, ocelot_port->pvid, ENTRYTYPE_LOCKED); diff --git a/target/linux/layerscape/patches-5.4/701-net-0249-net-mscc-ocelot-initialize-list-of-multicast-address.patch b/target/linux/layerscape/patches-5.4/701-net-0249-net-mscc-ocelot-initialize-list-of-multicast-address.patch index ea01c8b542..b0c349ec37 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0249-net-mscc-ocelot-initialize-list-of-multicast-address.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0249-net-mscc-ocelot-initialize-list-of-multicast-address.patch @@ -17,7 +17,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c -@@ -2245,6 +2245,7 @@ int ocelot_init(struct ocelot *ocelot) +@@ -2242,6 +2242,7 @@ int ocelot_init(struct ocelot *ocelot) if (!ocelot->stats_queue) return -ENOMEM; diff --git a/target/linux/layerscape/patches-5.4/701-net-0251-net-mscc-ocelot-split-assignment-of-the-cpu-port-int.patch b/target/linux/layerscape/patches-5.4/701-net-0251-net-mscc-ocelot-split-assignment-of-the-cpu-port-int.patch index 4f5ab9ad5b..8fa0bca935 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0251-net-mscc-ocelot-split-assignment-of-the-cpu-port-int.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0251-net-mscc-ocelot-split-assignment-of-the-cpu-port-int.patch @@ -32,7 +32,7 @@ Signed-off-by: David S. Miller /* Set vlan ingress filter mask to all ports but the CPU port by * default. */ -@@ -2226,11 +2220,52 @@ int ocelot_probe_port(struct ocelot *oce +@@ -2223,11 +2217,52 @@ int ocelot_probe_port(struct ocelot *oce } EXPORT_SYMBOL(ocelot_probe_port); @@ -87,7 +87,7 @@ Signed-off-by: David S. Miller ocelot->lags = devm_kcalloc(ocelot->dev, ocelot->num_phys_ports, sizeof(u32), GFP_KERNEL); -@@ -2310,13 +2345,6 @@ int ocelot_init(struct ocelot *ocelot) +@@ -2307,13 +2342,6 @@ int ocelot_init(struct ocelot *ocelot) ocelot_write_rix(ocelot, 0, ANA_PGID_PGID, PGID_SRC + port); } @@ -101,7 +101,7 @@ Signed-off-by: David S. Miller /* Allow broadcast MAC frames. */ for (i = ocelot->num_phys_ports + 1; i < PGID_CPU; i++) { u32 val = ANA_PGID_PGID_PGID(GENMASK(ocelot->num_phys_ports - 1, 0)); -@@ -2329,13 +2357,6 @@ int ocelot_init(struct ocelot *ocelot) +@@ -2326,13 +2354,6 @@ int ocelot_init(struct ocelot *ocelot) ocelot_write_rix(ocelot, 0, ANA_PGID_PGID, PGID_MCIPV4); ocelot_write_rix(ocelot, 0, ANA_PGID_PGID, PGID_MCIPV6); diff --git a/target/linux/layerscape/patches-5.4/701-net-0252-net-mscc-ocelot-don-t-hardcode-the-number-of-the-CPU.patch b/target/linux/layerscape/patches-5.4/701-net-0252-net-mscc-ocelot-don-t-hardcode-the-number-of-the-CPU.patch index aec70e6d6f..7ddc5753f6 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0252-net-mscc-ocelot-don-t-hardcode-the-number-of-the-CPU.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0252-net-mscc-ocelot-don-t-hardcode-the-number-of-the-CPU.patch @@ -30,7 +30,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c -@@ -1383,7 +1383,7 @@ static void ocelot_bridge_stp_state_set( +@@ -1380,7 +1380,7 @@ static void ocelot_bridge_stp_state_set( * a source for the other ports. */ for (p = 0; p < ocelot->num_phys_ports; p++) { @@ -39,7 +39,7 @@ Signed-off-by: David S. Miller unsigned long mask = ocelot->bridge_fwd_mask & ~BIT(p); for (i = 0; i < ocelot->num_phys_ports; i++) { -@@ -1398,15 +1398,18 @@ static void ocelot_bridge_stp_state_set( +@@ -1395,15 +1395,18 @@ static void ocelot_bridge_stp_state_set( } } diff --git a/target/linux/layerscape/patches-5.4/701-net-0255-net-mscc-ocelot-move-invariant-configs-out-of-adjust.patch b/target/linux/layerscape/patches-5.4/701-net-0255-net-mscc-ocelot-move-invariant-configs-out-of-adjust.patch index 8cb8a831ae..f0f4aeae5d 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0255-net-mscc-ocelot-move-invariant-configs-out-of-adjust.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0255-net-mscc-ocelot-move-invariant-configs-out-of-adjust.patch @@ -98,7 +98,7 @@ Signed-off-by: David S. Miller } static void ocelot_port_adjust_link(struct net_device *dev) -@@ -2143,11 +2102,53 @@ static int ocelot_init_timestamp(struct +@@ -2140,11 +2099,53 @@ static int ocelot_init_timestamp(struct static void ocelot_init_port(struct ocelot *ocelot, int port) { struct ocelot_port *ocelot_port = ocelot->ports[port]; diff --git a/target/linux/layerscape/patches-5.4/701-net-0256-net-mscc-ocelot-create-a-helper-for-changing-the-por.patch b/target/linux/layerscape/patches-5.4/701-net-0256-net-mscc-ocelot-create-a-helper-for-changing-the-por.patch index 0a1299dd38..13fe784f24 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0256-net-mscc-ocelot-create-a-helper-for-changing-the-por.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0256-net-mscc-ocelot-create-a-helper-for-changing-the-por.patch @@ -20,7 +20,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c -@@ -2099,11 +2099,32 @@ static int ocelot_init_timestamp(struct +@@ -2096,11 +2096,32 @@ static int ocelot_init_timestamp(struct return 0; } @@ -54,7 +54,7 @@ Signed-off-by: David S. Miller INIT_LIST_HEAD(&ocelot_port->skbs); /* Basic L2 initialization */ -@@ -2124,8 +2145,7 @@ static void ocelot_init_port(struct ocel +@@ -2121,8 +2142,7 @@ static void ocelot_init_port(struct ocel DEV_MAC_HDX_CFG); /* Set Max Length and maximum tags allowed */ @@ -64,7 +64,7 @@ Signed-off-by: David S. Miller ocelot_port_writel(ocelot_port, DEV_MAC_TAGS_CFG_TAG_ID(ETH_P_8021AD) | DEV_MAC_TAGS_CFG_VLAN_AWR_ENA | DEV_MAC_TAGS_CFG_VLAN_LEN_AWR_ENA, -@@ -2135,20 +2155,6 @@ static void ocelot_init_port(struct ocel +@@ -2132,20 +2152,6 @@ static void ocelot_init_port(struct ocel ocelot_port_writel(ocelot_port, 0, DEV_MAC_FC_MAC_HIGH_CFG); ocelot_port_writel(ocelot_port, 0, DEV_MAC_FC_MAC_LOW_CFG); diff --git a/target/linux/layerscape/patches-5.4/701-net-0258-net-mscc-ocelot-adjust-MTU-on-the-CPU-port-in-NPI-mo.patch b/target/linux/layerscape/patches-5.4/701-net-0258-net-mscc-ocelot-adjust-MTU-on-the-CPU-port-in-NPI-mo.patch index 3c9d0336a4..667be87db0 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0258-net-mscc-ocelot-adjust-MTU-on-the-CPU-port-in-NPI-mo.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0258-net-mscc-ocelot-adjust-MTU-on-the-CPU-port-in-NPI-mo.patch @@ -22,7 +22,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c -@@ -2232,9 +2232,18 @@ void ocelot_set_cpu_port(struct ocelot * +@@ -2229,9 +2229,18 @@ void ocelot_set_cpu_port(struct ocelot * * Only one port can be an NPI at the same time. */ if (cpu < ocelot->num_phys_ports) { diff --git a/target/linux/layerscape/patches-5.4/701-net-0259-net-mscc-ocelot-separate-the-implementation-of-switc.patch b/target/linux/layerscape/patches-5.4/701-net-0259-net-mscc-ocelot-separate-the-implementation-of-switc.patch index 50a37e5500..3a8e9d6b11 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0259-net-mscc-ocelot-separate-the-implementation-of-switc.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0259-net-mscc-ocelot-separate-the-implementation-of-switc.patch @@ -20,7 +20,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c -@@ -2271,6 +2271,14 @@ int ocelot_init(struct ocelot *ocelot) +@@ -2268,6 +2268,14 @@ int ocelot_init(struct ocelot *ocelot) int i, ret; u32 port; diff --git a/target/linux/layerscape/patches-5.4/701-net-0260-net-mscc-ocelot-publish-structure-definitions-to-inc.patch b/target/linux/layerscape/patches-5.4/701-net-0260-net-mscc-ocelot-publish-structure-definitions-to-inc.patch index 6fbc091739..8529e9825c 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0260-net-mscc-ocelot-publish-structure-definitions-to-inc.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0260-net-mscc-ocelot-publish-structure-definitions-to-inc.patch @@ -195,7 +195,7 @@ Signed-off-by: David S. Miller static int ocelot_port_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb, -@@ -1153,8 +1160,7 @@ static const struct net_device_ops ocelo +@@ -1147,8 +1154,7 @@ static const struct net_device_ops ocelo .ndo_do_ioctl = ocelot_ioctl, }; @@ -205,7 +205,7 @@ Signed-off-by: David S. Miller { int i; -@@ -1165,6 +1171,7 @@ static void ocelot_get_strings(struct oc +@@ -1159,6 +1165,7 @@ static void ocelot_get_strings(struct oc memcpy(data + i * ETH_GSTRING_LEN, ocelot->stats_layout[i].name, ETH_GSTRING_LEN); } @@ -213,7 +213,7 @@ Signed-off-by: David S. Miller static void ocelot_port_get_strings(struct net_device *netdev, u32 sset, u8 *data) -@@ -1216,7 +1223,7 @@ static void ocelot_check_stats_work(stru +@@ -1210,7 +1217,7 @@ static void ocelot_check_stats_work(stru OCELOT_STATS_CHECK_DELAY); } @@ -222,7 +222,7 @@ Signed-off-by: David S. Miller { int i; -@@ -1227,6 +1234,7 @@ static void ocelot_get_ethtool_stats(str +@@ -1221,6 +1228,7 @@ static void ocelot_get_ethtool_stats(str for (i = 0; i < ocelot->num_stats; i++) *data++ = ocelot->stats[port * ocelot->num_stats + i]; } @@ -230,7 +230,7 @@ Signed-off-by: David S. Miller static void ocelot_port_get_ethtool_stats(struct net_device *dev, struct ethtool_stats *stats, -@@ -1239,13 +1247,14 @@ static void ocelot_port_get_ethtool_stat +@@ -1233,13 +1241,14 @@ static void ocelot_port_get_ethtool_stat ocelot_get_ethtool_stats(ocelot, port, data); } @@ -246,7 +246,7 @@ Signed-off-by: David S. Miller static int ocelot_port_get_sset_count(struct net_device *dev, int sset) { -@@ -1256,8 +1265,8 @@ static int ocelot_port_get_sset_count(st +@@ -1250,8 +1259,8 @@ static int ocelot_port_get_sset_count(st return ocelot_get_sset_count(ocelot, port, sset); } @@ -257,7 +257,7 @@ Signed-off-by: David S. Miller { info->phc_index = ocelot->ptp_clock ? ptp_clock_index(ocelot->ptp_clock) : -1; -@@ -1273,6 +1282,7 @@ static int ocelot_get_ts_info(struct oce +@@ -1270,6 +1279,7 @@ static int ocelot_get_ts_info(struct oce return 0; } @@ -265,7 +265,7 @@ Signed-off-by: David S. Miller static int ocelot_port_get_ts_info(struct net_device *dev, struct ethtool_ts_info *info) -@@ -1296,8 +1306,7 @@ static const struct ethtool_ops ocelot_e +@@ -1293,8 +1303,7 @@ static const struct ethtool_ops ocelot_e .get_ts_info = ocelot_port_get_ts_info, }; @@ -275,7 +275,7 @@ Signed-off-by: David S. Miller { u32 port_cfg; int p, i; -@@ -1358,6 +1367,7 @@ static void ocelot_bridge_stp_state_set( +@@ -1355,6 +1364,7 @@ static void ocelot_bridge_stp_state_set( } } } @@ -283,7 +283,7 @@ Signed-off-by: David S. Miller static void ocelot_port_attr_stp_state_set(struct ocelot *ocelot, int port, struct switchdev_trans *trans, -@@ -1369,11 +1379,12 @@ static void ocelot_port_attr_stp_state_s +@@ -1366,11 +1376,12 @@ static void ocelot_port_attr_stp_state_s ocelot_bridge_stp_state_set(ocelot, port, state); } @@ -297,7 +297,7 @@ Signed-off-by: David S. Miller static void ocelot_port_attr_ageing_set(struct ocelot *ocelot, int port, unsigned long ageing_clock_t) -@@ -1604,8 +1615,8 @@ static int ocelot_port_obj_del(struct ne +@@ -1601,8 +1612,8 @@ static int ocelot_port_obj_del(struct ne return ret; } @@ -308,7 +308,7 @@ Signed-off-by: David S. Miller { if (!ocelot->bridge_mask) { ocelot->hw_bridge_dev = bridge; -@@ -1620,9 +1631,10 @@ static int ocelot_port_bridge_join(struc +@@ -1617,9 +1628,10 @@ static int ocelot_port_bridge_join(struc return 0; } @@ -321,7 +321,7 @@ Signed-off-by: David S. Miller { ocelot->bridge_mask &= ~BIT(port); -@@ -1633,6 +1645,7 @@ static int ocelot_port_bridge_leave(stru +@@ -1630,6 +1642,7 @@ static int ocelot_port_bridge_leave(stru ocelot_port_set_pvid(ocelot, port, 0); return ocelot_port_set_native_vlan(ocelot, port, 0); } @@ -329,7 +329,7 @@ Signed-off-by: David S. Miller static void ocelot_set_aggr_pgids(struct ocelot *ocelot) { -@@ -2121,7 +2134,7 @@ static void ocelot_port_set_mtu(struct o +@@ -2118,7 +2131,7 @@ static void ocelot_port_set_mtu(struct o ocelot_write(ocelot, ocelot_wm_enc(atop_wm), SYS_ATOP_TOT_CFG); } @@ -338,7 +338,7 @@ Signed-off-by: David S. Miller { struct ocelot_port *ocelot_port = ocelot->ports[port]; -@@ -2168,6 +2181,7 @@ static void ocelot_init_port(struct ocel +@@ -2165,6 +2178,7 @@ static void ocelot_init_port(struct ocel /* Enable vcap lookups */ ocelot_vcap_enable(ocelot, port); } diff --git a/target/linux/layerscape/patches-5.4/701-net-0265-net-mscc-ocelot-export-ocelot_hwstamp_get-set-functi.patch b/target/linux/layerscape/patches-5.4/701-net-0265-net-mscc-ocelot-export-ocelot_hwstamp_get-set-functi.patch index 469eea25d5..d6b4e2bc13 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0265-net-mscc-ocelot-export-ocelot_hwstamp_get-set-functi.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0265-net-mscc-ocelot-export-ocelot_hwstamp_get-set-functi.patch @@ -36,7 +36,7 @@ Signed-off-by: David S. Miller { struct ocelot_port *ocelot_port = ocelot->ports[port]; struct hwtstamp_config cfg; -@@ -1120,6 +1119,7 @@ static int ocelot_hwstamp_set(struct oce +@@ -1114,6 +1113,7 @@ static int ocelot_hwstamp_set(struct oce return copy_to_user(ifr->ifr_data, &cfg, sizeof(cfg)) ? -EFAULT : 0; } diff --git a/target/linux/layerscape/patches-5.4/701-net-0271-net-mscc-ocelot-use-skb-queue-instead-of-skbs-list.patch b/target/linux/layerscape/patches-5.4/701-net-0271-net-mscc-ocelot-use-skb-queue-instead-of-skbs-list.patch index 2163c57ac2..4ed7c26770 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0271-net-mscc-ocelot-use-skb-queue-instead-of-skbs-list.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0271-net-mscc-ocelot-use-skb-queue-instead-of-skbs-list.patch @@ -96,7 +96,7 @@ Signed-off-by: David S. Miller } } EXPORT_SYMBOL(ocelot_get_txtstamp); -@@ -2208,7 +2199,7 @@ void ocelot_init_port(struct ocelot *oce +@@ -2205,7 +2196,7 @@ void ocelot_init_port(struct ocelot *oce { struct ocelot_port *ocelot_port = ocelot->ports[port]; @@ -105,7 +105,7 @@ Signed-off-by: David S. Miller /* Basic L2 initialization */ -@@ -2493,9 +2484,7 @@ EXPORT_SYMBOL(ocelot_init); +@@ -2490,9 +2481,7 @@ EXPORT_SYMBOL(ocelot_init); void ocelot_deinit(struct ocelot *ocelot) { @@ -115,7 +115,7 @@ Signed-off-by: David S. Miller int i; cancel_delayed_work(&ocelot->stats_work); -@@ -2507,14 +2496,7 @@ void ocelot_deinit(struct ocelot *ocelot +@@ -2504,14 +2493,7 @@ void ocelot_deinit(struct ocelot *ocelot for (i = 0; i < ocelot->num_phys_ports; i++) { port = ocelot->ports[i]; diff --git a/target/linux/layerscape/patches-5.4/701-net-0272-net-mscc-ocelot-tsn-configuration-support.patch b/target/linux/layerscape/patches-5.4/701-net-0272-net-mscc-ocelot-tsn-configuration-support.patch index 2bd7dfbfc7..953b479a20 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0272-net-mscc-ocelot-tsn-configuration-support.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0272-net-mscc-ocelot-tsn-configuration-support.patch @@ -41,7 +41,7 @@ Signed-off-by: Xiaoliang Yang ocelot_write_rix(ocelot, val, ANA_PGID_PGID, i); __dev_mc_sync(dev, ocelot_mc_sync, ocelot_mc_unsync); -@@ -2410,10 +2410,11 @@ int ocelot_init(struct ocelot *ocelot) +@@ -2407,10 +2407,11 @@ int ocelot_init(struct ocelot *ocelot) SYS_FRM_AGING_MAX_AGE(307692), SYS_FRM_AGING); /* Setup flooding PGIDs */ diff --git a/target/linux/layerscape/patches-5.4/701-net-0341-LF-368-net-mscc-ocelot-add-VCAP-IS2-rule-to-trap-PTP.patch b/target/linux/layerscape/patches-5.4/701-net-0341-LF-368-net-mscc-ocelot-add-VCAP-IS2-rule-to-trap-PTP.patch index 18754172a5..817d449e01 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0341-LF-368-net-mscc-ocelot-add-VCAP-IS2-rule-to-trap-PTP.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0341-LF-368-net-mscc-ocelot-add-VCAP-IS2-rule-to-trap-PTP.patch @@ -14,7 +14,7 @@ Signed-off-by: Yangbo Lu --- a/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c -@@ -2340,6 +2340,20 @@ void ocelot_set_cpu_port(struct ocelot * +@@ -2337,6 +2337,20 @@ void ocelot_set_cpu_port(struct ocelot * } EXPORT_SYMBOL(ocelot_set_cpu_port); @@ -35,7 +35,7 @@ Signed-off-by: Yangbo Lu int ocelot_init(struct ocelot *ocelot) { char queue_name[32]; -@@ -2477,6 +2491,13 @@ int ocelot_init(struct ocelot *ocelot) +@@ -2474,6 +2488,13 @@ int ocelot_init(struct ocelot *ocelot) "Timestamp initialization failed\n"); return ret; } @@ -49,7 +49,7 @@ Signed-off-by: Yangbo Lu } return 0; -@@ -2491,6 +2512,8 @@ void ocelot_deinit(struct ocelot *ocelot +@@ -2488,6 +2509,8 @@ void ocelot_deinit(struct ocelot *ocelot cancel_delayed_work(&ocelot->stats_work); destroy_workqueue(ocelot->stats_queue); mutex_destroy(&ocelot->stats_lock); diff --git a/target/linux/layerscape/patches-5.4/701-net-0367-net-mscc-ocelot-Workaround-to-allow-traffic-to-CPU-i.patch b/target/linux/layerscape/patches-5.4/701-net-0367-net-mscc-ocelot-Workaround-to-allow-traffic-to-CPU-i.patch index 4e24fecfdf..8d10202ac9 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0367-net-mscc-ocelot-Workaround-to-allow-traffic-to-CPU-i.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0367-net-mscc-ocelot-Workaround-to-allow-traffic-to-CPU-i.patch @@ -128,7 +128,7 @@ Signed-off-by: Vladimir Oltean --- a/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c -@@ -2294,6 +2294,18 @@ void ocelot_set_cpu_port(struct ocelot * +@@ -2291,6 +2291,18 @@ void ocelot_set_cpu_port(struct ocelot * enum ocelot_tag_prefix injection, enum ocelot_tag_prefix extraction) { diff --git a/target/linux/layerscape/patches-5.4/701-net-0394-drivers-net-mscc_ocelot-don-t-flood-unicast-traffic-.patch b/target/linux/layerscape/patches-5.4/701-net-0394-drivers-net-mscc_ocelot-don-t-flood-unicast-traffic-.patch index 12a03b0d7b..a37cf66def 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0394-drivers-net-mscc_ocelot-don-t-flood-unicast-traffic-.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0394-drivers-net-mscc_ocelot-don-t-flood-unicast-traffic-.patch @@ -15,7 +15,7 @@ Signed-off-by: Alex Marginean --- a/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c -@@ -1680,6 +1680,8 @@ static int ocelot_port_obj_del(struct ne +@@ -1677,6 +1677,8 @@ static int ocelot_port_obj_del(struct ne int ocelot_port_bridge_join(struct ocelot *ocelot, int port, struct net_device *bridge) { @@ -24,7 +24,7 @@ Signed-off-by: Alex Marginean if (!ocelot->bridge_mask) { ocelot->hw_bridge_dev = bridge; } else { -@@ -1691,6 +1693,12 @@ int ocelot_port_bridge_join(struct ocelo +@@ -1688,6 +1690,12 @@ int ocelot_port_bridge_join(struct ocelo ocelot->bridge_mask |= BIT(port); diff --git a/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch b/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch index 9dd1cf5ff5..4f4381c9a5 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch @@ -24,7 +24,7 @@ Signed-off-by: Peter Chen --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c -@@ -1421,6 +1421,15 @@ int xhci_hub_control(struct usb_hcd *hcd +@@ -1422,6 +1422,15 @@ int xhci_hub_control(struct usb_hcd *hcd /* 4.19.6 Port Test Modes (USB2 Test Mode) */ if (hcd->speed != HCD_USB2) goto error; @@ -42,7 +42,7 @@ Signed-off-by: Peter Chen retval = xhci_enter_test_mode(xhci, test_mode, wIndex, --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c -@@ -3630,6 +3630,129 @@ int xhci_queue_ctrl_tx(struct xhci_hcd * +@@ -3636,6 +3636,129 @@ int xhci_queue_ctrl_tx(struct xhci_hcd * return 0; } @@ -174,7 +174,7 @@ Signed-off-by: Peter Chen * bursts that are required to move all packets in this TD. Only SuperSpeed --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c -@@ -5389,6 +5389,7 @@ static const struct hc_driver xhci_hc_dr +@@ -5393,6 +5393,7 @@ static const struct hc_driver xhci_hc_dr .disable_usb3_lpm_timeout = xhci_disable_usb3_lpm_timeout, .find_raw_port_number = xhci_find_raw_port_number, .clear_tt_buffer_complete = xhci_clear_tt_buffer_complete, diff --git a/target/linux/layerscape/patches-5.4/820-usb-0017-MLK-19153-2-usb-host-xhci-do-not-return-error-status.patch b/target/linux/layerscape/patches-5.4/820-usb-0017-MLK-19153-2-usb-host-xhci-do-not-return-error-status.patch index e5394cc6d8..effe5997cd 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0017-MLK-19153-2-usb-host-xhci-do-not-return-error-status.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0017-MLK-19153-2-usb-host-xhci-do-not-return-error-status.patch @@ -22,7 +22,7 @@ Signed-off-by: Peter Chen --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c -@@ -2097,12 +2097,9 @@ static int process_ctrl_td(struct xhci_h +@@ -2103,12 +2103,9 @@ static int process_ctrl_td(struct xhci_h switch (trb_comp_code) { case COMP_SUCCESS: diff --git a/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch b/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch index f808b5b556..5947563516 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch @@ -24,7 +24,7 @@ Signed-off-by: Peter Chen --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c -@@ -5410,6 +5410,8 @@ void xhci_init_driver(struct hc_driver * +@@ -5414,6 +5414,8 @@ void xhci_init_driver(struct hc_driver * drv->check_bandwidth = over->check_bandwidth; if (over->reset_bandwidth) drv->reset_bandwidth = over->reset_bandwidth; diff --git a/target/linux/layerscape/patches-5.4/820-usb-0019-MLK-9829-usb-core-print-suggested-message-if-failed-.patch b/target/linux/layerscape/patches-5.4/820-usb-0019-MLK-9829-usb-core-print-suggested-message-if-failed-.patch index e02f08579c..6111197263 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0019-MLK-9829-usb-core-print-suggested-message-if-failed-.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0019-MLK-9829-usb-core-print-suggested-message-if-failed-.patch @@ -20,7 +20,7 @@ Signed-off-by: Li Jun --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -4779,7 +4779,8 @@ hub_port_init(struct usb_hub *hub, struc +@@ -4777,7 +4777,8 @@ hub_port_init(struct usb_hub *hub, struc } if (r) { if (r != -ENODEV) diff --git a/target/linux/layerscape/patches-5.4/820-usb-0021-MLK-22099-usb-host-xhci-do-warm-reset-for-link-state.patch b/target/linux/layerscape/patches-5.4/820-usb-0021-MLK-22099-usb-host-xhci-do-warm-reset-for-link-state.patch index 26c6c007fb..eb5dcb5595 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0021-MLK-22099-usb-host-xhci-do-warm-reset-for-link-state.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0021-MLK-22099-usb-host-xhci-do-warm-reset-for-link-state.patch @@ -16,7 +16,7 @@ Signed-off-by: Li Jun --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c -@@ -1739,7 +1739,8 @@ static bool xhci_port_missing_cas_quirk( +@@ -1740,7 +1740,8 @@ static bool xhci_port_missing_cas_quirk( return false; if (((portsc & PORT_PLS_MASK) != XDEV_POLLING) && diff --git a/target/linux/malta/config-5.10 b/target/linux/malta/config-5.10 index 5c9642d549..0a4892d4ab 100644 --- a/target/linux/malta/config-5.10 +++ b/target/linux/malta/config-5.10 @@ -60,16 +60,9 @@ CONFIG_CPU_RMAP=y CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y CONFIG_CPU_SUPPORTS_HIGHMEM=y CONFIG_CRC16=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y CONFIG_CRYPTO_CRC32=y CONFIG_CRYPTO_CRC32C=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2 -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG2=y CONFIG_CSRC_R4K=y CONFIG_DMA_MAYBE_COHERENT=y @@ -133,7 +126,6 @@ CONFIG_KALLSYMS=y CONFIG_KERNEL_GZIP=y # CONFIG_KERNEL_XZ is not set CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_MD=y CONFIG_MEMFD_CREATE=y diff --git a/target/linux/mediatek/mt7622/config-5.10 b/target/linux/mediatek/mt7622/config-5.10 index 37483c0421..96bdea061c 100644 --- a/target/linux/mediatek/mt7622/config-5.10 +++ b/target/linux/mediatek/mt7622/config-5.10 @@ -109,8 +109,6 @@ CONFIG_CPU_RMAP=y CONFIG_CPU_THERMAL=y CONFIG_CRC16=y CONFIG_CRYPTO_ACOMP2=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y CONFIG_CRYPTO_CMAC=y CONFIG_CRYPTO_CRC32=y CONFIG_CRYPTO_CRC32C=y @@ -121,8 +119,6 @@ CONFIG_CRYPTO_DRBG_MENU=y CONFIG_CRYPTO_ECB=y CONFIG_CRYPTO_ECC=y CONFIG_CRYPTO_ECDH=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y CONFIG_CRYPTO_HASH_INFO=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_JITTERENTROPY=y @@ -130,9 +126,6 @@ CONFIG_CRYPTO_KPP=y CONFIG_CRYPTO_KPP2=y CONFIG_CRYPTO_LIB_SHA256=y CONFIG_CRYPTO_LZO=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_RNG_DEFAULT=y @@ -227,7 +220,6 @@ CONFIG_JUMP_LABEL=y # CONFIG_KEYBOARD_MTK_PMIC is not set CONFIG_LEDS_UBNT_LEDBAR=y CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOCK_SPIN_ON_OWNER=y CONFIG_LZO_COMPRESS=y diff --git a/target/linux/mediatek/mt7623/config-5.10 b/target/linux/mediatek/mt7623/config-5.10 index 437593a805..60e2aa87bd 100644 --- a/target/linux/mediatek/mt7623/config-5.10 +++ b/target/linux/mediatek/mt7623/config-5.10 @@ -115,14 +115,12 @@ CONFIG_CRYPTO_DEV_MEDIATEK=y CONFIG_CRYPTO_DRBG=y CONFIG_CRYPTO_DRBG_HMAC=y CONFIG_CRYPTO_DRBG_MENU=y -CONFIG_CRYPTO_GF128MUL=y CONFIG_CRYPTO_HASH_INFO=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_HW=y CONFIG_CRYPTO_JITTERENTROPY=y CONFIG_CRYPTO_LIB_SHA256=y CONFIG_CRYPTO_LZO=y -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_RNG_DEFAULT=y @@ -347,7 +345,6 @@ CONFIG_LCD_PLATFORM=y CONFIG_LEDS_MT6323=y # CONFIG_LEDS_UBNT_LEDBAR is not set CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOCK_SPIN_ON_OWNER=y CONFIG_LOGO=y diff --git a/target/linux/mediatek/mt7629/config-5.10 b/target/linux/mediatek/mt7629/config-5.10 index 8b47c4c0f4..d49bb38d71 100644 --- a/target/linux/mediatek/mt7629/config-5.10 +++ b/target/linux/mediatek/mt7629/config-5.10 @@ -74,10 +74,8 @@ CONFIG_CPU_TLB_V7=y CONFIG_CPU_V7=y CONFIG_CRC16=y CONFIG_CRYPTO_DEFLATE=y -CONFIG_CRYPTO_GF128MUL=y CONFIG_CRYPTO_HASH_INFO=y CONFIG_CRYPTO_LZO=y -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_ZSTD=y CONFIG_DCACHE_WORD_ACCESS=y @@ -146,7 +144,6 @@ CONFIG_IRQ_WORK=y # CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set # CONFIG_LEDS_UBNT_LEDBAR is not set CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOCK_SPIN_ON_OWNER=y CONFIG_LZO_COMPRESS=y diff --git a/target/linux/mediatek/patches-5.10/163-dts-mt7623-bpi-r2-ethernet-alias.patch b/target/linux/mediatek/patches-5.10/163-dts-mt7623-bpi-r2-ethernet-alias.patch new file mode 100644 index 0000000000..b1dd75a414 --- /dev/null +++ b/target/linux/mediatek/patches-5.10/163-dts-mt7623-bpi-r2-ethernet-alias.patch @@ -0,0 +1,10 @@ +--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts ++++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts +@@ -15,6 +15,7 @@ + + aliases { + serial2 = &uart2; ++ ethernet0 = &gmac0; + mmc0 = &mmc0; + mmc1 = &mmc1; + led-boot = &led_system_green; diff --git a/target/linux/mediatek/patches-5.10/331-mt7622-rfb1-enable-bmt.patch b/target/linux/mediatek/patches-5.10/331-mt7622-rfb1-enable-bmt.patch index 3f59163e09..a79bd8fcdc 100644 --- a/target/linux/mediatek/patches-5.10/331-mt7622-rfb1-enable-bmt.patch +++ b/target/linux/mediatek/patches-5.10/331-mt7622-rfb1-enable-bmt.patch @@ -1,6 +1,6 @@ --- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts -@@ -533,6 +533,8 @@ +@@ -535,6 +535,8 @@ pinctrl-0 = <&serial_nand_pins>; status = "okay"; diff --git a/target/linux/mediatek/patches-5.10/410-bt-mtk-serial-fix.patch b/target/linux/mediatek/patches-5.10/410-bt-mtk-serial-fix.patch index d18f49e1b7..0cc9668f81 100644 --- a/target/linux/mediatek/patches-5.10/410-bt-mtk-serial-fix.patch +++ b/target/linux/mediatek/patches-5.10/410-bt-mtk-serial-fix.patch @@ -19,7 +19,7 @@ }, [PORT_NPCM] = { .name = "Nuvoton 16550", -@@ -2732,6 +2732,11 @@ serial8250_do_set_termios(struct uart_po +@@ -2725,6 +2725,11 @@ serial8250_do_set_termios(struct uart_po unsigned long flags; unsigned int baud, quot, frac = 0; diff --git a/target/linux/mpc85xx/config-5.10 b/target/linux/mpc85xx/config-5.10 index 54ee3f355c..e140239fc0 100644 --- a/target/linux/mpc85xx/config-5.10 +++ b/target/linux/mpc85xx/config-5.10 @@ -35,21 +35,14 @@ CONFIG_COMPAT_32BIT_TIME=y # CONFIG_CORENET_GENERIC is not set # CONFIG_CPM2 is not set CONFIG_CPU_BIG_ENDIAN=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y # CONFIG_CRYPTO_AES_PPC_SPE is not set CONFIG_CRYPTO_AKCIPHER=y CONFIG_CRYPTO_AKCIPHER2=y CONFIG_CRYPTO_AUTHENC=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y CONFIG_CRYPTO_HW=y CONFIG_CRYPTO_LIB_POLY1305_RSIZE=1 -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y # CONFIG_CRYPTO_MD5_PPC is not set CONFIG_CRYPTO_NULL=y -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_RSA=y @@ -124,7 +117,6 @@ CONFIG_KERNEL_START=0xc0000000 CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOWMEM_CAM_NUM=3 CONFIG_LOWMEM_SIZE=0x30000000 diff --git a/target/linux/mvebu/config-5.10 b/target/linux/mvebu/config-5.10 index d16564e5d7..1017ee5eed 100644 --- a/target/linux/mvebu/config-5.10 +++ b/target/linux/mvebu/config-5.10 @@ -100,8 +100,6 @@ CONFIG_CPU_TLB_V7=y CONFIG_CPU_V7=y CONFIG_CRC16=y CONFIG_CRYPTO_ACOMP2=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y CONFIG_CRYPTO_AES_ARM=y CONFIG_CRYPTO_AES_ARM_BS=y CONFIG_CRYPTO_AUTHENC=y @@ -113,16 +111,11 @@ CONFIG_CRYPTO_DES=y CONFIG_CRYPTO_DEV_MARVELL=y CONFIG_CRYPTO_DEV_MARVELL_CESA=y CONFIG_CRYPTO_ESSIV=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y CONFIG_CRYPTO_HASH_INFO=y CONFIG_CRYPTO_HW=y CONFIG_CRYPTO_LIB_DES=y CONFIG_CRYPTO_LZO=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y CONFIG_CRYPTO_NULL=y -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA1_ARM=y @@ -229,7 +222,6 @@ CONFIG_LEDS_PCA963X=y CONFIG_LEDS_TLC591XX=y CONFIG_LEDS_TRIGGER_DISK=y CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOCK_SPIN_ON_OWNER=y CONFIG_LZO_COMPRESS=y diff --git a/target/linux/mvebu/cortexa72/base-files/etc/board.d/01_leds b/target/linux/mvebu/cortexa72/base-files/etc/board.d/01_leds new file mode 100644 index 0000000000..809a64a60e --- /dev/null +++ b/target/linux/mvebu/cortexa72/base-files/etc/board.d/01_leds @@ -0,0 +1,20 @@ +# SPDX-License-Identifier: GPL-2.0-only + +. /lib/functions/uci-defaults.sh + +board_config_update + +board=$(board_name) + +case "$board" in +iei,puzzle-m901) + ucidef_set_led_netdev "wan" "WAN" "white:network" "eth0" "link" + ;; +iei,puzzle-m902) + ucidef_set_led_netdev "wan" "WAN" "white:network" "eth2" "link" + ;; +esac + +board_config_flush + +exit 0 diff --git a/target/linux/mvebu/cortexa72/base-files/etc/board.d/02_network b/target/linux/mvebu/cortexa72/base-files/etc/board.d/02_network old mode 100755 new mode 100644 index 24a72f336a..f3c59bf2ad --- a/target/linux/mvebu/cortexa72/base-files/etc/board.d/02_network +++ b/target/linux/mvebu/cortexa72/base-files/etc/board.d/02_network @@ -17,7 +17,7 @@ iei,puzzle-m901) ucidef_set_interfaces_lan_wan "eth1 eth2 eth3 eth4 eth5" "eth0" ;; iei,puzzle-m902) - ucidef_set_interfaces_lan_wan "eth1 eth2 eth3 eth4 eth5 eth10 eth11 eth12" "eth0" + ucidef_set_interfaces_lan_wan "eth0 eth1 eth3 eth4 eth5 eth6 eth7 eth8" "eth2" ;; marvell,armada8040-mcbin-doubleshot|\ marvell,armada8040-mcbin-singleshot) diff --git a/target/linux/mvebu/cortexa72/config-5.10 b/target/linux/mvebu/cortexa72/config-5.10 index 68443a85e5..be78be5a34 100644 --- a/target/linux/mvebu/cortexa72/config-5.10 +++ b/target/linux/mvebu/cortexa72/config-5.10 @@ -1,4 +1,5 @@ CONFIG_64BIT=y +CONFIG_AQUANTIA_PHY=y CONFIG_ARCH_DMA_ADDR_T_64BIT=y CONFIG_ARCH_MMAP_RND_BITS=18 CONFIG_ARCH_MMAP_RND_BITS_MAX=24 @@ -30,7 +31,6 @@ CONFIG_ARM_GIC_V3_ITS_PCI=y CONFIG_ARM_PSCI_FW=y CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y -CONFIG_CRYPTO_GF128MUL=y CONFIG_CRYPTO_ZSTD=y CONFIG_DMA_DIRECT_REMAP=y # CONFIG_FLATMEM_MANUAL is not set @@ -43,8 +43,10 @@ CONFIG_HOLES_IN_ZONE=y CONFIG_HW_RANDOM_OMAP=y CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 CONFIG_LEDS_IS31FL319X=y +CONFIG_LEDS_IEI_WT61P803_PUZZLE=y CONFIG_MARVELL_10G_PHY=y CONFIG_MDIO_DEVRES=y +CONFIG_MFD_IEI_WT61P803_PUZZLE=y CONFIG_MFD_SYSCON=y CONFIG_MMC_SDHCI_XENON=y CONFIG_MODULES_USE_ELF_RELA=y @@ -74,8 +76,12 @@ CONFIG_POWER_SUPPLY=y CONFIG_QUEUED_RWLOCKS=y CONFIG_QUEUED_SPINLOCKS=y CONFIG_RAS=y +# CONFIG_RAVE_SP_CORE is not set CONFIG_REGULATOR_GPIO=y # CONFIG_RODATA_FULL_DEFAULT_ENABLED is not set +CONFIG_SENSORS_IEI_WT61P803_PUZZLE_HWMON=y +CONFIG_SERIAL_DEV_BUS=y +CONFIG_SERIAL_DEV_CTRL_TTYPORT=y CONFIG_SPARSEMEM=y CONFIG_SPARSEMEM_EXTREME=y CONFIG_SPARSEMEM_MANUAL=y diff --git a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9131-puzzle-m901.dts b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9131-puzzle-m901.dts index 58e749490a..80d876b4ad 100644 --- a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9131-puzzle-m901.dts +++ b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9131-puzzle-m901.dts @@ -8,6 +8,7 @@ #include "cn9130.dtsi" #include +#include / { model = "iEi Puzzle-M901"; @@ -31,12 +32,26 @@ gpio2 = &cp0_gpio2; gpio3 = &cp1_gpio1; gpio4 = &cp1_gpio2; + led-boot = &led_power; + led-failsafe = &led_info; + led-running = &led_power; + led-upgrade = &led_info; }; memory@00000000 { device_type = "memory"; reg = <0x0 0x0 0x0 0x80000000>; }; + + gpio_keys { + compatible = "gpio-keys"; + + reset { + label = "Reset"; + linux,code = ; + gpios = <&cp0_gpio2 4 GPIO_ACTIVE_LOW>; + }; + }; }; &uart0 { @@ -45,6 +60,75 @@ &cp0_uart0 { status = "okay"; + + puzzle-mcu { + compatible = "iei,wt61p803-puzzle"; + #address-cells = <1>; + #size-cells = <1>; + current-speed = <115200>; + enable-beep; + status = "okay"; + + leds { + compatible = "iei,wt61p803-puzzle-leds"; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + led@0 { + reg = <0>; + label = "white:network"; + active-low; + }; + + led@1 { + reg = <1>; + label = "green:cloud"; + active-low; + }; + + led_info: led@2 { + reg = <2>; + label = "orange:info"; + active-low; + }; + + led_power: led@3 { + reg = <3>; + label = "yellow:power"; + active-low; + default-state = "on"; + }; + }; + + hwmon { + compatible = "iei,wt61p803-puzzle-hwmon"; + #address-cells = <1>; + #size-cells = <0>; + + chassis_fan_group0: fan-group@0 { + #cooling-cells = <2>; + reg = <0x00>; + cooling-levels = <64 102 170 230 250>; + }; + }; + }; +}; + +&ap_thermal_cpu1 { + trips { + cpu_active: cpu-active { + temperature = <44000>; + hysteresis = <2000>; + type = "active"; + }; + }; + cooling-maps { + fan-map { + trip = <&cpu_active>; + cooling-device = <&chassis_fan_group0 64 THERMAL_NO_LIMIT>; + }; + }; }; /* on-board eMMC - U9 */ @@ -85,21 +169,21 @@ status = "okay"; phy-mode = "2500base-x"; phys = <&cp0_comphy2 0>; - managed = "in-band-status"; + phy = <&cp0_nbaset_phy0>; }; &cp0_eth1 { status = "okay"; phy-mode = "2500base-x"; phys = <&cp0_comphy4 1>; - managed = "in-band-status"; + phy = <&cp0_nbaset_phy1>; }; &cp0_eth2 { status = "okay"; phy-mode = "2500base-x"; phys = <&cp0_comphy5 2>; - managed = "in-band-status"; + phy = <&cp0_nbaset_phy2>; }; &cp0_gpio1 { @@ -250,21 +334,21 @@ status = "okay"; phy-mode = "2500base-x"; phys = <&cp1_comphy2 0>; - managed = "in-band-status"; + phy = <&cp1_nbaset_phy0>; }; &cp1_eth1 { status = "okay"; phy-mode = "2500base-x"; phys = <&cp1_comphy4 1>; - managed = "in-band-status"; + phy = <&cp1_nbaset_phy1>; }; &cp1_eth2 { status = "okay"; phy-mode = "2500base-x"; phys = <&cp1_comphy5 2>; - managed = "in-band-status"; + phy = <&cp1_nbaset_phy2>; }; &cp1_sata0 { diff --git a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9132-puzzle-m902.dts b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9132-puzzle-m902.dts index dc4e6527f1..fd99eb2d13 100644 --- a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9132-puzzle-m902.dts +++ b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9132-puzzle-m902.dts @@ -8,6 +8,7 @@ #include "cn9130.dtsi" #include +#include / { model = "iEi Puzzle-M902"; @@ -38,7 +39,10 @@ ethernet8 = &cp2_eth2; spi1 = &cp0_spi0; spi2 = &cp0_spi1; - serial1 = &cp0_uart0; + led-boot = &led_power; + led-failsafe = &led_info; + led-running = &led_power; + led-upgrade = &led_info; }; memory@00000000 { @@ -46,6 +50,16 @@ reg = <0x0 0x0 0x0 0x80000000>; }; + gpio_keys { + compatible = "gpio-keys"; + + reset { + label = "Reset"; + linux,code = ; + gpios = <&cp0_gpio2 4 GPIO_ACTIVE_LOW>; + }; + }; + cp2_reg_usb3_vbus0: cp2_usb3_vbus@0 { compatible = "regulator-fixed"; regulator-name = "cp2-xhci0-vbus"; @@ -91,6 +105,75 @@ &cp0_uart0 { status = "okay"; + + puzzle-mcu { + compatible = "iei,wt61p803-puzzle"; + #address-cells = <1>; + #size-cells = <1>; + current-speed = <115200>; + enable-beep; + status = "okay"; + + leds { + compatible = "iei,wt61p803-puzzle-leds"; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + led@0 { + reg = <0>; + label = "white:network"; + active-low; + }; + + led@1 { + reg = <1>; + label = "green:cloud"; + active-low; + }; + + led_info: led@2 { + reg = <2>; + label = "orange:info"; + active-low; + }; + + led_power: led@3 { + reg = <3>; + label = "yellow:power"; + active-low; + default-state = "on"; + }; + }; + + hwmon { + compatible = "iei,wt61p803-puzzle-hwmon"; + #address-cells = <1>; + #size-cells = <0>; + + chassis_fan_group0: fan-group@0 { + #cooling-cells = <2>; + reg = <0x00>; + cooling-levels = <64 102 170 230 250>; + }; + }; + }; +}; + +&ap_thermal_cpu1 { + trips { + cpu_active: cpu-active { + temperature = <44000>; + hysteresis = <2000>; + type = "active"; + }; + }; + cooling-maps { + fan-map { + trip = <&cpu_active>; + cooling-device = <&chassis_fan_group0 64 THERMAL_NO_LIMIT>; + }; + }; }; /* on-board eMMC - U9 */ @@ -131,21 +214,21 @@ status = "okay"; phy-mode = "10gbase-kr"; phys = <&cp0_comphy2 0>; - managed = "in-band-status"; + phy = <&cp0_nbaset_phy0>; }; &cp0_eth1 { status = "okay"; phy-mode = "2500base-x"; phys = <&cp0_comphy4 1>; - managed = "in-band-status"; + phy = <&cp0_nbaset_phy1>; }; &cp0_eth2 { status = "okay"; phy-mode = "2500base-x"; phys = <&cp0_comphy1 2>; - managed = "in-band-status"; + phy = <&cp0_nbaset_phy2>; }; &cp0_gpio1 { @@ -314,21 +397,21 @@ status = "okay"; phy-mode = "10gbase-kr"; phys = <&cp1_comphy2 0>; - managed = "in-band-status"; + phy = <&cp1_nbaset_phy0>; }; &cp1_eth1 { status = "okay"; phy-mode = "2500base-x"; phys = <&cp1_comphy4 1>; - managed = "in-band-status"; + phy = <&cp1_nbaset_phy1>; }; &cp1_eth2 { status = "okay"; phy-mode = "2500base-x"; phys = <&cp1_comphy1 2>; - managed = "in-band-status"; + phy = <&cp1_nbaset_phy2>; }; &cp1_gpio1 { @@ -415,21 +498,21 @@ status = "okay"; phy-mode = "10gbase-kr"; phys = <&cp2_comphy2 0>; - managed = "in-band-status"; + phy = <&cp2_nbaset_phy0>; }; &cp2_eth1 { status = "okay"; phy-mode = "2500base-x"; phys = <&cp2_comphy4 1>; - managed = "in-band-status"; + phy = <&cp2_nbaset_phy1>; }; &cp2_eth2 { status = "okay"; phy-mode = "2500base-x"; phys = <&cp2_comphy1 2>; - managed = "in-band-status"; + phy = <&cp2_nbaset_phy2>; }; &cp2_gpio1 { diff --git a/target/linux/mvebu/patches-5.10/702-net-next-ethernet-marvell-mvnetaMQPrioOffload.patch b/target/linux/mvebu/patches-5.10/702-net-next-ethernet-marvell-mvnetaMQPrioOffload.patch index 8a5f3f3cf4..41f8c1fbfd 100644 --- a/target/linux/mvebu/patches-5.10/702-net-next-ethernet-marvell-mvnetaMQPrioOffload.patch +++ b/target/linux/mvebu/patches-5.10/702-net-next-ethernet-marvell-mvnetaMQPrioOffload.patch @@ -16,8 +16,6 @@ Signed-off-by: David S. Miller (limited to 'drivers/net/ethernet/marvell/mvneta.c') -diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c -index 80e4b500695e6..46b7604805f76 100644 --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c @@ -38,6 +38,7 @@ @@ -28,7 +26,7 @@ index 80e4b500695e6..46b7604805f76 100644 #include /* Registers */ -@@ -4908,14 +4909,14 @@ static void mvneta_setup_rx_prio_map(struct mvneta_port *pp) +@@ -4933,14 +4934,14 @@ static void mvneta_setup_rx_prio_map(str } static int mvneta_setup_mqprio(struct net_device *dev, @@ -46,7 +44,7 @@ index 80e4b500695e6..46b7604805f76 100644 if (num_tc > rxq_number) return -EINVAL; -@@ -4926,13 +4927,15 @@ static int mvneta_setup_mqprio(struct net_device *dev, +@@ -4951,13 +4952,15 @@ static int mvneta_setup_mqprio(struct ne return 0; } @@ -66,6 +64,3 @@ index 80e4b500695e6..46b7604805f76 100644 return 0; } --- -cgit 1.2.3-1.el7 - diff --git a/target/linux/mvebu/patches-5.10/703-net-next-ethernet-marvell-mvnetaMQPrioFlag.patch b/target/linux/mvebu/patches-5.10/703-net-next-ethernet-marvell-mvnetaMQPrioFlag.patch index a9bf9b22c3..8529b6ae5e 100644 --- a/target/linux/mvebu/patches-5.10/703-net-next-ethernet-marvell-mvnetaMQPrioFlag.patch +++ b/target/linux/mvebu/patches-5.10/703-net-next-ethernet-marvell-mvnetaMQPrioFlag.patch @@ -15,11 +15,9 @@ Signed-off-by: David S. Miller (limited to 'drivers/net/ethernet/marvell/mvneta.c') -diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c -index 46b7604805f76..d3ce87e69d2a8 100644 --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -4915,7 +4915,9 @@ static int mvneta_setup_mqprio(struct net_device *dev, +@@ -4940,7 +4940,9 @@ static int mvneta_setup_mqprio(struct ne u8 num_tc; int i; @@ -30,6 +28,3 @@ index 46b7604805f76..d3ce87e69d2a8 100644 num_tc = mqprio->qopt.num_tc; if (num_tc > rxq_number) --- -cgit 1.2.3-1.el7 - diff --git a/target/linux/mvebu/patches-5.10/704-net-next-ethernet-marvell-mvnetaMQPrioQueue.patch b/target/linux/mvebu/patches-5.10/704-net-next-ethernet-marvell-mvnetaMQPrioQueue.patch index ac5fdc329a..ed4f0441dd 100644 --- a/target/linux/mvebu/patches-5.10/704-net-next-ethernet-marvell-mvnetaMQPrioQueue.patch +++ b/target/linux/mvebu/patches-5.10/704-net-next-ethernet-marvell-mvnetaMQPrioQueue.patch @@ -20,8 +20,6 @@ Signed-off-by: David S. Miller (limited to 'drivers/net/ethernet/marvell/mvneta.c') -diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c -index d3ce87e69d2a8..aba452e8abfe6 100644 --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c @@ -493,7 +493,6 @@ struct mvneta_port { @@ -32,7 +30,7 @@ index d3ce87e69d2a8..aba452e8abfe6 100644 phy_interface_t phy_interface; struct device_node *dn; -@@ -4897,13 +4896,12 @@ static void mvneta_clear_rx_prio_map(struct mvneta_port *pp) +@@ -4922,13 +4921,12 @@ static void mvneta_clear_rx_prio_map(str mvreg_write(pp, MVNETA_VLAN_PRIO_TO_RXQ, 0); } @@ -50,7 +48,7 @@ index d3ce87e69d2a8..aba452e8abfe6 100644 mvreg_write(pp, MVNETA_VLAN_PRIO_TO_RXQ, val); } -@@ -4912,8 +4910,8 @@ static int mvneta_setup_mqprio(struct net_device *dev, +@@ -4937,8 +4935,8 @@ static int mvneta_setup_mqprio(struct ne struct tc_mqprio_qopt_offload *mqprio) { struct mvneta_port *pp = netdev_priv(dev); @@ -60,7 +58,7 @@ index d3ce87e69d2a8..aba452e8abfe6 100644 if (mqprio->qopt.hw != TC_MQPRIO_HW_OFFLOAD_TCS) return 0; -@@ -4923,21 +4921,28 @@ static int mvneta_setup_mqprio(struct net_device *dev, +@@ -4948,21 +4946,28 @@ static int mvneta_setup_mqprio(struct ne if (num_tc > rxq_number) return -EINVAL; @@ -75,12 +73,12 @@ index d3ce87e69d2a8..aba452e8abfe6 100644 - memcpy(pp->prio_tc_map, mqprio->qopt.prio_tc_map, - sizeof(pp->prio_tc_map)); + netdev_set_num_tc(dev, mqprio->qopt.num_tc); -+ + +- mvneta_setup_rx_prio_map(pp); + for (tc = 0; tc < mqprio->qopt.num_tc; tc++) { + netdev_set_tc_queue(dev, tc, mqprio->qopt.count[tc], + mqprio->qopt.offset[tc]); - -- mvneta_setup_rx_prio_map(pp); ++ + for (rxq = mqprio->qopt.offset[tc]; + rxq < mqprio->qopt.count[tc] + mqprio->qopt.offset[tc]; + rxq++) { @@ -97,6 +95,3 @@ index d3ce87e69d2a8..aba452e8abfe6 100644 return 0; } --- -cgit 1.2.3-1.el7 - diff --git a/target/linux/mvebu/patches-5.10/705-net-next-ethernet-marvell-mvnetaMQPrioTCOffload.patch b/target/linux/mvebu/patches-5.10/705-net-next-ethernet-marvell-mvnetaMQPrioTCOffload.patch index d2fd1832d8..15a0ce6b58 100644 --- a/target/linux/mvebu/patches-5.10/705-net-next-ethernet-marvell-mvnetaMQPrioTCOffload.patch +++ b/target/linux/mvebu/patches-5.10/705-net-next-ethernet-marvell-mvnetaMQPrioTCOffload.patch @@ -20,8 +20,6 @@ Signed-off-by: David S. Miller (limited to 'drivers/net/ethernet/marvell/mvneta.c') -diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c -index aba452e8abfe6..2368ae3f0e10d 100644 --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c @@ -248,12 +248,39 @@ @@ -64,7 +62,7 @@ index aba452e8abfe6..2368ae3f0e10d 100644 #define MVNETA_LPI_CTRL_0 0x2cc0 #define MVNETA_LPI_CTRL_1 0x2cc4 #define MVNETA_LPI_REQUEST_ENABLE BIT(0) -@@ -4906,11 +4933,74 @@ static void mvneta_map_vlan_prio_to_rxq(struct mvneta_port *pp, u8 pri, u8 rxq) +@@ -4931,11 +4958,74 @@ static void mvneta_map_vlan_prio_to_rxq( mvreg_write(pp, MVNETA_VLAN_PRIO_TO_RXQ, val); } @@ -140,7 +138,7 @@ index aba452e8abfe6..2368ae3f0e10d 100644 u8 num_tc; if (mqprio->qopt.hw != TC_MQPRIO_HW_OFFLOAD_TCS) -@@ -4924,6 +5014,7 @@ static int mvneta_setup_mqprio(struct net_device *dev, +@@ -4949,6 +5039,7 @@ static int mvneta_setup_mqprio(struct ne mvneta_clear_rx_prio_map(pp); if (!num_tc) { @@ -148,7 +146,7 @@ index aba452e8abfe6..2368ae3f0e10d 100644 netdev_reset_tc(dev); return 0; } -@@ -4944,6 +5035,33 @@ static int mvneta_setup_mqprio(struct net_device *dev, +@@ -4969,6 +5060,33 @@ static int mvneta_setup_mqprio(struct ne } } @@ -182,6 +180,3 @@ index aba452e8abfe6..2368ae3f0e10d 100644 return 0; } --- -cgit 1.2.3-1.el7 - diff --git a/target/linux/mvebu/patches-5.10/901-dt-bindings-Add-IEI-vendor-prefix-and-IEI-WT61P803-P.patch b/target/linux/mvebu/patches-5.10/901-dt-bindings-Add-IEI-vendor-prefix-and-IEI-WT61P803-P.patch new file mode 100644 index 0000000000..28b2b19499 --- /dev/null +++ b/target/linux/mvebu/patches-5.10/901-dt-bindings-Add-IEI-vendor-prefix-and-IEI-WT61P803-P.patch @@ -0,0 +1,218 @@ +From aa4a0ccc41997f2da172165c92803abace43bd1c Mon Sep 17 00:00:00 2001 +From: Luka Kovacic +Date: Tue, 24 Aug 2021 12:44:32 +0000 +Subject: [PATCH 1/7] dt-bindings: Add IEI vendor prefix and IEI WT61P803 + PUZZLE driver bindings + +Add the IEI WT61P803 PUZZLE Device Tree bindings for MFD, HWMON and LED +drivers. A new vendor prefix is also added accordingly for +IEI Integration Corp. + +Signed-off-by: Luka Kovacic +Signed-off-by: Pavo Banicevic +Cc: Luka Perkov +Cc: Robert Marko +--- + .../hwmon/iei,wt61p803-puzzle-hwmon.yaml | 53 ++++++++++++ + .../leds/iei,wt61p803-puzzle-leds.yaml | 39 +++++++++ + .../bindings/mfd/iei,wt61p803-puzzle.yaml | 82 +++++++++++++++++++ + .../devicetree/bindings/vendor-prefixes.yaml | 2 + + 4 files changed, 176 insertions(+) + create mode 100644 Documentation/devicetree/bindings/hwmon/iei,wt61p803-puzzle-hwmon.yaml + create mode 100644 Documentation/devicetree/bindings/leds/iei,wt61p803-puzzle-leds.yaml + create mode 100644 Documentation/devicetree/bindings/mfd/iei,wt61p803-puzzle.yaml + +--- /dev/null ++++ b/Documentation/devicetree/bindings/hwmon/iei,wt61p803-puzzle-hwmon.yaml +@@ -0,0 +1,53 @@ ++# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause ++%YAML 1.2 ++--- ++$id: http://devicetree.org/schemas/hwmon/iei,wt61p803-puzzle-hwmon.yaml# ++$schema: http://devicetree.org/meta-schemas/core.yaml# ++ ++title: IEI WT61P803 PUZZLE MCU HWMON module from IEI Integration Corp. ++ ++maintainers: ++ - Luka Kovacic ++ ++description: | ++ This module is a part of the IEI WT61P803 PUZZLE MFD device. For more details ++ see Documentation/devicetree/bindings/mfd/iei,wt61p803-puzzle.yaml. ++ ++ The HWMON module is a sub-node of the MCU node in the Device Tree. ++ ++properties: ++ compatible: ++ const: iei,wt61p803-puzzle-hwmon ++ ++ "#address-cells": ++ const: 1 ++ ++ "#size-cells": ++ const: 0 ++ ++patternProperties: ++ "^fan-group@[0-1]$": ++ type: object ++ properties: ++ reg: ++ minimum: 0 ++ maximum: 1 ++ description: ++ Fan group ID ++ ++ cooling-levels: ++ minItems: 1 ++ maxItems: 255 ++ description: ++ Cooling levels for the fans (PWM value mapping) ++ description: | ++ Properties for each fan group. ++ required: ++ - reg ++ ++required: ++ - compatible ++ - "#address-cells" ++ - "#size-cells" ++ ++additionalProperties: false +--- /dev/null ++++ b/Documentation/devicetree/bindings/leds/iei,wt61p803-puzzle-leds.yaml +@@ -0,0 +1,39 @@ ++# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause ++%YAML 1.2 ++--- ++$id: http://devicetree.org/schemas/leds/iei,wt61p803-puzzle-leds.yaml# ++$schema: http://devicetree.org/meta-schemas/core.yaml# ++ ++title: IEI WT61P803 PUZZLE MCU LED module from IEI Integration Corp. ++ ++maintainers: ++ - Luka Kovacic ++ ++description: | ++ This module is a part of the IEI WT61P803 PUZZLE MFD device. For more details ++ see Documentation/devicetree/bindings/mfd/iei,wt61p803-puzzle.yaml. ++ ++ The LED module is a sub-node of the MCU node in the Device Tree. ++ ++properties: ++ compatible: ++ const: iei,wt61p803-puzzle-leds ++ ++ "#address-cells": ++ const: 1 ++ ++ "#size-cells": ++ const: 0 ++ ++ led@0: ++ type: object ++ $ref: common.yaml ++ description: | ++ Properties for a single LED. ++ ++required: ++ - compatible ++ - "#address-cells" ++ - "#size-cells" ++ ++additionalProperties: false +--- /dev/null ++++ b/Documentation/devicetree/bindings/mfd/iei,wt61p803-puzzle.yaml +@@ -0,0 +1,82 @@ ++# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause ++%YAML 1.2 ++--- ++$id: http://devicetree.org/schemas/mfd/iei,wt61p803-puzzle.yaml# ++$schema: http://devicetree.org/meta-schemas/core.yaml# ++ ++title: IEI WT61P803 PUZZLE MCU from IEI Integration Corp. ++ ++maintainers: ++ - Luka Kovacic ++ ++description: | ++ IEI WT61P803 PUZZLE MCU is embedded in some IEI Puzzle series boards. ++ It's used for controlling system power states, fans, LEDs and temperature ++ sensors. ++ ++ For Device Tree bindings of other sub-modules (HWMON, LEDs) refer to the ++ binding documents under the respective subsystem directories. ++ ++properties: ++ compatible: ++ const: iei,wt61p803-puzzle ++ ++ current-speed: ++ description: ++ Serial bus speed in bps ++ maxItems: 1 ++ ++ enable-beep: true ++ ++ hwmon: ++ $ref: /schemas/hwmon/iei,wt61p803-puzzle-hwmon.yaml ++ ++ leds: ++ $ref: /schemas/leds/iei,wt61p803-puzzle-leds.yaml ++ ++required: ++ - compatible ++ - current-speed ++ ++additionalProperties: false ++ ++examples: ++ - | ++ #include ++ serial { ++ mcu { ++ compatible = "iei,wt61p803-puzzle"; ++ current-speed = <115200>; ++ enable-beep; ++ ++ leds { ++ compatible = "iei,wt61p803-puzzle-leds"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ led@0 { ++ reg = <0>; ++ function = LED_FUNCTION_POWER; ++ color = ; ++ }; ++ }; ++ ++ hwmon { ++ compatible = "iei,wt61p803-puzzle-hwmon"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ fan-group@0 { ++ #cooling-cells = <2>; ++ reg = <0x00>; ++ cooling-levels = <64 102 170 230 250>; ++ }; ++ ++ fan-group@1 { ++ #cooling-cells = <2>; ++ reg = <0x01>; ++ cooling-levels = <64 102 170 230 250>; ++ }; ++ }; ++ }; ++ }; +--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml ++++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml +@@ -475,6 +475,8 @@ patternProperties: + description: IC Plus Corp. + "^idt,.*": + description: Integrated Device Technologies, Inc. ++ "^iei,.*": ++ description: IEI Integration Corp. + "^ifi,.*": + description: Ingenieurburo Fur Ic-Technologie (I/F/I) + "^ilitek,.*": diff --git a/target/linux/mvebu/patches-5.10/902-drivers-mfd-Add-a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch b/target/linux/mvebu/patches-5.10/902-drivers-mfd-Add-a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch new file mode 100644 index 0000000000..01c2ecce0d --- /dev/null +++ b/target/linux/mvebu/patches-5.10/902-drivers-mfd-Add-a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch @@ -0,0 +1,1034 @@ +From 692cfa85272dd12995b427c0a7a585ced5d54f32 Mon Sep 17 00:00:00 2001 +From: Luka Kovacic +Date: Tue, 24 Aug 2021 12:44:33 +0000 +Subject: [PATCH 2/7] drivers: mfd: Add a driver for IEI WT61P803 PUZZLE MCU + +Add a driver for the IEI WT61P803 PUZZLE microcontroller, used in some +IEI Puzzle series devices. The microcontroller controls system power, +temperature sensors, fans and LEDs. + +This driver implements the core functionality for device communication +over the system serial (serdev bus). It handles MCU messages and the +internal MCU properties. Some properties can be managed over sysfs. + +Signed-off-by: Luka Kovacic +Signed-off-by: Pavo Banicevic +Cc: Luka Perkov +Cc: Robert Marko +--- + drivers/mfd/Kconfig | 8 + + drivers/mfd/Makefile | 1 + + drivers/mfd/iei-wt61p803-puzzle.c | 908 ++++++++++++++++++++++++ + include/linux/mfd/iei-wt61p803-puzzle.h | 66 ++ + 4 files changed, 983 insertions(+) + create mode 100644 drivers/mfd/iei-wt61p803-puzzle.c + create mode 100644 include/linux/mfd/iei-wt61p803-puzzle.h + +--- a/drivers/mfd/Kconfig ++++ b/drivers/mfd/Kconfig +@@ -2155,6 +2155,15 @@ config SGI_MFD_IOC3 + If you have an SGI Origin, Octane, or a PCI IOC3 card, + then say Y. Otherwise say N. + ++config MFD_IEI_WT61P803_PUZZLE ++ tristate "IEI WT61P803 PUZZLE MCU driver" ++ depends on SERIAL_DEV_BUS ++ select MFD_CORE ++ help ++ IEI WT61P803 PUZZLE is a system power management microcontroller ++ used for fan control, temperature sensor reading, LED control ++ and system identification. ++ + config MFD_INTEL_M10_BMC + tristate "Intel MAX 10 Board Management Controller" + depends on SPI_MASTER +--- a/drivers/mfd/Makefile ++++ b/drivers/mfd/Makefile +@@ -237,6 +237,7 @@ obj-$(CONFIG_MFD_HI655X_PMIC) += hi655 + obj-$(CONFIG_MFD_DLN2) += dln2.o + obj-$(CONFIG_MFD_RT5033) += rt5033.o + obj-$(CONFIG_MFD_SKY81452) += sky81452.o ++obj-$(CONFIG_MFD_IEI_WT61P803_PUZZLE) += iei-wt61p803-puzzle.o + + intel-soc-pmic-objs := intel_soc_pmic_core.o intel_soc_pmic_crc.o + obj-$(CONFIG_INTEL_SOC_PMIC) += intel-soc-pmic.o +--- /dev/null ++++ b/drivers/mfd/iei-wt61p803-puzzle.c +@@ -0,0 +1,908 @@ ++// SPDX-License-Identifier: GPL-2.0-only ++/* IEI WT61P803 PUZZLE MCU Driver ++ * System management microcontroller for fan control, temperature sensor reading, ++ * LED control and system identification on IEI Puzzle series ARM-based appliances. ++ * ++ * Copyright (C) 2020 Sartura Ltd. ++ * Author: Luka Kovacic ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* start, payload and XOR checksum at end */ ++#define IEI_WT61P803_PUZZLE_MAX_COMMAND_LENGTH (1 + 20 + 1) ++#define IEI_WT61P803_PUZZLE_RESP_BUF_SIZE 512 ++ ++#define IEI_WT61P803_PUZZLE_MAC_LENGTH 17 ++#define IEI_WT61P803_PUZZLE_SN_LENGTH 36 ++#define IEI_WT61P803_PUZZLE_VERSION_LENGTH 6 ++#define IEI_WT61P803_PUZZLE_BUILD_INFO_LENGTH 16 ++#define IEI_WT61P803_PUZZLE_PROTOCOL_VERSION_LENGTH 8 ++#define IEI_WT61P803_PUZZLE_NB_MAC 8 ++ ++/* Use HZ as a timeout value throughout the driver */ ++#define IEI_WT61P803_PUZZLE_GENERAL_TIMEOUT HZ ++ ++enum iei_wt61p803_puzzle_attribute_type { ++ IEI_WT61P803_PUZZLE_VERSION, ++ IEI_WT61P803_PUZZLE_BUILD_INFO, ++ IEI_WT61P803_PUZZLE_BOOTLOADER_MODE, ++ IEI_WT61P803_PUZZLE_PROTOCOL_VERSION, ++ IEI_WT61P803_PUZZLE_SERIAL_NUMBER, ++ IEI_WT61P803_PUZZLE_MAC_ADDRESS, ++ IEI_WT61P803_PUZZLE_AC_RECOVERY_STATUS, ++ IEI_WT61P803_PUZZLE_POWER_LOSS_RECOVERY, ++ IEI_WT61P803_PUZZLE_POWER_STATUS, ++}; ++ ++struct iei_wt61p803_puzzle_device_attribute { ++ struct device_attribute dev_attr; ++ enum iei_wt61p803_puzzle_attribute_type type; ++ u8 index; ++}; ++ ++/** ++ * struct iei_wt61p803_puzzle_mcu_status - MCU flags state ++ * @ac_recovery_status_flag: AC Recovery Status Flag ++ * @power_loss_recovery: System recovery after power loss ++ * @power_status: System Power-on Method ++ */ ++struct iei_wt61p803_puzzle_mcu_status { ++ u8 ac_recovery_status_flag; ++ u8 power_loss_recovery; ++ u8 power_status; ++}; ++ ++/** ++ * struct iei_wt61p803_puzzle_reply - MCU reply ++ * @size: Size of the MCU reply ++ * @data: Full MCU reply buffer ++ * @state: Current state of the packet ++ * @received: Was the response fullfilled ++ */ ++struct iei_wt61p803_puzzle_reply { ++ size_t size; ++ unsigned char data[IEI_WT61P803_PUZZLE_RESP_BUF_SIZE]; ++ struct completion received; ++}; ++ ++/** ++ * struct iei_wt61p803_puzzle_mcu_version - MCU version status ++ * @version: Primary firmware version ++ * @build_info: Build date and time ++ * @bootloader_mode: Status of the MCU operation ++ * @protocol_version: MCU communication protocol version ++ * @serial_number: Device factory serial number ++ * @mac_address: Device factory MAC addresses ++ * ++ * Last element of arrays is reserved for '\0'. ++ */ ++struct iei_wt61p803_puzzle_mcu_version { ++ char version[IEI_WT61P803_PUZZLE_VERSION_LENGTH + 1]; ++ char build_info[IEI_WT61P803_PUZZLE_BUILD_INFO_LENGTH + 1]; ++ bool bootloader_mode; ++ char protocol_version[IEI_WT61P803_PUZZLE_PROTOCOL_VERSION_LENGTH + 1]; ++ char serial_number[IEI_WT61P803_PUZZLE_SN_LENGTH + 1]; ++ char mac_address[IEI_WT61P803_PUZZLE_NB_MAC][IEI_WT61P803_PUZZLE_MAC_LENGTH + 1]; ++}; ++ ++/** ++ * struct iei_wt61p803_puzzle - IEI WT61P803 PUZZLE MCU Driver ++ * @serdev: Pointer to underlying serdev device ++ * @dev: Pointer to underlying dev device ++ * @reply_lock: Reply mutex lock ++ * @reply: Pointer to the iei_wt61p803_puzzle_reply struct ++ * @version: MCU version related data ++ * @status: MCU status related data ++ * @response_buffer Command response buffer allocation ++ * @lock General member mutex lock ++ */ ++struct iei_wt61p803_puzzle { ++ struct serdev_device *serdev; ++ struct device *dev; ++ struct mutex reply_lock; /* lock to prevent multiple firmware calls */ ++ struct iei_wt61p803_puzzle_reply *reply; ++ struct iei_wt61p803_puzzle_mcu_version version; ++ struct iei_wt61p803_puzzle_mcu_status status; ++ unsigned char response_buffer[IEI_WT61P803_PUZZLE_BUF_SIZE]; ++ struct mutex lock; /* lock to protect response buffer */ ++}; ++ ++static unsigned char iei_wt61p803_puzzle_checksum(unsigned char *buf, size_t len) ++{ ++ unsigned char checksum = 0; ++ size_t i; ++ ++ for (i = 0; i < len; i++) ++ checksum ^= buf[i]; ++ return checksum; ++} ++ ++static int iei_wt61p803_puzzle_process_resp(struct iei_wt61p803_puzzle *mcu, ++ const unsigned char *raw_resp_data, size_t size) ++{ ++ unsigned char checksum; ++ ++ /* Check the incoming frame header */ ++ if (!(raw_resp_data[0] == IEI_WT61P803_PUZZLE_CMD_HEADER_START || ++ raw_resp_data[0] == IEI_WT61P803_PUZZLE_CMD_HEADER_START_OTHER || ++ (raw_resp_data[0] == IEI_WT61P803_PUZZLE_CMD_HEADER_EEPROM && ++ raw_resp_data[1] == IEI_WT61P803_PUZZLE_CMD_EEPROM_READ))) { ++ if (mcu->reply->size + size >= sizeof(mcu->reply->data)) ++ return -EIO; ++ ++ /* Append the frame to existing data */ ++ memcpy(mcu->reply->data + mcu->reply->size, raw_resp_data, size); ++ mcu->reply->size += size; ++ } else { ++ if (size >= sizeof(mcu->reply->data)) ++ return -EIO; ++ ++ /* Start processing a new frame */ ++ memcpy(mcu->reply->data, raw_resp_data, size); ++ mcu->reply->size = size; ++ } ++ ++ checksum = iei_wt61p803_puzzle_checksum(mcu->reply->data, mcu->reply->size - 1); ++ if (checksum != mcu->reply->data[mcu->reply->size - 1]) { ++ /* The checksum isn't matched yet, wait for new frames */ ++ return size; ++ } ++ ++ /* Received all the data */ ++ complete(&mcu->reply->received); ++ ++ return size; ++} ++ ++static int iei_wt61p803_puzzle_recv_buf(struct serdev_device *serdev, ++ const unsigned char *data, size_t size) ++{ ++ struct iei_wt61p803_puzzle *mcu = serdev_device_get_drvdata(serdev); ++ int ret; ++ ++ ret = iei_wt61p803_puzzle_process_resp(mcu, data, size); ++ /* Return the number of processed bytes if function returns error, ++ * discard the remaining incoming data, since the frame this data ++ * belongs to is broken anyway ++ */ ++ if (ret < 0) ++ return size; ++ ++ return ret; ++} ++ ++static const struct serdev_device_ops iei_wt61p803_puzzle_serdev_device_ops = { ++ .receive_buf = iei_wt61p803_puzzle_recv_buf, ++ .write_wakeup = serdev_device_write_wakeup, ++}; ++ ++/** ++ * iei_wt61p803_puzzle_write_command_watchdog() - Watchdog of the normal cmd ++ * @mcu: Pointer to the iei_wt61p803_puzzle core MFD struct ++ * @cmd: Pointer to the char array to send (size should be content + 1 (xor)) ++ * @size: Size of the cmd char array ++ * @reply_data: Pointer to the reply/response data array (should be allocated) ++ * @reply_size: Pointer to size_t (size of reply_data) ++ * @retry_count: Number of times to retry sending the command to the MCU ++ */ ++int iei_wt61p803_puzzle_write_command_watchdog(struct iei_wt61p803_puzzle *mcu, ++ unsigned char *cmd, size_t size, ++ unsigned char *reply_data, ++ size_t *reply_size, int retry_count) ++{ ++ struct device *dev = &mcu->serdev->dev; ++ int ret, i; ++ ++ for (i = 0; i < retry_count; i++) { ++ ret = iei_wt61p803_puzzle_write_command(mcu, cmd, size, ++ reply_data, reply_size); ++ if (ret != -ETIMEDOUT) ++ return ret; ++ } ++ ++ dev_err(dev, "Command response timed out. Retries: %d\n", retry_count); ++ ++ return -ETIMEDOUT; ++} ++EXPORT_SYMBOL_GPL(iei_wt61p803_puzzle_write_command_watchdog); ++ ++/** ++ * iei_wt61p803_puzzle_write_command() - Send a structured command to the MCU ++ * @mcu: Pointer to the iei_wt61p803_puzzle core MFD struct ++ * @cmd: Pointer to the char array to send (size should be content + 1 (xor)) ++ * @size: Size of the cmd char array ++ * @reply_data: Pointer to the reply/response data array (should be allocated) ++ * ++ * Sends a structured command to the MCU. ++ */ ++int iei_wt61p803_puzzle_write_command(struct iei_wt61p803_puzzle *mcu, ++ unsigned char *cmd, size_t size, ++ unsigned char *reply_data, ++ size_t *reply_size) ++{ ++ struct device *dev = &mcu->serdev->dev; ++ int ret; ++ ++ if (size <= 1 || size > IEI_WT61P803_PUZZLE_MAX_COMMAND_LENGTH) ++ return -EINVAL; ++ ++ mutex_lock(&mcu->reply_lock); ++ ++ cmd[size - 1] = iei_wt61p803_puzzle_checksum(cmd, size - 1); ++ ++ /* Initialize reply struct */ ++ reinit_completion(&mcu->reply->received); ++ mcu->reply->size = 0; ++ usleep_range(2000, 10000); ++ serdev_device_write_flush(mcu->serdev); ++ ret = serdev_device_write_buf(mcu->serdev, cmd, size); ++ if (ret < 0) ++ goto exit; ++ ++ serdev_device_wait_until_sent(mcu->serdev, IEI_WT61P803_PUZZLE_GENERAL_TIMEOUT); ++ ret = wait_for_completion_timeout(&mcu->reply->received, ++ IEI_WT61P803_PUZZLE_GENERAL_TIMEOUT); ++ if (ret == 0) { ++ dev_err(dev, "Command reply receive timeout\n"); ++ ret = -ETIMEDOUT; ++ goto exit; ++ } ++ ++ *reply_size = mcu->reply->size; ++ /* Copy the received data, as it will not be available after a new frame is received */ ++ memcpy(reply_data, mcu->reply->data, mcu->reply->size); ++ ret = 0; ++exit: ++ mutex_unlock(&mcu->reply_lock); ++ return ret; ++} ++EXPORT_SYMBOL_GPL(iei_wt61p803_puzzle_write_command); ++ ++static int iei_wt61p803_puzzle_buzzer(struct iei_wt61p803_puzzle *mcu, bool long_beep) ++{ ++ unsigned char *resp_buf = mcu->response_buffer; ++ unsigned char buzzer_cmd[4] = {}; ++ size_t reply_size; ++ int ret; ++ ++ buzzer_cmd[0] = IEI_WT61P803_PUZZLE_CMD_HEADER_START; ++ buzzer_cmd[1] = IEI_WT61P803_PUZZLE_CMD_FUNCTION_SINGLE; ++ buzzer_cmd[2] = long_beep ? '3' : '2'; /* Buzzer 1.5 / 0.5 second beep */ ++ ++ mutex_lock(&mcu->lock); ++ ret = iei_wt61p803_puzzle_write_command(mcu, buzzer_cmd, sizeof(buzzer_cmd), ++ resp_buf, &reply_size); ++ if (ret) ++ goto exit; ++ ++ if (reply_size != 3) { ++ ret = -EIO; ++ goto exit; ++ } ++ ++ if (!(resp_buf[0] == IEI_WT61P803_PUZZLE_CMD_HEADER_START && ++ resp_buf[1] == IEI_WT61P803_PUZZLE_CMD_RESPONSE_OK && ++ resp_buf[2] == IEI_WT61P803_PUZZLE_CHECKSUM_RESPONSE_OK)) { ++ ret = -EPROTO; ++ goto exit; ++ } ++exit: ++ mutex_unlock(&mcu->lock); ++ return ret; ++} ++ ++static int iei_wt61p803_puzzle_get_version(struct iei_wt61p803_puzzle *mcu) ++{ ++ unsigned char version_cmd[3] = { ++ IEI_WT61P803_PUZZLE_CMD_HEADER_START_OTHER, ++ IEI_WT61P803_PUZZLE_CMD_OTHER_VERSION, ++ }; ++ unsigned char build_info_cmd[3] = { ++ IEI_WT61P803_PUZZLE_CMD_HEADER_START_OTHER, ++ IEI_WT61P803_PUZZLE_CMD_OTHER_BUILD, ++ }; ++ unsigned char bootloader_mode_cmd[3] = { ++ IEI_WT61P803_PUZZLE_CMD_HEADER_START_OTHER, ++ IEI_WT61P803_PUZZLE_CMD_OTHER_BOOTLOADER_MODE, ++ }; ++ unsigned char protocol_version_cmd[3] = { ++ IEI_WT61P803_PUZZLE_CMD_HEADER_START_OTHER, ++ IEI_WT61P803_PUZZLE_CMD_OTHER_PROTOCOL_VERSION, ++ }; ++ unsigned char *rb = mcu->response_buffer; ++ size_t reply_size; ++ int ret; ++ ++ mutex_lock(&mcu->lock); ++ ++ ret = iei_wt61p803_puzzle_write_command(mcu, version_cmd, sizeof(version_cmd), ++ rb, &reply_size); ++ if (ret) ++ goto err; ++ if (reply_size < 7) { ++ ret = -EIO; ++ goto err; ++ } ++ sprintf(mcu->version.version, "v%c.%.3s", rb[2], &rb[3]); ++ ++ ret = iei_wt61p803_puzzle_write_command(mcu, build_info_cmd, ++ sizeof(build_info_cmd), rb, ++ &reply_size); ++ if (ret) ++ goto err; ++ if (reply_size < 15) { ++ ret = -EIO; ++ goto err; ++ } ++ sprintf(mcu->version.build_info, "%c%c/%c%c/%.4s %c%c:%c%c", ++ rb[8], rb[9], rb[6], rb[7], &rb[2], rb[10], rb[11], ++ rb[12], rb[13]); ++ ++ ret = iei_wt61p803_puzzle_write_command(mcu, bootloader_mode_cmd, ++ sizeof(bootloader_mode_cmd), rb, ++ &reply_size); ++ if (ret) ++ goto err; ++ if (reply_size < 4) { ++ ret = -EIO; ++ goto err; ++ } ++ if (rb[2] == IEI_WT61P803_PUZZLE_CMD_OTHER_MODE_APPS) ++ mcu->version.bootloader_mode = false; ++ else if (rb[2] == IEI_WT61P803_PUZZLE_CMD_OTHER_MODE_BOOTLOADER) ++ mcu->version.bootloader_mode = true; ++ ++ ret = iei_wt61p803_puzzle_write_command(mcu, protocol_version_cmd, ++ sizeof(protocol_version_cmd), rb, ++ &reply_size); ++ if (ret) ++ goto err; ++ if (reply_size < 9) { ++ ret = -EIO; ++ goto err; ++ } ++ sprintf(mcu->version.protocol_version, "v%c.%c%c%c%c%c", ++ rb[7], rb[6], rb[5], rb[4], rb[3], rb[2]); ++err: ++ mutex_unlock(&mcu->lock); ++ return ret; ++} ++ ++static int iei_wt61p803_puzzle_get_mcu_status(struct iei_wt61p803_puzzle *mcu) ++{ ++ unsigned char mcu_status_cmd[5] = { ++ IEI_WT61P803_PUZZLE_CMD_HEADER_START, ++ IEI_WT61P803_PUZZLE_CMD_FUNCTION_OTHER, ++ IEI_WT61P803_PUZZLE_CMD_FUNCTION_OTHER_STATUS, ++ IEI_WT61P803_PUZZLE_CMD_FUNCTION_OTHER_STATUS, ++ }; ++ unsigned char *resp_buf = mcu->response_buffer; ++ size_t reply_size; ++ int ret; ++ ++ mutex_lock(&mcu->lock); ++ ret = iei_wt61p803_puzzle_write_command(mcu, mcu_status_cmd, sizeof(mcu_status_cmd), ++ resp_buf, &reply_size); ++ if (ret) ++ goto exit; ++ if (reply_size < 20) { ++ ret = -EIO; ++ goto exit; ++ } ++ ++ /* Response format: ++ * (IDX RESPONSE) ++ * 0 @ ++ * 1 O ++ * 2 S ++ * 3 S ++ * ... ++ * 5 AC Recovery Status Flag ++ * ... ++ * 10 Power Loss Recovery ++ * ... ++ * 19 Power Status (system power on method) ++ * 20 XOR checksum ++ */ ++ if (resp_buf[0] == IEI_WT61P803_PUZZLE_CMD_HEADER_START && ++ resp_buf[1] == IEI_WT61P803_PUZZLE_CMD_FUNCTION_OTHER && ++ resp_buf[2] == IEI_WT61P803_PUZZLE_CMD_FUNCTION_OTHER_STATUS && ++ resp_buf[3] == IEI_WT61P803_PUZZLE_CMD_FUNCTION_OTHER_STATUS) { ++ mcu->status.ac_recovery_status_flag = resp_buf[5]; ++ mcu->status.power_loss_recovery = resp_buf[10]; ++ mcu->status.power_status = resp_buf[19]; ++ } ++exit: ++ mutex_unlock(&mcu->lock); ++ return ret; ++} ++ ++static int iei_wt61p803_puzzle_get_serial_number(struct iei_wt61p803_puzzle *mcu) ++{ ++ unsigned char *resp_buf = mcu->response_buffer; ++ unsigned char serial_number_cmd[5] = { ++ IEI_WT61P803_PUZZLE_CMD_HEADER_EEPROM, ++ IEI_WT61P803_PUZZLE_CMD_EEPROM_READ, ++ 0x00, /* EEPROM read address */ ++ 0x24, /* Data length */ ++ }; ++ size_t reply_size; ++ int ret; ++ ++ mutex_lock(&mcu->lock); ++ ret = iei_wt61p803_puzzle_write_command(mcu, serial_number_cmd, ++ sizeof(serial_number_cmd), ++ resp_buf, &reply_size); ++ if (ret) ++ goto err; ++ ++ if (reply_size < IEI_WT61P803_PUZZLE_SN_LENGTH + 4) { ++ ret = -EIO; ++ goto err; ++ } ++ ++ sprintf(mcu->version.serial_number, "%.*s", ++ IEI_WT61P803_PUZZLE_SN_LENGTH, resp_buf + 4); ++err: ++ mutex_unlock(&mcu->lock); ++ return ret; ++} ++ ++static int iei_wt61p803_puzzle_write_serial_number(struct iei_wt61p803_puzzle *mcu, ++ unsigned char serial_number[36]) ++{ ++ unsigned char *resp_buf = mcu->response_buffer; ++ unsigned char serial_number_header[4] = { ++ IEI_WT61P803_PUZZLE_CMD_HEADER_EEPROM, ++ IEI_WT61P803_PUZZLE_CMD_EEPROM_WRITE, ++ 0x00, /* EEPROM write address */ ++ 0xC, /* Data length */ ++ }; ++ unsigned char serial_number_cmd[4 + 12 + 1]; /* header, serial number, XOR checksum */ ++ int ret, sn_counter; ++ size_t reply_size; ++ ++ /* The MCU can only handle 22 byte messages, send the S/N in 12 byte chunks */ ++ mutex_lock(&mcu->lock); ++ for (sn_counter = 0; sn_counter < 3; sn_counter++) { ++ serial_number_header[2] = 0x0 + 0xC * sn_counter; ++ ++ memcpy(serial_number_cmd, serial_number_header, sizeof(serial_number_header)); ++ memcpy(serial_number_cmd + sizeof(serial_number_header), ++ serial_number + 0xC * sn_counter, 0xC); ++ ++ ret = iei_wt61p803_puzzle_write_command(mcu, serial_number_cmd, ++ sizeof(serial_number_cmd), ++ resp_buf, &reply_size); ++ if (ret) ++ goto err; ++ if (reply_size != 3) { ++ ret = -EIO; ++ goto err; ++ } ++ if (!(resp_buf[0] == IEI_WT61P803_PUZZLE_CMD_HEADER_START && ++ resp_buf[1] == IEI_WT61P803_PUZZLE_CMD_RESPONSE_OK && ++ resp_buf[2] == IEI_WT61P803_PUZZLE_CHECKSUM_RESPONSE_OK)) { ++ ret = -EPROTO; ++ goto err; ++ } ++ } ++ ++ sprintf(mcu->version.serial_number, "%.*s", ++ IEI_WT61P803_PUZZLE_SN_LENGTH, serial_number); ++err: ++ mutex_unlock(&mcu->lock); ++ return ret; ++} ++ ++static int iei_wt61p803_puzzle_get_mac_address(struct iei_wt61p803_puzzle *mcu, int index) ++{ ++ unsigned char *resp_buf = mcu->response_buffer; ++ unsigned char mac_address_cmd[5] = { ++ IEI_WT61P803_PUZZLE_CMD_HEADER_EEPROM, ++ IEI_WT61P803_PUZZLE_CMD_EEPROM_READ, ++ 0x00, /* EEPROM read address */ ++ 0x11, /* Data length */ ++ }; ++ size_t reply_size; ++ int ret; ++ ++ mutex_lock(&mcu->lock); ++ mac_address_cmd[2] = 0x24 + 0x11 * index; ++ ++ ret = iei_wt61p803_puzzle_write_command(mcu, mac_address_cmd, ++ sizeof(mac_address_cmd), ++ resp_buf, &reply_size); ++ if (ret) ++ goto err; ++ ++ if (reply_size < 22) { ++ ret = -EIO; ++ goto err; ++ } ++ ++ sprintf(mcu->version.mac_address[index], "%.*s", ++ IEI_WT61P803_PUZZLE_MAC_LENGTH, resp_buf + 4); ++err: ++ mutex_unlock(&mcu->lock); ++ return ret; ++} ++ ++static int ++iei_wt61p803_puzzle_write_mac_address(struct iei_wt61p803_puzzle *mcu, ++ unsigned char mac_address[IEI_WT61P803_PUZZLE_MAC_LENGTH], ++ int mac_address_idx) ++{ ++ unsigned char mac_address_cmd[4 + IEI_WT61P803_PUZZLE_MAC_LENGTH + 1]; ++ unsigned char *resp_buf = mcu->response_buffer; ++ unsigned char mac_address_header[4] = { ++ IEI_WT61P803_PUZZLE_CMD_HEADER_EEPROM, ++ IEI_WT61P803_PUZZLE_CMD_EEPROM_WRITE, ++ 0x00, /* EEPROM write address */ ++ 0x11, /* Data length */ ++ }; ++ size_t reply_size; ++ int ret; ++ ++ if (mac_address_idx < 0 || mac_address_idx >= IEI_WT61P803_PUZZLE_NB_MAC) ++ return -EINVAL; ++ ++ mac_address_header[2] = 0x24 + 0x11 * mac_address_idx; ++ ++ /* Concat mac_address_header, mac_address to mac_address_cmd */ ++ memcpy(mac_address_cmd, mac_address_header, sizeof(mac_address_header)); ++ memcpy(mac_address_cmd + sizeof(mac_address_header), mac_address, ++ IEI_WT61P803_PUZZLE_MAC_LENGTH); ++ ++ mutex_lock(&mcu->lock); ++ ret = iei_wt61p803_puzzle_write_command(mcu, mac_address_cmd, ++ sizeof(mac_address_cmd), ++ resp_buf, &reply_size); ++ if (ret) ++ goto err; ++ if (reply_size != 3) { ++ ret = -EIO; ++ goto err; ++ } ++ if (!(resp_buf[0] == IEI_WT61P803_PUZZLE_CMD_HEADER_START && ++ resp_buf[1] == IEI_WT61P803_PUZZLE_CMD_RESPONSE_OK && ++ resp_buf[2] == IEI_WT61P803_PUZZLE_CHECKSUM_RESPONSE_OK)) { ++ ret = -EPROTO; ++ goto err; ++ } ++ ++ sprintf(mcu->version.mac_address[mac_address_idx], "%.*s", ++ IEI_WT61P803_PUZZLE_MAC_LENGTH, mac_address); ++err: ++ mutex_unlock(&mcu->lock); ++ return ret; ++} ++ ++static int iei_wt61p803_puzzle_write_power_loss_recovery(struct iei_wt61p803_puzzle *mcu, ++ int power_loss_recovery_action) ++{ ++ unsigned char *resp_buf = mcu->response_buffer; ++ unsigned char power_loss_recovery_cmd[5] = {}; ++ size_t reply_size; ++ int ret; ++ ++ if (power_loss_recovery_action < 0 || power_loss_recovery_action > 4) ++ return -EINVAL; ++ ++ power_loss_recovery_cmd[0] = IEI_WT61P803_PUZZLE_CMD_HEADER_START; ++ power_loss_recovery_cmd[1] = IEI_WT61P803_PUZZLE_CMD_FUNCTION_OTHER; ++ power_loss_recovery_cmd[2] = IEI_WT61P803_PUZZLE_CMD_FUNCTION_OTHER_POWER_LOSS; ++ power_loss_recovery_cmd[3] = hex_asc[power_loss_recovery_action]; ++ ++ mutex_lock(&mcu->lock); ++ ret = iei_wt61p803_puzzle_write_command(mcu, power_loss_recovery_cmd, ++ sizeof(power_loss_recovery_cmd), ++ resp_buf, &reply_size); ++ if (ret) ++ goto exit; ++ mcu->status.power_loss_recovery = power_loss_recovery_action; ++exit: ++ mutex_unlock(&mcu->lock); ++ return ret; ++} ++ ++#define to_puzzle_dev_attr(_attr) \ ++ container_of(_attr, struct iei_wt61p803_puzzle_device_attribute, dev_attr) ++ ++static ssize_t show_output(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ struct iei_wt61p803_puzzle *mcu = dev_get_drvdata(dev); ++ struct iei_wt61p803_puzzle_device_attribute *pattr = to_puzzle_dev_attr(attr); ++ int ret; ++ ++ switch (pattr->type) { ++ case IEI_WT61P803_PUZZLE_VERSION: ++ return scnprintf(buf, PAGE_SIZE, "%s\n", mcu->version.version); ++ case IEI_WT61P803_PUZZLE_BUILD_INFO: ++ return scnprintf(buf, PAGE_SIZE, "%s\n", mcu->version.build_info); ++ case IEI_WT61P803_PUZZLE_BOOTLOADER_MODE: ++ return scnprintf(buf, PAGE_SIZE, "%d\n", mcu->version.bootloader_mode); ++ case IEI_WT61P803_PUZZLE_PROTOCOL_VERSION: ++ return scnprintf(buf, PAGE_SIZE, "%s\n", mcu->version.protocol_version); ++ case IEI_WT61P803_PUZZLE_SERIAL_NUMBER: ++ ret = iei_wt61p803_puzzle_get_serial_number(mcu); ++ if (!ret) ++ ret = scnprintf(buf, PAGE_SIZE, "%s\n", mcu->version.serial_number); ++ else ++ ret = 0; ++ return ret; ++ case IEI_WT61P803_PUZZLE_MAC_ADDRESS: ++ ret = iei_wt61p803_puzzle_get_mac_address(mcu, pattr->index); ++ if (!ret) ++ ret = scnprintf(buf, PAGE_SIZE, "%s\n", ++ mcu->version.mac_address[pattr->index]); ++ else ++ ret = 0; ++ return ret; ++ case IEI_WT61P803_PUZZLE_AC_RECOVERY_STATUS: ++ case IEI_WT61P803_PUZZLE_POWER_LOSS_RECOVERY: ++ case IEI_WT61P803_PUZZLE_POWER_STATUS: ++ ret = iei_wt61p803_puzzle_get_mcu_status(mcu); ++ if (ret) ++ return ret; ++ ++ mutex_lock(&mcu->lock); ++ switch (pattr->type) { ++ case IEI_WT61P803_PUZZLE_AC_RECOVERY_STATUS: ++ ret = scnprintf(buf, PAGE_SIZE, "%x\n", ++ mcu->status.ac_recovery_status_flag); ++ break; ++ case IEI_WT61P803_PUZZLE_POWER_LOSS_RECOVERY: ++ ret = scnprintf(buf, PAGE_SIZE, "%x\n", mcu->status.power_loss_recovery); ++ break; ++ case IEI_WT61P803_PUZZLE_POWER_STATUS: ++ ret = scnprintf(buf, PAGE_SIZE, "%x\n", mcu->status.power_status); ++ break; ++ default: ++ ret = 0; ++ break; ++ } ++ mutex_unlock(&mcu->lock); ++ return ret; ++ default: ++ return 0; ++ } ++ ++ return 0; ++} ++ ++static ssize_t store_output(struct device *dev, ++ struct device_attribute *attr, ++ const char *buf, size_t len) ++{ ++ unsigned char serial_number[IEI_WT61P803_PUZZLE_SN_LENGTH]; ++ unsigned char mac_address[IEI_WT61P803_PUZZLE_MAC_LENGTH]; ++ struct iei_wt61p803_puzzle *mcu = dev_get_drvdata(dev); ++ struct iei_wt61p803_puzzle_device_attribute *pattr = to_puzzle_dev_attr(attr); ++ int power_loss_recovery_action = 0; ++ int ret; ++ ++ switch (pattr->type) { ++ case IEI_WT61P803_PUZZLE_SERIAL_NUMBER: ++ if (len != (size_t)(IEI_WT61P803_PUZZLE_SN_LENGTH + 1)) ++ return -EINVAL; ++ memcpy(serial_number, buf, sizeof(serial_number)); ++ ret = iei_wt61p803_puzzle_write_serial_number(mcu, serial_number); ++ if (ret) ++ return ret; ++ return len; ++ case IEI_WT61P803_PUZZLE_MAC_ADDRESS: ++ if (len != (size_t)(IEI_WT61P803_PUZZLE_MAC_LENGTH + 1)) ++ return -EINVAL; ++ ++ memcpy(mac_address, buf, sizeof(mac_address)); ++ ++ if (strlen(attr->attr.name) != 13) ++ return -EIO; ++ ++ ret = iei_wt61p803_puzzle_write_mac_address(mcu, mac_address, pattr->index); ++ if (ret) ++ return ret; ++ return len; ++ case IEI_WT61P803_PUZZLE_POWER_LOSS_RECOVERY: ++ ret = kstrtoint(buf, 10, &power_loss_recovery_action); ++ if (ret) ++ return ret; ++ ret = iei_wt61p803_puzzle_write_power_loss_recovery(mcu, ++ power_loss_recovery_action); ++ if (ret) ++ return ret; ++ return len; ++ default: ++ return -EINVAL; ++ } ++ ++ return 0; ++} ++ ++#define IEI_WT61P803_PUZZLE_ATTR(_name, _mode, _show, _store, _type, _index) \ ++ struct iei_wt61p803_puzzle_device_attribute dev_attr_##_name = \ ++ { .dev_attr = __ATTR(_name, _mode, _show, _store), \ ++ .type = _type, \ ++ .index = _index } ++ ++#define IEI_WT61P803_PUZZLE_ATTR_RO(_name, _type, _id) \ ++ IEI_WT61P803_PUZZLE_ATTR(_name, 0444, show_output, NULL, _type, _id) ++ ++#define IEI_WT61P803_PUZZLE_ATTR_RW(_name, _type, _id) \ ++ IEI_WT61P803_PUZZLE_ATTR(_name, 0644, show_output, store_output, _type, _id) ++ ++static IEI_WT61P803_PUZZLE_ATTR_RO(version, IEI_WT61P803_PUZZLE_VERSION, 0); ++static IEI_WT61P803_PUZZLE_ATTR_RO(build_info, IEI_WT61P803_PUZZLE_BUILD_INFO, 0); ++static IEI_WT61P803_PUZZLE_ATTR_RO(bootloader_mode, IEI_WT61P803_PUZZLE_BOOTLOADER_MODE, 0); ++static IEI_WT61P803_PUZZLE_ATTR_RO(protocol_version, IEI_WT61P803_PUZZLE_PROTOCOL_VERSION, 0); ++static IEI_WT61P803_PUZZLE_ATTR_RW(serial_number, IEI_WT61P803_PUZZLE_SERIAL_NUMBER, 0); ++static IEI_WT61P803_PUZZLE_ATTR_RW(mac_address_0, IEI_WT61P803_PUZZLE_MAC_ADDRESS, 0); ++static IEI_WT61P803_PUZZLE_ATTR_RW(mac_address_1, IEI_WT61P803_PUZZLE_MAC_ADDRESS, 1); ++static IEI_WT61P803_PUZZLE_ATTR_RW(mac_address_2, IEI_WT61P803_PUZZLE_MAC_ADDRESS, 2); ++static IEI_WT61P803_PUZZLE_ATTR_RW(mac_address_3, IEI_WT61P803_PUZZLE_MAC_ADDRESS, 3); ++static IEI_WT61P803_PUZZLE_ATTR_RW(mac_address_4, IEI_WT61P803_PUZZLE_MAC_ADDRESS, 4); ++static IEI_WT61P803_PUZZLE_ATTR_RW(mac_address_5, IEI_WT61P803_PUZZLE_MAC_ADDRESS, 5); ++static IEI_WT61P803_PUZZLE_ATTR_RW(mac_address_6, IEI_WT61P803_PUZZLE_MAC_ADDRESS, 6); ++static IEI_WT61P803_PUZZLE_ATTR_RW(mac_address_7, IEI_WT61P803_PUZZLE_MAC_ADDRESS, 7); ++static IEI_WT61P803_PUZZLE_ATTR_RO(ac_recovery_status, IEI_WT61P803_PUZZLE_AC_RECOVERY_STATUS, 0); ++static IEI_WT61P803_PUZZLE_ATTR_RW(power_loss_recovery, IEI_WT61P803_PUZZLE_POWER_LOSS_RECOVERY, 0); ++static IEI_WT61P803_PUZZLE_ATTR_RO(power_status, IEI_WT61P803_PUZZLE_POWER_STATUS, 0); ++ ++static struct attribute *iei_wt61p803_puzzle_attrs[] = { ++ &dev_attr_version.dev_attr.attr, ++ &dev_attr_build_info.dev_attr.attr, ++ &dev_attr_bootloader_mode.dev_attr.attr, ++ &dev_attr_protocol_version.dev_attr.attr, ++ &dev_attr_serial_number.dev_attr.attr, ++ &dev_attr_mac_address_0.dev_attr.attr, ++ &dev_attr_mac_address_1.dev_attr.attr, ++ &dev_attr_mac_address_2.dev_attr.attr, ++ &dev_attr_mac_address_3.dev_attr.attr, ++ &dev_attr_mac_address_4.dev_attr.attr, ++ &dev_attr_mac_address_5.dev_attr.attr, ++ &dev_attr_mac_address_6.dev_attr.attr, ++ &dev_attr_mac_address_7.dev_attr.attr, ++ &dev_attr_ac_recovery_status.dev_attr.attr, ++ &dev_attr_power_loss_recovery.dev_attr.attr, ++ &dev_attr_power_status.dev_attr.attr, ++ NULL ++}; ++ATTRIBUTE_GROUPS(iei_wt61p803_puzzle); ++ ++static int iei_wt61p803_puzzle_sysfs_create(struct device *dev, ++ struct iei_wt61p803_puzzle *mcu) ++{ ++ int ret; ++ ++ ret = sysfs_create_groups(&mcu->dev->kobj, iei_wt61p803_puzzle_groups); ++ if (ret) ++ mfd_remove_devices(mcu->dev); ++ ++ return ret; ++} ++ ++static int iei_wt61p803_puzzle_sysfs_remove(struct device *dev, ++ struct iei_wt61p803_puzzle *mcu) ++{ ++ /* Remove sysfs groups */ ++ sysfs_remove_groups(&mcu->dev->kobj, iei_wt61p803_puzzle_groups); ++ mfd_remove_devices(mcu->dev); ++ ++ return 0; ++} ++ ++static int iei_wt61p803_puzzle_probe(struct serdev_device *serdev) ++{ ++ struct device *dev = &serdev->dev; ++ struct iei_wt61p803_puzzle *mcu; ++ u32 baud; ++ int ret; ++ ++ /* Read the baud rate from 'current-speed', because the MCU supports different rates */ ++ if (device_property_read_u32(dev, "current-speed", &baud)) { ++ dev_err(dev, ++ "'current-speed' is not specified in device node\n"); ++ return -EINVAL; ++ } ++ dev_dbg(dev, "Driver baud rate: %d\n", baud); ++ ++ /* Allocate the memory */ ++ mcu = devm_kzalloc(dev, sizeof(*mcu), GFP_KERNEL); ++ if (!mcu) ++ return -ENOMEM; ++ ++ mcu->reply = devm_kzalloc(dev, sizeof(*mcu->reply), GFP_KERNEL); ++ if (!mcu->reply) ++ return -ENOMEM; ++ ++ /* Initialize device struct data */ ++ mcu->serdev = serdev; ++ mcu->dev = dev; ++ init_completion(&mcu->reply->received); ++ mutex_init(&mcu->reply_lock); ++ mutex_init(&mcu->lock); ++ ++ /* Setup UART interface */ ++ serdev_device_set_drvdata(serdev, mcu); ++ serdev_device_set_client_ops(serdev, &iei_wt61p803_puzzle_serdev_device_ops); ++ ret = devm_serdev_device_open(dev, serdev); ++ if (ret) ++ return ret; ++ serdev_device_set_baudrate(serdev, baud); ++ serdev_device_set_flow_control(serdev, false); ++ ret = serdev_device_set_parity(serdev, SERDEV_PARITY_NONE); ++ if (ret) { ++ dev_err(dev, "Failed to set parity\n"); ++ return ret; ++ } ++ ++ ret = iei_wt61p803_puzzle_get_version(mcu); ++ if (ret) ++ return ret; ++ ++ dev_dbg(dev, "MCU version: %s\n", mcu->version.version); ++ dev_dbg(dev, "MCU firmware build info: %s\n", mcu->version.build_info); ++ dev_dbg(dev, "MCU in bootloader mode: %s\n", ++ mcu->version.bootloader_mode ? "true" : "false"); ++ dev_dbg(dev, "MCU protocol version: %s\n", mcu->version.protocol_version); ++ ++ if (device_property_read_bool(dev, "enable-beep")) { ++ ret = iei_wt61p803_puzzle_buzzer(mcu, false); ++ if (ret) ++ return ret; ++ } ++ ++ ret = iei_wt61p803_puzzle_sysfs_create(dev, mcu); ++ if (ret) ++ return ret; ++ ++ return devm_of_platform_populate(dev); ++} ++ ++static void iei_wt61p803_puzzle_remove(struct serdev_device *serdev) ++{ ++ struct device *dev = &serdev->dev; ++ struct iei_wt61p803_puzzle *mcu = dev_get_drvdata(dev); ++ ++ iei_wt61p803_puzzle_sysfs_remove(dev, mcu); ++} ++ ++static const struct of_device_id iei_wt61p803_puzzle_dt_ids[] = { ++ { .compatible = "iei,wt61p803-puzzle" }, ++ { } ++}; ++ ++MODULE_DEVICE_TABLE(of, iei_wt61p803_puzzle_dt_ids); ++ ++static struct serdev_device_driver iei_wt61p803_puzzle_drv = { ++ .probe = iei_wt61p803_puzzle_probe, ++ .remove = iei_wt61p803_puzzle_remove, ++ .driver = { ++ .name = "iei-wt61p803-puzzle", ++ .of_match_table = iei_wt61p803_puzzle_dt_ids, ++ }, ++}; ++ ++module_serdev_device_driver(iei_wt61p803_puzzle_drv); ++ ++MODULE_LICENSE("GPL v2"); ++MODULE_AUTHOR("Luka Kovacic "); ++MODULE_DESCRIPTION("IEI WT61P803 PUZZLE MCU Driver"); +--- /dev/null ++++ b/include/linux/mfd/iei-wt61p803-puzzle.h +@@ -0,0 +1,66 @@ ++/* SPDX-License-Identifier: GPL-2.0-only */ ++/* IEI WT61P803 PUZZLE MCU Driver ++ * System management microcontroller for fan control, temperature sensor reading, ++ * LED control and system identification on IEI Puzzle series ARM-based appliances. ++ * ++ * Copyright (C) 2020 Sartura Ltd. ++ * Author: Luka Kovacic ++ */ ++ ++#ifndef _MFD_IEI_WT61P803_PUZZLE_H_ ++#define _MFD_IEI_WT61P803_PUZZLE_H_ ++ ++#define IEI_WT61P803_PUZZLE_BUF_SIZE 512 ++ ++/* Command magic numbers */ ++#define IEI_WT61P803_PUZZLE_CMD_HEADER_START 0x40 /* @ */ ++#define IEI_WT61P803_PUZZLE_CMD_HEADER_START_OTHER 0x25 /* % */ ++#define IEI_WT61P803_PUZZLE_CMD_HEADER_EEPROM 0xF7 ++ ++#define IEI_WT61P803_PUZZLE_CMD_RESPONSE_OK 0x30 /* 0 */ ++#define IEI_WT61P803_PUZZLE_CHECKSUM_RESPONSE_OK 0x70 ++ ++#define IEI_WT61P803_PUZZLE_CMD_EEPROM_READ 0xA1 ++#define IEI_WT61P803_PUZZLE_CMD_EEPROM_WRITE 0xA0 ++ ++#define IEI_WT61P803_PUZZLE_CMD_OTHER_VERSION 0x56 /* V */ ++#define IEI_WT61P803_PUZZLE_CMD_OTHER_BUILD 0x42 /* B */ ++#define IEI_WT61P803_PUZZLE_CMD_OTHER_BOOTLOADER_MODE 0x4D /* M */ ++#define IEI_WT61P803_PUZZLE_CMD_OTHER_MODE_BOOTLOADER 0x30 ++#define IEI_WT61P803_PUZZLE_CMD_OTHER_MODE_APPS 0x31 ++#define IEI_WT61P803_PUZZLE_CMD_OTHER_PROTOCOL_VERSION 0x50 /* P */ ++ ++#define IEI_WT61P803_PUZZLE_CMD_FUNCTION_SINGLE 0x43 /* C */ ++#define IEI_WT61P803_PUZZLE_CMD_FUNCTION_OTHER 0x4F /* O */ ++#define IEI_WT61P803_PUZZLE_CMD_FUNCTION_OTHER_STATUS 0x53 /* S */ ++#define IEI_WT61P803_PUZZLE_CMD_FUNCTION_OTHER_POWER_LOSS 0x41 /* A */ ++ ++#define IEI_WT61P803_PUZZLE_CMD_LED 0x52 /* R */ ++#define IEI_WT61P803_PUZZLE_CMD_LED_POWER 0x31 /* 1 */ ++ ++#define IEI_WT61P803_PUZZLE_CMD_TEMP 0x54 /* T */ ++#define IEI_WT61P803_PUZZLE_CMD_TEMP_ALL 0x41 /* A */ ++ ++#define IEI_WT61P803_PUZZLE_CMD_FAN 0x46 /* F */ ++#define IEI_WT61P803_PUZZLE_CMD_FAN_PWM_READ 0x5A /* Z */ ++#define IEI_WT61P803_PUZZLE_CMD_FAN_PWM_WRITE 0x57 /* W */ ++#define IEI_WT61P803_PUZZLE_CMD_FAN_PWM_BASE 0x30 ++#define IEI_WT61P803_PUZZLE_CMD_FAN_RPM_BASE 0x41 /* A */ ++ ++#define IEI_WT61P803_PUZZLE_CMD_FAN_PWM(x) (IEI_WT61P803_PUZZLE_CMD_FAN_PWM_BASE + (x)) /* 0 - 1 */ ++#define IEI_WT61P803_PUZZLE_CMD_FAN_RPM(x) (IEI_WT61P803_PUZZLE_CMD_FAN_RPM_BASE + (x)) /* 0 - 5 */ ++ ++struct iei_wt61p803_puzzle_mcu_version; ++struct iei_wt61p803_puzzle_reply; ++struct iei_wt61p803_puzzle; ++ ++int iei_wt61p803_puzzle_write_command_watchdog(struct iei_wt61p803_puzzle *mcu, ++ unsigned char *cmd, size_t size, ++ unsigned char *reply_data, size_t *reply_size, ++ int retry_count); ++ ++int iei_wt61p803_puzzle_write_command(struct iei_wt61p803_puzzle *mcu, ++ unsigned char *cmd, size_t size, ++ unsigned char *reply_data, size_t *reply_size); ++ ++#endif /* _MFD_IEI_WT61P803_PUZZLE_H_ */ diff --git a/target/linux/mvebu/patches-5.10/903-drivers-hwmon-Add-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch b/target/linux/mvebu/patches-5.10/903-drivers-hwmon-Add-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch new file mode 100644 index 0000000000..684f09c800 --- /dev/null +++ b/target/linux/mvebu/patches-5.10/903-drivers-hwmon-Add-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch @@ -0,0 +1,469 @@ +From e3310a638cd310bfd93dbbc6d2732ab6aea18dd2 Mon Sep 17 00:00:00 2001 +From: Luka Kovacic +Date: Tue, 24 Aug 2021 12:44:34 +0000 +Subject: [PATCH 3/7] drivers: hwmon: Add the IEI WT61P803 PUZZLE HWMON driver + +Add the IEI WT61P803 PUZZLE HWMON driver, that handles the fan speed +control via PWM, reading fan speed and reading on-board temperature +sensors. + +The driver registers a HWMON device and a simple thermal cooling device to +enable in-kernel fan management. + +This driver depends on the IEI WT61P803 PUZZLE MFD driver. + +Signed-off-by: Luka Kovacic +Signed-off-by: Pavo Banicevic +Acked-by: Guenter Roeck +Cc: Luka Perkov +Cc: Robert Marko +--- + drivers/hwmon/Kconfig | 8 + + drivers/hwmon/Makefile | 1 + + drivers/hwmon/iei-wt61p803-puzzle-hwmon.c | 413 ++++++++++++++++++++++ + 3 files changed, 422 insertions(+) + create mode 100644 drivers/hwmon/iei-wt61p803-puzzle-hwmon.c + +--- a/drivers/hwmon/Kconfig ++++ b/drivers/hwmon/Kconfig +@@ -722,6 +722,14 @@ config SENSORS_IBMPOWERNV + This driver can also be built as a module. If so, the module + will be called ibmpowernv. + ++config SENSORS_IEI_WT61P803_PUZZLE_HWMON ++ tristate "IEI WT61P803 PUZZLE MFD HWMON Driver" ++ depends on MFD_IEI_WT61P803_PUZZLE ++ help ++ The IEI WT61P803 PUZZLE MFD HWMON Driver handles reading fan speed ++ and writing fan PWM values. It also supports reading on-board ++ temperature sensors. ++ + config SENSORS_IIO_HWMON + tristate "Hwmon driver that uses channels specified via iio maps" + depends on IIO +--- a/drivers/hwmon/Makefile ++++ b/drivers/hwmon/Makefile +@@ -83,6 +83,7 @@ obj-$(CONFIG_SENSORS_HIH6130) += hih6130 + obj-$(CONFIG_SENSORS_ULTRA45) += ultra45_env.o + obj-$(CONFIG_SENSORS_I5500) += i5500_temp.o + obj-$(CONFIG_SENSORS_I5K_AMB) += i5k_amb.o ++obj-$(CONFIG_SENSORS_IEI_WT61P803_PUZZLE_HWMON) += iei-wt61p803-puzzle-hwmon.o + obj-$(CONFIG_SENSORS_IBMAEM) += ibmaem.o + obj-$(CONFIG_SENSORS_IBMPEX) += ibmpex.o + obj-$(CONFIG_SENSORS_IBMPOWERNV)+= ibmpowernv.o +--- /dev/null ++++ b/drivers/hwmon/iei-wt61p803-puzzle-hwmon.c +@@ -0,0 +1,413 @@ ++// SPDX-License-Identifier: GPL-2.0-only ++/* IEI WT61P803 PUZZLE MCU HWMON Driver ++ * ++ * Copyright (C) 2020 Sartura Ltd. ++ * Author: Luka Kovacic ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define IEI_WT61P803_PUZZLE_HWMON_MAX_PWM 2 ++#define IEI_WT61P803_PUZZLE_HWMON_MAX_PWM_VAL 255 ++ ++/** ++ * struct iei_wt61p803_puzzle_thermal_cooling_device - Thermal cooling device instance ++ * @mcu_hwmon: Parent driver struct pointer ++ * @tcdev: Thermal cooling device pointer ++ * @name: Thermal cooling device name ++ * @pwm_channel: Controlled PWM channel (0 or 1) ++ * @cooling_levels: Thermal cooling device cooling levels (DT) ++ */ ++struct iei_wt61p803_puzzle_thermal_cooling_device { ++ struct iei_wt61p803_puzzle_hwmon *mcu_hwmon; ++ struct thermal_cooling_device *tcdev; ++ char name[THERMAL_NAME_LENGTH]; ++ int pwm_channel; ++ u8 *cooling_levels; ++}; ++ ++/** ++ * struct iei_wt61p803_puzzle_hwmon - MCU HWMON Driver ++ * @mcu: MCU struct pointer ++ * @response_buffer Global MCU response buffer ++ * @thermal_cooling_dev_present: Per-channel thermal cooling device control indicator ++ * @cdev: Per-channel thermal cooling device private structure ++ */ ++struct iei_wt61p803_puzzle_hwmon { ++ struct iei_wt61p803_puzzle *mcu; ++ unsigned char response_buffer[IEI_WT61P803_PUZZLE_BUF_SIZE]; ++ bool thermal_cooling_dev_present[IEI_WT61P803_PUZZLE_HWMON_MAX_PWM]; ++ struct iei_wt61p803_puzzle_thermal_cooling_device ++ *cdev[IEI_WT61P803_PUZZLE_HWMON_MAX_PWM]; ++ struct mutex lock; /* mutex to protect response_buffer array */ ++}; ++ ++#define raw_temp_to_milidegree_celsius(x) (((x) - 0x80) * 1000) ++static int iei_wt61p803_puzzle_read_temp_sensor(struct iei_wt61p803_puzzle_hwmon *mcu_hwmon, ++ int channel, long *value) ++{ ++ unsigned char *resp_buf = mcu_hwmon->response_buffer; ++ unsigned char temp_sensor_ntc_cmd[4] = { ++ IEI_WT61P803_PUZZLE_CMD_HEADER_START, ++ IEI_WT61P803_PUZZLE_CMD_TEMP, ++ IEI_WT61P803_PUZZLE_CMD_TEMP_ALL, ++ }; ++ size_t reply_size; ++ int ret; ++ ++ mutex_lock(&mcu_hwmon->lock); ++ ret = iei_wt61p803_puzzle_write_command(mcu_hwmon->mcu, temp_sensor_ntc_cmd, ++ sizeof(temp_sensor_ntc_cmd), resp_buf, ++ &reply_size); ++ if (ret) ++ goto exit; ++ ++ if (reply_size != 7) { ++ ret = -EIO; ++ goto exit; ++ } ++ ++ /* Check the number of NTC values */ ++ if (resp_buf[3] != '2') { ++ ret = -EIO; ++ goto exit; ++ } ++ ++ *value = raw_temp_to_milidegree_celsius(resp_buf[4 + channel]); ++exit: ++ mutex_unlock(&mcu_hwmon->lock); ++ return ret; ++} ++ ++#define raw_fan_val_to_rpm(x, y) ((((x) << 8 | (y)) / 2) * 60) ++static int iei_wt61p803_puzzle_read_fan_speed(struct iei_wt61p803_puzzle_hwmon *mcu_hwmon, ++ int channel, long *value) ++{ ++ unsigned char *resp_buf = mcu_hwmon->response_buffer; ++ unsigned char fan_speed_cmd[4] = {}; ++ size_t reply_size; ++ int ret; ++ ++ fan_speed_cmd[0] = IEI_WT61P803_PUZZLE_CMD_HEADER_START; ++ fan_speed_cmd[1] = IEI_WT61P803_PUZZLE_CMD_FAN; ++ fan_speed_cmd[2] = IEI_WT61P803_PUZZLE_CMD_FAN_RPM(channel); ++ ++ mutex_lock(&mcu_hwmon->lock); ++ ret = iei_wt61p803_puzzle_write_command(mcu_hwmon->mcu, fan_speed_cmd, ++ sizeof(fan_speed_cmd), resp_buf, ++ &reply_size); ++ if (ret) ++ goto exit; ++ ++ if (reply_size != 7) { ++ ret = -EIO; ++ goto exit; ++ } ++ ++ *value = raw_fan_val_to_rpm(resp_buf[3], resp_buf[4]); ++exit: ++ mutex_unlock(&mcu_hwmon->lock); ++ return ret; ++} ++ ++static int iei_wt61p803_puzzle_write_pwm_channel(struct iei_wt61p803_puzzle_hwmon *mcu_hwmon, ++ int channel, long pwm_set_val) ++{ ++ unsigned char *resp_buf = mcu_hwmon->response_buffer; ++ unsigned char pwm_set_cmd[6] = {}; ++ size_t reply_size; ++ int ret; ++ ++ pwm_set_cmd[0] = IEI_WT61P803_PUZZLE_CMD_HEADER_START; ++ pwm_set_cmd[1] = IEI_WT61P803_PUZZLE_CMD_FAN; ++ pwm_set_cmd[2] = IEI_WT61P803_PUZZLE_CMD_FAN_PWM_WRITE; ++ pwm_set_cmd[3] = IEI_WT61P803_PUZZLE_CMD_FAN_PWM(channel); ++ pwm_set_cmd[4] = pwm_set_val; ++ ++ mutex_lock(&mcu_hwmon->lock); ++ ret = iei_wt61p803_puzzle_write_command(mcu_hwmon->mcu, pwm_set_cmd, ++ sizeof(pwm_set_cmd), resp_buf, ++ &reply_size); ++ if (ret) ++ goto exit; ++ ++ if (reply_size != 3) { ++ ret = -EIO; ++ goto exit; ++ } ++ ++ if (!(resp_buf[0] == IEI_WT61P803_PUZZLE_CMD_HEADER_START && ++ resp_buf[1] == IEI_WT61P803_PUZZLE_CMD_RESPONSE_OK && ++ resp_buf[2] == IEI_WT61P803_PUZZLE_CHECKSUM_RESPONSE_OK)) { ++ ret = -EIO; ++ goto exit; ++ } ++exit: ++ mutex_unlock(&mcu_hwmon->lock); ++ return ret; ++} ++ ++static int iei_wt61p803_puzzle_read_pwm_channel(struct iei_wt61p803_puzzle_hwmon *mcu_hwmon, ++ int channel, long *value) ++{ ++ unsigned char *resp_buf = mcu_hwmon->response_buffer; ++ unsigned char pwm_get_cmd[5] = {}; ++ size_t reply_size; ++ int ret; ++ ++ pwm_get_cmd[0] = IEI_WT61P803_PUZZLE_CMD_HEADER_START; ++ pwm_get_cmd[1] = IEI_WT61P803_PUZZLE_CMD_FAN; ++ pwm_get_cmd[2] = IEI_WT61P803_PUZZLE_CMD_FAN_PWM_READ; ++ pwm_get_cmd[3] = IEI_WT61P803_PUZZLE_CMD_FAN_PWM(channel); ++ ++ ret = iei_wt61p803_puzzle_write_command(mcu_hwmon->mcu, pwm_get_cmd, ++ sizeof(pwm_get_cmd), resp_buf, ++ &reply_size); ++ if (ret) ++ return ret; ++ ++ if (reply_size != 5) ++ return -EIO; ++ ++ if (resp_buf[2] != IEI_WT61P803_PUZZLE_CMD_FAN_PWM_READ) ++ return -EIO; ++ ++ *value = resp_buf[3]; ++ ++ return 0; ++} ++ ++static int iei_wt61p803_puzzle_read(struct device *dev, enum hwmon_sensor_types type, ++ u32 attr, int channel, long *val) ++{ ++ struct iei_wt61p803_puzzle_hwmon *mcu_hwmon = dev_get_drvdata(dev->parent); ++ ++ switch (type) { ++ case hwmon_pwm: ++ return iei_wt61p803_puzzle_read_pwm_channel(mcu_hwmon, channel, val); ++ case hwmon_fan: ++ return iei_wt61p803_puzzle_read_fan_speed(mcu_hwmon, channel, val); ++ case hwmon_temp: ++ return iei_wt61p803_puzzle_read_temp_sensor(mcu_hwmon, channel, val); ++ default: ++ return -EINVAL; ++ } ++} ++ ++static int iei_wt61p803_puzzle_write(struct device *dev, enum hwmon_sensor_types type, ++ u32 attr, int channel, long val) ++{ ++ struct iei_wt61p803_puzzle_hwmon *mcu_hwmon = dev_get_drvdata(dev->parent); ++ ++ return iei_wt61p803_puzzle_write_pwm_channel(mcu_hwmon, channel, val); ++} ++ ++static umode_t iei_wt61p803_puzzle_is_visible(const void *data, enum hwmon_sensor_types type, ++ u32 attr, int channel) ++{ ++ const struct iei_wt61p803_puzzle_hwmon *mcu_hwmon = data; ++ ++ switch (type) { ++ case hwmon_pwm: ++ if (mcu_hwmon->thermal_cooling_dev_present[channel]) ++ return 0444; ++ if (attr == hwmon_pwm_input) ++ return 0644; ++ break; ++ case hwmon_fan: ++ if (attr == hwmon_fan_input) ++ return 0444; ++ break; ++ case hwmon_temp: ++ if (attr == hwmon_temp_input) ++ return 0444; ++ break; ++ default: ++ return 0; ++ } ++ ++ return 0; ++} ++ ++static const struct hwmon_ops iei_wt61p803_puzzle_hwmon_ops = { ++ .is_visible = iei_wt61p803_puzzle_is_visible, ++ .read = iei_wt61p803_puzzle_read, ++ .write = iei_wt61p803_puzzle_write, ++}; ++ ++static const struct hwmon_channel_info *iei_wt61p803_puzzle_info[] = { ++ HWMON_CHANNEL_INFO(pwm, ++ HWMON_PWM_INPUT, ++ HWMON_PWM_INPUT), ++ HWMON_CHANNEL_INFO(fan, ++ HWMON_F_INPUT, ++ HWMON_F_INPUT, ++ HWMON_F_INPUT, ++ HWMON_F_INPUT, ++ HWMON_F_INPUT), ++ HWMON_CHANNEL_INFO(temp, ++ HWMON_T_INPUT, ++ HWMON_T_INPUT), ++ NULL ++}; ++ ++static const struct hwmon_chip_info iei_wt61p803_puzzle_chip_info = { ++ .ops = &iei_wt61p803_puzzle_hwmon_ops, ++ .info = iei_wt61p803_puzzle_info, ++}; ++ ++static int iei_wt61p803_puzzle_get_max_state(struct thermal_cooling_device *tcdev, ++ unsigned long *state) ++{ ++ *state = IEI_WT61P803_PUZZLE_HWMON_MAX_PWM_VAL; ++ ++ return 0; ++} ++ ++static int iei_wt61p803_puzzle_get_cur_state(struct thermal_cooling_device *tcdev, ++ unsigned long *state) ++{ ++ struct iei_wt61p803_puzzle_thermal_cooling_device *cdev = tcdev->devdata; ++ struct iei_wt61p803_puzzle_hwmon *mcu_hwmon = cdev->mcu_hwmon; ++ long value; ++ int ret; ++ ++ ret = iei_wt61p803_puzzle_read_pwm_channel(mcu_hwmon, cdev->pwm_channel, &value); ++ if (ret) ++ return ret; ++ *state = value; ++ return 0; ++} ++ ++static int iei_wt61p803_puzzle_set_cur_state(struct thermal_cooling_device *tcdev, ++ unsigned long state) ++{ ++ struct iei_wt61p803_puzzle_thermal_cooling_device *cdev = tcdev->devdata; ++ struct iei_wt61p803_puzzle_hwmon *mcu_hwmon = cdev->mcu_hwmon; ++ ++ return iei_wt61p803_puzzle_write_pwm_channel(mcu_hwmon, cdev->pwm_channel, state); ++} ++ ++static const struct thermal_cooling_device_ops iei_wt61p803_puzzle_cooling_ops = { ++ .get_max_state = iei_wt61p803_puzzle_get_max_state, ++ .get_cur_state = iei_wt61p803_puzzle_get_cur_state, ++ .set_cur_state = iei_wt61p803_puzzle_set_cur_state, ++}; ++ ++static int ++iei_wt61p803_puzzle_enable_thermal_cooling_dev(struct device *dev, ++ struct fwnode_handle *child, ++ struct iei_wt61p803_puzzle_hwmon *mcu_hwmon) ++{ ++ struct iei_wt61p803_puzzle_thermal_cooling_device *cdev; ++ u32 pwm_channel; ++ u8 num_levels; ++ int ret; ++ ++ ret = fwnode_property_read_u32(child, "reg", &pwm_channel); ++ if (ret) ++ return ret; ++ ++ mcu_hwmon->thermal_cooling_dev_present[pwm_channel] = true; ++ ++ num_levels = fwnode_property_count_u8(child, "cooling-levels"); ++ if (!num_levels) ++ return -EINVAL; ++ ++ cdev = devm_kzalloc(dev, sizeof(*cdev), GFP_KERNEL); ++ if (!cdev) ++ return -ENOMEM; ++ ++ cdev->cooling_levels = devm_kmalloc_array(dev, num_levels, sizeof(u8), GFP_KERNEL); ++ if (!cdev->cooling_levels) ++ return -ENOMEM; ++ ++ ret = fwnode_property_read_u8_array(child, "cooling-levels", ++ cdev->cooling_levels, ++ num_levels); ++ if (ret) { ++ dev_err(dev, "Couldn't read property 'cooling-levels'\n"); ++ return ret; ++ } ++ ++ snprintf(cdev->name, THERMAL_NAME_LENGTH, "wt61p803_puzzle_%d", pwm_channel); ++ cdev->tcdev = devm_thermal_of_cooling_device_register(dev, NULL, cdev->name, cdev, ++ &iei_wt61p803_puzzle_cooling_ops); ++ if (IS_ERR(cdev->tcdev)) ++ return PTR_ERR(cdev->tcdev); ++ ++ cdev->mcu_hwmon = mcu_hwmon; ++ cdev->pwm_channel = pwm_channel; ++ mcu_hwmon->cdev[pwm_channel] = cdev; ++ ++ return 0; ++} ++ ++static int iei_wt61p803_puzzle_hwmon_probe(struct platform_device *pdev) ++{ ++ struct device *dev = &pdev->dev; ++ struct iei_wt61p803_puzzle *mcu = dev_get_drvdata(dev->parent); ++ struct iei_wt61p803_puzzle_hwmon *mcu_hwmon; ++ struct fwnode_handle *child; ++ struct device *hwmon_dev; ++ int ret; ++ ++ mcu_hwmon = devm_kzalloc(dev, sizeof(*mcu_hwmon), GFP_KERNEL); ++ if (!mcu_hwmon) ++ return -ENOMEM; ++ ++ mcu_hwmon->mcu = mcu; ++ platform_set_drvdata(pdev, mcu_hwmon); ++ mutex_init(&mcu_hwmon->lock); ++ ++ hwmon_dev = devm_hwmon_device_register_with_info(dev, "iei_wt61p803_puzzle", ++ mcu_hwmon, ++ &iei_wt61p803_puzzle_chip_info, ++ NULL); ++ if (IS_ERR(hwmon_dev)) ++ return PTR_ERR(hwmon_dev); ++ ++ /* Control fans via PWM lines via Linux Kernel */ ++ if (IS_ENABLED(CONFIG_THERMAL)) { ++ device_for_each_child_node(dev, child) { ++ ret = iei_wt61p803_puzzle_enable_thermal_cooling_dev(dev, child, mcu_hwmon); ++ if (ret) { ++ dev_err(dev, "Enabling the PWM fan failed\n"); ++ fwnode_handle_put(child); ++ return ret; ++ } ++ } ++ } ++ return 0; ++} ++ ++static const struct of_device_id iei_wt61p803_puzzle_hwmon_id_table[] = { ++ { .compatible = "iei,wt61p803-puzzle-hwmon" }, ++ {} ++}; ++MODULE_DEVICE_TABLE(of, iei_wt61p803_puzzle_hwmon_id_table); ++ ++static struct platform_driver iei_wt61p803_puzzle_hwmon_driver = { ++ .driver = { ++ .name = "iei-wt61p803-puzzle-hwmon", ++ .of_match_table = iei_wt61p803_puzzle_hwmon_id_table, ++ }, ++ .probe = iei_wt61p803_puzzle_hwmon_probe, ++}; ++ ++module_platform_driver(iei_wt61p803_puzzle_hwmon_driver); ++ ++MODULE_DESCRIPTION("IEI WT61P803 PUZZLE MCU HWMON Driver"); ++MODULE_AUTHOR("Luka Kovacic "); ++MODULE_LICENSE("GPL v2"); diff --git a/target/linux/mvebu/patches-5.10/904-drivers-leds-Add-the-IEI-WT61P803-PUZZLE-LED-driver.patch b/target/linux/mvebu/patches-5.10/904-drivers-leds-Add-the-IEI-WT61P803-PUZZLE-LED-driver.patch new file mode 100644 index 0000000000..37f98b6ba8 --- /dev/null +++ b/target/linux/mvebu/patches-5.10/904-drivers-leds-Add-the-IEI-WT61P803-PUZZLE-LED-driver.patch @@ -0,0 +1,207 @@ +From f3b44eb69cc561cf05d00506dcec0dd9be003ed8 Mon Sep 17 00:00:00 2001 +From: Luka Kovacic +Date: Tue, 24 Aug 2021 12:44:35 +0000 +Subject: [PATCH 4/7] drivers: leds: Add the IEI WT61P803 PUZZLE LED driver + +Add support for the IEI WT61P803 PUZZLE LED driver. +Currently only the front panel power LED is supported, +since it is the only LED on this board wired through the +MCU. + +The LED is wired directly to the on-board MCU controller +and is toggled using an MCU command. + +Support for more LEDs is going to be added in case more +boards implement this microcontroller, as LEDs use many +different GPIOs. + +This driver depends on the IEI WT61P803 PUZZLE MFD driver. + +Signed-off-by: Luka Kovacic +Signed-off-by: Pavo Banicevic +Cc: Luka Perkov +Cc: Robert Marko +--- + drivers/leds/Kconfig | 8 ++ + drivers/leds/Makefile | 1 + + drivers/leds/leds-iei-wt61p803-puzzle.c | 147 ++++++++++++++++++++++++ + 3 files changed, 156 insertions(+) + create mode 100644 drivers/leds/leds-iei-wt61p803-puzzle.c + +--- a/drivers/leds/Kconfig ++++ b/drivers/leds/Kconfig +@@ -333,6 +333,14 @@ config LEDS_IPAQ_MICRO + Choose this option if you want to use the notification LED on + Compaq/HP iPAQ h3100 and h3600. + ++config LEDS_IEI_WT61P803_PUZZLE ++ tristate "LED Support for the IEI WT61P803 PUZZLE MCU" ++ depends on LEDS_CLASS ++ depends on MFD_IEI_WT61P803_PUZZLE ++ help ++ This option enables support for LEDs controlled by the IEI WT61P803 ++ M801 MCU. ++ + config LEDS_HP6XX + tristate "LED Support for the HP Jornada 6xx" + depends on LEDS_CLASS +--- a/drivers/leds/Makefile ++++ b/drivers/leds/Makefile +@@ -35,6 +35,7 @@ obj-$(CONFIG_LEDS_HP6XX) += leds-hp6xx. + obj-$(CONFIG_LEDS_INTEL_SS4200) += leds-ss4200.o + obj-$(CONFIG_LEDS_IP30) += leds-ip30.o + obj-$(CONFIG_LEDS_IPAQ_MICRO) += leds-ipaq-micro.o ++obj-$(CONFIG_LEDS_IEI_WT61P803_PUZZLE) += leds-iei-wt61p803-puzzle.o + obj-$(CONFIG_LEDS_IS31FL319X) += leds-is31fl319x.o + obj-$(CONFIG_LEDS_IS31FL32XX) += leds-is31fl32xx.o + obj-$(CONFIG_LEDS_KTD2692) += leds-ktd2692.o +--- /dev/null ++++ b/drivers/leds/leds-iei-wt61p803-puzzle.c +@@ -0,0 +1,147 @@ ++// SPDX-License-Identifier: GPL-2.0-only ++/* IEI WT61P803 PUZZLE MCU LED Driver ++ * ++ * Copyright (C) 2020 Sartura Ltd. ++ * Author: Luka Kovacic ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++enum iei_wt61p803_puzzle_led_state { ++ IEI_LED_OFF = 0x30, ++ IEI_LED_ON = 0x31, ++ IEI_LED_BLINK_5HZ = 0x32, ++ IEI_LED_BLINK_1HZ = 0x33, ++}; ++ ++/** ++ * struct iei_wt61p803_puzzle_led - MCU LED Driver ++ * @cdev: LED classdev ++ * @mcu: MCU struct pointer ++ * @response_buffer Global MCU response buffer ++ * @lock: General mutex lock to protect simultaneous R/W access to led_power_state ++ * @led_power_state: State of the front panel power LED ++ */ ++struct iei_wt61p803_puzzle_led { ++ struct led_classdev cdev; ++ struct iei_wt61p803_puzzle *mcu; ++ unsigned char response_buffer[IEI_WT61P803_PUZZLE_BUF_SIZE]; ++ struct mutex lock; /* mutex to protect led_power_state */ ++ int led_power_state; ++}; ++ ++static inline struct iei_wt61p803_puzzle_led *cdev_to_iei_wt61p803_puzzle_led ++ (struct led_classdev *led_cdev) ++{ ++ return container_of(led_cdev, struct iei_wt61p803_puzzle_led, cdev); ++} ++ ++static int iei_wt61p803_puzzle_led_brightness_set_blocking(struct led_classdev *cdev, ++ enum led_brightness brightness) ++{ ++ struct iei_wt61p803_puzzle_led *priv = cdev_to_iei_wt61p803_puzzle_led(cdev); ++ unsigned char *resp_buf = priv->response_buffer; ++ unsigned char led_power_cmd[5] = {}; ++ size_t reply_size; ++ int ret; ++ ++ led_power_cmd[0] = IEI_WT61P803_PUZZLE_CMD_HEADER_START; ++ led_power_cmd[1] = IEI_WT61P803_PUZZLE_CMD_LED; ++ led_power_cmd[2] = IEI_WT61P803_PUZZLE_CMD_LED_POWER; ++ led_power_cmd[3] = brightness == LED_OFF ? IEI_LED_OFF : IEI_LED_ON; ++ ++ ret = iei_wt61p803_puzzle_write_command(priv->mcu, led_power_cmd, ++ sizeof(led_power_cmd), ++ resp_buf, ++ &reply_size); ++ if (ret) ++ return ret; ++ ++ if (reply_size != 3) ++ return -EIO; ++ ++ if (!(resp_buf[0] == IEI_WT61P803_PUZZLE_CMD_HEADER_START && ++ resp_buf[1] == IEI_WT61P803_PUZZLE_CMD_RESPONSE_OK && ++ resp_buf[2] == IEI_WT61P803_PUZZLE_CHECKSUM_RESPONSE_OK)) ++ return -EIO; ++ ++ mutex_lock(&priv->lock); ++ priv->led_power_state = brightness; ++ mutex_unlock(&priv->lock); ++ ++ return 0; ++} ++ ++static enum led_brightness iei_wt61p803_puzzle_led_brightness_get(struct led_classdev *cdev) ++{ ++ struct iei_wt61p803_puzzle_led *priv = cdev_to_iei_wt61p803_puzzle_led(cdev); ++ int led_state; ++ ++ mutex_lock(&priv->lock); ++ led_state = priv->led_power_state; ++ mutex_unlock(&priv->lock); ++ ++ return led_state; ++} ++ ++static int iei_wt61p803_puzzle_led_probe(struct platform_device *pdev) ++{ ++ struct device *dev = &pdev->dev; ++ struct iei_wt61p803_puzzle *mcu = dev_get_drvdata(dev->parent); ++ struct iei_wt61p803_puzzle_led *priv; ++ struct led_init_data init_data = {}; ++ struct fwnode_handle *child; ++ int ret; ++ ++ if (device_get_child_node_count(dev) != 1) ++ return -EINVAL; ++ ++ priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); ++ if (!priv) ++ return -ENOMEM; ++ ++ priv->mcu = mcu; ++ priv->led_power_state = 1; ++ mutex_init(&priv->lock); ++ dev_set_drvdata(dev, priv); ++ ++ child = device_get_next_child_node(dev, NULL); ++ init_data.fwnode = child; ++ ++ priv->cdev.brightness_set_blocking = iei_wt61p803_puzzle_led_brightness_set_blocking; ++ priv->cdev.brightness_get = iei_wt61p803_puzzle_led_brightness_get; ++ priv->cdev.max_brightness = 1; ++ ++ ret = devm_led_classdev_register_ext(dev, &priv->cdev, &init_data); ++ if (ret) ++ dev_err(dev, "Could not register LED\n"); ++ ++ fwnode_handle_put(child); ++ return ret; ++} ++ ++static const struct of_device_id iei_wt61p803_puzzle_led_of_match[] = { ++ { .compatible = "iei,wt61p803-puzzle-leds" }, ++ { } ++}; ++MODULE_DEVICE_TABLE(of, iei_wt61p803_puzzle_led_of_match); ++ ++static struct platform_driver iei_wt61p803_puzzle_led_driver = { ++ .driver = { ++ .name = "iei-wt61p803-puzzle-led", ++ .of_match_table = iei_wt61p803_puzzle_led_of_match, ++ }, ++ .probe = iei_wt61p803_puzzle_led_probe, ++}; ++module_platform_driver(iei_wt61p803_puzzle_led_driver); ++ ++MODULE_DESCRIPTION("IEI WT61P803 PUZZLE front panel LED driver"); ++MODULE_AUTHOR("Luka Kovacic "); ++MODULE_LICENSE("GPL v2"); ++MODULE_ALIAS("platform:leds-iei-wt61p803-puzzle"); diff --git a/target/linux/mvebu/patches-5.10/905-Documentation-ABI-Add-iei-wt61p803-puzzle-driver-sys.patch b/target/linux/mvebu/patches-5.10/905-Documentation-ABI-Add-iei-wt61p803-puzzle-driver-sys.patch new file mode 100644 index 0000000000..b1d420ef0a --- /dev/null +++ b/target/linux/mvebu/patches-5.10/905-Documentation-ABI-Add-iei-wt61p803-puzzle-driver-sys.patch @@ -0,0 +1,82 @@ +From 2fab3b4956c5b2f83c1e1abffc1df39de2933d83 Mon Sep 17 00:00:00 2001 +From: Luka Kovacic +Date: Tue, 24 Aug 2021 12:44:36 +0000 +Subject: [PATCH 5/7] Documentation/ABI: Add iei-wt61p803-puzzle driver sysfs + interface documentation + +Add the iei-wt61p803-puzzle driver sysfs interface documentation to allow +monitoring and control of the microcontroller from user space. + +Signed-off-by: Luka Kovacic +Signed-off-by: Pavo Banicevic +Cc: Luka Perkov +Cc: Robert Marko +--- + .../testing/sysfs-driver-iei-wt61p803-puzzle | 61 +++++++++++++++++++ + 1 file changed, 61 insertions(+) + create mode 100644 Documentation/ABI/testing/sysfs-driver-iei-wt61p803-puzzle + +--- /dev/null ++++ b/Documentation/ABI/testing/sysfs-driver-iei-wt61p803-puzzle +@@ -0,0 +1,61 @@ ++What: /sys/bus/serial/devices/.../mac_address_* ++Date: September 2020 ++Contact: Luka Kovacic ++Description: (RW) Internal factory assigned MAC address values ++ ++What: /sys/bus/serial/devices/.../serial_number ++Date: September 2020 ++Contact: Luka Kovacic ++Description: (RW) Internal factory assigned serial number ++ ++What: /sys/bus/serial/devices/.../version ++Date: September 2020 ++Contact: Luka Kovacic ++Description: (RO) Internal MCU firmware version ++ ++What: /sys/bus/serial/devices/.../protocol_version ++Date: September 2020 ++Contact: Luka Kovacic ++Description: (RO) Internal MCU communication protocol version ++ ++What: /sys/bus/serial/devices/.../power_loss_recovery ++Date: September 2020 ++Contact: Luka Kovacic ++Description: (RW) Host platform power loss recovery settings ++ Value mapping: 0 - Always-On, 1 - Always-Off, 2 - Always-AC, 3 - Always-WA ++ ++What: /sys/bus/serial/devices/.../bootloader_mode ++Date: September 2020 ++Contact: Luka Kovacic ++Description: (RO) Internal MCU bootloader mode status ++ Value mapping: ++ 0 - normal mode ++ 1 - bootloader mode ++ ++What: /sys/bus/serial/devices/.../power_status ++Date: September 2020 ++Contact: Luka Kovacic ++Description: (RO) Power status indicates the host platform power on method. ++ Value mapping (bitwise list): ++ 0x80 - Null ++ 0x40 - Firmware flag ++ 0x20 - Power loss detection flag (powered off) ++ 0x10 - Power loss detection flag (AC mode) ++ 0x08 - Button power on ++ 0x04 - Wake-on-LAN power on ++ 0x02 - RTC alarm power on ++ 0x01 - AC recover power on ++ ++What: /sys/bus/serial/devices/.../build_info ++Date: September 2020 ++Contact: Luka Kovacic ++Description: (RO) Internal MCU firmware build date ++ Format: yyyy/mm/dd hh:mm ++ ++What: /sys/bus/serial/devices/.../ac_recovery_status ++Date: September 2020 ++Contact: Luka Kovacic ++Description: (RO) Host platform AC recovery status value ++ Value mapping: ++ 0 - board has not been recovered from power down ++ 1 - board has been recovered from power down diff --git a/target/linux/mvebu/patches-5.10/906-Documentation-hwmon-Add-iei-wt61p803-puzzle-hwmon-dr.patch b/target/linux/mvebu/patches-5.10/906-Documentation-hwmon-Add-iei-wt61p803-puzzle-hwmon-dr.patch new file mode 100644 index 0000000000..345d4ca03b --- /dev/null +++ b/target/linux/mvebu/patches-5.10/906-Documentation-hwmon-Add-iei-wt61p803-puzzle-hwmon-dr.patch @@ -0,0 +1,74 @@ +From 0aff3e5923fecc6842473ad07a688d6e2f2c2d55 Mon Sep 17 00:00:00 2001 +From: Luka Kovacic +Date: Tue, 24 Aug 2021 12:44:37 +0000 +Subject: [PATCH 6/7] Documentation/hwmon: Add iei-wt61p803-puzzle hwmon driver + documentation + +Add the iei-wt61p803-puzzle driver hwmon driver interface documentation. + +Signed-off-by: Luka Kovacic +Signed-off-by: Pavo Banicevic +Cc: Luka Perkov +Cc: Robert Marko +--- + .../hwmon/iei-wt61p803-puzzle-hwmon.rst | 43 +++++++++++++++++++ + Documentation/hwmon/index.rst | 1 + + 2 files changed, 44 insertions(+) + create mode 100644 Documentation/hwmon/iei-wt61p803-puzzle-hwmon.rst + +--- /dev/null ++++ b/Documentation/hwmon/iei-wt61p803-puzzle-hwmon.rst +@@ -0,0 +1,43 @@ ++.. SPDX-License-Identifier: GPL-2.0-only ++ ++Kernel driver iei-wt61p803-puzzle-hwmon ++======================================= ++ ++Supported chips: ++ * IEI WT61P803 PUZZLE for IEI Puzzle M801 ++ ++ Prefix: 'iei-wt61p803-puzzle-hwmon' ++ ++Author: Luka Kovacic ++ ++ ++Description ++----------- ++ ++This driver adds fan and temperature sensor reading for some IEI Puzzle ++series boards. ++ ++Sysfs attributes ++---------------- ++ ++The following attributes are supported: ++ ++- IEI WT61P803 PUZZLE for IEI Puzzle M801 ++ ++/sys files in hwmon subsystem ++----------------------------- ++ ++================= == ===================================================== ++fan[1-5]_input RO files for fan speed (in RPM) ++pwm[1-2] RW files for fan[1-2] target duty cycle (0..255) ++temp[1-2]_input RO files for temperature sensors, in millidegree Celsius ++================= == ===================================================== ++ ++/sys files in thermal subsystem ++------------------------------- ++ ++================= == ===================================================== ++cur_state RW file for current cooling state of the cooling device ++ (0..max_state) ++max_state RO file for maximum cooling state of the cooling device ++================= == ===================================================== +--- a/Documentation/hwmon/index.rst ++++ b/Documentation/hwmon/index.rst +@@ -71,6 +71,7 @@ Hardware Monitoring Kernel Drivers + ibmaem + ibm-cffps + ibmpowernv ++ iei-wt61p803-puzzle-hwmon + ina209 + ina2xx + ina3221 diff --git a/target/linux/mvebu/patches-5.10/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch b/target/linux/mvebu/patches-5.10/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch new file mode 100644 index 0000000000..577a9b40de --- /dev/null +++ b/target/linux/mvebu/patches-5.10/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch @@ -0,0 +1,41 @@ +From 12479baad28d2a08c6cb9e83471057635fa1635c Mon Sep 17 00:00:00 2001 +From: Luka Kovacic +Date: Tue, 24 Aug 2021 12:44:38 +0000 +Subject: [PATCH 7/7] MAINTAINERS: Add an entry for the IEI WT61P803 PUZZLE + driver + +Add an entry for the IEI WT61P803 PUZZLE driver (MFD, HWMON, LED drivers). + +Signed-off-by: Luka Kovacic +Signed-off-by: Pavo Banicevic +Cc: Luka Perkov +Cc: Robert Marko +--- + MAINTAINERS | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +--- a/MAINTAINERS ++++ b/MAINTAINERS +@@ -8538,6 +8538,22 @@ F: include/net/nl802154.h + F: net/ieee802154/ + F: net/mac802154/ + ++IEI WT61P803 M801 MFD DRIVER ++M: Luka Kovacic ++M: Luka Perkov ++M: Goran Medic ++L: linux-kernel@vger.kernel.org ++S: Maintained ++F: Documentation/ABI/stable/sysfs-driver-iei-wt61p803-puzzle ++F: Documentation/devicetree/bindings/hwmon/iei,wt61p803-puzzle-hwmon.yaml ++F: Documentation/devicetree/bindings/leds/iei,wt61p803-puzzle-leds.yaml ++F: Documentation/devicetree/bindings/mfd/iei,wt61p803-puzzle.yaml ++F: Documentation/hwmon/iei-wt61p803-puzzle-hwmon.rst ++F: drivers/hwmon/iei-wt61p803-puzzle-hwmon.c ++F: drivers/leds/leds-iei-wt61p803-puzzle.c ++F: drivers/mfd/iei-wt61p803-puzzle.c ++F: include/linux/mfd/iei-wt61p803-puzzle.h ++ + IFE PROTOCOL + M: Yotam Gigi + M: Jamal Hadi Salim diff --git a/target/linux/mvebu/patches-5.10/910-drivers-leds-wt61p803-puzzle-improvements.patch b/target/linux/mvebu/patches-5.10/910-drivers-leds-wt61p803-puzzle-improvements.patch new file mode 100644 index 0000000000..150a65498c --- /dev/null +++ b/target/linux/mvebu/patches-5.10/910-drivers-leds-wt61p803-puzzle-improvements.patch @@ -0,0 +1,271 @@ +--- a/drivers/leds/leds-iei-wt61p803-puzzle.c ++++ b/drivers/leds/leds-iei-wt61p803-puzzle.c +@@ -9,9 +9,13 @@ + #include + #include + #include ++#include + #include + #include + #include ++#include ++ ++#define IEI_LEDS_MAX 4 + + enum iei_wt61p803_puzzle_led_state { + IEI_LED_OFF = 0x30, +@@ -33,7 +37,11 @@ struct iei_wt61p803_puzzle_led { + struct iei_wt61p803_puzzle *mcu; + unsigned char response_buffer[IEI_WT61P803_PUZZLE_BUF_SIZE]; + struct mutex lock; /* mutex to protect led_power_state */ ++ struct work_struct work; + int led_power_state; ++ int id; ++ u8 blinking; ++ bool active_low; + }; + + static inline struct iei_wt61p803_puzzle_led *cdev_to_iei_wt61p803_puzzle_led +@@ -51,10 +59,18 @@ static int iei_wt61p803_puzzle_led_brigh + size_t reply_size; + int ret; + ++ if (priv->blinking) { ++ if (brightness == LED_OFF) ++ priv->blinking = 0; ++ else ++ return 0; ++ } ++ + led_power_cmd[0] = IEI_WT61P803_PUZZLE_CMD_HEADER_START; + led_power_cmd[1] = IEI_WT61P803_PUZZLE_CMD_LED; +- led_power_cmd[2] = IEI_WT61P803_PUZZLE_CMD_LED_POWER; +- led_power_cmd[3] = brightness == LED_OFF ? IEI_LED_OFF : IEI_LED_ON; ++ led_power_cmd[2] = IEI_WT61P803_PUZZLE_CMD_LED_SET(priv->id); ++ led_power_cmd[3] = ((brightness == LED_OFF) ^ priv->active_low) ? ++ IEI_LED_OFF : priv->blinking?priv->blinking:IEI_LED_ON; + + ret = iei_wt61p803_puzzle_write_command(priv->mcu, led_power_cmd, + sizeof(led_power_cmd), +@@ -90,39 +106,166 @@ static enum led_brightness iei_wt61p803_ + return led_state; + } + ++static void iei_wt61p803_puzzle_led_apply_blink(struct work_struct *work) ++{ ++ struct iei_wt61p803_puzzle_led *priv = container_of(work, struct iei_wt61p803_puzzle_led, work); ++ unsigned char led_blink_cmd[5] = {}; ++ unsigned char resp_buf[IEI_WT61P803_PUZZLE_BUF_SIZE]; ++ size_t reply_size; ++ ++ led_blink_cmd[0] = IEI_WT61P803_PUZZLE_CMD_HEADER_START; ++ led_blink_cmd[1] = IEI_WT61P803_PUZZLE_CMD_LED; ++ led_blink_cmd[2] = IEI_WT61P803_PUZZLE_CMD_LED_SET(priv->id); ++ led_blink_cmd[3] = priv->blinking; ++ ++ iei_wt61p803_puzzle_write_command(priv->mcu, led_blink_cmd, ++ sizeof(led_blink_cmd), ++ resp_buf, ++ &reply_size); ++ ++ return; ++} ++ ++static int iei_wt61p803_puzzle_led_set_blink(struct led_classdev *cdev, ++ unsigned long *delay_on, ++ unsigned long *delay_off) ++{ ++ struct iei_wt61p803_puzzle_led *priv = cdev_to_iei_wt61p803_puzzle_led(cdev); ++ u8 blink_mode = 0; ++ int ret = 0; ++ ++ /* set defaults */ ++ if (!*delay_on && !*delay_off) { ++ *delay_on = 500; ++ *delay_off = 500; ++ } ++ ++ /* minimum delay for soft-driven blinking is 100ms to keep load low */ ++ if (*delay_on < 100) ++ *delay_on = 100; ++ ++ if (*delay_off < 100) ++ *delay_off = 100; ++ ++ /* offload blinking to hardware, if possible */ ++ if (*delay_on != *delay_off) { ++ ret = -EINVAL; ++ } else if (*delay_on == 100) { ++ blink_mode = IEI_LED_BLINK_5HZ; ++ *delay_on = 100; ++ *delay_off = 100; ++ } else if (*delay_on <= 500) { ++ blink_mode = IEI_LED_BLINK_1HZ; ++ *delay_on = 500; ++ *delay_off = 500; ++ } else { ++ ret = -EINVAL; ++ } ++ ++ mutex_lock(&priv->lock); ++ priv->blinking = blink_mode; ++ mutex_unlock(&priv->lock); ++ ++ if (blink_mode) ++ schedule_work(&priv->work); ++ ++ return ret; ++} ++ ++ ++static int iei_wt61p803_puzzle_led_set_dt_default(struct led_classdev *cdev, ++ struct device_node *np) ++{ ++ const char *state; ++ int ret = 0; ++ ++ state = of_get_property(np, "default-state", NULL); ++ if (state) { ++ if (!strcmp(state, "on")) { ++ ret = ++ iei_wt61p803_puzzle_led_brightness_set_blocking( ++ cdev, cdev->max_brightness); ++ } else { ++ ret = iei_wt61p803_puzzle_led_brightness_set_blocking( ++ cdev, LED_OFF); ++ } ++ } ++ ++ return ret; ++} ++ + static int iei_wt61p803_puzzle_led_probe(struct platform_device *pdev) + { + struct device *dev = &pdev->dev; ++ struct device_node *np = dev_of_node(dev); ++ struct device_node *child; + struct iei_wt61p803_puzzle *mcu = dev_get_drvdata(dev->parent); + struct iei_wt61p803_puzzle_led *priv; +- struct led_init_data init_data = {}; +- struct fwnode_handle *child; + int ret; ++ u32 reg; + +- if (device_get_child_node_count(dev) != 1) ++ if (device_get_child_node_count(dev) > IEI_LEDS_MAX) + return -EINVAL; + +- priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); +- if (!priv) +- return -ENOMEM; +- +- priv->mcu = mcu; +- priv->led_power_state = 1; +- mutex_init(&priv->lock); +- dev_set_drvdata(dev, priv); +- +- child = device_get_next_child_node(dev, NULL); +- init_data.fwnode = child; +- +- priv->cdev.brightness_set_blocking = iei_wt61p803_puzzle_led_brightness_set_blocking; +- priv->cdev.brightness_get = iei_wt61p803_puzzle_led_brightness_get; +- priv->cdev.max_brightness = 1; ++ for_each_available_child_of_node(np, child) { ++ struct led_init_data init_data = {}; + +- ret = devm_led_classdev_register_ext(dev, &priv->cdev, &init_data); +- if (ret) +- dev_err(dev, "Could not register LED\n"); ++ ret = of_property_read_u32(child, "reg", ®); ++ if (ret) { ++ dev_err(dev, "Failed to read led 'reg' property\n"); ++ goto put_child_node; ++ } ++ ++ if (reg > IEI_LEDS_MAX) { ++ dev_err(dev, "Invalid led reg %u\n", reg); ++ ret = -EINVAL; ++ goto put_child_node; ++ } ++ ++ priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); ++ if (!priv) { ++ ret = -ENOMEM; ++ goto put_child_node; ++ } ++ ++ mutex_init(&priv->lock); ++ ++ dev_set_drvdata(dev, priv); ++ ++ if (of_property_read_bool(child, "active-low")) ++ priv->active_low = true; ++ ++ priv->mcu = mcu; ++ priv->id = reg; ++ priv->led_power_state = 1; ++ priv->blinking = 0; ++ init_data.fwnode = of_fwnode_handle(child); ++ ++ priv->cdev.brightness_set_blocking = iei_wt61p803_puzzle_led_brightness_set_blocking; ++ priv->cdev.brightness_get = iei_wt61p803_puzzle_led_brightness_get; ++ priv->cdev.blink_set = iei_wt61p803_puzzle_led_set_blink; ++ ++ priv->cdev.max_brightness = 1; ++ ++ INIT_WORK(&priv->work, iei_wt61p803_puzzle_led_apply_blink); ++ ++ ret = iei_wt61p803_puzzle_led_set_dt_default(&priv->cdev, child); ++ if (ret) { ++ dev_err(dev, "Could apply default from DT\n"); ++ goto put_child_node; ++ } ++ ++ ret = devm_led_classdev_register_ext(dev, &priv->cdev, &init_data); ++ if (ret) { ++ dev_err(dev, "Could not register LED\n"); ++ goto put_child_node; ++ } ++ } ++ ++ return ret; + +- fwnode_handle_put(child); ++put_child_node: ++ of_node_put(child); + return ret; + } + +--- a/include/linux/mfd/iei-wt61p803-puzzle.h ++++ b/include/linux/mfd/iei-wt61p803-puzzle.h +@@ -36,7 +36,7 @@ + #define IEI_WT61P803_PUZZLE_CMD_FUNCTION_OTHER_POWER_LOSS 0x41 /* A */ + + #define IEI_WT61P803_PUZZLE_CMD_LED 0x52 /* R */ +-#define IEI_WT61P803_PUZZLE_CMD_LED_POWER 0x31 /* 1 */ ++#define IEI_WT61P803_PUZZLE_CMD_LED_SET(n) (0x30 | (n)) + + #define IEI_WT61P803_PUZZLE_CMD_TEMP 0x54 /* T */ + #define IEI_WT61P803_PUZZLE_CMD_TEMP_ALL 0x41 /* A */ +--- a/drivers/mfd/iei-wt61p803-puzzle.c ++++ b/drivers/mfd/iei-wt61p803-puzzle.c +@@ -176,6 +176,9 @@ static int iei_wt61p803_puzzle_recv_buf( + struct iei_wt61p803_puzzle *mcu = serdev_device_get_drvdata(serdev); + int ret; + ++ print_hex_dump_debug("puzzle-mcu rx: ", DUMP_PREFIX_NONE, ++ 16, 1, data, size, false); ++ + ret = iei_wt61p803_puzzle_process_resp(mcu, data, size); + /* Return the number of processed bytes if function returns error, + * discard the remaining incoming data, since the frame this data +@@ -246,6 +249,9 @@ int iei_wt61p803_puzzle_write_command(st + + cmd[size - 1] = iei_wt61p803_puzzle_checksum(cmd, size - 1); + ++ print_hex_dump_debug("puzzle-mcu tx: ", DUMP_PREFIX_NONE, ++ 16, 1, cmd, size, false); ++ + /* Initialize reply struct */ + reinit_completion(&mcu->reply->received); + mcu->reply->size = 0; diff --git a/target/linux/mxs/config-5.10 b/target/linux/mxs/config-5.10 index 8bc075a916..0935454ba3 100644 --- a/target/linux/mxs/config-5.10 +++ b/target/linux/mxs/config-5.10 @@ -61,11 +61,7 @@ CONFIG_CRYPTO_CBC=y CONFIG_CRYPTO_CRC32C=y CONFIG_CRYPTO_DEV_MXS_DCP=y CONFIG_CRYPTO_ECB=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y CONFIG_CRYPTO_HW=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y CONFIG_CRYPTO_RNG2=y CONFIG_DEBUG_ALIGN_RODATA=y CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" @@ -140,7 +136,6 @@ CONFIG_IRQ_WORK=y # CONFIG_ISDN is not set CONFIG_JBD2=y CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y diff --git a/target/linux/octeon/config-5.10 b/target/linux/octeon/config-5.10 index 569388f016..4afeef7ad0 100644 --- a/target/linux/octeon/config-5.10 +++ b/target/linux/octeon/config-5.10 @@ -42,17 +42,10 @@ CONFIG_CPU_SUPPORTS_HIGHMEM=y CONFIG_CPU_SUPPORTS_HUGEPAGES=y CONFIG_CRAMFS=y CONFIG_CRC16=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y CONFIG_CRYPTO_CRC32=y CONFIG_CRYPTO_CRC32C=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2 -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y # CONFIG_CRYPTO_MD5_OCTEON is not set -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG2=y # CONFIG_CRYPTO_SHA1_OCTEON is not set # CONFIG_CRYPTO_SHA256_OCTEON is not set @@ -116,7 +109,6 @@ CONFIG_IRQ_FORCED_THREADING=y CONFIG_IRQ_WORK=y CONFIG_JBD2=y CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_MDIO_BUS=y CONFIG_MDIO_CAVIUM=y diff --git a/target/linux/octeontx/config-5.10 b/target/linux/octeontx/config-5.10 index 7954a336f7..18426a4496 100644 --- a/target/linux/octeontx/config-5.10 +++ b/target/linux/octeontx/config-5.10 @@ -109,12 +109,10 @@ CONFIG_CRYPTO_DRBG=y CONFIG_CRYPTO_DRBG_HMAC=y CONFIG_CRYPTO_DRBG_MENU=y CONFIG_CRYPTO_ECHAINIV=y -CONFIG_CRYPTO_GF128MUL=y CONFIG_CRYPTO_GHASH_ARM64_CE=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_JITTERENTROPY=y CONFIG_CRYPTO_LIB_SHA256=y -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_RNG_DEFAULT=y @@ -223,7 +221,6 @@ CONFIG_KEXEC=y CONFIG_KEXEC_CORE=y CONFIG_KSM=y CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOCK_SPIN_ON_OWNER=y CONFIG_LZO_COMPRESS=y diff --git a/target/linux/omap/config-5.10 b/target/linux/omap/config-5.10 index 900e47c0ab..10cd0b0159 100644 --- a/target/linux/omap/config-5.10 +++ b/target/linux/omap/config-5.10 @@ -144,7 +144,6 @@ CONFIG_CRYPTO_DRBG_HMAC=y CONFIG_CRYPTO_DRBG_MENU=y CONFIG_CRYPTO_ECB=y CONFIG_CRYPTO_ENGINE=y -CONFIG_CRYPTO_GF128MUL=y CONFIG_CRYPTO_HASH_INFO=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_HW=y @@ -153,7 +152,6 @@ CONFIG_CRYPTO_LIB_DES=y CONFIG_CRYPTO_LIB_SHA256=y CONFIG_CRYPTO_LZO=y CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_RNG_DEFAULT=y @@ -307,7 +305,6 @@ CONFIG_LEDS_TRIGGER_GPIO=y CONFIG_LEDS_TRIGGER_ONESHOT=y CONFIG_LIBCRC32C=y CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCKD=y CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOCK_SPIN_ON_OWNER=y diff --git a/target/linux/oxnas/patches-5.10/999-libata-hacks.patch b/target/linux/oxnas/patches-5.10/999-libata-hacks.patch index e34891cbb6..61c0c045a6 100644 --- a/target/linux/oxnas/patches-5.10/999-libata-hacks.patch +++ b/target/linux/oxnas/patches-5.10/999-libata-hacks.patch @@ -15,7 +15,7 @@ /* initialize internal qc */ qc = __ata_qc_from_tag(ap, ATA_TAG_INTERNAL); -@@ -4552,6 +4560,9 @@ struct ata_queued_cmd *ata_qc_new_init(s +@@ -4554,6 +4562,9 @@ struct ata_queued_cmd *ata_qc_new_init(s if (unlikely(ap->pflags & ATA_PFLAG_FROZEN)) return NULL; @@ -25,7 +25,7 @@ /* libsas case */ if (ap->flags & ATA_FLAG_SAS_HOST) { tag = ata_sas_allocate_tag(ap); -@@ -4597,6 +4608,8 @@ void ata_qc_free(struct ata_queued_cmd * +@@ -4599,6 +4610,8 @@ void ata_qc_free(struct ata_queued_cmd * qc->tag = ATA_TAG_POISON; if (ap->flags & ATA_FLAG_SAS_HOST) ata_sas_free_tag(tag, ap); diff --git a/target/linux/pistachio/config-5.10 b/target/linux/pistachio/config-5.10 index f3042b1d32..6417bd696f 100644 --- a/target/linux/pistachio/config-5.10 +++ b/target/linux/pistachio/config-5.10 @@ -43,13 +43,11 @@ CONFIG_CRC_CCITT=y CONFIG_CRYPTO_CBC=y CONFIG_CRYPTO_CRC32C=y CONFIG_CRYPTO_DEFLATE=y -CONFIG_CRYPTO_GF128MUL=y CONFIG_CRYPTO_HASH_INFO=y CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2 CONFIG_CRYPTO_LIB_SHA256=y CONFIG_CRYPTO_LZO=y CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_SHA1=y @@ -121,7 +119,6 @@ CONFIG_LEDS_GPIO=y CONFIG_LEDS_PWM=y CONFIG_LIBFDT=y CONFIG_LKDTM=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOG_BUF_SHIFT=18 CONFIG_LZO_COMPRESS=y diff --git a/target/linux/qoriq/Makefile b/target/linux/qoriq/Makefile new file mode 100644 index 0000000000..2dc08afd8c --- /dev/null +++ b/target/linux/qoriq/Makefile @@ -0,0 +1,22 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# Copyright (C) 2021 Stijn Tintel + +include $(TOPDIR)/rules.mk + +ARCH:=powerpc64 +BOARD:=qoriq +BOARDNAME:=NXP QorIQ (PowerPC) +CPU_TYPE:=e5500 +FEATURES:=boot-part ext4 fpu legacy-sdcard powerpc64 ramdisk root-part rtc source-only +SUBTARGETS:=generic + +KERNEL_PATCHVER:=5.10 + +KERNELNAME:=zImage + +include $(INCLUDE_DIR)/target.mk + +DEFAULT_PACKAGES += e2fsprogs mkf2fs uboot-envtools + +$(eval $(call BuildTarget)) diff --git a/target/linux/qoriq/base-files/etc/board.d/02_network b/target/linux/qoriq/base-files/etc/board.d/02_network new file mode 100644 index 0000000000..35b7ce9f32 --- /dev/null +++ b/target/linux/qoriq/base-files/etc/board.d/02_network @@ -0,0 +1,38 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +. /lib/functions/uci-defaults.sh +. /lib/functions.sh +. /lib/functions/system.sh + +board_config_update +board=$(board_name) + +wg_set_opt_interface() { + local device="$1" + local offset="$2" + + ucidef_set_interface "$device" device "$device" protocol static ipaddr "10.0.${offset}.1" netmask 255.255.255.0 +} + +case "$board" in +watchguard,firebox-m300) + ucidef_set_interfaces_lan_wan "eth1" "eth0" + wg_set_opt_interface "eth2" "2" + + sweth_mac_offset=0x186d + + for sweth in /sys/class/net/sweth*; do + device="$(basename "$sweth")" + mac="$(mtd_get_mac_text wg_cfg0 "$sweth_mac_offset")" + switchports="$switchports $device" + ucidef_set_network_device_mac "$device" "$mac" + wg_set_opt_interface "$device" "${device#sweth}" + sweth_mac_offset=$(printf "0x%X\n" $(( $sweth_mac_offset + 0x14))) + done + + ;; +esac + +board_config_flush + +exit 0 diff --git a/target/linux/qoriq/base-files/lib/preinit/79_move_config b/target/linux/qoriq/base-files/lib/preinit/79_move_config new file mode 100644 index 0000000000..54dd579660 --- /dev/null +++ b/target/linux/qoriq/base-files/lib/preinit/79_move_config @@ -0,0 +1,17 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +. /lib/functions.sh +. /lib/upgrade/common.sh + +move_config() { + local partdev + + if export_bootdevice && export_partdevice partdev 1; then + mkdir -p /boot + mount -o rw,noatime "/dev/$partdev" /boot + [ -f "/boot/$BACKUP_FILE" ] && mv -f "/boot/$BACKUP_FILE" / + umount /boot + fi +} + +boot_hook_add preinit_mount_root move_config diff --git a/target/linux/qoriq/base-files/lib/upgrade/platform.sh b/target/linux/qoriq/base-files/lib/upgrade/platform.sh new file mode 100755 index 0000000000..1392d5eb22 --- /dev/null +++ b/target/linux/qoriq/base-files/lib/upgrade/platform.sh @@ -0,0 +1,36 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +PART_NAME=firmware +REQUIRE_IMAGE_METADATA=1 + +platform_check_image() { + case "$(board_name)" in + watchguard,firebox-m300) + legacy_sdcard_check_image "$1" + ;; + *) + return 0 + ;; + esac +} + +platform_copy_config() { + case "$(board_name)" in + watchguard,firebox-m300) + legacy_sdcard_copy_config "$1" + ;; + *) + return 0 + esac +} + +platform_do_upgrade() { + case "$(board_name)" in + watchguard,firebox-m300) + legacy_sdcard_do_upgrade "$1" + ;; + *) + default_do_upgrade "$1" + ;; + esac +} diff --git a/target/linux/qoriq/config-5.10 b/target/linux/qoriq/config-5.10 new file mode 100644 index 0000000000..0a338ee9da --- /dev/null +++ b/target/linux/qoriq/config-5.10 @@ -0,0 +1,391 @@ +CONFIG_64BIT=y +CONFIG_ALTIVEC=y +CONFIG_ARCH_DMA_ADDR_T_64BIT=y +CONFIG_ARCH_HIBERNATION_POSSIBLE=y +CONFIG_ARCH_KEEP_MEMBLOCK=y +CONFIG_ARCH_MAY_HAVE_PC_FDC=y +CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y +CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y +CONFIG_ARCH_MMAP_RND_BITS=18 +CONFIG_ARCH_MMAP_RND_BITS_MAX=32 +CONFIG_ARCH_MMAP_RND_BITS_MIN=18 +CONFIG_ARCH_MMAP_RND_COMPAT_BITS=11 +CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=17 +CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11 +CONFIG_ARCH_SELECT_MEMORY_MODEL=y +CONFIG_ARCH_SPARSEMEM_ENABLE=y +CONFIG_ARCH_WEAK_RELEASE_ACQUIRE=y +CONFIG_ASN1=y +CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH=y +CONFIG_AUDIT_ARCH=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_SD=y +CONFIG_BLK_MQ_PCI=y +CONFIG_BLK_PM=y +CONFIG_BLK_SCSI_REQUEST=y +CONFIG_BLOCK_COMPAT=y +CONFIG_BOOKE=y +CONFIG_CLKDEV_LOOKUP=y +CONFIG_CLK_QORIQ=y +CONFIG_CLONE_BACKWARDS=y +CONFIG_CLZ_TAB=y +CONFIG_COMMON_CLK=y +CONFIG_COMPAT=y +# CONFIG_COMPAT_32BIT_TIME is not set +CONFIG_COMPAT_BINFMT_ELF=y +CONFIG_COMPAT_NETLINK_MESSAGES=y +CONFIG_COMPAT_OLD_SIGACTION=y +CONFIG_CONSOLE_TRANSLATIONS=y +CONFIG_CORENET_GENERIC=y +# CONFIG_CPUFREQ_DT is not set +CONFIG_CPU_BIG_ENDIAN=y +CONFIG_CPU_FREQ=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y +CONFIG_CPU_FREQ_GOV_ATTR_SET=y +CONFIG_CPU_FREQ_GOV_COMMON=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +# CONFIG_CPU_FREQ_STAT is not set +CONFIG_CPU_IDLE=y +CONFIG_CPU_IDLE_GOV_TEO=y +CONFIG_CPU_ISOLATION=y +CONFIG_CPU_RMAP=y +CONFIG_CRC16=y +CONFIG_CRYPTO_AUTHENC=y +CONFIG_CRYPTO_CRC32=y +CONFIG_CRYPTO_CRC32C=y +# CONFIG_CRYPTO_CRC32C_VPMSUM is not set +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_DEV_FSL_CAAM=y +CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API=y +CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API_DESC=y +CONFIG_CRYPTO_DEV_FSL_CAAM_COMMON=y +CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API=y +CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC=y +CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API_QI=y +# CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG is not set +# CONFIG_CRYPTO_DEV_FSL_CAAM_INTC is not set +CONFIG_CRYPTO_DEV_FSL_CAAM_JR=y +CONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API=y +CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9 +CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=y +# CONFIG_CRYPTO_DEV_NX is not set +CONFIG_CRYPTO_ECB=y +CONFIG_CRYPTO_ENGINE=y +CONFIG_CRYPTO_HW=y +CONFIG_CRYPTO_LIB_DES=y +CONFIG_CRYPTO_LIB_POLY1305_RSIZE=1 +# CONFIG_CRYPTO_MD5_PPC is not set +CONFIG_CRYPTO_RNG=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_RSA=y +# CONFIG_CRYPTO_SHA1_PPC is not set +CONFIG_CRYPTO_XTS=y +CONFIG_DATA_SHIFT=12 +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_DWARF4=y +CONFIG_DEFAULT_UIMAGE=y +CONFIG_DMADEVICES=y +CONFIG_DMA_ENGINE=y +CONFIG_DMA_OF=y +CONFIG_DMA_OPS=y +CONFIG_DMA_OPS_BYPASS=y +CONFIG_DTC=y +CONFIG_DUMMY_CONSOLE=y +CONFIG_DYNAMIC_DEBUG=y +CONFIG_E500=y +# CONFIG_E5500_CPU is not set +CONFIG_E6500_CPU=y +CONFIG_EARLY_PRINTK=y +CONFIG_EDAC=y +CONFIG_EDAC_ATOMIC_SCRUB=y +# CONFIG_EDAC_CPC925 is not set +# CONFIG_EDAC_DEBUG is not set +CONFIG_EDAC_LEGACY_SYSFS=y +CONFIG_EDAC_MPC85XX=y +CONFIG_EDAC_SUPPORT=y +CONFIG_EPAPR_PARAVIRT=y +CONFIG_EXT4_FS=y +CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_F2FS_FS=y +CONFIG_FIXED_PHY=y +CONFIG_FORCE_MAX_ZONEORDER=13 +# CONFIG_FSL_BMAN_TEST is not set +CONFIG_FSL_CORENET_CF=y +CONFIG_FSL_CORENET_RCPM=y +CONFIG_FSL_DMA=y +CONFIG_FSL_DPAA=y +# CONFIG_FSL_DPAA_CHECKING is not set +CONFIG_FSL_DPAA_ETH=y +CONFIG_FSL_EMB_PERFMON=y +CONFIG_FSL_FMAN=y +CONFIG_FSL_GUTS=y +CONFIG_FSL_IFC=y +CONFIG_FSL_LBC=y +CONFIG_FSL_MPIC_TIMER_WAKEUP=y +CONFIG_FSL_PAMU=y +CONFIG_FSL_PCI=y +# CONFIG_FSL_QMAN_TEST is not set +CONFIG_FSL_SOC=y +CONFIG_FSL_SOC_BOOKE=y +CONFIG_FSL_XGMAC_MDIO=y +CONFIG_FS_IOMAP=y +CONFIG_FS_MBCACHE=y +CONFIG_FS_POSIX_ACL=y +CONFIG_FTL=y +CONFIG_FUNCTION_ERROR_INJECTION=y +CONFIG_FW_LOADER_PAGED_BUF=y +CONFIG_GDB_SCRIPTS=y +CONFIG_GENERIC_ALLOCATOR=y +CONFIG_GENERIC_BUG=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y +CONFIG_GENERIC_CMOS_UPDATE=y +# CONFIG_GENERIC_CPU is not set +CONFIG_GENERIC_CPU_AUTOPROBE=y +CONFIG_GENERIC_CPU_VULNERABILITIES=y +CONFIG_GENERIC_EARLY_IOREMAP=y +CONFIG_GENERIC_IRQ_MIGRATION=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_GENERIC_IRQ_SHOW_LEVEL=y +CONFIG_GENERIC_ISA_DMA=y +CONFIG_GENERIC_MSI_IRQ=y +CONFIG_GENERIC_MSI_IRQ_DOMAIN=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_GENERIC_PHY=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_GENERIC_STRNCPY_FROM_USER=y +CONFIG_GENERIC_STRNLEN_USER=y +CONFIG_GENERIC_TIME_VSYSCALL=y +# CONFIG_GEN_RTC is not set +# CONFIG_GIANFAR is not set +CONFIG_GLOB=y +CONFIG_GPIOLIB=y +CONFIG_GPIO_GENERIC=y +CONFIG_GPIO_MPC8XXX=y +CONFIG_GRO_CELLS=y +# CONFIG_HANGCHECK_TIMER is not set +# CONFIG_HARDENED_USERCOPY is not set +CONFIG_HAS_DMA=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT_MAP=y +CONFIG_HWMON=y +CONFIG_HW_CONSOLE=y +CONFIG_HW_RANDOM=y +CONFIG_ILLEGAL_POINTER_VALUE=0x5deadbeef0000000 +CONFIG_INITRAMFS_SOURCE="" +CONFIG_INPUT=y +CONFIG_IOMMU_API=y +# CONFIG_IOMMU_DEBUGFS is not set +# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set +CONFIG_IOMMU_HELPER=y +CONFIG_IOMMU_SUPPORT=y +CONFIG_IRQCHIP=y +CONFIG_IRQ_DOMAIN=y +CONFIG_IRQ_DOMAIN_HIERARCHY=y +CONFIG_IRQ_FORCED_THREADING=y +CONFIG_IRQ_WORK=y +CONFIG_ISA_DMA_API=y +CONFIG_JBD2=y +CONFIG_JUMP_LABEL=y +CONFIG_JUMP_LABEL_FEATURE_CHECKS=y +# CONFIG_JUMP_LABEL_FEATURE_CHECK_DEBUG is not set +CONFIG_KALLSYMS=y +CONFIG_KERNEL_GZIP=y +CONFIG_KERNEL_START=0xc000000000000000 +CONFIG_KPROBES=y +CONFIG_KRETPROBES=y +# CONFIG_LD_HEAD_STUB_CATCH is not set +CONFIG_LIBFDT=y +CONFIG_LOCK_DEBUGGING_SUPPORT=y +CONFIG_LOCK_SPIN_ON_OWNER=y +CONFIG_MAGIC_SYSRQ=y +CONFIG_MATH_EMULATION=y +# CONFIG_MATH_EMULATION_FULL is not set +CONFIG_MATH_EMULATION_HW_UNIMPLEMENTED=y +CONFIG_MDIO_BUS=y +CONFIG_MDIO_DEVICE=y +CONFIG_MDIO_DEVRES=y +CONFIG_MEMFD_CREATE=y +CONFIG_MEMORY=y +CONFIG_MIGRATION=y +CONFIG_MMC=y +CONFIG_MMC_BLOCK=y +CONFIG_MMC_DEBUG=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_IO_ACCESSORS=y +CONFIG_MMC_SDHCI_OF_ESDHC=y +# CONFIG_MMC_SDHCI_PCI is not set +CONFIG_MMC_SDHCI_PLTFM=y +# CONFIG_MMC_WBSD is not set +CONFIG_MMIOWB=y +CONFIG_MMU_GATHER_PAGE_SIZE=y +CONFIG_MODULES_USE_ELF_RELA=y +CONFIG_MPIC=y +CONFIG_MPIC_MSGR=y +CONFIG_MPIC_TIMER=y +CONFIG_MPILIB=y +CONFIG_MTD_NAND_CORE=y +CONFIG_MTD_NAND_ECC=y +CONFIG_MTD_NAND_ECC_SW_HAMMING=y +CONFIG_MTD_NAND_FSL_IFC=y +CONFIG_MTD_PHYSMAP=y +CONFIG_MTD_RAW_NAND=y +CONFIG_MUTEX_SPIN_ON_OWNER=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y +CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y +CONFIG_NEED_SG_DMA_LENGTH=y +CONFIG_NET_DEVLINK=y +CONFIG_NET_DSA=y +CONFIG_NET_DSA_MV88E6XXX=y +CONFIG_NET_DSA_MV88E6XXX_GLOBAL2=y +CONFIG_NET_DSA_TAG_DSA=y +CONFIG_NET_DSA_TAG_EDSA=y +CONFIG_NET_DSA_TAG_OCELOT=y +CONFIG_NET_DSA_TAG_TRAILER=y +CONFIG_NET_FLOW_LIMIT=y +CONFIG_NET_SWITCHDEV=y +CONFIG_NLS=y +CONFIG_NO_HZ_COMMON=y +CONFIG_NO_HZ_IDLE=y +CONFIG_NR_CPUS=24 +CONFIG_NR_IRQS=512 +CONFIG_OF=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_DMA_DEFAULT_COHERENT=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_FLATTREE=y +CONFIG_OF_GPIO=y +CONFIG_OF_IOMMU=y +CONFIG_OF_IRQ=y +CONFIG_OF_KOBJ=y +CONFIG_OF_MDIO=y +CONFIG_OF_NET=y +CONFIG_OLD_SIGSUSPEND=y +CONFIG_OPTPROBES=y +CONFIG_PACKING=y +CONFIG_PADATA=y +CONFIG_PAGE_OFFSET=0xc000000000000000 +CONFIG_PCI=y +CONFIG_PCI_DOMAINS=y +CONFIG_PCI_MSI=y +CONFIG_PCI_MSI_ARCH_FALLBACKS=y +CONFIG_PCI_MSI_IRQ_DOMAIN=y +CONFIG_PGTABLE_LEVELS=4 +CONFIG_PHYLIB=y +CONFIG_PHYLINK=y +CONFIG_PHYSICAL_START=0x00000000 +CONFIG_PHYS_64BIT=y +CONFIG_PHYS_ADDR_T_64BIT=y +CONFIG_PM=y +# CONFIG_PMU_SYSFS is not set +CONFIG_PM_CLK=y +CONFIG_PPC=y +CONFIG_PPC64=y +CONFIG_PPC_ADV_DEBUG_DACS=2 +CONFIG_PPC_ADV_DEBUG_DVCS=0 +CONFIG_PPC_ADV_DEBUG_IACS=2 +CONFIG_PPC_ADV_DEBUG_REGS=y +CONFIG_PPC_BARRIER_NOSPEC=y +CONFIG_PPC_BOOK3E=y +CONFIG_PPC_BOOK3E_64=y +CONFIG_PPC_BOOK3E_MMU=y +# CONFIG_PPC_BOOK3S_64 is not set +CONFIG_PPC_DAWR=y +CONFIG_PPC_DOORBELL=y +CONFIG_PPC_E500MC=y +# CONFIG_PPC_EARLY_DEBUG is not set +CONFIG_PPC_EPAPR_HV_PIC=y +CONFIG_PPC_FPU=y +CONFIG_PPC_FSL_BOOK3E=y +CONFIG_PPC_INDIRECT_PCI=y +# CONFIG_PPC_IRQ_SOFT_MASK_DEBUG is not set +CONFIG_PPC_MMU_NOHASH=y +CONFIG_PPC_MSI_BITMAP=y +CONFIG_PPC_OF_BOOT_TRAMPOLINE=y +CONFIG_PPC_PAGE_SHIFT=12 +# CONFIG_PPC_PTDUMP is not set +# CONFIG_PPC_QEMU_E500 is not set +CONFIG_PPC_QUEUED_SPINLOCKS=y +CONFIG_PPC_SMP_MUXED_IPI=y +CONFIG_PPC_UDBG_16550=y +CONFIG_PPC_WERROR=y +CONFIG_PPS=y +CONFIG_PTE_64BIT=y +CONFIG_QORIQ_CPUFREQ=y +CONFIG_QORIQ_THERMAL=y +CONFIG_QUEUED_RWLOCKS=y +CONFIG_QUEUED_SPINLOCKS=y +CONFIG_RAS=y +CONFIG_RATIONAL=y +# CONFIG_RAVE_SP_CORE is not set +CONFIG_REGMAP=y +CONFIG_REGMAP_MMIO=y +CONFIG_RFS_ACCEL=y +CONFIG_RPS=y +CONFIG_RWSEM_SPIN_ON_OWNER=y +# CONFIG_SCOM_DEBUGFS is not set +CONFIG_SCSI=y +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_FSL=y +CONFIG_SERIAL_8250_NR_UARTS=4 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 +CONFIG_SERIAL_8250_SHARE_IRQ=y +CONFIG_SERIAL_DEV_BUS=y +CONFIG_SERIAL_DEV_CTRL_TTYPORT=y +CONFIG_SERIAL_FSL_LINFLEXUART=y +CONFIG_SERIAL_FSL_LINFLEXUART_CONSOLE=y +CONFIG_SERIAL_FSL_LPUART=y +CONFIG_SERIAL_FSL_LPUART_CONSOLE=y +CONFIG_SERIAL_MCTRL_GPIO=y +CONFIG_SG_POOL=y +CONFIG_SLUB_DEBUG=y +CONFIG_SMP=y +CONFIG_SOC_BUS=y +CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y +CONFIG_SPARSE_IRQ=y +CONFIG_SPI=y +CONFIG_SPI_FSL_ESPI=y +CONFIG_SPI_MASTER=y +CONFIG_SRCU=y +CONFIG_SWIOTLB=y +CONFIG_SWPHY=y +CONFIG_SYSCTL_EXCEPTION_TRACE=y +CONFIG_SYSVIPC_COMPAT=y +CONFIG_SYS_SUPPORTS_HUGETLBFS=y +CONFIG_TARGET_CPU_BOOL=y +CONFIG_THERMAL=y +CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y +CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0 +CONFIG_THERMAL_GOV_STEP_WISE=y +CONFIG_THERMAL_OF=y +CONFIG_THREAD_INFO_IN_TASK=y +CONFIG_THREAD_SHIFT=14 +CONFIG_TREE_RCU=y +CONFIG_TREE_SRCU=y +# CONFIG_UACCE is not set +# CONFIG_UCLAMP_TASK is not set +CONFIG_USB=y +CONFIG_USB_COMMON=y +CONFIG_USB_EHCI_FSL=y +CONFIG_USB_EHCI_HCD=y +# CONFIG_USB_EHCI_HCD_PLATFORM is not set +CONFIG_USB_STORAGE=y +CONFIG_USB_SUPPORT=y +CONFIG_USB_UAS=y +CONFIG_VDSO32=y +CONFIG_VGA_CONSOLE=y +CONFIG_VIRT_CPU_ACCOUNTING=y +CONFIG_VIRT_CPU_ACCOUNTING_NATIVE=y +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +# CONFIG_VT_HW_CONSOLE_BINDING is not set +# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set +CONFIG_XPS=y +CONFIG_ZLIB_DEFLATE=y diff --git a/target/linux/qoriq/files/arch/powerpc/boot/dts/fsl/watchguard-firebox-m300.dts b/target/linux/qoriq/files/arch/powerpc/boot/dts/fsl/watchguard-firebox-m300.dts new file mode 100644 index 0000000000..54f7e06bc5 --- /dev/null +++ b/target/linux/qoriq/files/arch/powerpc/boot/dts/fsl/watchguard-firebox-m300.dts @@ -0,0 +1,328 @@ +// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later +/* + * WatchGuard Firebox M300 Device Tree Source + * Based on t2081qds.dts from Linux 5.10 + * + * Copyright 2013 - 2015 Freescale Semiconductor Inc. + * Copyright 2020 - 2021 Stijn Tintel + */ + +/include/ "t208xsi-pre.dtsi" +/include/ "t208xqds.dtsi" + +/ { + model = "WatchGuard Firebox M300"; + compatible = "watchguard,firebox-m300", "fsl,T2081QDS"; + + interrupt-parent = <&mpic>; + + aliases { + /delete-property/ ethernet0; + /delete-property/ ethernet1; + /delete-property/ ethernet2; + /delete-property/ ethernet3; + /delete-property/ ethernet4; + /delete-property/ ethernet5; + /delete-property/ ethernet6; + /delete-property/ ethernet7; + + ethernet0 = &enet7; + ethernet1 = &enet0; + ethernet2 = &enet1; + ethernet3 = &enet2; + ethernet4 = &enet3; + }; +}; + +&soc { +// Include first to make this the first interface +/include/ "qoriq-fman3-0-10g-1.dtsi" +}; + +// mdio-mux under &boardctrl + its aliases removed. causes crash: +// Oops: Machine check, sig: 7 [#1] + +/include/ "t2081si-post.dtsi" + +// add stuff below the include to make sure we override whatever is there + +&enet0 { + phy-connection-type = "sgmii"; + phy-handle = <&phy1>; +}; + +&enet1 { + phy-connection-type = "sgmii"; + phy-handle = <&phy2>; +}; + +&enet2 { + phy-connection-type = "rgmii"; + + fixed-link { + speed = <1000>; + full-duplex; + }; +}; + +&enet3 { + phy-connection-type = "rgmii"; + + fixed-link { + speed = <1000>; + full-duplex; + }; +}; + +&enet4 { + status = "disabled"; +}; + +&enet5 { + status = "disabled"; +}; + +&enet6 { + status = "disabled"; +}; + +&enet7 { + phy-connection-type = "sgmii"; + phy-handle = <&phy0>; +}; + +&ifc { + ranges = <0x00 0x00 0x0f 0xefc00000 0x400000>; + + nor@0,0 { + reg = <0x00 0x00 0x400000>; + + partition@0{ + reg = <0x0 0x10000>; + label = "qoriq-rcw"; + read-only; + }; + + partition@10000 { + reg = <0x10000 0x20000>; + label = "wg_cfg0"; + read-only; + }; + + partition@30000 { + reg = <0x30000 0x10000>; + label = "wg_cfg1"; + read-only; + }; + + partition@40000 { + reg = <0x40000 0x10000>; + label = "wg_mfg_data"; + read-only; + }; + + partition@50000 { + reg = <0x50000 0xb0000>; + label = "wg_bootopt_data_and_reserved"; + read-only; + }; + + partition@100000 { + reg = <0x100000 0xb0000>; + label = "wg_extra_reserved_1"; + read-only; + }; + + partition@1B0000 { + reg = <0x1b0000 0xb0000>; + label = "wg_extra_reserved_2"; + read-only; + }; + + partition@260000 { + reg = <0x260000 0xc0000>; + label = "wg_u-boot_failsafe"; + read-only; + }; + + partition@320000 { + reg = <0x320000 0x10000>; + label = "qoriq-fman"; + read-only; + }; + + partition@330000 { + reg = <0x330000 0x10000>; + label = "u-boot-env"; + }; + + partition@340000 { + reg = <0x340000 0xc0000>; + label = "u-boot"; + read-only; + }; + }; + + nand@2,0 { + status = "disabled"; + }; +}; + +&mdio0 { + // m300 ethernet port 0 + phy0: ethernet-phy@0 { + reg = <0x00>; + }; + + // m300 ethernet port 1 + phy1: ethernet-phy@1 { + reg = <0x01>; + }; + + phy2: ethernet-phy@2 { + reg = <0x02>; + }; + + phy3: ethernet-phy@3 { + reg = <0x03>; + }; + + switch0: switch@10 { + compatible = "marvell,mv88e6085"; + reg = <0x10>; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + switch0phy0: switch0phy0@0 { + reg = <0x00>; + interrupt-parent = <&switch0>; + }; + + switch0phy1: switch0phy1@1 { + reg = <0x01>; + interrupt-parent = <&switch0>; + }; + + switch0phy2: switch0phy2@2 { + reg = <0x02>; + interrupt-parent = <&switch0>; + }; + + switch0phy3: switch0phy3@3 { + reg = <0x03>; + interrupt-parent = <&switch0>; + }; + + switch0phy4: switch0phy4@4 { + reg = <0x04>; + interrupt-parent = <&switch0>; + }; + }; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + label = "sweth3"; + phy-handle = <&switch0phy0>; + }; + + port@1 { + reg = <1>; + label = "sweth4"; + phy-handle = <&switch0phy1>; + }; + + port@2 { + reg = <2>; + label = "sweth5"; + phy-handle = <&switch0phy2>; + }; + + port@3 { + reg = <3>; + label = "sweth6"; + phy-handle = <&switch0phy3>; + }; + + port@4 { + reg = <4>; + label = "sweth7"; + phy-handle = <&switch0phy4>; + }; + + // OEM bootlog suggests multiple ports are attached to switch + // Keep this until OEM supplies GPL sources + port@5 { + status = "disabled"; + + reg = "<5>"; + label = "cpu"; + ethernet = <&enet2>; + phy-mode = "rgmii-id"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + + port@6 { + reg = <6>; + label = "cpu"; + ethernet = <&enet3>; + phy-mode = "rgmii-id"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; + }; +}; + +&soc { + i2c@118000 { + tpm@29 { + compatible = "tpm,tpm_i2c_atmel"; + reg = <0x29>; + }; + hwmon@2c { + compatible = "winbond,w83793"; + reg = <0x2c>; + }; + hwmon@2d { + compatible = "winbond,w83793"; + reg = <0x2d>; + }; + rtc@32 { + compatible = "ricoh,rs5c372a"; + reg = <0x32>; + }; + pca9547@77 { + status = "disabled"; + }; + }; + + spi@110000 { + // DTS decompiled from OEM DTB contains flash@0 but doesn't work + // spi-nor spi0.0: unrecognized JEDEC id bytes: ff ff ff ff ff ff + // disable for now + flash@0 { + status = "disabled"; + }; + + flash@1 { + status = "disabled"; + }; + + flash@2 { + status = "disabled"; + }; + }; +}; diff --git a/target/linux/qoriq/generic/target.mk b/target/linux/qoriq/generic/target.mk new file mode 100644 index 0000000000..b3bdb405f7 --- /dev/null +++ b/target/linux/qoriq/generic/target.mk @@ -0,0 +1,3 @@ +define Target/Description + Build firmware images for NXP QorIQ boards in the AMP series. +endef diff --git a/target/linux/qoriq/image/Makefile b/target/linux/qoriq/image/Makefile new file mode 100644 index 0000000000..a3c8dd38c2 --- /dev/null +++ b/target/linux/qoriq/image/Makefile @@ -0,0 +1,36 @@ +# SPDX-License-Identifier: GPL-2.0-only + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/image.mk + +SQUASHFSCOMP := xz $(LZMA_XZ_OPTIONS) + +define Build/sdcard-img + rm -fR $@.boot + mkdir -p $@.boot + $(CP) $(KDIR)/$(DEVICE_NAME)-kernel.bin $@.boot + $(if $(DEVICE_DTS),\ + $(foreach dtb,$(DEVICE_DTS),$(CP) $(KDIR)/image-$(dtb).dtb $@.boot), \ + $(CP) $(KDIR)/image-/*.dtb $@.boot) + + $(SCRIPT_DIR)/gen_image_generic.sh \ + $@ \ + $(CONFIG_TARGET_KERNEL_PARTSIZE) $@.boot \ + $(CONFIG_TARGET_ROOTFS_PARTSIZE) $(IMAGE_ROOTFS) \ + 2048 + + $(if $(UBOOT),dd if=$(STAGING_DIR_IMAGE)/$(UBOOT).img of=$@ bs=512 skip=1 seek=1 conv=notrunc) +endef + +define Device/Default + PROFILES := Default + DEVICE_DTS := $(subst _,-,$(1)) + KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts) + KERNEL_ENTRY := 0x00000000 + KERNEL_LOADADDR := 0x00000000 + KERNEL := kernel-bin +endef + +include $(SUBTARGET).mk + +$(eval $(call BuildImage)) diff --git a/target/linux/qoriq/image/generic.mk b/target/linux/qoriq/image/generic.mk new file mode 100644 index 0000000000..0d7f5e4c10 --- /dev/null +++ b/target/linux/qoriq/image/generic.mk @@ -0,0 +1,12 @@ +define Device/watchguard_firebox-m300 + DEVICE_VENDOR := WatchGuard + DEVICE_MODEL := Firebox M300 + DEVICE_DTS_DIR := $(DTS_DIR)/fsl + DEVICE_PACKAGES := \ + kmod-hwmon-w83793 kmod-ptp-qoriq kmod-rtc-rs5c372a kmod-tpm-i2c-atmel + KERNEL := kernel-bin | gzip | uImage gzip + IMAGES := sdcard.img.gz sysupgrade.img.gz + IMAGE/sysupgrade.img.gz := sdcard-img | gzip | append-metadata + IMAGE/sdcard.img.gz := sdcard-img | gzip +endef +TARGET_DEVICES += watchguard_firebox-m300 diff --git a/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts b/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts index 0e56d16a7f..afd54e816b 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts +++ b/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts @@ -90,6 +90,21 @@ nvmem-cells = <&macaddr_eeprom_6>; nvmem-cell-names = "mac-address"; + + /* This is a workaround. + * + * Ubiquiti uses a +2 offset in the first octet relative + * to the 2.4 GHz WMAC. Other octets are identical. + * + * The vendor firmware increases the last octet by 2 for each + * VAP. + * + * This is in conflict on how mac80211 addresses subsequent VAPs. + * mac80211 increases the first octet by two for each VAP, leading + * to conflicting MAC addresses for subsequent interfaces. + */ + mac-address-increment = <1>; + ieee80211-freq-limit = <5000000 6000000>; }; diff --git a/target/linux/ramips/mt7620/config-5.10 b/target/linux/ramips/mt7620/config-5.10 index c00313328a..04a7614604 100644 --- a/target/linux/ramips/mt7620/config-5.10 +++ b/target/linux/ramips/mt7620/config-5.10 @@ -83,7 +83,6 @@ CONFIG_IRQ_MIPS_CPU=y CONFIG_IRQ_WORK=y # CONFIG_KERNEL_ZSTD is not set CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_MARVELL_PHY=y CONFIG_MDIO_BUS=y diff --git a/target/linux/ramips/mt7621/config-5.10 b/target/linux/ramips/mt7621/config-5.10 index e85bca4c5e..5b02cdfe79 100644 --- a/target/linux/ramips/mt7621/config-5.10 +++ b/target/linux/ramips/mt7621/config-5.10 @@ -42,16 +42,10 @@ CONFIG_CPU_SUPPORTS_HIGHMEM=y CONFIG_CPU_SUPPORTS_MSA=y CONFIG_CRC16=y CONFIG_CRYPTO_ACOMP2=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y CONFIG_CRYPTO_DEFLATE=y -CONFIG_CRYPTO_HASH2=y CONFIG_CRYPTO_HASH_INFO=y CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2 CONFIG_CRYPTO_LZO=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG2=y CONFIG_CSRC_R4K=y CONFIG_DEBUG_PINCTRL=y @@ -114,7 +108,6 @@ CONFIG_IRQ_WORK=y # CONFIG_KERNEL_ZSTD is not set CONFIG_LED_TRIGGER_PHY=y CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LZO_COMPRESS=y CONFIG_LZO_DECOMPRESS=y diff --git a/target/linux/ramips/mt76x8/config-5.10 b/target/linux/ramips/mt76x8/config-5.10 index f20e9a96a1..5dc7d5ffb3 100644 --- a/target/linux/ramips/mt76x8/config-5.10 +++ b/target/linux/ramips/mt76x8/config-5.10 @@ -84,7 +84,6 @@ CONFIG_IRQ_MIPS_CPU=y CONFIG_IRQ_WORK=y # CONFIG_KERNEL_ZSTD is not set CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y diff --git a/target/linux/ramips/rt288x/config-5.10 b/target/linux/ramips/rt288x/config-5.10 index 03b38fcad4..077164e408 100644 --- a/target/linux/ramips/rt288x/config-5.10 +++ b/target/linux/ramips/rt288x/config-5.10 @@ -73,7 +73,6 @@ CONFIG_IRQ_MIPS_CPU=y CONFIG_IRQ_WORK=y # CONFIG_KERNEL_ZSTD is not set CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y diff --git a/target/linux/ramips/rt305x/config-5.10 b/target/linux/ramips/rt305x/config-5.10 index a67b525f82..b62c441988 100644 --- a/target/linux/ramips/rt305x/config-5.10 +++ b/target/linux/ramips/rt305x/config-5.10 @@ -75,7 +75,6 @@ CONFIG_IRQ_MIPS_CPU=y CONFIG_IRQ_WORK=y # CONFIG_KERNEL_ZSTD is not set CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y diff --git a/target/linux/ramips/rt3883/config-5.10 b/target/linux/ramips/rt3883/config-5.10 index f705fb351a..2791e77a31 100644 --- a/target/linux/ramips/rt3883/config-5.10 +++ b/target/linux/ramips/rt3883/config-5.10 @@ -75,7 +75,6 @@ CONFIG_IRQ_MIPS_CPU=y CONFIG_IRQ_WORK=y # CONFIG_KERNEL_ZSTD is not set CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y diff --git a/target/linux/realtek/config-5.10 b/target/linux/realtek/config-5.10 index f75cf92897..b3a16927d6 100644 --- a/target/linux/realtek/config-5.10 +++ b/target/linux/realtek/config-5.10 @@ -30,9 +30,7 @@ CONFIG_CPU_R4K_CACHE_TLB=y CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y CONFIG_CPU_SUPPORTS_HIGHMEM=y CONFIG_CPU_SUPPORTS_MSA=y -CONFIG_CRYPTO_GF128MUL=y CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2 -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG2=y CONFIG_CSRC_R4K=y CONFIG_DEBUG_INFO=y @@ -97,7 +95,6 @@ CONFIG_LEDS_GPIO=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_MARVELL_PHY=y CONFIG_MDIO_BUS=y diff --git a/target/linux/realtek/patches-5.10/008-5.17-watchdog-add-realtek-otto-watchdog-timer.patch b/target/linux/realtek/patches-5.10/008-5.17-watchdog-add-realtek-otto-watchdog-timer.patch index 9b06a3e318..cc5ee92466 100644 --- a/target/linux/realtek/patches-5.10/008-5.17-watchdog-add-realtek-otto-watchdog-timer.patch +++ b/target/linux/realtek/patches-5.10/008-5.17-watchdog-add-realtek-otto-watchdog-timer.patch @@ -32,7 +32,7 @@ Signed-off-by: Guenter Roeck --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -14815,6 +14815,13 @@ S: Maintained +@@ -14814,6 +14814,13 @@ S: Maintained F: include/sound/rt*.h F: sound/soc/codecs/rt* diff --git a/target/linux/rockchip/armv8/config-5.10 b/target/linux/rockchip/armv8/config-5.10 index 447efbd328..c7a8605e38 100644 --- a/target/linux/rockchip/armv8/config-5.10 +++ b/target/linux/rockchip/armv8/config-5.10 @@ -153,8 +153,6 @@ CONFIG_CRC16=y CONFIG_CRC32_SLICEBY8=y CONFIG_CRC_T10DIF=y CONFIG_CROSS_MEMORY_ATTACH=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y CONFIG_CRYPTO_CRC32=y CONFIG_CRYPTO_CRC32C=y CONFIG_CRYPTO_CRCT10DIF=y @@ -162,12 +160,6 @@ CONFIG_CRYPTO_CRCT10DIF=y CONFIG_CRYPTO_DRBG=y CONFIG_CRYPTO_DRBG_HMAC=y CONFIG_CRYPTO_DRBG_MENU=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_JITTERENTROPY=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_RNG_DEFAULT=y @@ -331,7 +323,6 @@ CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=16 CONFIG_LIBCRC32C=y CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCALVERSION_AUTO=y CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOCK_SPIN_ON_OWNER=y diff --git a/target/linux/sunxi/config-5.10 b/target/linux/sunxi/config-5.10 index 34563d3ad5..cf14c93bfe 100644 --- a/target/linux/sunxi/config-5.10 +++ b/target/linux/sunxi/config-5.10 @@ -115,11 +115,9 @@ CONFIG_CRYPTO_DEV_SUN4I_SS=y CONFIG_CRYPTO_DEV_SUN4I_SS_PRNG=y # CONFIG_CRYPTO_DEV_SUN8I_CE is not set # CONFIG_CRYPTO_DEV_SUN8I_SS is not set -CONFIG_CRYPTO_GF128MUL=y CONFIG_CRYPTO_HW=y CONFIG_CRYPTO_LIB_DES=y CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_SHA1=y @@ -265,7 +263,6 @@ CONFIG_LCD_CLASS_DEVICE=y CONFIG_LCD_PLATFORM=y CONFIG_LEDS_GPIO=y CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOCK_SPIN_ON_OWNER=y CONFIG_LOGO=y diff --git a/target/linux/tegra/config-5.10 b/target/linux/tegra/config-5.10 index 8b03db1809..bf47021143 100644 --- a/target/linux/tegra/config-5.10 +++ b/target/linux/tegra/config-5.10 @@ -106,8 +106,6 @@ CONFIG_CRC16=y CONFIG_CRC32_SLICEBY8=y CONFIG_CROSS_MEMORY_ATTACH=y CONFIG_CRYPTO_ACOMP2=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y CONFIG_CRYPTO_AES_ARM=y CONFIG_CRYPTO_AKCIPHER=y CONFIG_CRYPTO_AKCIPHER2=y @@ -119,18 +117,13 @@ CONFIG_CRYPTO_DRBG=y CONFIG_CRYPTO_DRBG_HMAC=y CONFIG_CRYPTO_DRBG_MENU=y CONFIG_CRYPTO_ECHAINIV=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_JITTERENTROPY=y CONFIG_CRYPTO_LIB_SHA256=y CONFIG_CRYPTO_LZ4=y CONFIG_CRYPTO_LZ4HC=y CONFIG_CRYPTO_LZO=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y CONFIG_CRYPTO_NULL=y -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_RNG_DEFAULT=y @@ -262,7 +255,6 @@ CONFIG_JBD2=y CONFIG_KCMP=y CONFIG_KEYBOARD_ATKBD=y CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOCK_SPIN_ON_OWNER=y CONFIG_LZ4HC_COMPRESS=y diff --git a/target/linux/uml/config-5.10 b/target/linux/uml/config-5.10 index 8d281958fb..f09b7d6dc2 100644 --- a/target/linux/uml/config-5.10 +++ b/target/linux/uml/config-5.10 @@ -21,9 +21,7 @@ CONFIG_CPU_SUP_ZHAOXIN=y CONFIG_CRC16=y CONFIG_CRYPTO_CRC32=y CONFIG_CRYPTO_CRC32C=y -CONFIG_CRYPTO_GF128MUL=y CONFIG_CRYPTO_LIB_POLY1305_RSIZE=11 -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_SHA1=y # CONFIG_CRYPTO_TWOFISH_X86_64 is not set @@ -56,7 +54,6 @@ CONFIG_JBD2=y # CONFIG_JFFS2_FS is not set CONFIG_KALLSYMS=y CONFIG_KERNEL_STACK_ORDER=2 -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y # CONFIG_MATOM is not set CONFIG_MAY_HAVE_RUNTIME_DEPS=y diff --git a/target/linux/x86/64/config-5.10 b/target/linux/x86/64/config-5.10 index a62e5a795a..5aac4aa7e2 100644 --- a/target/linux/x86/64/config-5.10 +++ b/target/linux/x86/64/config-5.10 @@ -64,8 +64,6 @@ CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y # CONFIG_CPU_IDLE_GOV_HALTPOLL is not set CONFIG_CPU_RMAP=y CONFIG_CRC_T10DIF=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y CONFIG_CRYPTO_AES_NI_INTEL=y # CONFIG_CRYPTO_BLOWFISH_X86_64 is not set # CONFIG_CRYPTO_CAMELLIA_AESNI_AVX2_X86_64 is not set @@ -78,15 +76,11 @@ CONFIG_CRYPTO_CRCT10DIF=y CONFIG_CRYPTO_CRYPTD=y # CONFIG_CRYPTO_DES3_EDE_X86_64 is not set CONFIG_CRYPTO_ECB=y -CONFIG_CRYPTO_GF128MUL=y CONFIG_CRYPTO_GLUE_HELPER_X86=y CONFIG_CRYPTO_LIB_POLY1305_RSIZE=11 CONFIG_CRYPTO_LRW=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y # CONFIG_CRYPTO_NHPOLY1305_AVX2 is not set # CONFIG_CRYPTO_NHPOLY1305_SSE2 is not set -CONFIG_CRYPTO_NULL2=y # CONFIG_CRYPTO_SERPENT_AVX2_X86_64 is not set # CONFIG_CRYPTO_SERPENT_AVX_X86_64 is not set # CONFIG_CRYPTO_SERPENT_SSE2_X86_64 is not set diff --git a/target/linux/x86/config-5.10 b/target/linux/x86/config-5.10 index 14a98e61c6..ed795910ee 100644 --- a/target/linux/x86/config-5.10 +++ b/target/linux/x86/config-5.10 @@ -67,8 +67,6 @@ CONFIG_CRC16=y CONFIG_CRYPTO_CRC32=y CONFIG_CRYPTO_CRC32C=y # CONFIG_CRYPTO_CRC32_PCLMUL is not set -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y CONFIG_CRYPTO_LIB_POLY1305_RSIZE=1 CONFIG_CRYPTO_RNG2=y # CONFIG_CRYPTO_SERPENT_SSE2_586 is not set @@ -195,7 +193,6 @@ CONFIG_KEXEC=y CONFIG_KEXEC_CORE=y CONFIG_KEYBOARD_ATKBD=y # CONFIG_LEDS_CLEVO_MAIL is not set -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y # CONFIG_M486 is not set # CONFIG_M486SX is not set diff --git a/target/linux/x86/generic/config-5.10 b/target/linux/x86/generic/config-5.10 index 5830f2a14c..2b57cffd0a 100644 --- a/target/linux/x86/generic/config-5.10 +++ b/target/linux/x86/generic/config-5.10 @@ -59,11 +59,6 @@ CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y # CONFIG_CPU_IDLE_GOV_HALTPOLL is not set CONFIG_CPU_IDLE_GOV_MENU=y CONFIG_CPU_RMAP=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -CONFIG_CRYPTO_NULL2=y # CONFIG_DEBUG_HOTPLUG_CPU0 is not set CONFIG_DMA_ACPI=y CONFIG_DMA_OPS=y diff --git a/target/linux/zynq/config-5.10 b/target/linux/zynq/config-5.10 index d30b4f8467..35b7f03a9b 100644 --- a/target/linux/zynq/config-5.10 +++ b/target/linux/zynq/config-5.10 @@ -119,9 +119,7 @@ CONFIG_CRC32_SLICEBY8=y CONFIG_CROSS_MEMORY_ATTACH=y CONFIG_CRYPTO_CRC32=y CONFIG_CRYPTO_CRC32C=y -CONFIG_CRYPTO_GF128MUL=y CONFIG_CRYPTO_HW=y -CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG2=y CONFIG_DCACHE_WORD_ACCESS=y CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" @@ -293,7 +291,6 @@ CONFIG_LEDS_TRIGGER_GPIO=y CONFIG_LEDS_TRIGGER_ONESHOT=y CONFIG_LEDS_TRIGGER_TRANSIENT=y CONFIG_LIBFDT=y -CONFIG_LLD_VERSION=0 CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOCK_SPIN_ON_OWNER=y CONFIG_MACB=y diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk index a195002888..bef4fa37f8 100644 --- a/toolchain/gcc/common.mk +++ b/toolchain/gcc/common.mk @@ -108,6 +108,7 @@ GCC_CONFIGURE:= \ $(if $(CONFIG_mips64)$(CONFIG_mips64el),--with-arch=mips64 \ --with-abi=$(call qstrip,$(CONFIG_MIPS64_ABI))) \ $(if $(CONFIG_arc),--with-cpu=$(CONFIG_CPU_TYPE)) \ + $(if $(CONFIG_powerpc64), $(if $(CONFIG_USE_MUSL),--with-abi=elfv2)) \ --with-gmp=$(TOPDIR)/staging_dir/host \ --with-mpfr=$(TOPDIR)/staging_dir/host \ --with-mpc=$(TOPDIR)/staging_dir/host \ diff --git a/toolchain/gcc/patches/11.2.0/001-Revert-Cleanup-range-of-address-calculations.patch b/toolchain/gcc/patches/11.2.0/001-Revert-Cleanup-range-of-address-calculations.patch deleted file mode 100644 index a97e061d6b..0000000000 --- a/toolchain/gcc/patches/11.2.0/001-Revert-Cleanup-range-of-address-calculations.patch +++ /dev/null @@ -1,160 +0,0 @@ -From: Felix Fietkau -Date: Tue, 16 Nov 2021 10:39:51 +0100 -Subject: [PATCH] Revert "Cleanup range of address calculations." - -This reverts commit 47923622c663ffad8b14aa93706183290d4f6791. -This commit is causing issues with offset of struct members. - -https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103255 ---- - delete mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr78655.c - ---- a/gcc/gimple-range.cc -+++ b/gcc/gimple-range.cc -@@ -431,9 +431,8 @@ gimple_ranger::range_of_range_op (irange - m_cache.register_dependency (lhs, op2); - } - -- if (gimple_code (s) == GIMPLE_ASSIGN -- && gimple_assign_rhs_code (s) == ADDR_EXPR) -- return range_of_address (r, s); -+ if (range_of_non_trivial_assignment (r, s)) -+ return true; - - if (range_of_expr (range1, op1, s)) - { -@@ -447,84 +446,48 @@ gimple_ranger::range_of_range_op (irange - return true; - } - --// Calculate the range of an assignment containing an ADDR_EXPR. -+// Calculate the range of a non-trivial assignment. That is, is one -+// inolving arithmetic on an SSA name (for example, an ADDR_EXPR). - // Return the range in R. --// If a range cannot be calculated, set it to VARYING and return true. -+// -+// If a range cannot be calculated, return false. - - bool --gimple_ranger::range_of_address (irange &r, gimple *stmt) -+gimple_ranger::range_of_non_trivial_assignment (irange &r, gimple *stmt) - { -- gcc_checking_assert (gimple_code (stmt) == GIMPLE_ASSIGN); -- gcc_checking_assert (gimple_assign_rhs_code (stmt) == ADDR_EXPR); -+ if (gimple_code (stmt) != GIMPLE_ASSIGN) -+ return false; - -- bool strict_overflow_p; -- tree expr = gimple_assign_rhs1 (stmt); -- poly_int64 bitsize, bitpos; -- tree offset; -- machine_mode mode; -- int unsignedp, reversep, volatilep; -- tree base = get_inner_reference (TREE_OPERAND (expr, 0), &bitsize, -- &bitpos, &offset, &mode, &unsignedp, -- &reversep, &volatilep); -- -- -- if (base != NULL_TREE -- && TREE_CODE (base) == MEM_REF -- && TREE_CODE (TREE_OPERAND (base, 0)) == SSA_NAME) -+ tree base = gimple_range_base_of_assignment (stmt); -+ if (base) - { -- tree ssa = TREE_OPERAND (base, 0); -- gcc_checking_assert (irange::supports_type_p (TREE_TYPE (ssa))); -- range_of_expr (r, ssa, stmt); -- range_cast (r, TREE_TYPE (gimple_assign_rhs1 (stmt))); -- -- poly_offset_int off = 0; -- bool off_cst = false; -- if (offset == NULL_TREE || TREE_CODE (offset) == INTEGER_CST) -+ if (TREE_CODE (base) == MEM_REF) - { -- off = mem_ref_offset (base); -- if (offset) -- off += poly_offset_int::from (wi::to_poly_wide (offset), -- SIGNED); -- off <<= LOG2_BITS_PER_UNIT; -- off += bitpos; -- off_cst = true; -+ if (TREE_CODE (TREE_OPERAND (base, 0)) == SSA_NAME) -+ { -+ int_range_max range1; -+ tree ssa = TREE_OPERAND (base, 0); -+ if (range_of_expr (range1, ssa, stmt)) -+ { -+ tree type = TREE_TYPE (ssa); -+ range_operator *op = range_op_handler (POINTER_PLUS_EXPR, -+ type); -+ int_range<2> offset (TREE_OPERAND (base, 1), -+ TREE_OPERAND (base, 1)); -+ op->fold_range (r, type, range1, offset); -+ return true; -+ } -+ } -+ return false; - } -- /* If &X->a is equal to X, the range of X is the result. */ -- if (off_cst && known_eq (off, 0)) -- return true; -- else if (flag_delete_null_pointer_checks -- && !TYPE_OVERFLOW_WRAPS (TREE_TYPE (expr))) -- { -- /* For -fdelete-null-pointer-checks -fno-wrapv-pointer we don't -- allow going from non-NULL pointer to NULL. */ -- if(!range_includes_zero_p (&r)) -- return true; -- } -- /* If MEM_REF has a "positive" offset, consider it non-NULL -- always, for -fdelete-null-pointer-checks also "negative" -- ones. Punt for unknown offsets (e.g. variable ones). */ -- if (!TYPE_OVERFLOW_WRAPS (TREE_TYPE (expr)) -- && off_cst -- && known_ne (off, 0) -- && (flag_delete_null_pointer_checks || known_gt (off, 0))) -+ if (gimple_assign_rhs_code (stmt) == ADDR_EXPR) - { -+ // Handle "= &a" and return non-zero. - r = range_nonzero (TREE_TYPE (gimple_assign_rhs1 (stmt))); - return true; - } -- r = int_range<2> (TREE_TYPE (gimple_assign_rhs1 (stmt))); -- return true; -- } -- -- // Handle "= &a". -- if (tree_single_nonzero_warnv_p (expr, &strict_overflow_p)) -- { -- r = range_nonzero (TREE_TYPE (gimple_assign_rhs1 (stmt))); -- return true; - } -- -- // Otherwise return varying. -- r = int_range<2> (TREE_TYPE (gimple_assign_rhs1 (stmt))); -- return true; -+ return false; - } - - // Calculate a range for phi statement S and return it in R. ---- a/gcc/gimple-range.h -+++ b/gcc/gimple-range.h -@@ -62,7 +62,7 @@ protected: - ranger_cache m_cache; - private: - bool range_of_phi (irange &r, gphi *phi); -- bool range_of_address (irange &r, gimple *s); -+ bool range_of_non_trivial_assignment (irange &r, gimple *s); - bool range_of_builtin_call (irange &r, gcall *call); - bool range_with_loop_info (irange &r, tree name); - void range_of_ssa_name_with_loop_info (irange &, tree, class loop *, ---- a/gcc/range-op.cc -+++ b/gcc/range-op.cc -@@ -3447,7 +3447,6 @@ pointer_table::pointer_table () - set (GT_EXPR, op_gt); - set (GE_EXPR, op_ge); - set (SSA_NAME, op_identity); -- set (INTEGER_CST, op_integer_cst); - set (ADDR_EXPR, op_addr); - set (NOP_EXPR, op_convert); - set (CONVERT_EXPR, op_convert); diff --git a/toolchain/gcc/patches/11.2.0/001-v11.3.0-ranger-Fix-up-fold_using_range-range_of_address-PR10.patch b/toolchain/gcc/patches/11.2.0/001-v11.3.0-ranger-Fix-up-fold_using_range-range_of_address-PR10.patch new file mode 100644 index 0000000000..71bbfe5a1d --- /dev/null +++ b/toolchain/gcc/patches/11.2.0/001-v11.3.0-ranger-Fix-up-fold_using_range-range_of_address-PR10.patch @@ -0,0 +1,114 @@ +From a6219e8e0719b14f474b0dcaa7bde2f4e57474f9 Mon Sep 17 00:00:00 2001 +From: Jakub Jelinek +Date: Wed, 17 Nov 2021 13:45:53 +0100 +Subject: [PATCH] ranger: Fix up fold_using_range::range_of_address [PR103255] + +If on &base->member the offset isn't constant or isn't zero and +-fdelete-null-pointer-checks and not -fwrapv-pointer and base has a range +that doesn't include NULL, we return the range of the base. +Usually it isn't a big deal, because for most pointers we just use +varying, range_zero and range_nonzero ranges and nothing beyond that, +but if a pointer is initialized from a constant, we actually track the +exact range and in that case this causes miscompilation. +As discussed on IRC, I think doing something like: + offset_int off2; + if (off_cst && off.is_constant (&off2)) + { + tree cst = wide_int_to_tree (sizetype, off2 / BITS_PER_UNIT); + // adjust range r with POINTER_PLUS_EXPR cst + if (!range_includes_zero_p (&r)) + return true; + } + // Fallback + r = range_nonzero (TREE_TYPE (gimple_assign_rhs1 (stmt))); + return true; +could work, given that most of the pointer ranges are just the simple ones +perhaps it is too much for little benefit. + +2021-11-17 Jakub Jelinek + + PR tree-optimization/103255 + * gimple-range.cc (fold_using_range::range_of_address): Return + range_nonzero rather than unadjusted base's range. Formatting fixes. + + * gcc.c-torture/execute/pr103255.c: New test. + +(cherry picked from commit c39cb6bf835ca12e590eaa6f90222e51be207c50) +--- + gcc/gimple-range.cc | 16 +++++--- + .../gcc.c-torture/execute/pr103255.c | 41 +++++++++++++++++++ + 2 files changed, 52 insertions(+), 5 deletions(-) + create mode 100644 gcc/testsuite/gcc.c-torture/execute/pr103255.c + +--- a/gcc/gimple-range.cc ++++ b/gcc/gimple-range.cc +@@ -491,14 +491,20 @@ gimple_ranger::range_of_address (irange + } + /* If &X->a is equal to X, the range of X is the result. */ + if (off_cst && known_eq (off, 0)) +- return true; ++ return true; + else if (flag_delete_null_pointer_checks + && !TYPE_OVERFLOW_WRAPS (TREE_TYPE (expr))) + { +- /* For -fdelete-null-pointer-checks -fno-wrapv-pointer we don't +- allow going from non-NULL pointer to NULL. */ +- if(!range_includes_zero_p (&r)) +- return true; ++ /* For -fdelete-null-pointer-checks -fno-wrapv-pointer we don't ++ allow going from non-NULL pointer to NULL. */ ++ if (!range_includes_zero_p (&r)) ++ { ++ /* We could here instead adjust r by off >> LOG2_BITS_PER_UNIT ++ using POINTER_PLUS_EXPR if off_cst and just fall back to ++ this. */ ++ r = range_nonzero (TREE_TYPE (gimple_assign_rhs1 (stmt))); ++ return true; ++ } + } + /* If MEM_REF has a "positive" offset, consider it non-NULL + always, for -fdelete-null-pointer-checks also "negative" +--- /dev/null ++++ b/gcc/testsuite/gcc.c-torture/execute/pr103255.c +@@ -0,0 +1,41 @@ ++/* PR tree-optimization/103255 */ ++ ++struct H ++{ ++ unsigned a; ++ unsigned b; ++ unsigned c; ++}; ++ ++#if __SIZEOF_POINTER__ >= 4 ++#define ADDR 0x400000 ++#else ++#define ADDR 0x4000 ++#endif ++#define OFF 0x20 ++ ++int ++main () ++{ ++ struct H *h = 0; ++ unsigned long o; ++ volatile int t = 1; ++ ++ for (o = OFF; o <= OFF; o += 0x1000) ++ { ++ struct H *u; ++ u = (struct H *) (ADDR + o); ++ if (t) ++ { ++ h = u; ++ break; ++ } ++ } ++ ++ if (h == 0) ++ return 0; ++ unsigned *tt = &h->b; ++ if ((__SIZE_TYPE__) tt != (ADDR + OFF + __builtin_offsetof (struct H, b))) ++ __builtin_abort (); ++ return 0; ++} diff --git a/toolchain/gcc/patches/11.2.0/011-v12-configure-define-TARGET_LIBC_GNUSTACK-on-musl.patch b/toolchain/gcc/patches/11.2.0/011-v12-configure-define-TARGET_LIBC_GNUSTACK-on-musl.patch new file mode 100644 index 0000000000..94105bdf9f --- /dev/null +++ b/toolchain/gcc/patches/11.2.0/011-v12-configure-define-TARGET_LIBC_GNUSTACK-on-musl.patch @@ -0,0 +1,46 @@ +From ea650cae26da4a8fc04f0c4666f4dd776d0b5fc0 Mon Sep 17 00:00:00 2001 +From: Ilya Lipnitskiy +Date: Sun, 14 Nov 2021 21:54:25 -0800 +Subject: [PATCH] configure: define TARGET_LIBC_GNUSTACK on musl + +musl only uses PT_GNU_STACK to set default thread stack size and has no +executable stack support[0], so there is no reason not to emit the +.note.GNU-stack section on musl builds. + +[0]: https://lore.kernel.org/all/20190423192534.GN23599@brightrain.aerifal.cx/T/#u + +gcc/ChangeLog: + + * configure: Regenerate. + * configure.ac: define TARGET_LIBC_GNUSTACK on musl + +Signed-off-by: Ilya Lipnitskiy +--- + gcc/configure | 3 +++ + gcc/configure.ac | 3 +++ + 2 files changed, 6 insertions(+) + +--- a/gcc/configure ++++ b/gcc/configure +@@ -30954,6 +30954,9 @@ fi + # Check if the target LIBC handles PT_GNU_STACK. + gcc_cv_libc_gnustack=unknown + case "$target" in ++ mips*-*-linux-musl*) ++ gcc_cv_libc_gnustack=yes ++ ;; + mips*-*-linux*) + + if test $glibc_version_major -gt 2 \ +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -6788,6 +6788,9 @@ fi + # Check if the target LIBC handles PT_GNU_STACK. + gcc_cv_libc_gnustack=unknown + case "$target" in ++ mips*-*-linux-musl*) ++ gcc_cv_libc_gnustack=yes ++ ;; + mips*-*-linux*) + GCC_GLIBC_VERSION_GTE_IFELSE([2], [31], [gcc_cv_libc_gnustack=yes], ) + ;; diff --git a/toolchain/gcc/patches/11.2.0/930-fix-mips-noexecstack.patch b/toolchain/gcc/patches/11.2.0/930-fix-mips-noexecstack.patch deleted file mode 100644 index 591dfe5a50..0000000000 --- a/toolchain/gcc/patches/11.2.0/930-fix-mips-noexecstack.patch +++ /dev/null @@ -1,111 +0,0 @@ -From da45b3fde60095756f5f6030f6012c23a3d34429 Mon Sep 17 00:00:00 2001 -From: Andrew McDonnell -Date: Fri, 3 Oct 2014 19:09:00 +0930 -Subject: Add .note.GNU-stack section - -See http://lists.busybox.net/pipermail/uclibc/2014-October/048671.html -Below copied from https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02430.html - -Re: [Patch, MIPS] Add .note.GNU-stack section - - From: Steve Ellcey - -On Wed, 2014-09-10 at 10:15 -0700, Eric Christopher wrote: -> -> -> On Wed, Sep 10, 2014 at 9:27 AM, wrote: - -> This works except you did not update the assembly files in -> libgcc or glibc. We (Cavium) have the same patch in our tree -> for a few released versions. - -> Mind just checking yours in then Andrew? - -> Thanks! -> -eric - -I talked to Andrew about what files he changed in GCC and created and -tested this new patch. Andrew also mentioned changing some assembly -files in glibc but I don't see any use of '.section .note.GNU-stack' in -any assembly files in glibc (for any platform) so I wasn't planning on -creating a glibc to add them to mips glibc assembly language files. - -OK to check in this patch? - -Steve Ellcey -sellcey@mips.com - - - -2014-09-26 Steve Ellcey ---- - gcc/config/mips/mips.c | 3 +++ - libgcc/config/mips/crti.S | 4 ++++ - libgcc/config/mips/crtn.S | 3 +++ - libgcc/config/mips/mips16.S | 4 ++++ - libgcc/config/mips/vr4120-div.S | 4 ++++ - 5 files changed, 18 insertions(+) - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -22890,6 +22890,9 @@ mips_asm_file_end (void) - #define TARGET_ASM_FILE_END mips_asm_file_end - - -+#undef TARGET_ASM_FILE_END -+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack -+ - struct gcc_target targetm = TARGET_INITIALIZER; - - #include "gt-mips.h" ---- a/libgcc/config/mips/crti.S -+++ b/libgcc/config/mips/crti.S -@@ -24,6 +24,10 @@ see the files COPYING3 and COPYING.RUNTI - /* An executable stack is *not* required for these functions. */ - #include "gnustack.h" - -+ -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/crtn.S -+++ b/libgcc/config/mips/crtn.S -@@ -24,6 +24,9 @@ see the files COPYING3 and COPYING.RUNTI - /* An executable stack is *not* required for these functions. */ - #include "gnustack.h" - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/mips16.S -+++ b/libgcc/config/mips/mips16.S -@@ -51,6 +51,10 @@ see the files COPYING3 and COPYING.RUNTI - values using the soft-float calling convention, but do the actual - operation using the hard floating point instructions. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - #if defined _MIPS_SIM && (_MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIO64) - - /* This file contains 32-bit assembly code. */ ---- a/libgcc/config/mips/vr4120-div.S -+++ b/libgcc/config/mips/vr4120-div.S -@@ -29,6 +29,10 @@ see the files COPYING3 and COPYING.RUNTI - -mfix-vr4120. div and ddiv do not give the correct result when one - of the operands is negative. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - .set nomips16 - - #define DIV \ diff --git a/toolchain/gcc/patches/11.2.0/970-macos_arm64-building-fix.patch b/toolchain/gcc/patches/11.2.0/970-macos_arm64-building-fix.patch index 6572b8e559..424899eb9c 100644 --- a/toolchain/gcc/patches/11.2.0/970-macos_arm64-building-fix.patch +++ b/toolchain/gcc/patches/11.2.0/970-macos_arm64-building-fix.patch @@ -15,11 +15,9 @@ Date: Mon Aug 16 13:16:21 2021 +0100 Reviewed-by: John Scipione Reviewed-by: Adrien Destugues -diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h -index 976f9afae5..736b83ff0b 100644 --- a/gcc/config/aarch64/aarch64.h +++ b/gcc/config/aarch64/aarch64.h -@@ -1000,7 +1000,7 @@ extern const char *aarch64_rewrite_mcpu (int argc, const char **argv); +@@ -1236,7 +1236,7 @@ extern const char *aarch64_rewrite_mcpu #define MCPU_TO_MARCH_SPEC_FUNCTIONS \ { "rewrite_mcpu", aarch64_rewrite_mcpu }, @@ -28,8 +26,6 @@ index 976f9afae5..736b83ff0b 100644 extern const char *host_detect_local_cpu (int argc, const char **argv); #define HAVE_LOCAL_CPU_DETECT # define EXTRA_SPEC_FUNCTIONS \ -diff --git a/gcc/config/host-darwin.c b/gcc/config/host-darwin.c -index 8f700eec85..b737abc006 100644 --- a/gcc/config/host-darwin.c +++ b/gcc/config/host-darwin.c @@ -22,6 +22,8 @@ @@ -40,8 +36,8 @@ index 8f700eec85..b737abc006 100644 +#include "hosthooks-def.h" /* Yes, this is really supposed to work. */ - static char pch_address_space[1024*1024*1024] __attribute__((aligned (4096))); -@@ -75,3 +77,5 @@ darwin_gt_pch_use_address (void *addr, size_t sz, int fd, size_t off) + /* This allows for a pagesize of 16384, which we have on Darwin20, but should +@@ -79,3 +81,5 @@ darwin_gt_pch_use_address (void *addr, s return ret; }