Merge Official Source

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2022-05-17 15:21:29 +08:00
commit 4a7066f666
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
156 changed files with 1191 additions and 2329 deletions

View File

@ -137,14 +137,6 @@ define Image/BuildKernel/MkuImage
-n '$(call toupper,$(ARCH)) $(VERSION_DIST) Linux-$(LINUX_VERSION)' -d $(4) $(5)
endef
define Image/BuildKernel/MkFIT
$(TOPDIR)/scripts/mkits.sh \
-D $(1) -o $(KDIR)/fit-$(1).its -k $(2) $(if $(3),-d $(3)) -C $(4) -a $(5) -e $(6) \
-c $(if $(DEVICE_DTS_CONFIG),$(DEVICE_DTS_CONFIG),"config-1") \
-A $(LINUX_KARCH) -v $(LINUX_VERSION)
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $(KDIR)/fit-$(1).its $(KDIR)/fit-$(1)$(7).itb
endef
ifdef CONFIG_TARGET_IMAGES_GZIP
define Image/Gzip
rm -f $(1).gz

View File

@ -1,2 +1,2 @@
LINUX_VERSION-5.10 = .113
LINUX_KERNEL_HASH-5.10.113 = 82516a02bb52456f6e8057217dde6e02b78003b1e058117557c2ae9661696dfc
LINUX_VERSION-5.10 = .115
LINUX_KERNEL_HASH-5.10.115 = f5e417b32f89318b6d0a230109a592ffd68997817463dc4692fa49ec7fe42f71

View File

@ -1,2 +1,2 @@
LINUX_VERSION-5.15 = .38
LINUX_KERNEL_HASH-5.15.38 = 7e415d420990b88bfec038d56e920b9b28f99d54f31dbbd7aa82e66acca11052
LINUX_VERSION-5.15 = .40
LINUX_KERNEL_HASH-5.15.40 = c787f7eecbabbfca4dd3224827292a5fb98e3370c6e04b859714fba25bb8c33b

View File

@ -10,9 +10,9 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_SOURCE_URL:=https://github.com/chunkeey/FritzBox-4040-UBOOT
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=f92be9d783b1210c020d5d6129e210a94bb7e290
PKG_SOURCE_DATE:=2019-10-19
PKG_MIRROR_HASH:=e40a7f624b1758b276f81c765ef1da568c595b8bd54568b9cceca7d170ebc612
PKG_SOURCE_VERSION:=9d89013f9cc963eca25856c61fa066091d35f8de
PKG_SOURCE_DATE:=2022-05-01
PKG_MIRROR_HASH:=4f2a3782ba359e6d901b536d1d685026913c14426f8e58ba9673281f20675050
PKG_RELEASE:=$(AUTORELEASE)

View File

@ -25,40 +25,21 @@ endef
# <https://wireless.wiki.kernel.org/en/users/drivers/ath10k/boardfiles>
ALLWIFIBOARDS:= \
8dev_habanero-dvk \
aruba_ap-303 \
asus_rt-ac42u \
avm_fritzrepeater-1200 \
buffalo_wtr-m2133hp \
cellc_rtl30vw \
devolo_magic-2-wifi-next \
dlink_dap2610 \
edgecore_ecw5410 \
edgecore_oap100 \
engenius_eap2200 \
engenius_emd1 \
engenius_emr3500 \
ezviz_cs-w3-wd1200g-eup \
glinet_gl-ap1300 \
glinet_gl-b2200 \
glinet_gl-s1300 \
google_wifi \
linksys_ea8300 \
linksys_mr8300-v0 \
luma_wrtq-329acn \
mikrotik_cap-ac \
mikrotik_hap-ac2 \
mikrotik_hap-ac3 \
mikrotik_sxtsq-5-ac \
mobipromo_cm520-79f \
nec_wg2600hp3 \
p2w_r619ac \
plasmacloud_pa1200 \
plasmacloud_pa2200 \
qxwlan_e2600ac-c1 \
qxwlan_e2600ac-c2 \
teltonika_rutx \
zte_mf286d
teltonika_rutx
ALLWIFIPACKAGES:=$(foreach BOARD,$(ALLWIFIBOARDS),ipq-wifi-$(BOARD))
@ -119,39 +100,20 @@ endef
# Place files in this directory as board-<devicename>.<qca4019|qca9888|qca9984>
# Add $(eval $(call generate-ipq-wifi-package,<devicename>,<display name>))
$(eval $(call generate-ipq-wifi-package,8dev_habanero-dvk,8devices Habanero DVK))
$(eval $(call generate-ipq-wifi-package,aruba_ap-303,Aruba AP-303))
$(eval $(call generate-ipq-wifi-package,asus_rt-ac42u,ASUS RT-AC42U))
$(eval $(call generate-ipq-wifi-package,avm_fritzrepeater-1200,AVM FRITZRepeater 1200))
$(eval $(call generate-ipq-wifi-package,buffalo_wtr-m2133hp,Buffalo WTR-M2133HP))
$(eval $(call generate-ipq-wifi-package,cellc_rtl30vw, Cell C RTL30VW))
$(eval $(call generate-ipq-wifi-package,devolo_magic-2-wifi-next,devolo Magic 2 WiFi next))
$(eval $(call generate-ipq-wifi-package,dlink_dap2610,D-Link DAP-2610))
$(eval $(call generate-ipq-wifi-package,edgecore_ecw5410,Edgecore ECW5410))
$(eval $(call generate-ipq-wifi-package,edgecore_oap100,Edgecore OAP100))
$(eval $(call generate-ipq-wifi-package,engenius_eap2200,EnGenius EAP2200))
$(eval $(call generate-ipq-wifi-package,engenius_emd1,EnGenius EMD1))
$(eval $(call generate-ipq-wifi-package,engenius_emr3500,EnGenius EMR3500))
$(eval $(call generate-ipq-wifi-package,ezviz_cs-w3-wd1200g-eup,EZVIZ CS-W3-WD1200G EUP))
$(eval $(call generate-ipq-wifi-package,glinet_gl-ap1300,GL.iNet GL-AP1300))
$(eval $(call generate-ipq-wifi-package,glinet_gl-b2200,GL.iNet GL-B2200))
$(eval $(call generate-ipq-wifi-package,glinet_gl-s1300,GL.iNet GL-S1300))
$(eval $(call generate-ipq-wifi-package,google_wifi,Google WiFi))
$(eval $(call generate-ipq-wifi-package,linksys_ea8300,Linksys EA8300))
$(eval $(call generate-ipq-wifi-package,linksys_mr8300-v0,Linksys MR8300))
$(eval $(call generate-ipq-wifi-package,luma_wrtq-329acn,Luma WRTQ-329ACN))
$(eval $(call generate-ipq-wifi-package,mikrotik_cap-ac,Mikrotik cAP ac))
$(eval $(call generate-ipq-wifi-package,mikrotik_hap-ac2,Mikrotik hAP ac2))
$(eval $(call generate-ipq-wifi-package,mikrotik_hap-ac3,Mikrotik hAP ac3))
$(eval $(call generate-ipq-wifi-package,mikrotik_sxtsq-5-ac,MikroTik SXTsq 5 ac))
$(eval $(call generate-ipq-wifi-package,mobipromo_cm520-79f,MobiPromo CM520-79F))
$(eval $(call generate-ipq-wifi-package,nec_wg2600hp3,NEC Platforms WG2600HP3))
$(eval $(call generate-ipq-wifi-package,p2w_r619ac,P&W R619AC))
$(eval $(call generate-ipq-wifi-package,plasmacloud_pa1200,Plasma Cloud PA1200))
$(eval $(call generate-ipq-wifi-package,plasmacloud_pa2200,Plasma Cloud PA2200))
$(eval $(call generate-ipq-wifi-package,qxwlan_e2600ac-c1,Qxwlan E2600AC C1))
$(eval $(call generate-ipq-wifi-package,qxwlan_e2600ac-c2,Qxwlan E2600AC C2))
$(eval $(call generate-ipq-wifi-package,teltonika_rutx,Teltonika RUTX))
$(eval $(call generate-ipq-wifi-package,zte_mf286d,ZTE MF286D))
$(foreach PACKAGE,$(ALLWIFIPACKAGES),$(eval $(call BuildPackage,$(PACKAGE))))

View File

@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=linux-firmware
PKG_VERSION:=20220411
PKG_VERSION:=20220509
PKG_RELEASE:=1
PKG_SOURCE_URL:=@KERNEL/linux/kernel/firmware
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_HASH:=020b11f6412f4956f5a6f98de7d41867d2b30ea0ce81b1e2d206ec9840363849
PKG_HASH:=376e0b3d7b4f8aaa2abf7f5ab74803dcf14b06b94e3d841b1467cd9a2848255e
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>

View File

@ -1,14 +1,3 @@
QCA99X0_BOARD_REV:=e404444dfc0baf7d0fcde21ab8ec333608c9960c
QCA99X0_BOARD_FILE:=board-2.bin.$(QCA99X0_BOARD_REV)
define Download/qca99x0-board
URL:=https://github.com/kvalo/ath10k-firmware/raw/master/QCA99X0/hw2.0/
URL_FILE:=board-2.bin
FILE:=$(QCA99X0_BOARD_FILE)
HASH:=f91975dca2435fa6f8570146e6b255c2a70b9ffbdf5ef16a29d67bec7374c11a
endef
$(eval $(call Download,qca99x0-board))
Package/ath10k-board-qca4019 = $(call Package/firmware-default,ath10k qca4019 board firmware)
define Package/ath10k-board-qca4019/install
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA4019/hw1.0
@ -117,7 +106,7 @@ Package/ath10k-board-qca99x0 = $(call Package/firmware-default,ath10k qca99x0 bo
define Package/ath10k-board-qca99x0/install
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA99X0/hw2.0
$(INSTALL_DATA) \
$(DL_DIR)/$(QCA99X0_BOARD_FILE) \
$(PKG_BUILD_DIR)/ath10k/QCA99X0/hw2.0/board-2.bin \
$(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board-2.bin
endef
$(eval $(call BuildPackage,ath10k-board-qca99x0))

View File

@ -5,9 +5,9 @@ PKG_RELEASE=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/libubox.git
PKG_MIRROR_HASH:=ae02e1539ea6af072e39ce0d7179806c98eb29188c233be44226118f4c4271ee
PKG_SOURCE_DATE:=2021-11-20
PKG_SOURCE_VERSION:=cce5e351278b307af7f69931971e3d4e060117d7
PKG_MIRROR_HASH:=cf48d00ed0ea74d53f2043eb9f9dc52834c0b214f258201cf22dfff7dd6c6e40
PKG_SOURCE_DATE:=2022-05-15
PKG_SOURCE_VERSION:=d2223ef9da7172a84d1508733dc58840e1381e3c
PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
CMAKE_INSTALL:=1

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=openssl
PKG_BASE:=1.1.1
PKG_BUGFIX:=n
PKG_BUGFIX:=o
PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX)
PKG_RELEASE:=$(AUTORELEASE)
PKG_USE_MIPS16:=0
@ -27,7 +27,7 @@ PKG_SOURCE_URL:= \
ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/ \
ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/old/$(PKG_BASE)/
PKG_HASH:=40dceb51a4f6a5275bde0e6bf20ef4b91bfc32ed57c0552e2e8e15463372b17a
PKG_HASH:=9384a2b0570dd80358841464677115df785edb941c71211f75076d72fe6b438f
PKG_LICENSE:=OpenSSL
PKG_LICENSE_FILES:=LICENSE

View File

@ -21,7 +21,7 @@ diff --git a/crypto/engine/build.info b/crypto/engine/build.info
diff --git a/crypto/init.c b/crypto/init.c
--- a/crypto/init.c
+++ b/crypto/init.c
@@ -329,18 +329,6 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_engine_openssl)
@@ -328,18 +328,6 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_engine_openssl)
engine_load_openssl_int();
return 1;
}
@ -40,7 +40,7 @@ diff --git a/crypto/init.c b/crypto/init.c
# ifndef OPENSSL_NO_RDRAND
static CRYPTO_ONCE engine_rdrand = CRYPTO_ONCE_STATIC_INIT;
@@ -365,6 +353,18 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_engine_dynamic)
@@ -364,6 +352,18 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_engine_dynamic)
return 1;
}
# ifndef OPENSSL_NO_STATIC_ENGINE
@ -59,7 +59,7 @@ diff --git a/crypto/init.c b/crypto/init.c
# if !defined(OPENSSL_NO_HW) && !defined(OPENSSL_NO_HW_PADLOCK)
static CRYPTO_ONCE engine_padlock = CRYPTO_ONCE_STATIC_INIT;
DEFINE_RUN_ONCE_STATIC(ossl_init_engine_padlock)
@@ -713,11 +713,6 @@ int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings)
@@ -704,11 +704,6 @@ int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings)
if ((opts & OPENSSL_INIT_ENGINE_OPENSSL)
&& !RUN_ONCE(&engine_openssl, ossl_init_engine_openssl))
return 0;
@ -71,7 +71,7 @@ diff --git a/crypto/init.c b/crypto/init.c
# ifndef OPENSSL_NO_RDRAND
if ((opts & OPENSSL_INIT_ENGINE_RDRAND)
&& !RUN_ONCE(&engine_rdrand, ossl_init_engine_rdrand))
@@ -727,6 +722,11 @@ int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings)
@@ -718,6 +713,11 @@ int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings)
&& !RUN_ONCE(&engine_dynamic, ossl_init_engine_dynamic))
return 0;
# ifndef OPENSSL_NO_STATIC_ENGINE

View File

@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=wolfssl
PKG_VERSION:=5.2.0-stable
PKG_VERSION:=5.3.0-stable
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION)
PKG_HASH:=409b4646c5f54f642de0e9f3544c3b83de7238134f5b1ff93fb44527bf119d05
PKG_HASH:=1a3bb310dc01d3e73d9ad91b6ea8249d081016f8eef4ae8f21d3421f91ef1de9
PKG_FIXUP:=libtool libtool-abiver
PKG_INSTALL:=1

View File

@ -1,24 +0,0 @@
From 87e43dd63ba429297e439f2dfd1ee8b45981e18b Mon Sep 17 00:00:00 2001
From: Juliusz Sosinowicz <juliusz@wolfssl.com>
Date: Sat, 12 Feb 2022 00:34:24 +0100
Subject: [PATCH] Reported in ZD13631
`ssl->peerVerifyRet` wasn't being cleared when retrying with an alternative cert chain
References: https://github.com/wolfSSL/wolfssl/issues/4879
---
src/internal.c | 3 +++
1 file changed, 3 insertions(+)
--- a/src/internal.c
+++ b/src/internal.c
@@ -12342,6 +12342,9 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte*
}
ret = 0; /* clear errors and continue */
+ #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
+ ssl->peerVerifyRet = 0;
+ #endif
args->verifyErr = 0;
}

View File

@ -1,19 +0,0 @@
From 096889927d9528d4fbeb3aab56d1fe8225d2e7ec Mon Sep 17 00:00:00 2001
From: Daniel Pouzzner <douzzer@wolfssl.com>
Date: Thu, 14 Apr 2022 20:23:31 -0500
Subject: [PATCH] wolfcrypt/src/port/devcrypto/devcrypto_aes.c: remove
redundant "int ret" in wc_AesCtrEncrypt() (supersedes #5052).
diff --git a/wolfcrypt/src/port/devcrypto/devcrypto_aes.c b/wolfcrypt/src/port/devcrypto/devcrypto_aes.c
index 3bc1d5bb1..28e145e27 100644
--- a/wolfcrypt/src/port/devcrypto/devcrypto_aes.c
+++ b/wolfcrypt/src/port/devcrypto/devcrypto_aes.c
@@ -208,7 +208,6 @@ int wc_AesCtrEncrypt(Aes* aes, byte* out, const byte* in, word32 sz)
int ret;
struct crypt_op crt;
byte* tmp;
- int ret;
if (aes == NULL || out == NULL || in == NULL) {
return BAD_FUNC_ARG;

View File

@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=util-linux
PKG_VERSION:=2.37.3
PKG_VERSION:=2.38
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.37
PKG_HASH:=590c592e58cd6bf38519cb467af05ce6a1ab18040e3e3418f24bcfb2f55f9776
PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.38
PKG_HASH:=6d111cbe4d55b336db2f1fbeffbc65b89908704c01136371d32aa9bec373eb64
PKG_CPE_ID:=cpe:/a:kernel:util-linux
PKG_LICENSE:=GPL-2.0-only
@ -25,14 +25,10 @@ PKG_LICENSE_FILES:= COPYING \
libuuid/COPYING \
Documentation/licenses/COPYING.BSD-3
PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
DISABLE_NLS:=--disable-nls
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/meson.mk
define Package/util-linux/Default
SECTION:=utils
@ -552,44 +548,69 @@ define Package/wipefs/description
libblkid.
endef
CONFIGURE_ARGS += \
--disable-use-tty-group \
--disable-rpath \
--disable-tls \
--disable-su \
--disable-sulogin \
--disable-makeinstall-chown \
--disable-login \
--disable-nologin \
--disable-lslogins \
--disable-runuser \
--disable-chfn-chsh \
--disable-raw \
--without-python \
--without-udev \
--without-readline \
--without-libmagic \
--with-ncursesw
TARGET_CFLAGS += $(FPIC) -std=gnu99
MESON_ARGS += \
-Dsystemd=disabled \
-Dtinfo=disabled \
-Dcryptsetup=disabled \
-Dlibutil=disabled \
-Dlibutempter=disabled \
-Dlibpcre2-posix=disabled \
-Dlibuser=disabled \
-Duse-tty-group=false \
-Duse-tls=false \
-Dbuild-python=disabled \
-Dbuild-zramctl=disabled \
-Dbuild-fsck=disabled \
-Dbuild-wipefs=disabled \
-Dbuild-fallocate=disabled \
-Dbuild-setpriv=disabled \
-Dbuild-hardlink=disabled \
-Dbuild-cramfs=disabled \
-Dbuild-bfs=disabled \
-Dbuild-minix=disabled \
-Dbuild-fdformat=disabled \
-Dbuild-lslogins=disabled \
-Dbuild-wdctl=disabled \
-Dbuild-cal=disabled \
-Dbuild-switch_root=disabled \
-Dbuild-pivot_root=disabled \
-Dbuild-lsmem=disabled \
-Dbuild-lsirq=disabled \
-Dbuild-irqtop=disabled \
-Dbuild-chmem=disabled \
-Dbuild-ipcrm=disabled \
-Dbuild-rfkill=disabled \
-Dbuild-tunelp=disabled \
-Dbuild-kill=disabled \
-Dbuild-last=disabled \
-Dbuild-utmpdump=disabled \
-Dbuild-line=disabled \
-Dbuild-mesg=disabled \
-Dbuild-raw=disabled \
-Dbuild-vipw=disabled \
-Dbuild-newgrp=disabled \
-Dbuild-chfn-chsh=disabled \
-Dbuild-login=disabled \
-Dbuild-nologin=disabled \
-Dbuild-sulogin=disabled \
-Dbuild-su=disabled \
-Dbuild-runuser=disabled \
-Dbuild-ul=disabled \
-Dbuild-pg=disabled \
-Dbuild-write=disabled \
-Dbuild-bash-completion=disabled \
-Dbuild-pylibmount=disabled \
-Dreadline=disabled \
-Dmagic=disabled \
-Dncursesw=enabled
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/blkid.pc $(1)/usr/lib/pkgconfig
$(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/blkid.pc
$(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/blkid.pc
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fdisk.pc $(1)/usr/lib/pkgconfig
$(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/fdisk.pc
$(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/fdisk.pc
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/mount.pc $(1)/usr/lib/pkgconfig
$(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/mount.pc
$(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/mount.pc
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/smartcols.pc $(1)/usr/lib/pkgconfig
$(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/smartcols.pc
$(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/smartcols.pc
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/uuid.pc $(1)/usr/lib/pkgconfig
$(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/uuid.pc
$(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/uuid.pc
$(INSTALL_DIR) $(1)/usr/include/blkid
$(CP) $(PKG_INSTALL_DIR)/usr/include/blkid/blkid.h $(1)/usr/include/blkid
@ -603,43 +624,37 @@ define Build/InstallDev
$(CP) $(PKG_INSTALL_DIR)/usr/include/libsmartcols/libsmartcols.h $(1)/usr/include/libsmartcols
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/lib/libblkid.so* $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/lib/libfdisk.so* $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/lib/libmount.so* $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/lib/libuuid.so* $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/lib/libsmartcols.so* $(1)/usr/lib
$(LN) libblkid.so.1 $(1)/usr/lib/libblkid.so
$(LN) libfdisk.so.1 $(1)/usr/lib/libfdisk.so
$(LN) libmount.so.1 $(1)/usr/lib/libmount.so
$(LN) libuuid.so.1 $(1)/usr/lib/libuuid.so
$(LN) libsmartcols.so.1 $(1)/usr/lib/libsmartcols.so
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libblkid.so* $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libfdisk.so* $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libmount.so* $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libuuid.so* $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsmartcols.so* $(1)/usr/lib
endef
define Package/libfdisk/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/lib/libfdisk.so.* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libfdisk.so.* $(1)/usr/lib/
endef
define Package/libblkid/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/lib/libblkid.so.* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libblkid.so.* $(1)/usr/lib/
endef
define Package/libmount/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/lib/libmount.so.* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libmount.so.* $(1)/usr/lib/
endef
define Package/libsmartcols/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/lib/libsmartcols.so.* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsmartcols.so.* $(1)/usr/lib/
endef
define Package/libuuid/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/lib/libuuid.so.* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libuuid.so.* $(1)/usr/lib/
endef
define Package/agetty/install

View File

@ -0,0 +1,20 @@
From c387d4fe7a1435a762a5b7d8b75feb13ad613315 Mon Sep 17 00:00:00 2001
From: Anatoly Pugachev <matorola@gmail.com>
Date: Fri, 8 Apr 2022 15:34:16 +0300
Subject: [PATCH] libfdisk: meson.build fix typo
---
libfdisk/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/libfdisk/meson.build
+++ b/libfdisk/meson.build
@@ -11,7 +11,7 @@ libfdisk_h = configure_file(
output : 'libfdisk.h',
configuration : defs,
install : build_libfdisk,
- install_dir : join_paths(get_option('includedir'), 'libfisk'),
+ install_dir : join_paths(get_option('includedir'), 'libfdisk'),
)
lib_fdisk_sources = '''

View File

@ -0,0 +1,22 @@
From 38b15ca2dc4ca32bbe4a2449e1c7b645e4577840 Mon Sep 17 00:00:00 2001
From: Rosen Penev <rosenp@gmail.com>
Date: Fri, 29 Apr 2022 16:53:43 -0700
Subject: [PATCH 1/7] meson: fix compilation without systemd
systemdsystemunitdir is used elsewhere.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
meson.build | 1 +
1 file changed, 1 insertion(+)
--- a/meson.build
+++ b/meson.build
@@ -720,6 +720,7 @@ if fs_search_path_extra != ''
endif
conf.set_quoted('FS_SEARCH_PATH', fs_search_path)
+systemdsystemunitdir = ''
if systemd.found()
systemdsystemunitdir = systemd.get_pkgconfig_variable('systemdsystemunitdir')
endif

View File

@ -0,0 +1,34 @@
From e25db9169450d3d5fb43656a2eae5c08999310f4 Mon Sep 17 00:00:00 2001
From: Rosen Penev <rosenp@gmail.com>
Date: Fri, 29 Apr 2022 16:56:54 -0700
Subject: [PATCH 2/7] meson: don't use run
Fixes cross compilation. run is not needed anyway.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
meson.build | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
--- a/meson.build
+++ b/meson.build
@@ -577,8 +577,7 @@ int main(void) {
return tzname ? 0 : 1;
}
'''.format(have ? 1 : 0)
-result = cc.run(code, name : 'using tzname[]')
-have = result.compiled() and result.returncode() == 0
+have = cc.compiles(code, name : 'using tzname[]')
conf.set('HAVE_TZNAME', have ? 1 : false)
socket_libs = []
@@ -641,8 +640,7 @@ int main(void) {
return (*__progname != 0);
}
'''
-result = cc.run(code, name : 'using __progname')
-have = result.compiled() and result.returncode() == 0
+have = cc.compiles(code, name : 'using __progname')
conf.set('HAVE___PROGNAME', have ? 1 : false)
build_plymouth_support = get_option('build-plymouth-support')

View File

@ -0,0 +1,23 @@
From 4194bb5b35e9b5f3296bf17b7cabcc5cb1632ba3 Mon Sep 17 00:00:00 2001
From: Rosen Penev <rosenp@gmail.com>
Date: Fri, 29 Apr 2022 16:55:15 -0700
Subject: [PATCH 3/7] meson: fix cpu_set_t test
_GNU_SOURCE is needed here.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/meson.build
+++ b/meson.build
@@ -379,7 +379,7 @@ endforeach
have = cc.has_header('sched.h')
conf.set10('HAVE_DECL_CPU_ALLOC', have)
# We get -1 if the size cannot be determined
-have_cpu_set_t = cc.sizeof('cpu_set_t', prefix : '#include <sched.h>') > 0
+have_cpu_set_t = cc.sizeof('cpu_set_t', prefix : '#define _GNU_SOURCE\n#include <sched.h>') > 0
conf.set('HAVE_CPU_SET_T', have_cpu_set_t ? 1 : false)
have = cc.has_header_symbol('stdlib.h', 'environ')

View File

@ -0,0 +1,23 @@
From 1e9e2b9fe365cc4a0025d44dc0a9c54bfffe9058 Mon Sep 17 00:00:00 2001
From: Rosen Penev <rosenp@gmail.com>
Date: Fri, 29 Apr 2022 18:16:17 -0700
Subject: [PATCH 4/7] meson: fix environ search
musl has it defined in unistd.h and hidden behind _GNU_SOURCE.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/meson.build
+++ b/meson.build
@@ -382,7 +382,7 @@ conf.set10('HAVE_DECL_CPU_ALLOC', have)
have_cpu_set_t = cc.sizeof('cpu_set_t', prefix : '#define _GNU_SOURCE\n#include <sched.h>') > 0
conf.set('HAVE_CPU_SET_T', have_cpu_set_t ? 1 : false)
-have = cc.has_header_symbol('stdlib.h', 'environ')
+have = cc.has_header_symbol('unistd.h', 'environ', prefix : '#define _GNU_SOURCE')
conf.set10('HAVE_ENVIRON_DECL', have)
have = cc.has_header_symbol('signal.h', 'sighandler_t')

View File

@ -0,0 +1,23 @@
From 5d7557eb3827664b2b78145373907f2a6994bdf9 Mon Sep 17 00:00:00 2001
From: Rosen Penev <rosenp@gmail.com>
Date: Fri, 29 Apr 2022 18:17:52 -0700
Subject: [PATCH 5/7] meson: add _GNU_SOURCE for sighandler_t
musl requires it.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/meson.build
+++ b/meson.build
@@ -385,7 +385,7 @@ conf.set('HAVE_CPU_SET_T', have_cpu_set_
have = cc.has_header_symbol('unistd.h', 'environ', prefix : '#define _GNU_SOURCE')
conf.set10('HAVE_ENVIRON_DECL', have)
-have = cc.has_header_symbol('signal.h', 'sighandler_t')
+have = cc.has_header_symbol('signal.h', 'sighandler_t', prefix : '#define _GNU_SOURCE')
conf.set('HAVE_SIGHANDLER_T', have ? 1 : false)
have = cc.has_header_symbol('string.h', 'strsignal')

View File

@ -0,0 +1,24 @@
From 777652585924034deeba98ae3192f26bc32bb661 Mon Sep 17 00:00:00 2001
From: Rosen Penev <rosenp@gmail.com>
Date: Fri, 29 Apr 2022 18:19:53 -0700
Subject: [PATCH 6/7] meson: fix isnan check
musl only has isnan as a macro, not as a function. Handle the former
case.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/meson.build
+++ b/meson.build
@@ -622,7 +622,7 @@ rtas_libs = cc.find_library('rtas', requ
conf.set('HAVE_LIBRTAS', rtas_libs.found() ? 1 : false)
math_libs = []
-if not cc.has_function('isnan')
+if not cc.has_header_symbol('math.h', 'isnan')
lib = cc.find_library('m', required : true)
if (cc.has_function('isnan', dependencies : lib) and
cc.has_function('__isnan', dependencies : lib))

View File

@ -0,0 +1,23 @@
From 9a6b2618b46a859388139d1eb18f876886786659 Mon Sep 17 00:00:00 2001
From: Rosen Penev <rosenp@gmail.com>
Date: Fri, 29 Apr 2022 19:00:53 -0700
Subject: [PATCH] meson: fix tzname check
tzname is not a type but a variable. sizeof only works on types.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/meson.build
+++ b/meson.build
@@ -565,7 +565,7 @@ have = cc.has_member('struct tm', 'tm_zo
prefix : '#include <time.h>')
conf.set('HAVE_STRUCT_TM_TM_ZONE', have ? 1 : false)
-have = cc.sizeof('tzname', prefix : '#include <time.h>') > 0
+have = cc.has_header_symbol('time.h', 'tzname')
conf.set('HAVE_DECL_TZNAME', have ? 1 : false)
code = '''

View File

@ -0,0 +1,18 @@
--- a/meson.build
+++ b/meson.build
@@ -299,10 +299,14 @@ conf.set('HAVE_LIBUDEV', lib_udev.found(
lib_crypt = cc.find_library('crypt')
-lib_pam = cc.find_library('pam')
+req_libpam = not (get_option('build-login').disabled() or get_option('build-chfn-chsh').disabled()
+ or get_option('build-su').disabled() or get_option('build-runuser').disabled())
+lib_pam = cc.find_library('pam', required : req_libpam)
if lib_pam.found()
lib_pam_misc = cc.find_library('pam_misc')
lib_pam = [lib_pam, lib_pam_misc]
+else
+ lib_pam_misc = declare_dependency()
endif
lib_cryptsetup = dependency(

View File

@ -0,0 +1,31 @@
From cd23a4336f49ba6a12ade557a09589f2a7c966f4 Mon Sep 17 00:00:00 2001
From: Rosen Penev <rosenp@gmail.com>
Date: Mon, 2 May 2022 16:18:33 -0700
Subject: [PATCH] meson: make libcap-ng dependent on setpriv
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
meson.build | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/meson.build
+++ b/meson.build
@@ -334,7 +334,8 @@ have = cc.has_function(
conf.set('HAVE_CRYPT_ACTIVATE_BY_SIGNED_KEY', have ? 1 : false)
lib_cap_ng = dependency(
- 'libcap-ng')
+ 'libcap-ng',
+ required : get_option('build-setpriv'))
lib_selinux = dependency(
'libselinux',
@@ -1754,7 +1755,7 @@ if opt and not is_disabler(exe)
exes += exe
endif
-opt = not get_option('build-setpriv').disabled()
+opt = not get_option('build-setpriv').disabled() and lib_cap_ng.found()
exe = executable(
'setpriv',
setpriv_sources,

View File

@ -0,0 +1,21 @@
From e51565b653cf09985df57cb7254b16d5af5df223 Mon Sep 17 00:00:00 2001
From: Nicolas Caramelli <caramelli.devel@gmail.com>
Date: Fri, 29 Apr 2022 18:16:36 +0200
Subject: [PATCH] meson: fix when HAVE_CLOCK_GETTIME is set
Signed-off-by: Nicolas Caramelli <caramelli.devel@gmail.com>
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/meson.build
+++ b/meson.build
@@ -602,7 +602,7 @@ if not have
have = cc.has_function('clock_gettime',
dependencies : realtime_libs)
endif
-conf.set('HAVE_CLOCK_GETTIME', have_dirfd ? 1 : false)
+conf.set('HAVE_CLOCK_GETTIME', have ? 1 : false)
thread_libs = dependency('threads')

View File

@ -0,0 +1,20 @@
From e0c1a86bf88b568a7afe8ebaea1b9f84afb892c2 Mon Sep 17 00:00:00 2001
From: Eli Schwartz <eschwartz@archlinux.org>
Date: Wed, 4 May 2022 23:52:31 -0400
Subject: [PATCH] meson: get the project version from the version-gen script
This matches autotools and ensures that the version number is actually
reliable.
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/meson.build
+++ b/meson.build
@@ -1,5 +1,5 @@
project('util-linux', 'c',
- version : '2.37',
+ version : run_command('tools/git-version-gen', check: true).stdout(),
license : 'GPLv2+')
pkgconfig = import('pkgconfig')

View File

@ -0,0 +1,26 @@
From dc307e1cbf73f6dbf72bb049c19d332774cdb4e7 Mon Sep 17 00:00:00 2001
From: Eli Schwartz <eschwartz@archlinux.org>
Date: Thu, 5 May 2022 00:16:15 -0400
Subject: [PATCH] meson: fix error in processing version for pc files
This awk command was copied verbatim from configure.ac, which included
non-awk syntax because configure.ac cannot contain [ literals.
Rewrite these autoconf quadrigraphs as their actual values, for meson.
Fixes always setting the micro version to "0".
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/meson.build
+++ b/meson.build
@@ -41,7 +41,7 @@ conf.set_quoted('PACKAGE_VERSION', meson
codes = [''' {print $1} ''',
''' {sub("-.*","",$2); print $2} ''',
- ''' {sub("-.*","",$3); print $3 ~ /^@<:@0-9@:>@+$/ ? $3 : 0} ''']
+ ''' {sub("-.*","",$3); print $3 ~ /^[0-9]+$/ ? $3 : 0} ''']
pc_version = []
foreach code : codes
res = run_command('bash', '-c',

View File

@ -0,0 +1,10 @@
--- a/meson.build
+++ b/meson.build
@@ -774,7 +774,6 @@ subdir('disk-utils')
subdir('misc-utils')
subdir('text-utils')
subdir('term-utils')
-subdir('po')
includes = [dir_include,
dir_libblkid,

View File

@ -52,23 +52,27 @@
read-only;
};
partition@110000,0 {
partition@110000 {
label = "firmware";
reg = <0x00110000 0x01ac0000>;
};
partition@110000,1 {
/*
* The u-boot bootloader will look at this
* offset (0x110000) for an uImage binary.
*/
label = "kernel";
reg = <0x00110000 0x005f0000>;
};
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@700000 {
label = "ubi";
reg = <0x00700000 0x014d0000>;
partition@0 {
/*
* The u-boot bootloader will look at this
* offset (0x110000) for an uImage binary.
*/
label = "kernel";
reg = <0x00000000 0x005f0000>;
};
partition@5f0000 {
label = "ubi";
reg = <0x005f0000 0x014d0000>;
};
};
partition@1bd0000 {

View File

@ -187,22 +187,41 @@
};
partition@180000 {
label = "kernel";
reg = <0x00180000 0x00380000>;
label = "firmware";
reg = <0x00180000 0x01860000>;
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "kernel";
reg = <0x00000000 0x00380000>;
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
/*
* device-tree is @ 0x00180000 - 0x0019ffff
* kernel starts from 0x20000.
* this is coded into netgear's u-boot.
*/
partition@0 {
label = "dtb";
reg = <0x00000000 0x20000>;
};
/*
* device-tree is @ 0x00180000 - 0x001fffff
* kernel starts from 0x200000.
* this is coded into netgear's u-boot.
*
* this partition will also contain a
* fake/empty rootfs at the end to fool
* Netgear's uboot rootfs integrety checks.
*/
};
};
partition@500000 {
label = "ubi";
reg = <0x00500000 0x014e0000>;
partition@380000 {
label = "ubi";
reg = <0x00380000 0x014e0000>;
};
};

View File

@ -13,7 +13,7 @@ produce a noisy warning.
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -279,6 +279,7 @@ static void xhci_pci_quirks(struct devic
@@ -281,6 +281,7 @@ static void xhci_pci_quirks(struct devic
pdev->device == 0x0015) {
xhci->quirks |= XHCI_RESET_ON_RESUME;
xhci->quirks |= XHCI_ZERO_64B_REGS;

View File

@ -72,6 +72,9 @@
i2c: i2c {
compatible = "i2c-gpio";
pinctrl-names = "default";
pinctrl-0 = <&enable_gpio17>;
sda-gpios = <&gpio 17 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
scl-gpios = <&gpio 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
};
@ -181,3 +184,9 @@
reg = <0x0 0x6>;
};
};
&pinmux {
enable_gpio17: pinmux_enable_gpio17 {
pinctrl-single,bits = <0x10 0x0000 0xff00>;
};
};

View File

@ -0,0 +1,20 @@
#
# Copyright (C) 2022 OpenWrt.org
#
. /lib/functions/uci-defaults.sh
board_config_update
board=$(board_name)
case "$board" in
zte,mf286a|\
zte,mf286r)
ucidef_add_gpio_switch "power_btn_block" "Power button blocker" "20" "0"
;;
esac
board_config_flush
exit 0

View File

@ -305,7 +305,7 @@
list_for_each_entry(p, head, list) {
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -611,48 +611,53 @@ static void tcp_options_write(__be32 *pt
@@ -612,48 +612,53 @@ static void tcp_options_write(__be32 *pt
u16 options = opts->options; /* mungable copy */
if (unlikely(OPTION_MD5 & options)) {
@ -382,7 +382,7 @@
}
if (unlikely(opts->num_sack_blocks)) {
@@ -660,16 +665,17 @@ static void tcp_options_write(__be32 *pt
@@ -661,16 +666,17 @@ static void tcp_options_write(__be32 *pt
tp->duplicate_sack : tp->selective_acks;
int this_sack;
@ -406,7 +406,7 @@
}
tp->rx_opt.dsack = 0;
@@ -682,13 +688,14 @@ static void tcp_options_write(__be32 *pt
@@ -683,13 +689,14 @@ static void tcp_options_write(__be32 *pt
if (foc->exp) {
len = TCPOLEN_EXP_FASTOPEN_BASE + foc->len;
@ -706,7 +706,7 @@
EXPORT_SYMBOL(xfrm_parse_spi);
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -4083,14 +4083,16 @@ static bool tcp_parse_aligned_timestamp(
@@ -4084,14 +4084,16 @@ static bool tcp_parse_aligned_timestamp(
{
const __be32 *ptr = (const __be32 *)(th + 1);

View File

@ -18,7 +18,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -2597,7 +2597,7 @@ static void bcmgenet_init_tx_ring(struct
@@ -2604,7 +2604,7 @@ static void bcmgenet_init_tx_ring(struct
bcmgenet_tdma_ring_writel(priv, index, 0, TDMA_PROD_INDEX);
bcmgenet_tdma_ring_writel(priv, index, 0, TDMA_CONS_INDEX);
@ -27,7 +27,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
/* Disable rate control for now */
bcmgenet_tdma_ring_writel(priv, index, flow_period_val,
TDMA_FLOW_PERIOD);
@@ -4062,9 +4062,12 @@ static int bcmgenet_probe(struct platfor
@@ -4069,9 +4069,12 @@ static int bcmgenet_probe(struct platfor
netif_set_real_num_rx_queues(priv->dev, priv->hw_params->rx_queues + 1);
/* Set default coalescing parameters */

View File

@ -15,7 +15,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -1472,6 +1472,103 @@ command_cleanup:
@@ -1483,6 +1483,103 @@ command_cleanup:
}
/*
@ -119,7 +119,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
* non-error returns are a promise to giveback() the urb later
* we drop ownership so next owner (or urb unlink) can get it
*/
@@ -5378,6 +5475,7 @@ static const struct hc_driver xhci_hc_dr
@@ -5389,6 +5486,7 @@ static const struct hc_driver xhci_hc_dr
.endpoint_reset = xhci_endpoint_reset,
.check_bandwidth = xhci_check_bandwidth,
.reset_bandwidth = xhci_reset_bandwidth,

View File

@ -37,7 +37,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
static inline void bcmgenet_writel(u32 value, void __iomem *offset)
{
@@ -2428,6 +2431,11 @@ static void reset_umac(struct bcmgenet_p
@@ -2435,6 +2438,11 @@ static void reset_umac(struct bcmgenet_p
bcmgenet_rbuf_ctrl_set(priv, 0);
udelay(10);

View File

@ -24,7 +24,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -3246,7 +3246,7 @@ static void bcmgenet_get_hw_addr(struct
@@ -3253,7 +3253,7 @@ static void bcmgenet_get_hw_addr(struct
}
/* Returns a reusable dma control register value */
@ -33,7 +33,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
{
unsigned int i;
u32 reg;
@@ -3271,6 +3271,14 @@ static u32 bcmgenet_dma_disable(struct b
@@ -3278,6 +3278,14 @@ static u32 bcmgenet_dma_disable(struct b
udelay(10);
bcmgenet_umac_writel(priv, 0, UMAC_TX_FLUSH);
@ -48,7 +48,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
return dma_ctrl;
}
@@ -3334,8 +3342,8 @@ static int bcmgenet_open(struct net_devi
@@ -3341,8 +3349,8 @@ static int bcmgenet_open(struct net_devi
bcmgenet_set_hw_addr(priv, dev->dev_addr);
@ -59,7 +59,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
/* Reinitialize TDMA and RDMA and SW housekeeping */
ret = bcmgenet_init_dma(priv);
@@ -4191,7 +4199,7 @@ static int bcmgenet_resume(struct device
@@ -4198,7 +4206,7 @@ static int bcmgenet_resume(struct device
bcmgenet_hfb_create_rxnfc_filter(priv, rule);
/* Disable RX/TX DMA and flush TX queues */

View File

@ -22,7 +22,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -291,6 +291,7 @@ static void xhci_pci_quirks(struct devic
@@ -293,6 +293,7 @@ static void xhci_pci_quirks(struct devic
if (pdev->vendor == PCI_VENDOR_ID_VIA && pdev->device == 0x3483) {
xhci->quirks |= XHCI_LPM_SUPPORT;
xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS;

View File

@ -26,7 +26,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -4268,9 +4268,9 @@ void xhci_queue_new_dequeue_state(struct
@@ -4270,9 +4270,9 @@ void xhci_queue_new_dequeue_state(struct
}
ep = &xhci->devs[slot_id]->eps[ep_index];
if ((ep->ep_state & SET_DEQ_PENDING)) {

View File

@ -18,9 +18,6 @@ get_status_led() {
status_led=$(basename $status_led_file)
return
fi;
# And finally, let's also try the device-Tree aliases node
status_led="$(get_dt_led status)"
}
set_state() {

View File

@ -1,28 +0,0 @@
From: Christian Lamparter <chunkeey@gmail.com>
Date: Thu, 7 Jun 2018 19:29:12 +0200
Subject: bcm53xx: add LED status label alias for Meraki MR32
add an led-status alias label. This is used by OpenWrt's LED
DTS lookup function to identifiy the indicator LED
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
--- a/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
+++ b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
@@ -27,6 +27,7 @@
aliases {
serial1 = &uart2;
+ led-status = &led_status;
};
leds {
@@ -68,7 +69,7 @@
max-brightness = <255>;
};
- green {
+ led_status: green {
/* SYS-LED 1 - Tricolor */
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_GREEN>;

View File

@ -137,7 +137,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
static int
mt7530_setup(struct dsa_switch *ds)
{
@@ -1675,6 +1779,12 @@ mt7530_setup(struct dsa_switch *ds)
@@ -1676,6 +1780,12 @@ mt7530_setup(struct dsa_switch *ds)
}
}

View File

@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -2371,6 +2371,17 @@ static void mt753x_phylink_mac_link_up(s
@@ -2372,6 +2372,17 @@ static void mt753x_phylink_mac_link_up(s
mcr |= PMCR_RX_FC_EN;
}
@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mt7530_set(priv, MT7530_PMCR_P(port), mcr);
}
@@ -2601,6 +2612,36 @@ mt753x_phy_write(struct dsa_switch *ds,
@@ -2602,6 +2613,36 @@ mt753x_phy_write(struct dsa_switch *ds,
return priv->info->phy_write(ds, port, regnum, val);
}
@ -72,7 +72,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static const struct dsa_switch_ops mt7530_switch_ops = {
.get_tag_protocol = mtk_get_tag_protocol,
.setup = mt753x_setup,
@@ -2629,6 +2670,8 @@ static const struct dsa_switch_ops mt753
@@ -2630,6 +2671,8 @@ static const struct dsa_switch_ops mt753
.phylink_mac_an_restart = mt753x_phylink_mac_an_restart,
.phylink_mac_link_down = mt753x_phylink_mac_link_down,
.phylink_mac_link_up = mt753x_phylink_mac_link_up,

View File

@ -1294,7 +1294,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
@@ -395,7 +395,7 @@ static int socfpga_dwmac_probe(struct pl
@@ -397,7 +397,7 @@ static int socfpga_dwmac_probe(struct pl
if (ret)
return ret;
@ -1327,7 +1327,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
@@ -1202,7 +1202,7 @@ static int sun8i_dwmac_probe(struct plat
@@ -1203,7 +1203,7 @@ static int sun8i_dwmac_probe(struct plat
if (ret)
return -EINVAL;
@ -1478,7 +1478,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (ret)
--- a/drivers/net/ethernet/ti/cpsw_new.c
+++ b/drivers/net/ethernet/ti/cpsw_new.c
@@ -1267,7 +1267,6 @@ static int cpsw_probe_dt(struct cpsw_com
@@ -1269,7 +1269,6 @@ static int cpsw_probe_dt(struct cpsw_com
for_each_child_of_node(tmp_node, port_np) {
struct cpsw_slave_data *slave_data;
@ -1486,7 +1486,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
u32 port_id;
ret = of_property_read_u32(port_np, "reg", &port_id);
@@ -1326,10 +1325,8 @@ static int cpsw_probe_dt(struct cpsw_com
@@ -1328,10 +1327,8 @@ static int cpsw_probe_dt(struct cpsw_com
goto err_node_put;
}
@ -1641,7 +1641,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
lp->coalesce_count_tx = XAXIDMA_DFT_TX_THRESHOLD;
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
@@ -1113,7 +1113,6 @@ static int xemaclite_of_probe(struct pla
@@ -1122,7 +1122,6 @@ static int xemaclite_of_probe(struct pla
struct net_device *ndev = NULL;
struct net_local *lp = NULL;
struct device *dev = &ofdev->dev;
@ -1649,7 +1649,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int rc = 0;
@@ -1155,12 +1154,9 @@ static int xemaclite_of_probe(struct pla
@@ -1164,12 +1163,9 @@ static int xemaclite_of_probe(struct pla
lp->next_rx_buf_to_use = 0x0;
lp->tx_ping_pong = get_bool(ofdev, "xlnx,tx-ping-pong");
lp->rx_ping_pong = get_bool(ofdev, "xlnx,rx-ping-pong");

View File

@ -73,7 +73,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
static void
mt7530_stp_state_set(struct dsa_switch *ds, int port, u8 state)
{
@@ -2652,6 +2699,8 @@ static const struct dsa_switch_ops mt753
@@ -2653,6 +2700,8 @@ static const struct dsa_switch_ops mt753
.get_sset_count = mt7530_get_sset_count,
.port_enable = mt7530_port_enable,
.port_disable = mt7530_port_disable,

View File

@ -26,7 +26,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (priv->id == ID_MT7530) {
regulator_set_voltage(priv->core_pwr, 1000000, 1000000);
@@ -1947,6 +1948,7 @@ mt7531_setup(struct dsa_switch *ds)
@@ -1948,6 +1949,7 @@ mt7531_setup(struct dsa_switch *ds)
}
ds->configure_vlan_while_not_filtering = true;

View File

@ -67,7 +67,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static void mt7530_setup_port5(struct dsa_switch *ds, phy_interface_t interface)
{
struct mt7530_priv *priv = ds->priv;
@@ -2699,6 +2739,7 @@ static const struct dsa_switch_ops mt753
@@ -2700,6 +2740,7 @@ static const struct dsa_switch_ops mt753
.phy_write = mt753x_phy_write,
.get_ethtool_stats = mt7530_get_ethtool_stats,
.get_sset_count = mt7530_get_sset_count,

View File

@ -109,7 +109,7 @@ Signed-off-by: DENG Qingfang <dqfext@gmail.com>
mt7530_vlan_cmd(struct mt7530_priv *priv, enum mt7530_vlan_cmd cmd, u16 vid)
{
struct mt7530_dummy_poll p;
@@ -2745,11 +2813,15 @@ static const struct dsa_switch_ops mt753
@@ -2746,11 +2814,15 @@ static const struct dsa_switch_ops mt753
.port_change_mtu = mt7530_port_change_mtu,
.port_max_mtu = mt7530_port_max_mtu,
.port_stp_state_set = mt7530_stp_state_set,

View File

@ -305,7 +305,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static int
mt7530_setup(struct dsa_switch *ds)
{
@@ -2749,24 +2964,20 @@ static int
@@ -2750,24 +2965,20 @@ static int
mt753x_setup(struct dsa_switch *ds)
{
struct mt7530_priv *priv = ds->priv;
@ -340,7 +340,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
static int mt753x_get_mac_eee(struct dsa_switch *ds, int port,
@@ -2803,8 +3014,6 @@ static const struct dsa_switch_ops mt753
@@ -2804,8 +3015,6 @@ static const struct dsa_switch_ops mt753
.get_tag_protocol = mtk_get_tag_protocol,
.setup = mt753x_setup,
.get_strings = mt7530_get_strings,
@ -349,7 +349,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.get_ethtool_stats = mt7530_get_ethtool_stats,
.get_sset_count = mt7530_get_sset_count,
.set_ageing_time = mt7530_set_ageing_time,
@@ -2987,6 +3196,9 @@ mt7530_remove(struct mdio_device *mdiode
@@ -2988,6 +3197,9 @@ mt7530_remove(struct mdio_device *mdiode
dev_err(priv->dev, "Failed to disable io pwr: %d\n",
ret);

View File

@ -21,7 +21,7 @@ Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
@@ -883,8 +883,13 @@ advk_pci_bridge_emul_pcie_conf_read(stru
@@ -885,8 +885,13 @@ advk_pci_bridge_emul_pcie_conf_read(stru
case PCI_EXP_DEVCAP:
case PCI_EXP_DEVCTL:
@ -35,7 +35,7 @@ Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
default:
return PCI_BRIDGE_EMUL_NOT_HANDLED;
}
@@ -898,10 +903,6 @@ advk_pci_bridge_emul_pcie_conf_write(str
@@ -900,10 +905,6 @@ advk_pci_bridge_emul_pcie_conf_write(str
struct advk_pcie *pcie = bridge->data;
switch (reg) {
@ -46,7 +46,7 @@ Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
case PCI_EXP_LNKCTL:
advk_writel(pcie, new, PCIE_CORE_PCIEXP_CAP + reg);
if (new & PCI_EXP_LNKCTL_RL)
@@ -923,6 +924,12 @@ advk_pci_bridge_emul_pcie_conf_write(str
@@ -925,6 +926,12 @@ advk_pci_bridge_emul_pcie_conf_write(str
advk_writel(pcie, new, PCIE_ISR0_REG);
break;

View File

@ -1,59 +0,0 @@
From 7d8dc1f7cd007a7ce94c5b4c20d63a8b8d6d7751 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org>
Date: Tue, 30 Nov 2021 18:29:06 +0100
Subject: [PATCH] PCI: aardvark: Clear all MSIs at setup
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
We already clear all the other interrupts (ISR0, ISR1, HOST_CTRL_INT).
Define a new macro PCIE_MSI_ALL_MASK and do the same clearing for MSIs,
to ensure that we don't start receiving spurious interrupts.
Use this new mask in advk_pcie_handle_msi();
Link: https://lore.kernel.org/r/20211130172913.9727-5-kabel@kernel.org
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
---
drivers/pci/controller/pci-aardvark.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
@@ -114,6 +114,7 @@
#define PCIE_MSI_ADDR_HIGH_REG (CONTROL_BASE_ADDR + 0x54)
#define PCIE_MSI_STATUS_REG (CONTROL_BASE_ADDR + 0x58)
#define PCIE_MSI_MASK_REG (CONTROL_BASE_ADDR + 0x5C)
+#define PCIE_MSI_ALL_MASK GENMASK(31, 0)
#define PCIE_MSI_PAYLOAD_REG (CONTROL_BASE_ADDR + 0x9C)
#define PCIE_MSI_DATA_MASK GENMASK(15, 0)
@@ -577,6 +578,7 @@ static void advk_pcie_setup_hw(struct ad
advk_writel(pcie, reg, PCIE_CORE_CTRL2_REG);
/* Clear all interrupts */
+ advk_writel(pcie, PCIE_MSI_ALL_MASK, PCIE_MSI_STATUS_REG);
advk_writel(pcie, PCIE_ISR0_ALL_MASK, PCIE_ISR0_REG);
advk_writel(pcie, PCIE_ISR1_ALL_MASK, PCIE_ISR1_REG);
advk_writel(pcie, PCIE_IRQ_ALL_MASK, HOST_CTRL_INT_STATUS_REG);
@@ -589,7 +591,7 @@ static void advk_pcie_setup_hw(struct ad
advk_writel(pcie, PCIE_ISR1_ALL_MASK, PCIE_ISR1_MASK_REG);
/* Unmask all MSIs */
- advk_writel(pcie, 0, PCIE_MSI_MASK_REG);
+ advk_writel(pcie, ~(u32)PCIE_MSI_ALL_MASK, PCIE_MSI_MASK_REG);
/* Enable summary interrupt for GIC SPI source */
reg = PCIE_IRQ_ALL_MASK & (~PCIE_IRQ_ENABLE_INTS_MASK);
@@ -1397,7 +1399,7 @@ static void advk_pcie_handle_msi(struct
msi_mask = advk_readl(pcie, PCIE_MSI_MASK_REG);
msi_val = advk_readl(pcie, PCIE_MSI_STATUS_REG);
- msi_status = msi_val & ~msi_mask;
+ msi_status = msi_val & ((~msi_mask) & PCIE_MSI_ALL_MASK);
for (msi_idx = 0; msi_idx < MSI_IRQ_NUM; msi_idx++) {
if (!(BIT(msi_idx) & msi_status))

View File

@ -18,7 +18,7 @@ Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
@@ -1696,11 +1696,13 @@ static int advk_pcie_remove(struct platf
@@ -1692,11 +1692,13 @@ static int advk_pcie_remove(struct platf
struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie);
int i;

View File

@ -19,7 +19,7 @@ Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
@@ -1694,6 +1694,7 @@ static int advk_pcie_remove(struct platf
@@ -1690,6 +1690,7 @@ static int advk_pcie_remove(struct platf
{
struct advk_pcie *pcie = platform_get_drvdata(pdev);
struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie);
@ -27,7 +27,7 @@ Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
int i;
/* Remove PCI bus with all devices */
@@ -1702,6 +1703,11 @@ static int advk_pcie_remove(struct platf
@@ -1698,6 +1699,11 @@ static int advk_pcie_remove(struct platf
pci_remove_root_bus(bridge->bus);
pci_unlock_rescan_remove();

View File

@ -18,7 +18,7 @@ Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
@@ -1708,6 +1708,27 @@ static int advk_pcie_remove(struct platf
@@ -1704,6 +1704,27 @@ static int advk_pcie_remove(struct platf
val &= ~(PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER);
advk_writel(pcie, val, PCIE_CORE_CMD_STATUS_REG);

View File

@ -21,7 +21,7 @@ Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
@@ -1733,6 +1733,9 @@ static int advk_pcie_remove(struct platf
@@ -1729,6 +1729,9 @@ static int advk_pcie_remove(struct platf
advk_pcie_remove_msi_irq_domain(pcie);
advk_pcie_remove_irq_domain(pcie);

View File

@ -20,7 +20,7 @@ Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
@@ -1736,6 +1736,10 @@ static int advk_pcie_remove(struct platf
@@ -1732,6 +1732,10 @@ static int advk_pcie_remove(struct platf
/* Free config space for emulated root bridge */
pci_bridge_emul_cleanup(&pcie->bridge);

View File

@ -20,7 +20,7 @@ Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
@@ -1740,6 +1740,11 @@ static int advk_pcie_remove(struct platf
@@ -1736,6 +1736,11 @@ static int advk_pcie_remove(struct platf
if (pcie->reset_gpio)
gpiod_set_value_cansleep(pcie->reset_gpio, 1);

View File

@ -18,7 +18,7 @@ Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
@@ -1749,6 +1749,9 @@ static int advk_pcie_remove(struct platf
@@ -1745,6 +1745,9 @@ static int advk_pcie_remove(struct platf
for (i = 0; i < OB_WIN_COUNT; i++)
advk_pcie_disable_ob_win(pcie, i);

View File

@ -0,0 +1,79 @@
From a71658c7db0b2be9fcab3522aeabe11792a4f481 Mon Sep 17 00:00:00 2001
From: Dmitry Osipenko <digetx@gmail.com>
Date: Wed, 20 Jan 2021 23:58:44 +0300
Subject: [PATCH] regulator: consumer: Add missing stubs to
regulator/consumer.h
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
commit 51dfb6ca3728bd0a0a3c23776a12d2a15a1d2457 upstream.
Add missing stubs to regulator/consumer.h in order to fix COMPILE_TEST
of the kernel. In particular this should fix compile-testing of OPP core
because of a missing stub for regulator_sync_voltage().
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20210120205844.12658-1-digetx@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: Bjørn Mork <bjorn@mork.no>
Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/linux/regulator/consumer.h | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -332,6 +332,12 @@ regulator_get_exclusive(struct device *d
}
static inline struct regulator *__must_check
+devm_regulator_get_exclusive(struct device *dev, const char *id)
+{
+ return ERR_PTR(-ENODEV);
+}
+
+static inline struct regulator *__must_check
regulator_get_optional(struct device *dev, const char *id)
{
return ERR_PTR(-ENODEV);
@@ -486,6 +492,11 @@ static inline int regulator_get_voltage(
return -EINVAL;
}
+static inline int regulator_sync_voltage(struct regulator *regulator)
+{
+ return -EINVAL;
+}
+
static inline int regulator_is_supported_voltage(struct regulator *regulator,
int min_uV, int max_uV)
{
@@ -578,6 +589,25 @@ static inline int devm_regulator_unregis
return 0;
}
+static inline int regulator_suspend_enable(struct regulator_dev *rdev,
+ suspend_state_t state)
+{
+ return -EINVAL;
+}
+
+static inline int regulator_suspend_disable(struct regulator_dev *rdev,
+ suspend_state_t state)
+{
+ return -EINVAL;
+}
+
+static inline int regulator_set_suspend_voltage(struct regulator *regulator,
+ int min_uV, int max_uV,
+ suspend_state_t state)
+{
+ return -EINVAL;
+}
+
static inline void *regulator_get_drvdata(struct regulator *regulator)
{
return NULL;

View File

@ -1,44 +0,0 @@
From 9319230ac147067652b58fe849ffe0ceec098665 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org>
Date: Tue, 30 Nov 2021 18:29:03 +0100
Subject: [PATCH] PCI: pci-bridge-emul: Add description for class_revision
field
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The current assignment to the class_revision member
class_revision |= cpu_to_le32(PCI_CLASS_BRIDGE_PCI << 16);
can make the reader think that class is at high 16 bits of the member and
revision at low 16 bits.
In reality, class is at high 24 bits, but the class for PCI Bridge Normal
Decode is PCI_CLASS_BRIDGE_PCI << 8.
Change the assignment and add a comment to make this clearer.
Link: https://lore.kernel.org/r/20211130172913.9727-2-kabel@kernel.org
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
---
drivers/pci/pci-bridge-emul.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/drivers/pci/pci-bridge-emul.c
+++ b/drivers/pci/pci-bridge-emul.c
@@ -284,7 +284,11 @@ int pci_bridge_emul_init(struct pci_brid
{
BUILD_BUG_ON(sizeof(bridge->conf) != PCI_BRIDGE_CONF_END);
- bridge->conf.class_revision |= cpu_to_le32(PCI_CLASS_BRIDGE_PCI << 16);
+ /*
+ * class_revision: Class is high 24 bits and revision is low 8 bit of this member,
+ * while class for PCI Bridge Normal Decode has the 24-bit value: PCI_CLASS_BRIDGE_PCI << 8
+ */
+ bridge->conf.class_revision |= cpu_to_le32((PCI_CLASS_BRIDGE_PCI << 8) << 8);
bridge->conf.header_type = PCI_HEADER_TYPE_BRIDGE;
bridge->conf.cache_line_size = 0x10;
bridge->conf.status = cpu_to_le16(PCI_STATUS_CAP_LIST);

View File

@ -1,73 +0,0 @@
From 8ea673a8b30b4a32516b8adabb15e2a68ff02ec8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org>
Date: Tue, 30 Nov 2021 18:29:04 +0100
Subject: [PATCH] PCI: pci-bridge-emul: Add definitions for missing
capabilities registers
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
pci-bridge-emul driver already allocates buffer for capabilities up to the
PCI_EXP_SLTSTA2 register, but does not define bit access behavior for these
registers. Add these missing definitions.
Link: https://lore.kernel.org/r/20211130172913.9727-3-kabel@kernel.org
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
---
drivers/pci/pci-bridge-emul.c | 43 +++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
--- a/drivers/pci/pci-bridge-emul.c
+++ b/drivers/pci/pci-bridge-emul.c
@@ -270,6 +270,49 @@ struct pci_bridge_reg_behavior pcie_cap_
.ro = GENMASK(15, 0) | PCI_EXP_RTSTA_PENDING,
.w1c = PCI_EXP_RTSTA_PME,
},
+
+ [PCI_EXP_DEVCAP2 / 4] = {
+ /*
+ * Device capabilities 2 register has reserved bits [30:27].
+ * Also bits [26:24] are reserved for non-upstream ports.
+ */
+ .ro = BIT(31) | GENMASK(23, 0),
+ },
+
+ [PCI_EXP_DEVCTL2 / 4] = {
+ /*
+ * Device control 2 register is RW. Bit 11 is reserved for
+ * non-upstream ports.
+ *
+ * Device status 2 register is reserved.
+ */
+ .rw = GENMASK(15, 12) | GENMASK(10, 0),
+ },
+
+ [PCI_EXP_LNKCAP2 / 4] = {
+ /* Link capabilities 2 register has reserved bits [30:25] and 0. */
+ .ro = BIT(31) | GENMASK(24, 1),
+ },
+
+ [PCI_EXP_LNKCTL2 / 4] = {
+ /*
+ * Link control 2 register is RW.
+ *
+ * Link status 2 register has bits 5, 15 W1C;
+ * bits 10, 11 reserved and others are RO.
+ */
+ .rw = GENMASK(15, 0),
+ .w1c = (BIT(15) | BIT(5)) << 16,
+ .ro = (GENMASK(14, 12) | GENMASK(9, 6) | GENMASK(4, 0)) << 16,
+ },
+
+ [PCI_EXP_SLTCAP2 / 4] = {
+ /* Slot capabilities 2 register is reserved. */
+ },
+
+ [PCI_EXP_SLTCTL2 / 4] = {
+ /* Both Slot control 2 and Slot status 2 registers are reserved. */
+ },
};
/*

View File

@ -1,61 +0,0 @@
From 1d3e170344dff2cef8827db6c09909b78cbc11d7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org>
Date: Tue, 30 Nov 2021 18:29:05 +0100
Subject: [PATCH] PCI: aardvark: Add support for DEVCAP2, DEVCTL2, LNKCAP2 and
LNKCTL2 registers on emulated bridge
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
PCI aardvark hardware supports access to DEVCAP2, DEVCTL2, LNKCAP2 and
LNKCTL2 configuration registers of PCIe core via PCIE_CORE_PCIEXP_CAP.
Export them via emulated software root bridge.
Link: https://lore.kernel.org/r/20211130172913.9727-4-kabel@kernel.org
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
---
drivers/pci/controller/pci-aardvark.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
@@ -876,8 +876,13 @@ advk_pci_bridge_emul_pcie_conf_read(stru
case PCI_EXP_DEVCAP:
case PCI_EXP_DEVCTL:
+ case PCI_EXP_DEVCAP2:
+ case PCI_EXP_DEVCTL2:
+ case PCI_EXP_LNKCAP2:
+ case PCI_EXP_LNKCTL2:
*value = advk_readl(pcie, PCIE_CORE_PCIEXP_CAP + reg);
return PCI_BRIDGE_EMUL_HANDLED;
+
default:
return PCI_BRIDGE_EMUL_NOT_HANDLED;
}
@@ -891,10 +896,6 @@ advk_pci_bridge_emul_pcie_conf_write(str
struct advk_pcie *pcie = bridge->data;
switch (reg) {
- case PCI_EXP_DEVCTL:
- advk_writel(pcie, new, PCIE_CORE_PCIEXP_CAP + reg);
- break;
-
case PCI_EXP_LNKCTL:
advk_writel(pcie, new, PCIE_CORE_PCIEXP_CAP + reg);
if (new & PCI_EXP_LNKCTL_RL)
@@ -916,6 +917,12 @@ advk_pci_bridge_emul_pcie_conf_write(str
advk_writel(pcie, new, PCIE_ISR0_REG);
break;
+ case PCI_EXP_DEVCTL:
+ case PCI_EXP_DEVCTL2:
+ case PCI_EXP_LNKCTL2:
+ advk_writel(pcie, new, PCIE_CORE_PCIEXP_CAP + reg);
+ break;
+
default:
break;
}

View File

@ -1,59 +0,0 @@
From 7d8dc1f7cd007a7ce94c5b4c20d63a8b8d6d7751 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org>
Date: Tue, 30 Nov 2021 18:29:06 +0100
Subject: [PATCH] PCI: aardvark: Clear all MSIs at setup
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
We already clear all the other interrupts (ISR0, ISR1, HOST_CTRL_INT).
Define a new macro PCIE_MSI_ALL_MASK and do the same clearing for MSIs,
to ensure that we don't start receiving spurious interrupts.
Use this new mask in advk_pcie_handle_msi();
Link: https://lore.kernel.org/r/20211130172913.9727-5-kabel@kernel.org
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
---
drivers/pci/controller/pci-aardvark.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
@@ -115,6 +115,7 @@
#define PCIE_MSI_ADDR_HIGH_REG (CONTROL_BASE_ADDR + 0x54)
#define PCIE_MSI_STATUS_REG (CONTROL_BASE_ADDR + 0x58)
#define PCIE_MSI_MASK_REG (CONTROL_BASE_ADDR + 0x5C)
+#define PCIE_MSI_ALL_MASK GENMASK(31, 0)
#define PCIE_MSI_PAYLOAD_REG (CONTROL_BASE_ADDR + 0x9C)
#define PCIE_MSI_DATA_MASK GENMASK(15, 0)
@@ -570,6 +571,7 @@ static void advk_pcie_setup_hw(struct ad
advk_writel(pcie, reg, PCIE_CORE_CTRL2_REG);
/* Clear all interrupts */
+ advk_writel(pcie, PCIE_MSI_ALL_MASK, PCIE_MSI_STATUS_REG);
advk_writel(pcie, PCIE_ISR0_ALL_MASK, PCIE_ISR0_REG);
advk_writel(pcie, PCIE_ISR1_ALL_MASK, PCIE_ISR1_REG);
advk_writel(pcie, PCIE_IRQ_ALL_MASK, HOST_CTRL_INT_STATUS_REG);
@@ -582,7 +584,7 @@ static void advk_pcie_setup_hw(struct ad
advk_writel(pcie, PCIE_ISR1_ALL_MASK, PCIE_ISR1_MASK_REG);
/* Unmask all MSIs */
- advk_writel(pcie, 0, PCIE_MSI_MASK_REG);
+ advk_writel(pcie, ~(u32)PCIE_MSI_ALL_MASK, PCIE_MSI_MASK_REG);
/* Enable summary interrupt for GIC SPI source */
reg = PCIE_IRQ_ALL_MASK & (~PCIE_IRQ_ENABLE_INTS_MASK);
@@ -1389,7 +1391,7 @@ static void advk_pcie_handle_msi(struct
msi_mask = advk_readl(pcie, PCIE_MSI_MASK_REG);
msi_val = advk_readl(pcie, PCIE_MSI_STATUS_REG);
- msi_status = msi_val & ~msi_mask;
+ msi_status = msi_val & ((~msi_mask) & PCIE_MSI_ALL_MASK);
for (msi_idx = 0; msi_idx < MSI_IRQ_NUM; msi_idx++) {
if (!(BIT(msi_idx) & msi_status))

View File

@ -1,34 +0,0 @@
From a4ca7948e1d47275f8f3e5023243440c40561916 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org>
Date: Tue, 30 Nov 2021 18:29:07 +0100
Subject: [PATCH] PCI: aardvark: Comment actions in driver remove method
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Add two more comments into the advk_pcie_remove() method.
Link: https://lore.kernel.org/r/20211130172913.9727-6-kabel@kernel.org
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
---
drivers/pci/controller/pci-aardvark.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
@@ -1681,11 +1681,13 @@ static int advk_pcie_remove(struct platf
struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie);
int i;
+ /* Remove PCI bus with all devices */
pci_lock_rescan_remove();
pci_stop_root_bus(bridge->bus);
pci_remove_root_bus(bridge->bus);
pci_unlock_rescan_remove();
+ /* Remove IRQ domains */
advk_pcie_remove_msi_irq_domain(pcie);
advk_pcie_remove_irq_domain(pcie);

View File

@ -1,41 +0,0 @@
From a46f2f6dd4093438d9615dfbf5c0fea2a9835dba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org>
Date: Tue, 30 Nov 2021 18:29:08 +0100
Subject: [PATCH] PCI: aardvark: Disable bus mastering when unbinding driver
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Ensure that after driver unbind PCIe cards are not able to forward
memory and I/O requests in the upstream direction.
Link: https://lore.kernel.org/r/20211130172913.9727-7-kabel@kernel.org
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
---
drivers/pci/controller/pci-aardvark.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
@@ -1679,6 +1679,7 @@ static int advk_pcie_remove(struct platf
{
struct advk_pcie *pcie = platform_get_drvdata(pdev);
struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie);
+ u32 val;
int i;
/* Remove PCI bus with all devices */
@@ -1687,6 +1688,11 @@ static int advk_pcie_remove(struct platf
pci_remove_root_bus(bridge->bus);
pci_unlock_rescan_remove();
+ /* Disable Root Bridge I/O space, memory space and bus mastering */
+ val = advk_readl(pcie, PCIE_CORE_CMD_STATUS_REG);
+ val &= ~(PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER);
+ advk_writel(pcie, val, PCIE_CORE_CMD_STATUS_REG);
+
/* Remove IRQ domains */
advk_pcie_remove_msi_irq_domain(pcie);
advk_pcie_remove_irq_domain(pcie);

View File

@ -1,48 +0,0 @@
From 13bcdf07cb2ecff5d45d2c141df2539b15211448 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org>
Date: Tue, 30 Nov 2021 18:29:09 +0100
Subject: [PATCH] PCI: aardvark: Mask all interrupts when unbinding driver
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Ensure that no interrupt can be triggered after driver unbind.
Link: https://lore.kernel.org/r/20211130172913.9727-8-kabel@kernel.org
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
---
drivers/pci/controller/pci-aardvark.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
@@ -1693,6 +1693,27 @@ static int advk_pcie_remove(struct platf
val &= ~(PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER);
advk_writel(pcie, val, PCIE_CORE_CMD_STATUS_REG);
+ /* Disable MSI */
+ val = advk_readl(pcie, PCIE_CORE_CTRL2_REG);
+ val &= ~PCIE_CORE_CTRL2_MSI_ENABLE;
+ advk_writel(pcie, val, PCIE_CORE_CTRL2_REG);
+
+ /* Clear MSI address */
+ advk_writel(pcie, 0, PCIE_MSI_ADDR_LOW_REG);
+ advk_writel(pcie, 0, PCIE_MSI_ADDR_HIGH_REG);
+
+ /* Mask all interrupts */
+ advk_writel(pcie, PCIE_MSI_ALL_MASK, PCIE_MSI_MASK_REG);
+ advk_writel(pcie, PCIE_ISR0_ALL_MASK, PCIE_ISR0_MASK_REG);
+ advk_writel(pcie, PCIE_ISR1_ALL_MASK, PCIE_ISR1_MASK_REG);
+ advk_writel(pcie, PCIE_IRQ_ALL_MASK, HOST_CTRL_INT_MASK_REG);
+
+ /* Clear all interrupts */
+ advk_writel(pcie, PCIE_MSI_ALL_MASK, PCIE_MSI_STATUS_REG);
+ advk_writel(pcie, PCIE_ISR0_ALL_MASK, PCIE_ISR0_REG);
+ advk_writel(pcie, PCIE_ISR1_ALL_MASK, PCIE_ISR1_REG);
+ advk_writel(pcie, PCIE_IRQ_ALL_MASK, HOST_CTRL_INT_STATUS_REG);
+
/* Remove IRQ domains */
advk_pcie_remove_msi_irq_domain(pcie);
advk_pcie_remove_irq_domain(pcie);

View File

@ -1,33 +0,0 @@
From 2f040a17f5061457ae95035326d3159eddc1e5cc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org>
Date: Tue, 30 Nov 2021 18:29:10 +0100
Subject: [PATCH] PCI: aardvark: Fix memory leak in driver unbind
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Free config space for emulated root bridge when unbinding driver to fix
memory leak. Do it after disabling and masking all interrupts, since
aardvark interrupt handler accesses config space of emulated root
bridge.
Link: https://lore.kernel.org/r/20211130172913.9727-9-kabel@kernel.org
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
---
drivers/pci/controller/pci-aardvark.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
@@ -1718,6 +1718,9 @@ static int advk_pcie_remove(struct platf
advk_pcie_remove_msi_irq_domain(pcie);
advk_pcie_remove_irq_domain(pcie);
+ /* Free config space for emulated root bridge */
+ pci_bridge_emul_cleanup(&pcie->bridge);
+
/* Disable outbound address windows mapping */
for (i = 0; i < OB_WIN_COUNT; i++)
advk_pcie_disable_ob_win(pcie, i);

View File

@ -1,33 +0,0 @@
From 1f54391be8ce0c981d312cb93acdc5608def576a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org>
Date: Tue, 30 Nov 2021 18:29:11 +0100
Subject: [PATCH] PCI: aardvark: Assert PERST# when unbinding driver
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Put the PCIe card into reset by asserting PERST# signal when unbinding
driver. It doesn't make sense to leave the card working if it can't
communicate with the host. This should also save some power.
Link: https://lore.kernel.org/r/20211130172913.9727-10-kabel@kernel.org
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
---
drivers/pci/controller/pci-aardvark.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
@@ -1721,6 +1721,10 @@ static int advk_pcie_remove(struct platf
/* Free config space for emulated root bridge */
pci_bridge_emul_cleanup(&pcie->bridge);
+ /* Assert PERST# signal which prepares PCIe card for power down */
+ if (pcie->reset_gpio)
+ gpiod_set_value_cansleep(pcie->reset_gpio, 1);
+
/* Disable outbound address windows mapping */
for (i = 0; i < OB_WIN_COUNT; i++)
advk_pcie_disable_ob_win(pcie, i);

View File

@ -1,34 +0,0 @@
From 759dec2e3dfdbd261c41d2279f04f2351c971a49 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org>
Date: Tue, 30 Nov 2021 18:29:12 +0100
Subject: [PATCH] PCI: aardvark: Disable link training when unbinding driver
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Disable link training circuit in driver unbind sequence. We want to
leave link training in the same state as it was before the driver was
probed.
Link: https://lore.kernel.org/r/20211130172913.9727-11-kabel@kernel.org
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
---
drivers/pci/controller/pci-aardvark.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
@@ -1725,6 +1725,11 @@ static int advk_pcie_remove(struct platf
if (pcie->reset_gpio)
gpiod_set_value_cansleep(pcie->reset_gpio, 1);
+ /* Disable link training */
+ val = advk_readl(pcie, PCIE_CORE_CTRL0_REG);
+ val &= ~LINK_TRAINING_EN;
+ advk_writel(pcie, val, PCIE_CORE_CTRL0_REG);
+
/* Disable outbound address windows mapping */
for (i = 0; i < OB_WIN_COUNT; i++)
advk_pcie_disable_ob_win(pcie, i);

View File

@ -1,30 +0,0 @@
From fdbbe242c15a8f2cd0e3ad8a56cd0a447b771d0d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org>
Date: Tue, 30 Nov 2021 18:29:13 +0100
Subject: [PATCH] PCI: aardvark: Disable common PHY when unbinding driver
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Disable the PCIe PHY when unbinding driver. This should save some power.
Link: https://lore.kernel.org/r/20211130172913.9727-12-kabel@kernel.org
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
---
drivers/pci/controller/pci-aardvark.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
@@ -1734,6 +1734,9 @@ static int advk_pcie_remove(struct platf
for (i = 0; i < OB_WIN_COUNT; i++)
advk_pcie_disable_ob_win(pcie, i);
+ /* Disable phy */
+ advk_pcie_disable_phy(pcie);
+
return 0;
}

View File

@ -19,7 +19,7 @@
#define QUECTEL_VENDOR_ID 0x2c7c
/* These Quectel products use Quectel's vendor ID */
@@ -1127,6 +1129,11 @@ static const struct usb_device_id option
@@ -1129,6 +1131,11 @@ static const struct usb_device_id option
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EG95, 0xff, 0, 0) },
{ USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96),
.driver_info = RSVD(4) },

View File

@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
"__kstrtabns_" #sym ": \n" \
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -385,7 +385,7 @@ targets += $(real-dtb-y) $(lib-y) $(alwa
@@ -396,7 +396,7 @@ targets += $(real-dtb-y) $(lib-y) $(alwa
# Linker scripts preprocessor (.lds.S -> .lds)
# ---------------------------------------------------------------------------
quiet_cmd_cpp_lds_S = LDS $@

View File

@ -23,7 +23,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
{ {0x02, 0x21}, "lz4", unlz4 },
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -413,7 +413,7 @@ quiet_cmd_bzip2 = BZIP2 $@
@@ -402,7 +402,7 @@ quiet_cmd_bzip2 = BZIP2 $@
# ---------------------------------------------------------------------------
quiet_cmd_lzma = LZMA $@

View File

@ -272,7 +272,7 @@
obj-$(CONFIG_MTD_BLOCK) += mtdblock.o
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -608,6 +608,24 @@ static inline void mtd_align_erase_req(s
@@ -606,6 +606,24 @@ static inline void mtd_align_erase_req(s
req->len += mtd->erasesize - mod;
}
@ -297,7 +297,7 @@
static inline uint32_t mtd_div_by_ws(uint64_t sz, struct mtd_info *mtd)
{
if (mtd->writesize_shift)
@@ -680,6 +698,13 @@ extern void __put_mtd_device(struct mtd_
@@ -678,6 +696,13 @@ extern void __put_mtd_device(struct mtd_
extern struct mtd_info *get_mtd_device_nm(const char *name);
extern void put_mtd_device(struct mtd_info *mtd);

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