Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
commit
8944e968f2
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=uboot-envtools
|
||||
PKG_DISTNAME:=u-boot
|
||||
PKG_VERSION:=2022.07
|
||||
PKG_VERSION:=2022.10
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
|
||||
@ -17,7 +17,7 @@ PKG_SOURCE_URL:= \
|
||||
https://ftp.denx.de/pub/u-boot \
|
||||
https://mirror.cyberbits.eu/u-boot \
|
||||
ftp://ftp.denx.de/pub/u-boot
|
||||
PKG_HASH:=92b08eb49c24da14c1adbf70a71ae8f37cc53eeb4230e859ad8b6733d13dcf5e
|
||||
PKG_HASH:=50b4482a505bc281ba8470c399a3c26e145e29b23500bc35c50debd7fa46bdf8
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_DISTNAME)-$(PKG_VERSION)
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_DISTNAME)-$(PKG_VERSION)
|
||||
|
||||
|
||||
@ -0,0 +1,31 @@
|
||||
From 1add37b567a7dee39d99f37b37802034c3fce9c4 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Schwab <schwab@linux-m68k.org>
|
||||
Date: Sun, 20 Mar 2022 14:01:54 +0100
|
||||
Subject: [PATCH] Add support for readline 8.2
|
||||
|
||||
In readline 8.2 the type of rl_completer_word_break_characters changed to
|
||||
include const.
|
||||
---
|
||||
gdb/completer.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/gdb/completer.c
|
||||
+++ b/gdb/completer.c
|
||||
@@ -36,7 +36,7 @@
|
||||
calling a hook instead so we eliminate the CLI dependency. */
|
||||
#include "gdbcmd.h"
|
||||
|
||||
-/* Needed for rl_completer_word_break_characters() and for
|
||||
+/* Needed for rl_completer_word_break_characters and for
|
||||
rl_filename_completion_function. */
|
||||
#include "readline/readline.h"
|
||||
|
||||
@@ -2011,7 +2011,7 @@ gdb_completion_word_break_characters_thr
|
||||
rl_basic_quote_characters = NULL;
|
||||
}
|
||||
|
||||
- return rl_completer_word_break_characters;
|
||||
+ return (char *) rl_completer_word_break_characters;
|
||||
}
|
||||
|
||||
char *
|
||||
@ -1,12 +1,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=trace-cmd
|
||||
PKG_VERSION:=v3.1.3
|
||||
PKG_RELEASE:=2
|
||||
PKG_VERSION:=v3.1.4
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/snapshot/
|
||||
PKG_HASH:=1fd8515f38fc29fd7a66e7b6b5931856906522e8a1845999fc9033fc80d7b676
|
||||
PKG_HASH:=447e095dbdfb0d362ab8c2086d62d80c5a2ecf67aef09b8f6b0cc064c0e1bfb5
|
||||
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=linux-firmware
|
||||
PKG_VERSION:=20220913
|
||||
PKG_VERSION:=20221012
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/firmware
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_HASH:=26fd00f2d8e96c4af6f44269a6b893eb857253044f75ad28ef6706a2250cd8e9
|
||||
PKG_HASH:=e9d174af729511c8cccb60ec4e0b223b3c44b67d813b42d1ab9813acfa667fa5
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
|
||||
@ -28,23 +28,8 @@ define KernelPackage/button-hotplug/description
|
||||
If your device uses GPIO buttons, see gpio-button-hotplug.
|
||||
endef
|
||||
|
||||
EXTRA_KCONFIG:= \
|
||||
CONFIG_BUTTON_HOTPLUG=m
|
||||
|
||||
EXTRA_CFLAGS:= \
|
||||
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(EXTRA_KCONFIG)))) \
|
||||
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
|
||||
|
||||
MAKE_OPTS:= \
|
||||
$(KERNEL_MAKE_FLAGS) \
|
||||
M="$(PKG_BUILD_DIR)" \
|
||||
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
|
||||
$(EXTRA_KCONFIG)
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C "$(LINUX_DIR)" \
|
||||
$(MAKE_OPTS) \
|
||||
modules
|
||||
$(KERNEL_MAKE) M="$(PKG_BUILD_DIR)" modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,button-hotplug))
|
||||
|
||||
@ -1,2 +0,0 @@
|
||||
config BUTTON_HOTPLUG
|
||||
tristate "Button Hotplug driver"
|
||||
@ -1 +1 @@
|
||||
obj-${CONFIG_BUTTON_HOTPLUG} += button-hotplug.o
|
||||
obj-m := button-hotplug.o
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ksmbd
|
||||
PKG_VERSION:=3.4.5
|
||||
PKG_VERSION:=3.4.6
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/cifsd-team/cifsd/tar.gz/$(PKG_VERSION)?
|
||||
PKG_HASH:=2873c8ba1027fc5b04c5f5344804ef1469ad7019a033456c16ca4aa3f2c161f0
|
||||
PKG_HASH:=d742992692dbe164060d2a0ea668895ed2b86252f10427db3d3a002df44c445b
|
||||
|
||||
PKG_LICENSE:=GPL-2.0-or-later
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
@ -1,69 +0,0 @@
|
||||
From 98bc509f92cccedd7d51d5ebadc424e2d7f5cbb4 Mon Sep 17 00:00:00 2001
|
||||
From: Chukun Pan <amadeus@jmu.edu.cn>
|
||||
Date: Tue, 5 Jul 2022 15:20:10 +0800
|
||||
Subject: [PATCH] ksmbd: fixes build on kernel 5.15.52 or higher
|
||||
|
||||
The 5.15.52 kernel downported two commits "fs: remove unused low-level
|
||||
mapping helpers" and "fs: use low-level mapping helpers", which broken
|
||||
the compilation[1]. This commit fixed it.
|
||||
|
||||
1. https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.52
|
||||
|
||||
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
|
||||
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
|
||||
---
|
||||
smbacl.c | 6 ++++--
|
||||
smbacl.h | 6 ++++--
|
||||
2 files changed, 8 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/smbacl.c b/smbacl.c
|
||||
index 275e357..19c682a 100644
|
||||
--- a/smbacl.c
|
||||
+++ b/smbacl.c
|
||||
@@ -281,7 +281,8 @@ static int sid_to_id(struct user_namespace *user_ns,
|
||||
uid_t id;
|
||||
|
||||
id = le32_to_cpu(psid->sub_auth[psid->num_subauth - 1]);
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0) || \
|
||||
+ (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 52) && LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0))
|
||||
uid = mapped_kuid_user(user_ns, &init_user_ns, KUIDT_INIT(id));
|
||||
#else
|
||||
/*
|
||||
@@ -304,7 +305,8 @@ static int sid_to_id(struct user_namespace *user_ns,
|
||||
gid_t id;
|
||||
|
||||
id = le32_to_cpu(psid->sub_auth[psid->num_subauth - 1]);
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0) || \
|
||||
+ (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 52) && LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0))
|
||||
gid = mapped_kgid_user(user_ns, &init_user_ns, KGIDT_INIT(id));
|
||||
#else
|
||||
/*
|
||||
diff --git a/smbacl.h b/smbacl.h
|
||||
index f2bcdb4..7368bf4 100644
|
||||
--- a/smbacl.h
|
||||
+++ b/smbacl.h
|
||||
@@ -221,7 +221,8 @@ static inline uid_t posix_acl_uid_translate(struct user_namespace *mnt_userns,
|
||||
kuid_t kuid;
|
||||
|
||||
/* If this is an idmapped mount, apply the idmapping. */
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0) || \
|
||||
+ (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 52) && LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0))
|
||||
kuid = mapped_kuid_fs(mnt_userns, &init_user_ns, pace->e_uid);
|
||||
#else
|
||||
kuid = kuid_into_mnt(mnt_userns, pace->e_uid);
|
||||
@@ -241,7 +242,8 @@ static inline gid_t posix_acl_gid_translate(struct user_namespace *mnt_userns,
|
||||
kgid_t kgid;
|
||||
|
||||
/* If this is an idmapped mount, apply the idmapping. */
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0) || \
|
||||
+ (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 52) && LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0))
|
||||
kgid = mapped_kgid_fs(mnt_userns, &init_user_ns, pace->e_gid);
|
||||
#else
|
||||
kgid = kgid_into_mnt(mnt_userns, pace->e_gid);
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -28,6 +28,7 @@
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/version.h>
|
||||
#include <generated/utsrelease.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
@ -46,6 +46,7 @@
|
||||
#include <linux/modversions.h>
|
||||
#endif
|
||||
#include <linux/module.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/errno.h>
|
||||
|
||||
@ -43,7 +43,12 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/crypto.h>
|
||||
#include <linux/version.h>
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,11,0)
|
||||
#include <crypto/sha.h>
|
||||
#else
|
||||
#include <crypto/sha1.h>
|
||||
#endif
|
||||
#include <crypto/hash.h>
|
||||
#include <crypto/internal/hash.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
@ -44,7 +44,12 @@
|
||||
#include <linux/mm.h>
|
||||
#include <linux/crypto.h>
|
||||
#include <crypto/internal/hash.h>
|
||||
#include <linux/version.h>
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,11,0)
|
||||
#include <crypto/sha.h>
|
||||
#else
|
||||
#include <crypto/sha1.h>
|
||||
#endif
|
||||
#include <linux/types.h>
|
||||
#include <linux/scatterlist.h>
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
@ -22,3 +22,71 @@
|
||||
if (pVirtAddr == IFX_NULL)
|
||||
{
|
||||
IFXOS_PRN_USR_ERR_NL( IFXOS, IFXOS_PRN_LEVEL_ERR,
|
||||
--- a/src/linux/ifxos_linux_socket_drv.c
|
||||
+++ b/src/linux/ifxos_linux_socket_drv.c
|
||||
@@ -165,8 +165,12 @@ IFX_int_t IFXOS_SocketRecvFrom(
|
||||
IFXOS_sockAddr_t *pSocAddr)
|
||||
{
|
||||
struct msghdr msg;
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,13,0)
|
||||
struct iovec iov;
|
||||
mm_segment_t old_fs;
|
||||
+#else
|
||||
+ struct kvec iov;
|
||||
+#endif
|
||||
int ret;
|
||||
|
||||
IFXOS_RETURN_IF_POINTER_NULL(pBuffer, IFX_ERROR);
|
||||
@@ -181,6 +185,8 @@ IFX_int_t IFXOS_SocketRecvFrom(
|
||||
msg.msg_controllen = 0;
|
||||
msg.msg_flags = 0;
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,13,0)
|
||||
+
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0))
|
||||
msg.msg_iov = &iov;
|
||||
msg.msg_iovlen = 1;
|
||||
@@ -200,6 +206,10 @@ IFX_int_t IFXOS_SocketRecvFrom(
|
||||
#endif
|
||||
set_fs(old_fs);
|
||||
|
||||
+#else
|
||||
+ ret = kernel_recvmsg (socFd, &msg, &iov, 1, bufSize_byte, 0);
|
||||
+#endif
|
||||
+
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -229,8 +239,12 @@ IFX_int_t IFXOS_SocketSendTo(
|
||||
IFXOS_sockAddr_t *pSocAddr)
|
||||
{
|
||||
struct msghdr msg;
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,13,0)
|
||||
struct iovec iov;
|
||||
mm_segment_t old_fs;
|
||||
+#else
|
||||
+ struct kvec iov;
|
||||
+#endif
|
||||
int ret;
|
||||
|
||||
IFXOS_RETURN_IF_POINTER_NULL(pBuffer, IFX_ERROR);
|
||||
@@ -245,6 +259,8 @@ IFX_int_t IFXOS_SocketSendTo(
|
||||
msg.msg_controllen = 0;
|
||||
msg.msg_flags = MSG_DONTWAIT;
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,13,0)
|
||||
+
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0))
|
||||
msg.msg_iov = &iov;
|
||||
msg.msg_iovlen = 1;
|
||||
@@ -264,6 +280,10 @@ IFX_int_t IFXOS_SocketSendTo(
|
||||
#endif
|
||||
set_fs(old_fs);
|
||||
|
||||
+#else
|
||||
+ ret = kernel_sendmsg(socFd, &msg, &iov, 1, bufSize_byte);
|
||||
+#endif
|
||||
+
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@ -34,6 +34,16 @@
|
||||
}
|
||||
|
||||
|
||||
@@ -3800,7 +3808,9 @@ module_exit (ifx_tapi_module_exit);
|
||||
|
||||
MODULE_AUTHOR ("Lantiq Deutschland GmbH");
|
||||
MODULE_DESCRIPTION ("TAPI Driver - www.lantiq.com");
|
||||
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(5,10,0)
|
||||
MODULE_SUPPORTED_DEVICE ("TAPI DEVICE");
|
||||
+#endif
|
||||
MODULE_LICENSE ("Dual BSD/GPL");
|
||||
|
||||
EXPORT_SYMBOL (IFX_TAPI_Register_LL_Drv);
|
||||
--- a/src/drv_tapi_kpi.c
|
||||
+++ b/src/drv_tapi_kpi.c
|
||||
@@ -134,7 +134,11 @@ extern IFX_int32_t block_ingre
|
||||
|
||||
@ -43,7 +43,18 @@
|
||||
#ifdef MODULE
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
|
||||
MODULE_PARM(major_number, "b");
|
||||
@@ -1479,7 +1483,11 @@ struct proc_entry {
|
||||
@@ -1256,7 +1260,9 @@ static long MEI_Ioctl( struct file *filp
|
||||
MEI_IOCTL_RETURN:
|
||||
|
||||
local_args.drv_ioctl.retCode = ret;
|
||||
- copy_to_user( ((IOCTL_MEI_arg_t *)nArgument), &local_args, retSize);
|
||||
+ if ( ret == IFX_SUCCESS &&
|
||||
+ copy_to_user( ((IOCTL_MEI_arg_t *)nArgument), &local_args, retSize) )
|
||||
+ ret = -e_MEI_ERR_RETURN_ARG;
|
||||
|
||||
return (ret < 0) ? -1 : 0;
|
||||
}
|
||||
@@ -1479,7 +1485,11 @@ struct proc_entry {
|
||||
char name[32];
|
||||
proc_rd_callback_t rd;
|
||||
proc_wr_callback_t wr;
|
||||
@ -55,7 +66,7 @@
|
||||
int entity;
|
||||
};
|
||||
|
||||
@@ -1869,6 +1877,7 @@ static int mei_proc_single_open(struct i
|
||||
@@ -1869,6 +1879,7 @@ static int mei_proc_single_open(struct i
|
||||
static void mei_proc_entry_create(struct proc_dir_entry *parent_node,
|
||||
struct proc_entry *proc_entry)
|
||||
{
|
||||
@ -63,7 +74,7 @@
|
||||
memset(&proc_entry->ops, 0, sizeof(struct file_operations));
|
||||
proc_entry->ops.owner = THIS_MODULE;
|
||||
|
||||
@@ -1879,6 +1888,17 @@ static void mei_proc_entry_create(struct
|
||||
@@ -1879,6 +1890,17 @@ static void mei_proc_entry_create(struct
|
||||
proc_entry->ops.llseek = seq_lseek;
|
||||
if (proc_entry->wr)
|
||||
proc_entry->ops.write = proc_entry->wr;
|
||||
@ -81,7 +92,7 @@
|
||||
|
||||
proc_create_data(proc_entry->name,
|
||||
(S_IFREG | S_IRUGO),
|
||||
@@ -2174,9 +2194,11 @@ static int MEI_module_init (void)
|
||||
@@ -2174,9 +2196,11 @@ static int MEI_module_init (void)
|
||||
return (result);
|
||||
}
|
||||
|
||||
@ -93,7 +104,7 @@
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -2304,6 +2326,10 @@ static void MEI_module_exit (void)
|
||||
@@ -2304,6 +2328,10 @@ static void MEI_module_exit (void)
|
||||
|
||||
#else
|
||||
unregister_chrdev ( major_number , DRV_MEI_NAME );
|
||||
@ -104,7 +115,7 @@
|
||||
#endif
|
||||
|
||||
#if CONFIG_PROC_FS
|
||||
@@ -2388,9 +2414,11 @@ static void MEI_module_exit (void)
|
||||
@@ -2388,9 +2416,11 @@ static void MEI_module_exit (void)
|
||||
("MEI_DRV: Chipset Basic Exit failed" MEI_DRV_CRLF));
|
||||
}
|
||||
|
||||
@ -116,7 +127,7 @@
|
||||
|
||||
#if (MEI_SUPPORT_DEBUG_LOGGER == 1)
|
||||
if (nl_debug_sock)
|
||||
@@ -2514,6 +2542,10 @@ static int MEI_InitModuleRegCharDev(cons
|
||||
@@ -2514,6 +2544,10 @@ static int MEI_InitModuleRegCharDev(cons
|
||||
("Using major number %d" MEI_DRV_CRLF, major_number));
|
||||
}
|
||||
|
||||
@ -127,7 +138,7 @@
|
||||
return 0;
|
||||
#endif /* CONFIG_DEVFS_FS */
|
||||
}
|
||||
@@ -2563,21 +2595,32 @@ static int MEI_InitModuleBasics(void)
|
||||
@@ -2563,21 +2597,32 @@ static int MEI_InitModuleBasics(void)
|
||||
}
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0))
|
||||
@ -160,7 +171,7 @@
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -2905,11 +2948,15 @@ IFX_int32_t MEI_IoctlInitDevice(
|
||||
@@ -2905,11 +2950,15 @@ IFX_int32_t MEI_IoctlInitDevice(
|
||||
pMeiDev->eModePoll = e_MEI_DEV_ACCESS_MODE_IRQ;
|
||||
pMeiDev->intMask = ME_ARC2ME_INTERRUPT_UNMASK_ALL;
|
||||
|
||||
@ -176,6 +187,46 @@
|
||||
|
||||
pTmpXCntrl = MEI_VrxXDevToIrqListAdd(
|
||||
MEI_DRV_LINENUM_GET(pMeiDev),
|
||||
@@ -3249,9 +3298,11 @@ static int MEI_IoctlMeiDbgAccessWr_Wrap(
|
||||
ret = MEI_IoctlMeiDbgAccessWr( pMeiDynCntrl, pLocalArgument);
|
||||
|
||||
/* return arguments - count */
|
||||
- copy_to_user( (void *)&pUserArgument->count,
|
||||
- (void *)&pLocalArgument->count,
|
||||
- sizeof(pUserArgument->count) ) ;
|
||||
+ if ( ret == IFX_SUCCESS &&
|
||||
+ copy_to_user( (void *)&pUserArgument->count,
|
||||
+ (void *)&pLocalArgument->count,
|
||||
+ sizeof(pUserArgument->count) ) )
|
||||
+ ret = -e_MEI_ERR_RETURN_ARG;
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -3278,16 +3329,18 @@ static int MEI_IoctlMeiDbgAccessRd_Wrap(
|
||||
if ( pLocalArgument->count )
|
||||
{
|
||||
/* return the buffer */
|
||||
- copy_to_user( pUserBuf,
|
||||
- pLocalArgument->pData_32,
|
||||
- pLocalArgument->count * sizeof(IFX_uint32_t) ) ;
|
||||
+ if ( copy_to_user( pUserBuf,
|
||||
+ pLocalArgument->pData_32,
|
||||
+ pLocalArgument->count * sizeof(IFX_uint32_t) ) )
|
||||
+ ret = -e_MEI_ERR_RETURN_ARG;
|
||||
|
||||
}
|
||||
|
||||
/* return count argument */
|
||||
- copy_to_user( (void *)&pUserArgument->count,
|
||||
- (void *)&pLocalArgument->count,
|
||||
- sizeof(pUserArgument->count) ) ;
|
||||
+ if ( copy_to_user( (void *)&pUserArgument->count,
|
||||
+ (void *)&pLocalArgument->count,
|
||||
+ sizeof(pUserArgument->count) ) )
|
||||
+ ret = -e_MEI_ERR_RETURN_ARG;
|
||||
|
||||
return ret;
|
||||
}
|
||||
--- a/src/drv_mei_cpe_api_atm_ptm_intern.c
|
||||
+++ b/src/drv_mei_cpe_api_atm_ptm_intern.c
|
||||
@@ -147,6 +147,7 @@ IFX_int32_t MEI_InternalXtmSwhowtimeExit
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/src/drv_mei_cpe_linux.c
|
||||
+++ b/src/drv_mei_cpe_linux.c
|
||||
@@ -1503,8 +1503,8 @@ struct proc_entry {
|
||||
@@ -1505,8 +1505,8 @@ struct proc_entry {
|
||||
static void MEI_GetVersionProc(struct seq_file *s)
|
||||
{
|
||||
seq_printf(s, "%s" MEI_DRV_CRLF, &MEI_WHATVERSION[4]);
|
||||
@ -11,3 +11,13 @@
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4233,7 +4233,9 @@ module_exit (MEI_module_exit);
|
||||
#ifdef MODULE
|
||||
MODULE_AUTHOR("www.lantiq.com");
|
||||
MODULE_DESCRIPTION("MEI CPE Driver - www.lantiq.com");
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,11,0))
|
||||
MODULE_SUPPORTED_DEVICE("MEI CPE Interface");
|
||||
+#endif
|
||||
MODULE_LICENSE ("GPL");
|
||||
#endif /* #ifdef MODULE*/
|
||||
|
||||
|
||||
@ -9,6 +9,16 @@
|
||||
/* ============================= */
|
||||
/* Local Macros & Definitions */
|
||||
/* ============================= */
|
||||
@@ -862,7 +864,9 @@ void vmmc_module_exit(void)
|
||||
#ifdef MODULE
|
||||
MODULE_DESCRIPTION("VMMC(VoiceMacroMipsCore) device driver - www.lantiq.com");
|
||||
MODULE_AUTHOR("Lantiq Deutschland GmbH");
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,11,0))
|
||||
MODULE_SUPPORTED_DEVICE("DANUBE, TWINPASS, INCA-IP2, AR9, VR9");
|
||||
+#endif
|
||||
MODULE_LICENSE("Dual BSD/GPL");
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17))
|
||||
--- a/src/mps/drv_mps_vmmc_linux.c
|
||||
+++ b/src/mps/drv_mps_vmmc_linux.c
|
||||
@@ -80,11 +80,15 @@
|
||||
|
||||
@ -727,10 +727,10 @@ ifndef CONFIG_TARGET_x86_64
|
||||
FILES+= \
|
||||
$(LINUX_DIR)/arch/x86/crypto/twofish-i586.ko \
|
||||
$(LINUX_DIR)/arch/x86/crypto/serpent-sse2-i586.ko \
|
||||
$(LINUX_DIR)/arch/x86/crypto/glue_helper.ko \
|
||||
$(LINUX_DIR)/arch/x86/crypto/glue_helper.ko@lt5.12 \
|
||||
$(LINUX_DIR)/crypto/cryptd.ko \
|
||||
$(LINUX_DIR)/crypto/crypto_simd.ko
|
||||
AUTOLOAD+= $(call AutoLoad,10,cryptd glue_helper \
|
||||
AUTOLOAD+= $(call AutoLoad,10,cryptd glue_helper@lt5.12 \
|
||||
serpent-sse2-i586 twofish-i586 blowfish_generic)
|
||||
endef
|
||||
endif
|
||||
|
||||
@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=mac80211
|
||||
|
||||
PKG_VERSION:=5.15.58-1
|
||||
PKG_RELEASE:=2
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.15.58/
|
||||
PKG_HASH:=a3c2a2b7bbaf8943c65fd72f4e7d7ad5e205aeae28b26c835f9d8afa0f9810bf
|
||||
PKG_VERSION:=5.15.74-1
|
||||
PKG_RELEASE:=1
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.15.74/
|
||||
PKG_HASH:=98098d0cab24cc76a04db738dc746a0c8d38d180398805481224f141cca06423
|
||||
|
||||
PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)
|
||||
@ -426,8 +426,8 @@ ifeq ($(BUILD_VARIANT),smallbuffers)
|
||||
C_DEFINES+= -DCONFIG_ATH10K_SMALLBUFFERS
|
||||
endif
|
||||
|
||||
MAKE_OPTS:= -C "$(PKG_BUILD_DIR)" \
|
||||
$(KERNEL_MAKE_FLAGS) \
|
||||
MAKE_OPTS:= \
|
||||
$(subst -C $(LINUX_DIR),-C "$(PKG_BUILD_DIR)",$(KERNEL_MAKEOPTS)) \
|
||||
EXTRA_CFLAGS="-I$(PKG_BUILD_DIR)/include $(IREMAP_CFLAGS) $(C_DEFINES)" \
|
||||
KLIB_BUILD="$(LINUX_DIR)" \
|
||||
MODPROBE=true \
|
||||
|
||||
@ -152,7 +152,7 @@ Signed-off-by: Pali Rohár <pali@kernel.org>
|
||||
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/main.h
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/main.h
|
||||
@@ -1106,6 +1106,8 @@ void mwifiex_cancel_all_pending_cmd(stru
|
||||
@@ -1108,6 +1108,8 @@ void mwifiex_cancel_all_pending_cmd(stru
|
||||
void mwifiex_cancel_pending_scan_cmd(struct mwifiex_adapter *adapter);
|
||||
void mwifiex_cancel_scan(struct mwifiex_adapter *adapter);
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ Signed-off-by: Xing Song <xing.song@mediatek.com>
|
||||
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -2948,6 +2948,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
|
||||
@@ -2950,6 +2950,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
|
||||
if (!fwd_skb)
|
||||
goto out;
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/drivers/net/wireless/mac80211_hwsim.c
|
||||
+++ b/drivers/net/wireless/mac80211_hwsim.c
|
||||
@@ -3004,15 +3004,19 @@ static void mac80211_hwsim_he_capab(stru
|
||||
@@ -3003,15 +3003,19 @@ static void mac80211_hwsim_he_capab(stru
|
||||
{
|
||||
u16 n_iftype_data;
|
||||
|
||||
@ -34,7 +34,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3302,6 +3306,12 @@ static int mac80211_hwsim_new_radio(stru
|
||||
@@ -3301,6 +3305,12 @@ static int mac80211_hwsim_new_radio(stru
|
||||
sband->vht_cap.vht_mcs.tx_mcs_map =
|
||||
sband->vht_cap.vht_mcs.rx_mcs_map;
|
||||
break;
|
||||
@ -47,7 +47,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
case NL80211_BAND_S1GHZ:
|
||||
memcpy(&sband->s1g_cap, &hwsim_s1g_cap,
|
||||
sizeof(sband->s1g_cap));
|
||||
@@ -3312,6 +3322,13 @@ static int mac80211_hwsim_new_radio(stru
|
||||
@@ -3311,6 +3321,13 @@ static int mac80211_hwsim_new_radio(stru
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
sband->ht_cap.ht_supported = true;
|
||||
sband->ht_cap.cap = IEEE80211_HT_CAP_SUP_WIDTH_20_40 |
|
||||
IEEE80211_HT_CAP_GRN_FLD |
|
||||
@@ -3325,10 +3342,6 @@ static int mac80211_hwsim_new_radio(stru
|
||||
@@ -3324,10 +3341,6 @@ static int mac80211_hwsim_new_radio(stru
|
||||
sband->ht_cap.mcs.rx_mask[0] = 0xff;
|
||||
sband->ht_cap.mcs.rx_mask[1] = 0xff;
|
||||
sband->ht_cap.mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
|
||||
|
||||
@ -69,7 +69,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
#endif /* __MAC80211_DRIVER_OPS */
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -1490,7 +1490,7 @@ struct ieee80211_local {
|
||||
@@ -1489,7 +1489,7 @@ struct ieee80211_local {
|
||||
};
|
||||
|
||||
static inline struct ieee80211_sub_if_data *
|
||||
|
||||
@ -246,7 +246,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
struct rcu_head rcu_head;
|
||||
};
|
||||
|
||||
@@ -1083,6 +1084,20 @@ ieee80211_vif_get_shift(struct ieee80211
|
||||
@@ -1082,6 +1083,20 @@ ieee80211_vif_get_shift(struct ieee80211
|
||||
return shift;
|
||||
}
|
||||
|
||||
|
||||
@ -327,7 +327,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -863,16 +863,20 @@ enum txq_info_flags {
|
||||
@@ -862,16 +862,20 @@ enum txq_info_flags {
|
||||
* @def_flow: used as a fallback flow when a packet destined to @tin hashes to
|
||||
* a fq_flow which is already owned by a different tin
|
||||
* @def_cvars: codel vars for @def_flow
|
||||
@ -350,7 +350,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
unsigned long flags;
|
||||
|
||||
/* keep last! */
|
||||
@@ -949,8 +953,6 @@ struct ieee80211_sub_if_data {
|
||||
@@ -948,8 +952,6 @@ struct ieee80211_sub_if_data {
|
||||
struct ieee80211_tx_queue_params tx_conf[IEEE80211_NUM_ACS];
|
||||
struct mac80211_qos_map __rcu *qos_map;
|
||||
|
||||
@ -359,7 +359,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
struct work_struct csa_finalize_work;
|
||||
bool csa_block_tx; /* write-protected by sdata_lock and local->mtx */
|
||||
struct cfg80211_chan_def csa_chandef;
|
||||
@@ -1185,44 +1187,6 @@ enum mac80211_scan_state {
|
||||
@@ -1184,44 +1186,6 @@ enum mac80211_scan_state {
|
||||
SCAN_ABORT,
|
||||
};
|
||||
|
||||
@ -404,7 +404,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
DECLARE_STATIC_KEY_FALSE(aql_disable);
|
||||
|
||||
struct ieee80211_local {
|
||||
@@ -1236,8 +1200,13 @@ struct ieee80211_local {
|
||||
@@ -1235,8 +1199,13 @@ struct ieee80211_local {
|
||||
struct codel_params cparams;
|
||||
|
||||
/* protects active_txqs and txqi->schedule_order */
|
||||
@ -419,7 +419,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
u32 aql_threshold;
|
||||
atomic_t aql_total_pending_airtime;
|
||||
|
||||
@@ -1654,125 +1623,6 @@ static inline bool txq_has_queue(struct
|
||||
@@ -1660,125 +1629,6 @@ static inline bool txq_has_queue(struct
|
||||
return !(skb_queue_empty(&txqi->frags) && !txqi->tin.backlog_packets);
|
||||
}
|
||||
|
||||
@ -545,7 +545,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
static inline int ieee80211_bssid_match(const u8 *raddr, const u8 *addr)
|
||||
{
|
||||
return ether_addr_equal(raddr, addr) ||
|
||||
@@ -2018,14 +1868,6 @@ int ieee80211_tx_control_port(struct wip
|
||||
@@ -2024,14 +1874,6 @@ int ieee80211_tx_control_port(struct wip
|
||||
u64 *cookie);
|
||||
int ieee80211_probe_mesh_link(struct wiphy *wiphy, struct net_device *dev,
|
||||
const u8 *buf, size_t len);
|
||||
|
||||
@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -1216,6 +1216,7 @@ struct ieee80211_local {
|
||||
@@ -1215,6 +1215,7 @@ struct ieee80211_local {
|
||||
u32 aql_txq_limit_high[IEEE80211_NUM_ACS];
|
||||
u32 aql_threshold;
|
||||
atomic_t aql_total_pending_airtime;
|
||||
|
||||
@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -4265,6 +4265,7 @@ void ieee80211_check_fast_rx(struct sta_
|
||||
@@ -4267,6 +4267,7 @@ void ieee80211_check_fast_rx(struct sta_
|
||||
.vif_type = sdata->vif.type,
|
||||
.control_port_protocol = sdata->control_port_protocol,
|
||||
}, *old, *new = NULL;
|
||||
@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
bool set_offload = false;
|
||||
bool assign = false;
|
||||
bool offload;
|
||||
@@ -4380,10 +4381,10 @@ void ieee80211_check_fast_rx(struct sta_
|
||||
@@ -4382,10 +4383,10 @@ void ieee80211_check_fast_rx(struct sta_
|
||||
if (assign)
|
||||
new = kmemdup(&fastrx, sizeof(fastrx), GFP_KERNEL);
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -4601,7 +4601,7 @@ static bool ieee80211_invoke_fast_rx(str
|
||||
@@ -4603,7 +4603,7 @@ static bool ieee80211_invoke_fast_rx(str
|
||||
|
||||
if (!(status->rx_flags & IEEE80211_RX_AMSDU)) {
|
||||
if (!pskb_may_pull(skb, snap_offs + sizeof(*payload)))
|
||||
|
||||
@ -1,110 +0,0 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Mon, 20 Sep 2021 15:40:07 +0200
|
||||
Subject: [PATCH] mac80211: mesh: clean up rx_bcn_presp API
|
||||
|
||||
commit a5b983c6073140b624f64e79fea6d33c3e4315a0 upstream.
|
||||
|
||||
We currently pass the entire elements to the rx_bcn_presp()
|
||||
method, but only need mesh_config. Additionally, we use the
|
||||
length of the elements to calculate back the entire frame's
|
||||
length, but that's confusing - just pass the length of the
|
||||
frame instead.
|
||||
|
||||
Link: https://lore.kernel.org/r/20210920154009.a18ed3d2da6c.I1824b773a0fbae4453e1433c184678ca14e8df45@changeid
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -645,10 +645,9 @@ struct ieee80211_if_ocb {
|
||||
*/
|
||||
struct ieee802_11_elems;
|
||||
struct ieee80211_mesh_sync_ops {
|
||||
- void (*rx_bcn_presp)(struct ieee80211_sub_if_data *sdata,
|
||||
- u16 stype,
|
||||
- struct ieee80211_mgmt *mgmt,
|
||||
- struct ieee802_11_elems *elems,
|
||||
+ void (*rx_bcn_presp)(struct ieee80211_sub_if_data *sdata, u16 stype,
|
||||
+ struct ieee80211_mgmt *mgmt, unsigned int len,
|
||||
+ const struct ieee80211_meshconf_ie *mesh_cfg,
|
||||
struct ieee80211_rx_status *rx_status);
|
||||
|
||||
/* should be called with beacon_data under RCU read lock */
|
||||
--- a/net/mac80211/mesh.c
|
||||
+++ b/net/mac80211/mesh.c
|
||||
@@ -1354,8 +1354,8 @@ static void ieee80211_mesh_rx_bcn_presp(
|
||||
}
|
||||
|
||||
if (ifmsh->sync_ops)
|
||||
- ifmsh->sync_ops->rx_bcn_presp(sdata,
|
||||
- stype, mgmt, &elems, rx_status);
|
||||
+ ifmsh->sync_ops->rx_bcn_presp(sdata, stype, mgmt, len,
|
||||
+ elems.mesh_config, rx_status);
|
||||
}
|
||||
|
||||
int ieee80211_mesh_finish_csa(struct ieee80211_sub_if_data *sdata)
|
||||
--- a/net/mac80211/mesh_sync.c
|
||||
+++ b/net/mac80211/mesh_sync.c
|
||||
@@ -3,6 +3,7 @@
|
||||
* Copyright 2011-2012, Pavel Zubarev <pavel.zubarev@gmail.com>
|
||||
* Copyright 2011-2012, Marco Porsch <marco.porsch@s2005.tu-chemnitz.de>
|
||||
* Copyright 2011-2012, cozybit Inc.
|
||||
+ * Copyright (C) 2021 Intel Corporation
|
||||
*/
|
||||
|
||||
#include "ieee80211_i.h"
|
||||
@@ -35,12 +36,12 @@ struct sync_method {
|
||||
/**
|
||||
* mesh_peer_tbtt_adjusting - check if an mp is currently adjusting its TBTT
|
||||
*
|
||||
- * @ie: information elements of a management frame from the mesh peer
|
||||
+ * @cfg: mesh config element from the mesh peer (or %NULL)
|
||||
*/
|
||||
-static bool mesh_peer_tbtt_adjusting(struct ieee802_11_elems *ie)
|
||||
+static bool mesh_peer_tbtt_adjusting(const struct ieee80211_meshconf_ie *cfg)
|
||||
{
|
||||
- return (ie->mesh_config->meshconf_cap &
|
||||
- IEEE80211_MESHCONF_CAPAB_TBTT_ADJUSTING) != 0;
|
||||
+ return cfg &&
|
||||
+ (cfg->meshconf_cap & IEEE80211_MESHCONF_CAPAB_TBTT_ADJUSTING);
|
||||
}
|
||||
|
||||
void mesh_sync_adjust_tsf(struct ieee80211_sub_if_data *sdata)
|
||||
@@ -76,11 +77,11 @@ void mesh_sync_adjust_tsf(struct ieee802
|
||||
}
|
||||
}
|
||||
|
||||
-static void mesh_sync_offset_rx_bcn_presp(struct ieee80211_sub_if_data *sdata,
|
||||
- u16 stype,
|
||||
- struct ieee80211_mgmt *mgmt,
|
||||
- struct ieee802_11_elems *elems,
|
||||
- struct ieee80211_rx_status *rx_status)
|
||||
+static void
|
||||
+mesh_sync_offset_rx_bcn_presp(struct ieee80211_sub_if_data *sdata, u16 stype,
|
||||
+ struct ieee80211_mgmt *mgmt, unsigned int len,
|
||||
+ const struct ieee80211_meshconf_ie *mesh_cfg,
|
||||
+ struct ieee80211_rx_status *rx_status)
|
||||
{
|
||||
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
|
||||
struct ieee80211_local *local = sdata->local;
|
||||
@@ -101,10 +102,7 @@ static void mesh_sync_offset_rx_bcn_pres
|
||||
*/
|
||||
if (ieee80211_have_rx_timestamp(rx_status))
|
||||
t_r = ieee80211_calculate_rx_timestamp(local, rx_status,
|
||||
- 24 + 12 +
|
||||
- elems->total_len +
|
||||
- FCS_LEN,
|
||||
- 24);
|
||||
+ len + FCS_LEN, 24);
|
||||
else
|
||||
t_r = drv_get_tsf(local, sdata);
|
||||
|
||||
@@ -119,7 +117,7 @@ static void mesh_sync_offset_rx_bcn_pres
|
||||
* dot11MeshNbrOffsetMaxNeighbor non-peer non-MBSS neighbors
|
||||
*/
|
||||
|
||||
- if (elems->mesh_config && mesh_peer_tbtt_adjusting(elems)) {
|
||||
+ if (mesh_peer_tbtt_adjusting(mesh_cfg)) {
|
||||
msync_dbg(sdata, "STA %pM : is adjusting TBTT\n",
|
||||
sta->sta.addr);
|
||||
goto no_sync;
|
||||
@ -1,82 +0,0 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Mon, 20 Sep 2021 15:40:08 +0200
|
||||
Subject: [PATCH] mac80211: move CRC into struct ieee802_11_elems
|
||||
|
||||
commit c6e37ed498f958254b5459253199e816b6bfc52f upstream.
|
||||
|
||||
We're currently returning this value, but to prepare for
|
||||
returning the allocated structure, move it into there.
|
||||
|
||||
Link: https://lore.kernel.org/r/20210920154009.479b8ebf999d.If0d4ba75ee38998dc3eeae25058aa748efcb2fc9@changeid
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -1530,6 +1530,7 @@ struct ieee80211_csa_ie {
|
||||
struct ieee802_11_elems {
|
||||
const u8 *ie_start;
|
||||
size_t total_len;
|
||||
+ u32 crc;
|
||||
|
||||
/* pointers to IEs */
|
||||
const struct ieee80211_tdls_lnkie *lnk_id;
|
||||
@@ -2089,10 +2090,10 @@ static inline void ieee80211_tx_skb(stru
|
||||
ieee80211_tx_skb_tid(sdata, skb, 7);
|
||||
}
|
||||
|
||||
-u32 ieee802_11_parse_elems_crc(const u8 *start, size_t len, bool action,
|
||||
- struct ieee802_11_elems *elems,
|
||||
- u64 filter, u32 crc, u8 *transmitter_bssid,
|
||||
- u8 *bss_bssid);
|
||||
+void ieee802_11_parse_elems_crc(const u8 *start, size_t len, bool action,
|
||||
+ struct ieee802_11_elems *elems,
|
||||
+ u64 filter, u32 crc, u8 *transmitter_bssid,
|
||||
+ u8 *bss_bssid);
|
||||
static inline void ieee802_11_parse_elems(const u8 *start, size_t len,
|
||||
bool action,
|
||||
struct ieee802_11_elems *elems,
|
||||
--- a/net/mac80211/mlme.c
|
||||
+++ b/net/mac80211/mlme.c
|
||||
@@ -4102,10 +4102,11 @@ static void ieee80211_rx_mgmt_beacon(str
|
||||
*/
|
||||
if (!ieee80211_is_s1g_beacon(hdr->frame_control))
|
||||
ncrc = crc32_be(0, (void *)&mgmt->u.beacon.beacon_int, 4);
|
||||
- ncrc = ieee802_11_parse_elems_crc(variable,
|
||||
- len - baselen, false, &elems,
|
||||
- care_about_ies, ncrc,
|
||||
- mgmt->bssid, bssid);
|
||||
+ ieee802_11_parse_elems_crc(variable,
|
||||
+ len - baselen, false, &elems,
|
||||
+ care_about_ies, ncrc,
|
||||
+ mgmt->bssid, bssid);
|
||||
+ ncrc = elems.crc;
|
||||
|
||||
if (ieee80211_hw_check(&local->hw, PS_NULLFUNC_STACK) &&
|
||||
ieee80211_check_tim(elems.tim, elems.tim_len, bss_conf->aid)) {
|
||||
--- a/net/mac80211/util.c
|
||||
+++ b/net/mac80211/util.c
|
||||
@@ -1469,10 +1469,10 @@ static size_t ieee802_11_find_bssid_prof
|
||||
return found ? profile_len : 0;
|
||||
}
|
||||
|
||||
-u32 ieee802_11_parse_elems_crc(const u8 *start, size_t len, bool action,
|
||||
- struct ieee802_11_elems *elems,
|
||||
- u64 filter, u32 crc, u8 *transmitter_bssid,
|
||||
- u8 *bss_bssid)
|
||||
+void ieee802_11_parse_elems_crc(const u8 *start, size_t len, bool action,
|
||||
+ struct ieee802_11_elems *elems,
|
||||
+ u64 filter, u32 crc, u8 *transmitter_bssid,
|
||||
+ u8 *bss_bssid)
|
||||
{
|
||||
const struct element *non_inherit = NULL;
|
||||
u8 *nontransmitted_profile;
|
||||
@@ -1524,7 +1524,7 @@ u32 ieee802_11_parse_elems_crc(const u8
|
||||
|
||||
kfree(nontransmitted_profile);
|
||||
|
||||
- return crc;
|
||||
+ elems->crc = crc;
|
||||
}
|
||||
|
||||
void ieee80211_regulatory_limit_wmm_params(struct ieee80211_sub_if_data *sdata,
|
||||
@ -1,80 +0,0 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Mon, 20 Sep 2021 15:40:09 +0200
|
||||
Subject: [PATCH] mac80211: mlme: find auth challenge directly
|
||||
|
||||
commit 49a765d6785e99157ff5091cc37485732496864e upstream.
|
||||
|
||||
There's no need to parse all elements etc. just to find the
|
||||
authentication challenge - use cfg80211_find_elem() instead.
|
||||
This also allows us to remove WLAN_EID_CHALLENGE handling
|
||||
from the element parsing entirely.
|
||||
|
||||
Link: https://lore.kernel.org/r/20210920154009.45f9b3a15722.Ice3159ffad03a007d6154cbf1fb3a8c48489e86f@changeid
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -1540,7 +1540,6 @@ struct ieee802_11_elems {
|
||||
const u8 *supp_rates;
|
||||
const u8 *ds_params;
|
||||
const struct ieee80211_tim_ie *tim;
|
||||
- const u8 *challenge;
|
||||
const u8 *rsn;
|
||||
const u8 *rsnx;
|
||||
const u8 *erp_info;
|
||||
@@ -1594,7 +1593,6 @@ struct ieee802_11_elems {
|
||||
u8 ssid_len;
|
||||
u8 supp_rates_len;
|
||||
u8 tim_len;
|
||||
- u8 challenge_len;
|
||||
u8 rsn_len;
|
||||
u8 rsnx_len;
|
||||
u8 ext_supp_rates_len;
|
||||
--- a/net/mac80211/mlme.c
|
||||
+++ b/net/mac80211/mlme.c
|
||||
@@ -2889,17 +2889,17 @@ static void ieee80211_auth_challenge(str
|
||||
{
|
||||
struct ieee80211_local *local = sdata->local;
|
||||
struct ieee80211_mgd_auth_data *auth_data = sdata->u.mgd.auth_data;
|
||||
+ const struct element *challenge;
|
||||
u8 *pos;
|
||||
- struct ieee802_11_elems elems;
|
||||
u32 tx_flags = 0;
|
||||
struct ieee80211_prep_tx_info info = {
|
||||
.subtype = IEEE80211_STYPE_AUTH,
|
||||
};
|
||||
|
||||
pos = mgmt->u.auth.variable;
|
||||
- ieee802_11_parse_elems(pos, len - (pos - (u8 *)mgmt), false, &elems,
|
||||
- mgmt->bssid, auth_data->bss->bssid);
|
||||
- if (!elems.challenge)
|
||||
+ challenge = cfg80211_find_elem(WLAN_EID_CHALLENGE, pos,
|
||||
+ len - (pos - (u8 *)mgmt));
|
||||
+ if (!challenge)
|
||||
return;
|
||||
auth_data->expected_transaction = 4;
|
||||
drv_mgd_prepare_tx(sdata->local, sdata, &info);
|
||||
@@ -2907,7 +2907,8 @@ static void ieee80211_auth_challenge(str
|
||||
tx_flags = IEEE80211_TX_CTL_REQ_TX_STATUS |
|
||||
IEEE80211_TX_INTFL_MLME_CONN_TX;
|
||||
ieee80211_send_auth(sdata, 3, auth_data->algorithm, 0,
|
||||
- elems.challenge - 2, elems.challenge_len + 2,
|
||||
+ (void *)challenge,
|
||||
+ challenge->datalen + sizeof(*challenge),
|
||||
auth_data->bss->bssid, auth_data->bss->bssid,
|
||||
auth_data->key, auth_data->key_len,
|
||||
auth_data->key_idx, tx_flags);
|
||||
--- a/net/mac80211/util.c
|
||||
+++ b/net/mac80211/util.c
|
||||
@@ -1120,10 +1120,6 @@ _ieee802_11_parse_elems_crc(const u8 *st
|
||||
} else
|
||||
elem_parse_failed = true;
|
||||
break;
|
||||
- case WLAN_EID_CHALLENGE:
|
||||
- elems->challenge = pos;
|
||||
- elems->challenge_len = elen;
|
||||
- break;
|
||||
case WLAN_EID_VENDOR_SPECIFIC:
|
||||
if (elen >= 4 && pos[0] == 0x00 && pos[1] == 0x50 &&
|
||||
pos[2] == 0xf2) {
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,115 +0,0 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Fri, 1 Oct 2021 21:11:08 +0200
|
||||
Subject: [PATCH] mac80211: fix memory leaks with element parsing
|
||||
|
||||
commit 8223ac199a3849257e86ec27865dc63f034b1cf1 upstream.
|
||||
|
||||
My previous commit 5d24828d05f3 ("mac80211: always allocate
|
||||
struct ieee802_11_elems") had a few bugs and leaked the new
|
||||
allocated struct in a few error cases, fix that.
|
||||
|
||||
Fixes: 5d24828d05f3 ("mac80211: always allocate struct ieee802_11_elems")
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
Link: https://lore.kernel.org/r/20211001211108.9839928e42e0.Ib81ca187d3d3af7ed1bfeac2e00d08a4637c8025@changeid
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/agg-rx.c
|
||||
+++ b/net/mac80211/agg-rx.c
|
||||
@@ -499,13 +499,14 @@ void ieee80211_process_addba_request(str
|
||||
elems = ieee802_11_parse_elems(mgmt->u.action.u.addba_req.variable,
|
||||
ies_len, true, mgmt->bssid, NULL);
|
||||
if (!elems || elems->parse_error)
|
||||
- return;
|
||||
+ goto free;
|
||||
}
|
||||
|
||||
__ieee80211_start_rx_ba_session(sta, dialog_token, timeout,
|
||||
start_seq_num, ba_policy, tid,
|
||||
buf_size, true, false,
|
||||
elems ? elems->addba_ext_ie : NULL);
|
||||
+free:
|
||||
kfree(elems);
|
||||
}
|
||||
|
||||
--- a/net/mac80211/ibss.c
|
||||
+++ b/net/mac80211/ibss.c
|
||||
@@ -1659,11 +1659,11 @@ void ieee80211_ibss_rx_queued_mgmt(struc
|
||||
mgmt->u.action.u.chan_switch.variable,
|
||||
ies_len, true, mgmt->bssid, NULL);
|
||||
|
||||
- if (!elems || elems->parse_error)
|
||||
- break;
|
||||
-
|
||||
- ieee80211_rx_mgmt_spectrum_mgmt(sdata, mgmt, skb->len,
|
||||
- rx_status, elems);
|
||||
+ if (elems && !elems->parse_error)
|
||||
+ ieee80211_rx_mgmt_spectrum_mgmt(sdata, mgmt,
|
||||
+ skb->len,
|
||||
+ rx_status,
|
||||
+ elems);
|
||||
kfree(elems);
|
||||
break;
|
||||
}
|
||||
--- a/net/mac80211/mlme.c
|
||||
+++ b/net/mac80211/mlme.c
|
||||
@@ -3374,8 +3374,10 @@ static bool ieee80211_assoc_success(stru
|
||||
bss_ies = kmemdup(ies, sizeof(*ies) + ies->len,
|
||||
GFP_ATOMIC);
|
||||
rcu_read_unlock();
|
||||
- if (!bss_ies)
|
||||
- return false;
|
||||
+ if (!bss_ies) {
|
||||
+ ret = false;
|
||||
+ goto out;
|
||||
+ }
|
||||
|
||||
bss_elems = ieee802_11_parse_elems(bss_ies->data, bss_ies->len,
|
||||
false, mgmt->bssid,
|
||||
@@ -4358,13 +4360,11 @@ void ieee80211_sta_rx_queued_mgmt(struct
|
||||
mgmt->u.action.u.chan_switch.variable,
|
||||
ies_len, true, mgmt->bssid, NULL);
|
||||
|
||||
- if (!elems || elems->parse_error)
|
||||
- break;
|
||||
-
|
||||
- ieee80211_sta_process_chanswitch(sdata,
|
||||
- rx_status->mactime,
|
||||
- rx_status->device_timestamp,
|
||||
- elems, false);
|
||||
+ if (elems && !elems->parse_error)
|
||||
+ ieee80211_sta_process_chanswitch(sdata,
|
||||
+ rx_status->mactime,
|
||||
+ rx_status->device_timestamp,
|
||||
+ elems, false);
|
||||
kfree(elems);
|
||||
} else if (mgmt->u.action.category == WLAN_CATEGORY_PUBLIC) {
|
||||
struct ieee802_11_elems *elems;
|
||||
@@ -4384,17 +4384,17 @@ void ieee80211_sta_rx_queued_mgmt(struct
|
||||
mgmt->u.action.u.ext_chan_switch.variable,
|
||||
ies_len, true, mgmt->bssid, NULL);
|
||||
|
||||
- if (!elems || elems->parse_error)
|
||||
- break;
|
||||
+ if (elems && !elems->parse_error) {
|
||||
+ /* for the handling code pretend it was an IE */
|
||||
+ elems->ext_chansw_ie =
|
||||
+ &mgmt->u.action.u.ext_chan_switch.data;
|
||||
+
|
||||
+ ieee80211_sta_process_chanswitch(sdata,
|
||||
+ rx_status->mactime,
|
||||
+ rx_status->device_timestamp,
|
||||
+ elems, false);
|
||||
+ }
|
||||
|
||||
- /* for the handling code pretend this was also an IE */
|
||||
- elems->ext_chansw_ie =
|
||||
- &mgmt->u.action.u.ext_chan_switch.data;
|
||||
-
|
||||
- ieee80211_sta_process_chanswitch(sdata,
|
||||
- rx_status->mactime,
|
||||
- rx_status->device_timestamp,
|
||||
- elems, false);
|
||||
kfree(elems);
|
||||
}
|
||||
break;
|
||||
@ -1,41 +0,0 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Wed, 28 Sep 2022 21:56:15 +0200
|
||||
Subject: [PATCH] wifi: cfg80211: fix u8 overflow in
|
||||
cfg80211_update_notlisted_nontrans()
|
||||
|
||||
commit aebe9f4639b13a1f4e9a6b42cdd2e38c617b442d upstream.
|
||||
|
||||
In the copy code of the elements, we do the following calculation
|
||||
to reach the end of the MBSSID element:
|
||||
|
||||
/* copy the IEs after MBSSID */
|
||||
cpy_len = mbssid[1] + 2;
|
||||
|
||||
This looks fine, however, cpy_len is a u8, the same as mbssid[1],
|
||||
so the addition of two can overflow. In this case the subsequent
|
||||
memcpy() will overflow the allocated buffer, since it copies 256
|
||||
bytes too much due to the way the allocation and memcpy() sizes
|
||||
are calculated.
|
||||
|
||||
Fix this by using size_t for the cpy_len variable.
|
||||
|
||||
This fixes CVE-2022-41674.
|
||||
|
||||
Reported-by: Soenke Huster <shuster@seemoo.tu-darmstadt.de>
|
||||
Tested-by: Soenke Huster <shuster@seemoo.tu-darmstadt.de>
|
||||
Fixes: 0b8fb8235be8 ("cfg80211: Parsing of Multiple BSSID information in scanning")
|
||||
Reviewed-by: Kees Cook <keescook@chromium.org>
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/wireless/scan.c
|
||||
+++ b/net/wireless/scan.c
|
||||
@@ -2238,7 +2238,7 @@ cfg80211_update_notlisted_nontrans(struc
|
||||
size_t new_ie_len;
|
||||
struct cfg80211_bss_ies *new_ies;
|
||||
const struct cfg80211_bss_ies *old;
|
||||
- u8 cpy_len;
|
||||
+ size_t cpy_len;
|
||||
|
||||
lockdep_assert_held(&wiphy_to_rdev(wiphy)->bss_lock);
|
||||
|
||||
@ -1,47 +0,0 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Wed, 28 Sep 2022 22:01:37 +0200
|
||||
Subject: [PATCH] wifi: cfg80211/mac80211: reject bad MBSSID elements
|
||||
|
||||
commit 8f033d2becc24aa6bfd2a5c104407963560caabc upstream
|
||||
|
||||
Per spec, the maximum value for the MaxBSSID ('n') indicator is 8,
|
||||
and the minimum is 1 since a multiple BSSID set with just one BSSID
|
||||
doesn't make sense (the # of BSSIDs is limited by 2^n).
|
||||
|
||||
Limit this in the parsing in both cfg80211 and mac80211, rejecting
|
||||
any elements with an invalid value.
|
||||
|
||||
This fixes potentially bad shifts in the processing of these inside
|
||||
the cfg80211_gen_new_bssid() function later.
|
||||
|
||||
I found this during the investigation of CVE-2022-41674 fixed by the
|
||||
previous patch.
|
||||
|
||||
Fixes: 0b8fb8235be8 ("cfg80211: Parsing of Multiple BSSID information in scanning")
|
||||
Fixes: 78ac51f81532 ("mac80211: support multi-bssid")
|
||||
Reviewed-by: Kees Cook <keescook@chromium.org>
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/util.c
|
||||
+++ b/net/mac80211/util.c
|
||||
@@ -1413,6 +1413,8 @@ static size_t ieee802_11_find_bssid_prof
|
||||
for_each_element_id(elem, WLAN_EID_MULTIPLE_BSSID, start, len) {
|
||||
if (elem->datalen < 2)
|
||||
continue;
|
||||
+ if (elem->data[0] < 1 || elem->data[0] > 8)
|
||||
+ continue;
|
||||
|
||||
for_each_element(sub, elem->data + 1, elem->datalen - 1) {
|
||||
u8 new_bssid[ETH_ALEN];
|
||||
--- a/net/wireless/scan.c
|
||||
+++ b/net/wireless/scan.c
|
||||
@@ -2103,6 +2103,8 @@ static void cfg80211_parse_mbssid_data(s
|
||||
for_each_element_id(elem, WLAN_EID_MULTIPLE_BSSID, ie, ielen) {
|
||||
if (elem->datalen < 4)
|
||||
continue;
|
||||
+ if (elem->data[0] < 1 || (int)elem->data[0] > 8)
|
||||
+ continue;
|
||||
for_each_element(sub, elem->data + 1, elem->datalen - 1) {
|
||||
u8 profile_len;
|
||||
|
||||
@ -1,94 +0,0 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Wed, 28 Sep 2022 22:07:15 +0200
|
||||
Subject: [PATCH] wifi: mac80211: fix MBSSID parsing use-after-free
|
||||
|
||||
commit ff05d4b45dd89b922578dac497dcabf57cf771c6
|
||||
|
||||
When we parse a multi-BSSID element, we might point some
|
||||
element pointers into the allocated nontransmitted_profile.
|
||||
However, we free this before returning, causing UAF when the
|
||||
relevant pointers in the parsed elements are accessed.
|
||||
|
||||
Fix this by not allocating the scratch buffer separately but
|
||||
as part of the returned structure instead, that way, there
|
||||
are no lifetime issues with it.
|
||||
|
||||
The scratch buffer introduction as part of the returned data
|
||||
here is taken from MLO feature work done by Ilan.
|
||||
|
||||
This fixes CVE-2022-42719.
|
||||
|
||||
Fixes: 5023b14cf4df ("mac80211: support profile split between elements")
|
||||
Co-developed-by: Ilan Peer <ilan.peer@intel.com>
|
||||
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
|
||||
Reviewed-by: Kees Cook <keescook@chromium.org>
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -1611,6 +1611,14 @@ struct ieee802_11_elems {
|
||||
|
||||
/* whether a parse error occurred while retrieving these elements */
|
||||
bool parse_error;
|
||||
+
|
||||
+ /*
|
||||
+ * scratch buffer that can be used for various element parsing related
|
||||
+ * tasks, e.g., element de-fragmentation etc.
|
||||
+ */
|
||||
+ size_t scratch_len;
|
||||
+ u8 *scratch_pos;
|
||||
+ u8 scratch[];
|
||||
};
|
||||
|
||||
static inline struct ieee80211_local *hw_to_local(
|
||||
--- a/net/mac80211/util.c
|
||||
+++ b/net/mac80211/util.c
|
||||
@@ -1478,24 +1478,25 @@ struct ieee802_11_elems *ieee802_11_pars
|
||||
u8 *nontransmitted_profile;
|
||||
int nontransmitted_profile_len = 0;
|
||||
|
||||
- elems = kzalloc(sizeof(*elems), GFP_ATOMIC);
|
||||
+ elems = kzalloc(sizeof(*elems) + len, GFP_ATOMIC);
|
||||
if (!elems)
|
||||
return NULL;
|
||||
elems->ie_start = start;
|
||||
elems->total_len = len;
|
||||
|
||||
- nontransmitted_profile = kmalloc(len, GFP_ATOMIC);
|
||||
- if (nontransmitted_profile) {
|
||||
- nontransmitted_profile_len =
|
||||
- ieee802_11_find_bssid_profile(start, len, elems,
|
||||
- transmitter_bssid,
|
||||
- bss_bssid,
|
||||
- nontransmitted_profile);
|
||||
- non_inherit =
|
||||
- cfg80211_find_ext_elem(WLAN_EID_EXT_NON_INHERITANCE,
|
||||
- nontransmitted_profile,
|
||||
- nontransmitted_profile_len);
|
||||
- }
|
||||
+ elems->scratch_len = len;
|
||||
+ elems->scratch_pos = elems->scratch;
|
||||
+
|
||||
+ nontransmitted_profile = elems->scratch_pos;
|
||||
+ nontransmitted_profile_len =
|
||||
+ ieee802_11_find_bssid_profile(start, len, elems,
|
||||
+ transmitter_bssid,
|
||||
+ bss_bssid,
|
||||
+ nontransmitted_profile);
|
||||
+ non_inherit =
|
||||
+ cfg80211_find_ext_elem(WLAN_EID_EXT_NON_INHERITANCE,
|
||||
+ nontransmitted_profile,
|
||||
+ nontransmitted_profile_len);
|
||||
|
||||
crc = _ieee802_11_parse_elems_crc(start, len, action, elems, filter,
|
||||
crc, non_inherit);
|
||||
@@ -1524,8 +1525,6 @@ struct ieee802_11_elems *ieee802_11_pars
|
||||
offsetofend(struct ieee80211_bssid_index, dtim_count))
|
||||
elems->dtim_count = elems->bssid_index->dtim_count;
|
||||
|
||||
- kfree(nontransmitted_profile);
|
||||
-
|
||||
elems->crc = crc;
|
||||
|
||||
return elems;
|
||||
@ -1,41 +0,0 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Thu, 29 Sep 2022 21:50:44 +0200
|
||||
Subject: [PATCH] wifi: cfg80211: ensure length byte is present before
|
||||
access
|
||||
|
||||
commit 567e14e39e8f8c6997a1378bc3be615afca86063 upstream.
|
||||
|
||||
When iterating the elements here, ensure the length byte is
|
||||
present before checking it to see if the entire element will
|
||||
fit into the buffer.
|
||||
|
||||
Longer term, we should rewrite this code using the type-safe
|
||||
element iteration macros that check all of this.
|
||||
|
||||
Fixes: 0b8fb8235be8 ("cfg80211: Parsing of Multiple BSSID information in scanning")
|
||||
Reported-by: Soenke Huster <shuster@seemoo.tu-darmstadt.de>
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/wireless/scan.c
|
||||
+++ b/net/wireless/scan.c
|
||||
@@ -304,7 +304,8 @@ static size_t cfg80211_gen_new_ie(const
|
||||
tmp_old = cfg80211_find_ie(WLAN_EID_SSID, ie, ielen);
|
||||
tmp_old = (tmp_old) ? tmp_old + tmp_old[1] + 2 : ie;
|
||||
|
||||
- while (tmp_old + tmp_old[1] + 2 - ie <= ielen) {
|
||||
+ while (tmp_old + 2 - ie <= ielen &&
|
||||
+ tmp_old + tmp_old[1] + 2 - ie <= ielen) {
|
||||
if (tmp_old[0] == 0) {
|
||||
tmp_old++;
|
||||
continue;
|
||||
@@ -364,7 +365,8 @@ static size_t cfg80211_gen_new_ie(const
|
||||
* copied to new ie, skip ssid, capability, bssid-index ie
|
||||
*/
|
||||
tmp_new = sub_copy;
|
||||
- while (tmp_new + tmp_new[1] + 2 - sub_copy <= subie_len) {
|
||||
+ while (tmp_new + 2 - sub_copy <= subie_len &&
|
||||
+ tmp_new + tmp_new[1] + 2 - sub_copy <= subie_len) {
|
||||
if (!(tmp_new[0] == WLAN_EID_NON_TX_BSSID_CAP ||
|
||||
tmp_new[0] == WLAN_EID_SSID)) {
|
||||
memcpy(pos, tmp_new, tmp_new[1] + 2);
|
||||
@ -1,87 +0,0 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Fri, 30 Sep 2022 23:44:23 +0200
|
||||
Subject: [PATCH] wifi: cfg80211: fix BSS refcounting bugs
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
commit 0b7808818cb9df6680f98996b8e9a439fa7bcc2f upstream.
|
||||
|
||||
There are multiple refcounting bugs related to multi-BSSID:
|
||||
- In bss_ref_get(), if the BSS has a hidden_beacon_bss, then
|
||||
the bss pointer is overwritten before checking for the
|
||||
transmitted BSS, which is clearly wrong. Fix this by using
|
||||
the bss_from_pub() macro.
|
||||
|
||||
- In cfg80211_bss_update() we copy the transmitted_bss pointer
|
||||
from tmp into new, but then if we release new, we'll unref
|
||||
it erroneously. We already set the pointer and ref it, but
|
||||
need to NULL it since it was copied from the tmp data.
|
||||
|
||||
- In cfg80211_inform_single_bss_data(), if adding to the non-
|
||||
transmitted list fails, we unlink the BSS and yet still we
|
||||
return it, but this results in returning an entry without
|
||||
a reference. We shouldn't return it anyway if it was broken
|
||||
enough to not get added there.
|
||||
|
||||
This fixes CVE-2022-42720.
|
||||
|
||||
Reported-by: Sönke Huster <shuster@seemoo.tu-darmstadt.de>
|
||||
Tested-by: Sönke Huster <shuster@seemoo.tu-darmstadt.de>
|
||||
Fixes: a3584f56de1c ("cfg80211: Properly track transmitting and non-transmitting BSS")
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/wireless/scan.c
|
||||
+++ b/net/wireless/scan.c
|
||||
@@ -143,18 +143,12 @@ static inline void bss_ref_get(struct cf
|
||||
lockdep_assert_held(&rdev->bss_lock);
|
||||
|
||||
bss->refcount++;
|
||||
- if (bss->pub.hidden_beacon_bss) {
|
||||
- bss = container_of(bss->pub.hidden_beacon_bss,
|
||||
- struct cfg80211_internal_bss,
|
||||
- pub);
|
||||
- bss->refcount++;
|
||||
- }
|
||||
- if (bss->pub.transmitted_bss) {
|
||||
- bss = container_of(bss->pub.transmitted_bss,
|
||||
- struct cfg80211_internal_bss,
|
||||
- pub);
|
||||
- bss->refcount++;
|
||||
- }
|
||||
+
|
||||
+ if (bss->pub.hidden_beacon_bss)
|
||||
+ bss_from_pub(bss->pub.hidden_beacon_bss)->refcount++;
|
||||
+
|
||||
+ if (bss->pub.transmitted_bss)
|
||||
+ bss_from_pub(bss->pub.transmitted_bss)->refcount++;
|
||||
}
|
||||
|
||||
static inline void bss_ref_put(struct cfg80211_registered_device *rdev,
|
||||
@@ -1743,6 +1737,8 @@ cfg80211_bss_update(struct cfg80211_regi
|
||||
new->refcount = 1;
|
||||
INIT_LIST_HEAD(&new->hidden_list);
|
||||
INIT_LIST_HEAD(&new->pub.nontrans_list);
|
||||
+ /* we'll set this later if it was non-NULL */
|
||||
+ new->pub.transmitted_bss = NULL;
|
||||
|
||||
if (rcu_access_pointer(tmp->pub.proberesp_ies)) {
|
||||
hidden = rb_find_bss(rdev, tmp, BSS_CMP_HIDE_ZLEN);
|
||||
@@ -1983,10 +1979,15 @@ cfg80211_inform_single_bss_data(struct w
|
||||
spin_lock_bh(&rdev->bss_lock);
|
||||
if (cfg80211_add_nontrans_list(non_tx_data->tx_bss,
|
||||
&res->pub)) {
|
||||
- if (__cfg80211_unlink_bss(rdev, res))
|
||||
+ if (__cfg80211_unlink_bss(rdev, res)) {
|
||||
rdev->bss_generation++;
|
||||
+ res = NULL;
|
||||
+ }
|
||||
}
|
||||
spin_unlock_bh(&rdev->bss_lock);
|
||||
+
|
||||
+ if (!res)
|
||||
+ return NULL;
|
||||
}
|
||||
|
||||
trace_cfg80211_return_bss(&res->pub);
|
||||
@ -1,48 +0,0 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Sat, 1 Oct 2022 00:01:44 +0200
|
||||
Subject: [PATCH] wifi: cfg80211: avoid nontransmitted BSS list
|
||||
corruption
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
commit bcca852027e5878aec911a347407ecc88d6fff7f upstream.
|
||||
|
||||
If a non-transmitted BSS shares enough information (both
|
||||
SSID and BSSID!) with another non-transmitted BSS of a
|
||||
different AP, then we can find and update it, and then
|
||||
try to add it to the non-transmitted BSS list. We do a
|
||||
search for it on the transmitted BSS, but if it's not
|
||||
there (but belongs to another transmitted BSS), the list
|
||||
gets corrupted.
|
||||
|
||||
Since this is an erroneous situation, simply fail the
|
||||
list insertion in this case and free the non-transmitted
|
||||
BSS.
|
||||
|
||||
This fixes CVE-2022-42721.
|
||||
|
||||
Reported-by: Sönke Huster <shuster@seemoo.tu-darmstadt.de>
|
||||
Tested-by: Sönke Huster <shuster@seemoo.tu-darmstadt.de>
|
||||
Fixes: 0b8fb8235be8 ("cfg80211: Parsing of Multiple BSSID information in scanning")
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/wireless/scan.c
|
||||
+++ b/net/wireless/scan.c
|
||||
@@ -425,6 +425,15 @@ cfg80211_add_nontrans_list(struct cfg802
|
||||
|
||||
rcu_read_unlock();
|
||||
|
||||
+ /*
|
||||
+ * This is a bit weird - it's not on the list, but already on another
|
||||
+ * one! The only way that could happen is if there's some BSSID/SSID
|
||||
+ * shared by multiple APs in their multi-BSSID profiles, potentially
|
||||
+ * with hidden SSID mixed in ... ignore it.
|
||||
+ */
|
||||
+ if (!list_empty(&nontrans_bss->nontrans_list))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
/* add to the list */
|
||||
list_add_tail(&nontrans_bss->nontrans_list, &trans_bss->nontrans_list);
|
||||
return 0;
|
||||
@ -1,31 +0,0 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Wed, 5 Oct 2022 15:10:09 +0200
|
||||
Subject: [PATCH] wifi: mac80211_hwsim: avoid mac80211 warning on bad
|
||||
rate
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
commit 1833b6f46d7e2830251a063935ab464256defe22 upstream.
|
||||
|
||||
If the tool on the other side (e.g. wmediumd) gets confused
|
||||
about the rate, we hit a warning in mac80211. Silence that
|
||||
by effectively duplicating the check here and dropping the
|
||||
frame silently (in mac80211 it's dropped with the warning).
|
||||
|
||||
Reported-by: Sönke Huster <shuster@seemoo.tu-darmstadt.de>
|
||||
Tested-by: Sönke Huster <shuster@seemoo.tu-darmstadt.de>
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/drivers/net/wireless/mac80211_hwsim.c
|
||||
+++ b/drivers/net/wireless/mac80211_hwsim.c
|
||||
@@ -3760,6 +3760,8 @@ static int hwsim_cloned_frame_received_n
|
||||
|
||||
rx_status.band = channel->band;
|
||||
rx_status.rate_idx = nla_get_u32(info->attrs[HWSIM_ATTR_RX_RATE]);
|
||||
+ if (rx_status.rate_idx >= data2->hw->wiphy->bands[rx_status.band]->n_bitrates)
|
||||
+ goto out;
|
||||
rx_status.signal = nla_get_u32(info->attrs[HWSIM_ATTR_SIGNAL]);
|
||||
|
||||
hdr = (void *)skb->data;
|
||||
@ -1,52 +0,0 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Wed, 5 Oct 2022 21:24:10 +0200
|
||||
Subject: [PATCH] wifi: mac80211: fix crash in beacon protection for
|
||||
P2P-device
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
commit b2d03cabe2b2e150ff5a381731ea0355459be09f upstream.
|
||||
|
||||
If beacon protection is active but the beacon cannot be
|
||||
decrypted or is otherwise malformed, we call the cfg80211
|
||||
API to report this to userspace, but that uses a netdev
|
||||
pointer, which isn't present for P2P-Device. Fix this to
|
||||
call it only conditionally to ensure cfg80211 won't crash
|
||||
in the case of P2P-Device.
|
||||
|
||||
This fixes CVE-2022-42722.
|
||||
|
||||
Reported-by: Sönke Huster <shuster@seemoo.tu-darmstadt.de>
|
||||
Fixes: 9eaf183af741 ("mac80211: Report beacon protection failures to user space")
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -1986,10 +1986,11 @@ ieee80211_rx_h_decrypt(struct ieee80211_
|
||||
|
||||
if (mmie_keyidx < NUM_DEFAULT_KEYS + NUM_DEFAULT_MGMT_KEYS ||
|
||||
mmie_keyidx >= NUM_DEFAULT_KEYS + NUM_DEFAULT_MGMT_KEYS +
|
||||
- NUM_DEFAULT_BEACON_KEYS) {
|
||||
- cfg80211_rx_unprot_mlme_mgmt(rx->sdata->dev,
|
||||
- skb->data,
|
||||
- skb->len);
|
||||
+ NUM_DEFAULT_BEACON_KEYS) {
|
||||
+ if (rx->sdata->dev)
|
||||
+ cfg80211_rx_unprot_mlme_mgmt(rx->sdata->dev,
|
||||
+ skb->data,
|
||||
+ skb->len);
|
||||
return RX_DROP_MONITOR; /* unexpected BIP keyidx */
|
||||
}
|
||||
|
||||
@@ -2137,7 +2138,8 @@ ieee80211_rx_h_decrypt(struct ieee80211_
|
||||
/* either the frame has been decrypted or will be dropped */
|
||||
status->flag |= RX_FLAG_DECRYPTED;
|
||||
|
||||
- if (unlikely(ieee80211_is_beacon(fc) && result == RX_DROP_UNUSABLE))
|
||||
+ if (unlikely(ieee80211_is_beacon(fc) && result == RX_DROP_UNUSABLE &&
|
||||
+ rx->sdata->dev))
|
||||
cfg80211_rx_unprot_mlme_mgmt(rx->sdata->dev,
|
||||
skb->data, skb->len);
|
||||
|
||||
@ -1,85 +0,0 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Wed, 5 Oct 2022 23:11:43 +0200
|
||||
Subject: [PATCH] wifi: cfg80211: update hidden BSSes to avoid WARN_ON
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
commit c90b93b5b782891ebfda49d4e5da36632fefd5d1 upstream.
|
||||
|
||||
When updating beacon elements in a non-transmitted BSS,
|
||||
also update the hidden sub-entries to the same beacon
|
||||
elements, so that a future update through other paths
|
||||
won't trigger a WARN_ON().
|
||||
|
||||
The warning is triggered because the beacon elements in
|
||||
the hidden BSSes that are children of the BSS should
|
||||
always be the same as in the parent.
|
||||
|
||||
Reported-by: Sönke Huster <shuster@seemoo.tu-darmstadt.de>
|
||||
Tested-by: Sönke Huster <shuster@seemoo.tu-darmstadt.de>
|
||||
Fixes: 0b8fb8235be8 ("cfg80211: Parsing of Multiple BSSID information in scanning")
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/wireless/scan.c
|
||||
+++ b/net/wireless/scan.c
|
||||
@@ -1609,6 +1609,23 @@ struct cfg80211_non_tx_bss {
|
||||
u8 bssid_index;
|
||||
};
|
||||
|
||||
+static void cfg80211_update_hidden_bsses(struct cfg80211_internal_bss *known,
|
||||
+ const struct cfg80211_bss_ies *new_ies,
|
||||
+ const struct cfg80211_bss_ies *old_ies)
|
||||
+{
|
||||
+ struct cfg80211_internal_bss *bss;
|
||||
+
|
||||
+ /* Assign beacon IEs to all sub entries */
|
||||
+ list_for_each_entry(bss, &known->hidden_list, hidden_list) {
|
||||
+ const struct cfg80211_bss_ies *ies;
|
||||
+
|
||||
+ ies = rcu_access_pointer(bss->pub.beacon_ies);
|
||||
+ WARN_ON(ies != old_ies);
|
||||
+
|
||||
+ rcu_assign_pointer(bss->pub.beacon_ies, new_ies);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static bool
|
||||
cfg80211_update_known_bss(struct cfg80211_registered_device *rdev,
|
||||
struct cfg80211_internal_bss *known,
|
||||
@@ -1632,7 +1649,6 @@ cfg80211_update_known_bss(struct cfg8021
|
||||
kfree_rcu((struct cfg80211_bss_ies *)old, rcu_head);
|
||||
} else if (rcu_access_pointer(new->pub.beacon_ies)) {
|
||||
const struct cfg80211_bss_ies *old;
|
||||
- struct cfg80211_internal_bss *bss;
|
||||
|
||||
if (known->pub.hidden_beacon_bss &&
|
||||
!list_empty(&known->hidden_list)) {
|
||||
@@ -1660,16 +1676,7 @@ cfg80211_update_known_bss(struct cfg8021
|
||||
if (old == rcu_access_pointer(known->pub.ies))
|
||||
rcu_assign_pointer(known->pub.ies, new->pub.beacon_ies);
|
||||
|
||||
- /* Assign beacon IEs to all sub entries */
|
||||
- list_for_each_entry(bss, &known->hidden_list, hidden_list) {
|
||||
- const struct cfg80211_bss_ies *ies;
|
||||
-
|
||||
- ies = rcu_access_pointer(bss->pub.beacon_ies);
|
||||
- WARN_ON(ies != old);
|
||||
-
|
||||
- rcu_assign_pointer(bss->pub.beacon_ies,
|
||||
- new->pub.beacon_ies);
|
||||
- }
|
||||
+ cfg80211_update_hidden_bsses(known, new->pub.beacon_ies, old);
|
||||
|
||||
if (old)
|
||||
kfree_rcu((struct cfg80211_bss_ies *)old, rcu_head);
|
||||
@@ -2319,6 +2326,8 @@ cfg80211_update_notlisted_nontrans(struc
|
||||
} else {
|
||||
old = rcu_access_pointer(nontrans_bss->beacon_ies);
|
||||
rcu_assign_pointer(nontrans_bss->beacon_ies, new_ies);
|
||||
+ cfg80211_update_hidden_bsses(bss_from_pub(nontrans_bss),
|
||||
+ new_ies, old);
|
||||
rcu_assign_pointer(nontrans_bss->ies, new_ies);
|
||||
if (old)
|
||||
kfree_rcu((struct cfg80211_bss_ies *)old, rcu_head);
|
||||
@ -1,77 +0,0 @@
|
||||
From 4db561ae4a90c2d0e15996634567559e292dc9e5 Mon Sep 17 00:00:00 2001
|
||||
From: Ahmed Zaki <anzaki@gmail.com>
|
||||
Date: Sat, 2 Oct 2021 08:53:29 -0600
|
||||
Subject: [PATCH] mac80211: fix a memory leak where sta_info is not freed
|
||||
|
||||
commit 8f9dcc29566626f683843ccac6113a12208315ca upstream.
|
||||
|
||||
The following is from a system that went OOM due to a memory leak:
|
||||
|
||||
wlan0: Allocated STA 74:83:c2:64:0b:87
|
||||
wlan0: Allocated STA 74:83:c2:64:0b:87
|
||||
wlan0: IBSS finish 74:83:c2:64:0b:87 (---from ieee80211_ibss_add_sta)
|
||||
wlan0: Adding new IBSS station 74:83:c2:64:0b:87
|
||||
wlan0: moving STA 74:83:c2:64:0b:87 to state 2
|
||||
wlan0: moving STA 74:83:c2:64:0b:87 to state 3
|
||||
wlan0: Inserted STA 74:83:c2:64:0b:87
|
||||
wlan0: IBSS finish 74:83:c2:64:0b:87 (---from ieee80211_ibss_work)
|
||||
wlan0: Adding new IBSS station 74:83:c2:64:0b:87
|
||||
wlan0: moving STA 74:83:c2:64:0b:87 to state 2
|
||||
wlan0: moving STA 74:83:c2:64:0b:87 to state 3
|
||||
.
|
||||
.
|
||||
wlan0: expiring inactive not authorized STA 74:83:c2:64:0b:87
|
||||
wlan0: moving STA 74:83:c2:64:0b:87 to state 2
|
||||
wlan0: moving STA 74:83:c2:64:0b:87 to state 1
|
||||
wlan0: Removed STA 74:83:c2:64:0b:87
|
||||
wlan0: Destroyed STA 74:83:c2:64:0b:87
|
||||
|
||||
The ieee80211_ibss_finish_sta() is called twice on the same STA from 2
|
||||
different locations. On the second attempt, the allocated STA is not
|
||||
destroyed creating a kernel memory leak.
|
||||
|
||||
This is happening because sta_info_insert_finish() does not call
|
||||
sta_info_free() the second time when the STA already exists (returns
|
||||
-EEXIST). Note that the caller sta_info_insert_rcu() assumes STA is
|
||||
destroyed upon errors.
|
||||
|
||||
Same fix is applied to -ENOMEM.
|
||||
|
||||
Signed-off-by: Ahmed Zaki <anzaki@gmail.com>
|
||||
Link: https://lore.kernel.org/r/20211002145329.3125293-1-anzaki@gmail.com
|
||||
[change the error path label to use the existing code]
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
Signed-off-by: Viacheslav Sablin <sablin@ispras.ru>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
net/mac80211/sta_info.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/net/mac80211/sta_info.c
|
||||
+++ b/net/mac80211/sta_info.c
|
||||
@@ -646,13 +646,13 @@ static int sta_info_insert_finish(struct
|
||||
/* check if STA exists already */
|
||||
if (sta_info_get_bss(sdata, sta->sta.addr)) {
|
||||
err = -EEXIST;
|
||||
- goto out_err;
|
||||
+ goto out_cleanup;
|
||||
}
|
||||
|
||||
sinfo = kzalloc(sizeof(struct station_info), GFP_KERNEL);
|
||||
if (!sinfo) {
|
||||
err = -ENOMEM;
|
||||
- goto out_err;
|
||||
+ goto out_cleanup;
|
||||
}
|
||||
|
||||
local->num_sta++;
|
||||
@@ -708,8 +708,8 @@ static int sta_info_insert_finish(struct
|
||||
out_drop_sta:
|
||||
local->num_sta--;
|
||||
synchronize_net();
|
||||
+ out_cleanup:
|
||||
cleanup_single_sta(sta);
|
||||
- out_err:
|
||||
mutex_unlock(&local->sta_mtx);
|
||||
kfree(sinfo);
|
||||
rcu_read_lock();
|
||||
@ -1,47 +0,0 @@
|
||||
From 552ba102a6898630a7d16887f29e606d6fabe508 Mon Sep 17 00:00:00 2001
|
||||
From: Siddh Raman Pant <code@siddh.me>
|
||||
Date: Sun, 14 Aug 2022 20:45:12 +0530
|
||||
Subject: [PATCH] wifi: mac80211: Don't finalize CSA in IBSS mode if state is
|
||||
disconnected
|
||||
|
||||
commit 15bc8966b6d3a5b9bfe4c9facfa02f2b69b1e5f0 upstream.
|
||||
|
||||
When we are not connected to a channel, sending channel "switch"
|
||||
announcement doesn't make any sense.
|
||||
|
||||
The BSS list is empty in that case. This causes the for loop in
|
||||
cfg80211_get_bss() to be bypassed, so the function returns NULL
|
||||
(check line 1424 of net/wireless/scan.c), causing the WARN_ON()
|
||||
in ieee80211_ibss_csa_beacon() to get triggered (check line 500
|
||||
of net/mac80211/ibss.c), which was consequently reported on the
|
||||
syzkaller dashboard.
|
||||
|
||||
Thus, check if we have an existing connection before generating
|
||||
the CSA beacon in ieee80211_ibss_finish_csa().
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Fixes: cd7760e62c2a ("mac80211: add support for CSA in IBSS mode")
|
||||
Link: https://syzkaller.appspot.com/bug?id=05603ef4ae8926761b678d2939a3b2ad28ab9ca6
|
||||
Reported-by: syzbot+b6c9fe29aefe68e4ad34@syzkaller.appspotmail.com
|
||||
Signed-off-by: Siddh Raman Pant <code@siddh.me>
|
||||
Tested-by: syzbot+b6c9fe29aefe68e4ad34@syzkaller.appspotmail.com
|
||||
Link: https://lore.kernel.org/r/20220814151512.9985-1-code@siddh.me
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
net/mac80211/ibss.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/net/mac80211/ibss.c
|
||||
+++ b/net/mac80211/ibss.c
|
||||
@@ -534,6 +534,10 @@ int ieee80211_ibss_finish_csa(struct iee
|
||||
|
||||
sdata_assert_lock(sdata);
|
||||
|
||||
+ /* When not connected/joined, sending CSA doesn't make sense. */
|
||||
+ if (ifibss->state != IEEE80211_IBSS_MLME_JOINED)
|
||||
+ return -ENOLINK;
|
||||
+
|
||||
/* update cfg80211 bss information with the new channel */
|
||||
if (!is_zero_ether_addr(ifibss->bssid)) {
|
||||
cbss = cfg80211_get_bss(sdata->local->hw.wiphy,
|
||||
@ -1,55 +0,0 @@
|
||||
From 5d20c6f932f2758078d0454729129c894fe353e7 Mon Sep 17 00:00:00 2001
|
||||
From: Siddh Raman Pant <code@siddh.me>
|
||||
Date: Sat, 20 Aug 2022 01:33:40 +0530
|
||||
Subject: [PATCH] wifi: mac80211: Fix UAF in ieee80211_scan_rx()
|
||||
|
||||
commit 60deb9f10eec5c6a20252ed36238b55d8b614a2c upstream.
|
||||
|
||||
ieee80211_scan_rx() tries to access scan_req->flags after a
|
||||
null check, but a UAF is observed when the scan is completed
|
||||
and __ieee80211_scan_completed() executes, which then calls
|
||||
cfg80211_scan_done() leading to the freeing of scan_req.
|
||||
|
||||
Since scan_req is rcu_dereference()'d, prevent the racing in
|
||||
__ieee80211_scan_completed() by ensuring that from mac80211's
|
||||
POV it is no longer accessed from an RCU read critical section
|
||||
before we call cfg80211_scan_done().
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Link: https://syzkaller.appspot.com/bug?extid=f9acff9bf08a845f225d
|
||||
Reported-by: syzbot+f9acff9bf08a845f225d@syzkaller.appspotmail.com
|
||||
Suggested-by: Johannes Berg <johannes@sipsolutions.net>
|
||||
Signed-off-by: Siddh Raman Pant <code@siddh.me>
|
||||
Link: https://lore.kernel.org/r/20220819200340.34826-1-code@siddh.me
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
net/mac80211/scan.c | 11 +++++++----
|
||||
1 file changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/net/mac80211/scan.c
|
||||
+++ b/net/mac80211/scan.c
|
||||
@@ -465,16 +465,19 @@ static void __ieee80211_scan_completed(s
|
||||
scan_req = rcu_dereference_protected(local->scan_req,
|
||||
lockdep_is_held(&local->mtx));
|
||||
|
||||
- if (scan_req != local->int_scan_req) {
|
||||
- local->scan_info.aborted = aborted;
|
||||
- cfg80211_scan_done(scan_req, &local->scan_info);
|
||||
- }
|
||||
RCU_INIT_POINTER(local->scan_req, NULL);
|
||||
RCU_INIT_POINTER(local->scan_sdata, NULL);
|
||||
|
||||
local->scanning = 0;
|
||||
local->scan_chandef.chan = NULL;
|
||||
|
||||
+ synchronize_rcu();
|
||||
+
|
||||
+ if (scan_req != local->int_scan_req) {
|
||||
+ local->scan_info.aborted = aborted;
|
||||
+ cfg80211_scan_done(scan_req, &local->scan_info);
|
||||
+ }
|
||||
+
|
||||
/* Set power back to normal operating levels. */
|
||||
ieee80211_hw_config(local, 0);
|
||||
|
||||
@ -87,7 +87,7 @@
|
||||
CFG80211_TESTMODE_DUMP(ieee80211_testmode_dump)
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -1448,6 +1448,7 @@ struct ieee80211_local {
|
||||
@@ -1447,6 +1447,7 @@ struct ieee80211_local {
|
||||
int dynamic_ps_forced_timeout;
|
||||
|
||||
int user_power_level; /* in dBm, for all interfaces */
|
||||
|
||||
@ -24,7 +24,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
|
||||
- capab = u16_encode_bits(amsdu, IEEE80211_ADDBA_PARAM_AMSDU_MASK);
|
||||
+ capab = 0;
|
||||
+#ifdef CONFIG_MAC80211_MESH
|
||||
+#ifdef CPTCFG_MAC80211_MESH
|
||||
+ if (!sta->mesh)
|
||||
+#endif
|
||||
+ capab = u16_encode_bits(amsdu, IEEE80211_ADDBA_PARAM_AMSDU_MASK);
|
||||
|
||||
@ -0,0 +1,13 @@
|
||||
--- a/mt7915/init.c
|
||||
+++ b/mt7915/init.c
|
||||
@@ -327,8 +327,8 @@ mt7915_init_wiphy(struct ieee80211_hw *h
|
||||
struct mt7915_dev *dev = phy->dev;
|
||||
|
||||
hw->queues = 4;
|
||||
- hw->max_rx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF;
|
||||
- hw->max_tx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF;
|
||||
+ hw->max_rx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF_HE;
|
||||
+ hw->max_tx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF_HE;
|
||||
hw->netdev_features = NETIF_F_RXCSUM;
|
||||
|
||||
hw->radiotap_timestamp.units_pos =
|
||||
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=gettext-full
|
||||
PKG_VERSION:=0.21
|
||||
PKG_RELEASE:=2
|
||||
PKG_VERSION:=0.21.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=gettext-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@GNU/gettext
|
||||
PKG_HASH:=d20fcbb537e02dcf1383197ba05bd0734ef7bf5db06bdb241eb69b7d16b73192
|
||||
PKG_HASH:=50dbc8f39797950aa2c98e939947c527e5ac9ebd2c1b99dd7b06ba33a6767ae6
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/gettext-$(PKG_VERSION)
|
||||
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/gettext-$(PKG_VERSION)
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
$(INSTALL_DATA) $$dir/$$file $(DESTDIR)$(htmldir)/$$file; \
|
||||
--- a/gettext-tools/man/Makefile.am
|
||||
+++ b/gettext-tools/man/Makefile.am
|
||||
@@ -157,8 +157,7 @@ recode-sr-latin.1.html: recode-sr-latin.
|
||||
@@ -158,8 +158,7 @@ recode-sr-latin.1.html: recode-sr-latin.
|
||||
gettextize.1.html: gettextize.1
|
||||
autopoint.1.html: autopoint.1
|
||||
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
--- a/gettext-runtime/gnulib-m4/stddef_h.m4
|
||||
+++ b/gettext-runtime/gnulib-m4/stddef_h.m4
|
||||
@@ -8,7 +8,7 @@ dnl with or without modifications, as lo
|
||||
AC_DEFUN([gl_STDDEF_H],
|
||||
@@ -9,7 +9,7 @@ dnl A placeholder for <stddef.h>, for pl
|
||||
AC_DEFUN_ONCE([gl_STDDEF_H],
|
||||
[
|
||||
AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
|
||||
- AC_REQUIRE([gt_TYPE_WCHAR_T])
|
||||
+ AC_REQUIRE([gt_TYPE_WCHAR_T_GT])
|
||||
STDDEF_H=
|
||||
|
||||
dnl Test whether the type max_align_t exists and whether its alignment
|
||||
dnl Persuade OpenBSD <stddef.h> to declare max_align_t.
|
||||
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
|
||||
--- a/gettext-runtime/gnulib-m4/stdint.m4
|
||||
+++ b/gettext-runtime/gnulib-m4/stdint.m4
|
||||
@@ -15,7 +15,7 @@ AC_DEFUN_ONCE([gl_STDINT_H],
|
||||
@ -22,7 +22,7 @@
|
||||
dnl macros.
|
||||
--- a/gettext-runtime/gnulib-m4/wchar_h.m4
|
||||
+++ b/gettext-runtime/gnulib-m4/wchar_h.m4
|
||||
@@ -27,7 +27,7 @@ AC_DEFUN([gl_WCHAR_H],
|
||||
@@ -27,7 +27,7 @@ AC_DEFUN_ONCE([gl_WCHAR_H],
|
||||
|
||||
AC_REQUIRE([gl_FEATURES_H])
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
[AC_COMPILE_IFELSE(
|
||||
--- a/gettext-runtime/gnulib-m4/wctype_h.m4
|
||||
+++ b/gettext-runtime/gnulib-m4/wctype_h.m4
|
||||
@@ -22,7 +22,7 @@ AC_DEFUN([gl_WCTYPE_H],
|
||||
@@ -22,7 +22,7 @@ AC_DEFUN_ONCE([gl_WCTYPE_H],
|
||||
fi
|
||||
AC_SUBST([HAVE_ISWCNTRL])
|
||||
|
||||
@ -77,26 +77,6 @@
|
||||
[
|
||||
AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t],
|
||||
[AC_COMPILE_IFELSE(
|
||||
--- a/gettext-runtime/intl/Makefile.am
|
||||
+++ b/gettext-runtime/intl/Makefile.am
|
||||
@@ -274,7 +274,7 @@ libgnuintl.h: $(srcdir)/libgnuintl.in.h
|
||||
-e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \
|
||||
-e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \
|
||||
-e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \
|
||||
- -e 's,@''HAVE_NAMELESS_LOCALES''@,@HAVE_NAMELESS_LOCALES@,g' \
|
||||
+ -e 's,@''HAVE_NAMELESS_LOCALES''@,0,g' \
|
||||
-e 's,@''HAVE_NEWLOCALE''@,@HAVE_NEWLOCALE@,g' \
|
||||
< $(srcdir)/libgnuintl.in.h \
|
||||
| if test '@WOE32DLL@' = yes; then \
|
||||
@@ -294,7 +294,7 @@ libintl.h: $(srcdir)/libgnuintl.in.h
|
||||
-e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \
|
||||
-e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \
|
||||
-e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \
|
||||
- -e 's,@''HAVE_NAMELESS_LOCALES''@,@HAVE_NAMELESS_LOCALES@,g' \
|
||||
+ -e 's,@''HAVE_NAMELESS_LOCALES''@,0,g' \
|
||||
-e 's,@''HAVE_NEWLOCALE''@,@HAVE_NEWLOCALE@,g' \
|
||||
< $(srcdir)/libgnuintl.in.h > libintl.h
|
||||
MOSTLYCLEANFILES += libintl.h
|
||||
--- a/gettext-runtime/libasprintf/configure.ac
|
||||
+++ b/gettext-runtime/libasprintf/configure.ac
|
||||
@@ -76,8 +76,8 @@ dnl Checks for typedefs, structures, and
|
||||
@ -145,30 +125,6 @@
|
||||
AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
|
||||
AC_REQUIRE([gt_TYPE_INTMAX_T])
|
||||
AC_REQUIRE([gt_PRINTF_POSIX])
|
||||
--- a/gettext-tools/gnulib-m4/gnulib-comp.m4
|
||||
+++ b/gettext-tools/gnulib-m4/gnulib-comp.m4
|
||||
@@ -1843,8 +1843,8 @@ changequote([, ])dnl
|
||||
AC_REQUIRE([gl_SOCKETS])
|
||||
gl_TYPE_SOCKLEN_T
|
||||
gl_STDALIGN_H
|
||||
- AC_REQUIRE([gt_TYPE_WCHAR_T])
|
||||
- AC_REQUIRE([gt_TYPE_WINT_T])
|
||||
+ AC_REQUIRE([gt_TYPE_WCHAR_T_GT])
|
||||
+ AC_REQUIRE([gt_TYPE_WINT_T_GT])
|
||||
gl_FUNC_STRERROR_R
|
||||
if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
|
||||
AC_LIBOBJ([strerror_r])
|
||||
--- a/gettext-tools/gnulib-m4/stddef_h.m4
|
||||
+++ b/gettext-tools/gnulib-m4/stddef_h.m4
|
||||
@@ -8,7 +8,7 @@ dnl with or without modifications, as lo
|
||||
AC_DEFUN([gl_STDDEF_H],
|
||||
[
|
||||
AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
|
||||
- AC_REQUIRE([gt_TYPE_WCHAR_T])
|
||||
+ AC_REQUIRE([gt_TYPE_WCHAR_T_GT])
|
||||
STDDEF_H=
|
||||
|
||||
dnl Test whether the type max_align_t exists and whether its alignment
|
||||
--- a/gettext-tools/gnulib-m4/stdint.m4
|
||||
+++ b/gettext-tools/gnulib-m4/stdint.m4
|
||||
@@ -15,7 +15,7 @@ AC_DEFUN_ONCE([gl_STDINT_H],
|
||||
@ -216,7 +172,7 @@
|
||||
dnl is defined as a weak alias of snprintf; we prefer to use the latter).
|
||||
--- a/gettext-tools/gnulib-m4/wchar_h.m4
|
||||
+++ b/gettext-tools/gnulib-m4/wchar_h.m4
|
||||
@@ -27,7 +27,7 @@ AC_DEFUN([gl_WCHAR_H],
|
||||
@@ -27,7 +27,7 @@ AC_DEFUN_ONCE([gl_WCHAR_H],
|
||||
|
||||
AC_REQUIRE([gl_FEATURES_H])
|
||||
|
||||
@ -238,7 +194,7 @@
|
||||
[AC_COMPILE_IFELSE(
|
||||
--- a/gettext-tools/gnulib-m4/wctype_h.m4
|
||||
+++ b/gettext-tools/gnulib-m4/wctype_h.m4
|
||||
@@ -22,7 +22,7 @@ AC_DEFUN([gl_WCTYPE_H],
|
||||
@@ -22,7 +22,7 @@ AC_DEFUN_ONCE([gl_WCTYPE_H],
|
||||
fi
|
||||
AC_SUBST([HAVE_ISWCNTRL])
|
||||
|
||||
@ -271,37 +227,6 @@
|
||||
[
|
||||
AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t],
|
||||
[AC_COMPILE_IFELSE(
|
||||
--- a/gettext-tools/intl/Makefile.am
|
||||
+++ b/gettext-tools/intl/Makefile.am
|
||||
@@ -274,7 +274,7 @@ libgnuintl.h: $(srcdir)/libgnuintl.in.h
|
||||
-e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \
|
||||
-e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \
|
||||
-e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \
|
||||
- -e 's,@''HAVE_NAMELESS_LOCALES''@,@HAVE_NAMELESS_LOCALES@,g' \
|
||||
+ -e 's,@''HAVE_NAMELESS_LOCALES''@,0,g' \
|
||||
-e 's,@''HAVE_NEWLOCALE''@,@HAVE_NEWLOCALE@,g' \
|
||||
< $(srcdir)/libgnuintl.in.h \
|
||||
| if test '@WOE32DLL@' = yes; then \
|
||||
@@ -294,7 +294,7 @@ libintl.h: $(srcdir)/libgnuintl.in.h
|
||||
-e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \
|
||||
-e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \
|
||||
-e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \
|
||||
- -e 's,@''HAVE_NAMELESS_LOCALES''@,@HAVE_NAMELESS_LOCALES@,g' \
|
||||
+ -e 's,@''HAVE_NAMELESS_LOCALES''@,0,g' \
|
||||
-e 's,@''HAVE_NEWLOCALE''@,@HAVE_NEWLOCALE@,g' \
|
||||
< $(srcdir)/libgnuintl.in.h > libintl.h
|
||||
MOSTLYCLEANFILES += libintl.h
|
||||
--- a/libtextstyle/gnulib-m4/stddef_h.m4
|
||||
+++ b/libtextstyle/gnulib-m4/stddef_h.m4
|
||||
@@ -8,7 +8,7 @@ dnl with or without modifications, as lo
|
||||
AC_DEFUN([gl_STDDEF_H],
|
||||
[
|
||||
AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
|
||||
- AC_REQUIRE([gt_TYPE_WCHAR_T])
|
||||
+ AC_REQUIRE([gt_TYPE_WCHAR_T_GT])
|
||||
STDDEF_H=
|
||||
|
||||
dnl Test whether the type max_align_t exists and whether its alignment
|
||||
--- a/libtextstyle/gnulib-m4/stdint.m4
|
||||
+++ b/libtextstyle/gnulib-m4/stdint.m4
|
||||
@@ -15,7 +15,7 @@ AC_DEFUN_ONCE([gl_STDINT_H],
|
||||
@ -349,7 +274,7 @@
|
||||
dnl is defined as a weak alias of snprintf; we prefer to use the latter).
|
||||
--- a/libtextstyle/gnulib-m4/wchar_h.m4
|
||||
+++ b/libtextstyle/gnulib-m4/wchar_h.m4
|
||||
@@ -27,7 +27,7 @@ AC_DEFUN([gl_WCHAR_H],
|
||||
@@ -27,7 +27,7 @@ AC_DEFUN_ONCE([gl_WCHAR_H],
|
||||
|
||||
AC_REQUIRE([gl_FEATURES_H])
|
||||
|
||||
@ -380,3 +305,38 @@
|
||||
[
|
||||
AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t],
|
||||
[AC_COMPILE_IFELSE(
|
||||
--- a/gettext-tools/gnulib-m4/gnulib-comp.m4
|
||||
+++ b/gettext-tools/gnulib-m4/gnulib-comp.m4
|
||||
@@ -2218,8 +2218,8 @@ changequote([, ])dnl
|
||||
AC_REQUIRE([gl_SOCKETLIB])
|
||||
AC_REQUIRE([gl_SOCKETS])
|
||||
gl_TYPE_SOCKLEN_T
|
||||
- AC_REQUIRE([gt_TYPE_WCHAR_T])
|
||||
- AC_REQUIRE([gt_TYPE_WINT_T])
|
||||
+ AC_REQUIRE([gt_TYPE_WCHAR_T_GT])
|
||||
+ AC_REQUIRE([gt_TYPE_WINT_T_GT])
|
||||
gl_FUNC_STRERROR_R
|
||||
AS_IF([test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1], [
|
||||
AC_LIBOBJ([strerror_r])
|
||||
--- a/libtextstyle/gnulib-m4/stddef_h.m4
|
||||
+++ b/libtextstyle/gnulib-m4/stddef_h.m4
|
||||
@@ -9,7 +9,7 @@ dnl A placeholder for <stddef.h>, for pl
|
||||
AC_DEFUN_ONCE([gl_STDDEF_H],
|
||||
[
|
||||
AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
|
||||
- AC_REQUIRE([gt_TYPE_WCHAR_T])
|
||||
+ AC_REQUIRE([gt_TYPE_WCHAR_T_GT])
|
||||
|
||||
dnl Persuade OpenBSD <stddef.h> to declare max_align_t.
|
||||
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
|
||||
--- a/gettext-tools/gnulib-m4/stddef_h.m4
|
||||
+++ b/gettext-tools/gnulib-m4/stddef_h.m4
|
||||
@@ -9,7 +9,7 @@ dnl A placeholder for <stddef.h>, for pl
|
||||
AC_DEFUN_ONCE([gl_STDDEF_H],
|
||||
[
|
||||
AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
|
||||
- AC_REQUIRE([gt_TYPE_WCHAR_T])
|
||||
+ AC_REQUIRE([gt_TYPE_WCHAR_T_GT])
|
||||
|
||||
dnl Persuade OpenBSD <stddef.h> to declare max_align_t.
|
||||
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libbsd
|
||||
PKG_VERSION:=0.11.6
|
||||
PKG_VERSION:=0.11.7
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://libbsd.freedesktop.org/releases
|
||||
PKG_HASH:=19b38f3172eaf693e6e1c68714636190c7e48851e45224d720b3b5bc0499b5df
|
||||
PKG_HASH:=9baa186059ebbf25c06308e9f991fda31f7183c0f24931826d83aa6abd8a0261
|
||||
|
||||
PKG_LICENSE:=BSD-4-Clause
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=readline
|
||||
PKG_VERSION:=8.1.2
|
||||
PKG_VERSION:=8.2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@GNU/readline
|
||||
PKG_HASH:=7589a2381a8419e68654a47623ce7dfcb756815c8fee726b98f90bf668af7bc6
|
||||
PKG_HASH:=3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35
|
||||
|
||||
PKG_LICENSE:=GPL-3.0-or-later
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
@ -8,13 +8,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=thc-ipv6
|
||||
PKG_VERSION:=2.7
|
||||
PKG_VERSION:=3.8
|
||||
PKG_RELEASE:=1
|
||||
PKG_LICENSE:=GPL-3.0
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@GITHUB/vanhauser-thc/THC-Archive/master/Tools
|
||||
PKG_HASH:=440a3ae98b57100c397ec4f8634468dbbb0c3b48788c6b74af2a597a90544a96
|
||||
PKG_HASH:=b60be61a8b0a944a66e3b719704b4c03c1bc2c22f32d5d21e99e434c82a9d769
|
||||
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
|
||||
@ -31,7 +31,7 @@ THC_APPLETS := \
|
||||
fuzz_dhcps6 implementation6 implementation6d inverse_lookup6 \
|
||||
kill_router6 ndpexhaust6 node_query6 parasite6 passive_discovery6 \
|
||||
randicmp6 redir6 rsmurf6 sendpees6 sendpeesmp6 smurf6 thcping6 \
|
||||
toobig6 trace6
|
||||
toobig6 trace6 toobigsniff6 flood_unreach6 connect6
|
||||
|
||||
THC_DEPENDS_dnsdict6 := +libpthread
|
||||
THC_DEPENDS_thcping6 := +librt
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,5 +1,5 @@
|
||||
@@ -1,6 +1,6 @@
|
||||
# Comment out if openssl-dev is not present
|
||||
# of if you want to compile statc
|
||||
-HAVE_SSL=yes
|
||||
+#HAVE_SSL=yes
|
||||
|
||||
CC=gcc
|
||||
#CFLAGS=-g
|
||||
# comment in if you want to compile static tools
|
||||
#STATIC=-static
|
||||
|
||||
@ -1,12 +1,11 @@
|
||||
diff -urN thc-ipv6-2.7/Makefile thc-ipv6-2.7.new/Makefile
|
||||
--- thc-ipv6-2.7/Makefile 2014-12-27 05:05:30.000000000 -0800
|
||||
+++ thc-ipv6-2.7.new/Makefile 2017-02-04 20:55:51.679898101 -0800
|
||||
@@ -3,7 +3,7 @@
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -7,7 +7,7 @@ HAVE_SSL=yes
|
||||
|
||||
CC=gcc
|
||||
#CC=gcc
|
||||
#CFLAGS=-g
|
||||
-CFLAGS=-O2
|
||||
+CFLAGS?=-O2
|
||||
-CFLAGS+=-g -O3 -march=native -flto -falign-functions -falign-jumps -falign-loops -falign-labels -freorder-blocks
|
||||
+CFLAGS+=-g -O3 -flto -falign-functions -falign-jumps -falign-loops -falign-labels -freorder-blocks
|
||||
CFLAGS+=$(if $(HAVE_SSL),-D_HAVE_SSL,)
|
||||
LDFLAGS+=-lpcap $(if $(HAVE_SSL),-lssl -lcrypto,)
|
||||
PROGRAMS=parasite6 dos-new-ip6 detect-new-ip6 fake_router6 fake_advertise6 fake_solicitate6 fake_mld6 fake_mld26 fake_mldrouter6 flood_mldrouter6 fake_mipv6 redir6 smurf6 alive6 toobig6 rsmurf6 implementation6 implementation6d sendpees6 sendpeesmp6 randicmp6 fuzz_ip6 flood_mld6 flood_mld26 flood_router6 flood_advertise6 flood_solicitate6 trace6 exploit6 denial6 fake_dhcps6 flood_dhcpc6 fake_dns6d fragmentation6 kill_router6 fake_dnsupdate6 ndpexhaust6 detect_sniffer6 dump_router6 fake_router26 flood_router26 passive_discovery6 dnsrevenum6 inverse_lookup6 node_query6 address6 covert_send6 covert_send6d inject_alive6 firewall6 ndpexhaust26 fake_pim6 thcsyn6 redirsniff6 flood_redir6 four2six dump_dhcp6 fuzz_dhcps6 flood_rs6 fuzz_dhcpc6
|
||||
PROGRAMS=parasite6 dos-new-ip6 detect-new-ip6 fake_router6 fake_advertise6 fake_solicitate6 fake_mld6 fake_mld26 fake_mldrouter6 flood_mldrouter6 fake_mipv6 redir6 smurf6 alive6 toobig6 rsmurf6 implementation6 implementation6d sendpees6 sendpeesmp6 randicmp6 fuzz_ip6 flood_mld6 flood_mld26 flood_router6 flood_advertise6 flood_solicitate6 trace6 exploit6 denial6 fake_dhcps6 flood_dhcpc6 fake_dns6d fragmentation6 kill_router6 fake_dnsupdate6 ndpexhaust6 detect_sniffer6 dump_router6 fake_router26 flood_router26 passive_discovery6 dnsrevenum6 inverse_lookup6 node_query6 address6 covert_send6 covert_send6d inject_alive6 firewall6 ndpexhaust26 fake_pim6 thcsyn6 redirsniff6 flood_redir6 four2six dump_dhcp6 flood_rs6 fuzz_dhcps6 fuzz_dhcpc6 toobigsniff6 flood_unreach6 connect6
|
||||
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=iproute2
|
||||
PKG_VERSION:=5.19.0
|
||||
PKG_VERSION:=6.0.0
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2
|
||||
PKG_HASH:=26b7a34d6a7fd2f7a42e2b39c5a90cb61bac522d1096067ffeb195e5693d7791
|
||||
PKG_HASH:=523139e9e72aec996374fa2de74be4c53d2dd05589488934d21ff97bae19580a
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_BUILD_DEPENDS:=iptables
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
@ -1,23 +0,0 @@
|
||||
From cf6b60c504d4be5e1df2b2745e55d677967831d0 Mon Sep 17 00:00:00 2001
|
||||
From: Changhyeok Bae <changhyeok.bae@gmail.com>
|
||||
Date: Tue, 9 Aug 2022 04:01:05 +0000
|
||||
Subject: [PATCH 1/5] ipstats: Add param.h for musl
|
||||
|
||||
Fix build error for musl
|
||||
| /usr/src/debug/iproute2/5.19.0-r0/iproute2-5.19.0/ip/ipstats.c:231: undefined reference to `MIN'
|
||||
|
||||
Signed-off-by: Changhyeok Bae <changhyeok.bae@gmail.com>
|
||||
---
|
||||
ip/ipstats.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/ip/ipstats.c
|
||||
+++ b/ip/ipstats.c
|
||||
@@ -1,6 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
+#include <sys/param.h>
|
||||
|
||||
#include "list.h"
|
||||
#include "utils.h"
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -411,7 +411,7 @@ check_tirpc()
|
||||
@@ -412,7 +412,7 @@ check_tirpc()
|
||||
|
||||
check_mnl()
|
||||
{
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -266,7 +266,7 @@ EOF
|
||||
@@ -267,7 +267,7 @@ EOF
|
||||
|
||||
check_elf()
|
||||
{
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -469,7 +469,7 @@ EOF
|
||||
@@ -470,7 +470,7 @@ EOF
|
||||
|
||||
check_cap()
|
||||
{
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -398,7 +398,7 @@ check_selinux()
|
||||
@@ -399,7 +399,7 @@ check_selinux()
|
||||
|
||||
check_tirpc()
|
||||
{
|
||||
|
||||
@ -105,4 +105,4 @@
|
||||
+
|
||||
UTILOBJ = utils.o utils_math.o rt_names.o ll_map.o ll_types.o ll_proto.o ll_addr.o \
|
||||
inet_proto.o namespace.o json_writer.o json_print.o json_print_math.o \
|
||||
names.o color.o bpf_legacy.o bpf_glue.o exec.o fs.o cg_map.o
|
||||
names.o color.o bpf_legacy.o bpf_glue.o exec.o fs.o cg_map.o ppp_proto.o
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -290,7 +290,7 @@ int main(int argc, char **argv) {
|
||||
@@ -291,7 +291,7 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
EOF
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
local ret=$?
|
||||
|
||||
rm -f $TMPDIR/libbpf_test.c $TMPDIR/libbpf_test
|
||||
@@ -308,7 +308,7 @@ int main(int argc, char **argv) {
|
||||
@@ -309,7 +309,7 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
EOF
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -455,14 +455,8 @@ EOF
|
||||
@@ -456,14 +456,8 @@ EOF
|
||||
if $CC -I$INCLUDE -o $TMPDIR/strtest $TMPDIR/strtest.c >/dev/null 2>&1; then
|
||||
echo "no"
|
||||
else
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -385,7 +385,7 @@ check_libbpf()
|
||||
@@ -386,7 +386,7 @@ check_libbpf()
|
||||
check_selinux()
|
||||
# SELinux is a compile time option in the ss utility
|
||||
{
|
||||
|
||||
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=mtd-utils
|
||||
PKG_VERSION:=2.1.4
|
||||
PKG_VERSION:=2.1.5
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=https://infraroot.at/pub/mtd/
|
||||
PKG_HASH:=2c6711d15d282c47cb3867b6857340597e26d332c238465134c602e5eef71b99
|
||||
PKG_HASH:=386e27fd121699b6b729bc2e8e04dda987b31cca6b16e12fb6cc6dcf26449f46
|
||||
|
||||
PKG_INSTALL:=1
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
@ -5020,7 +5020,7 @@
|
||||
+}
|
||||
--- a/jffsX-utils/mkfs.jffs2.c
|
||||
+++ b/jffsX-utils/mkfs.jffs2.c
|
||||
@@ -1667,11 +1667,11 @@ int main(int argc, char **argv)
|
||||
@@ -1668,11 +1668,11 @@ int main(int argc, char **argv)
|
||||
}
|
||||
erase_block_size *= units;
|
||||
|
||||
|
||||
@ -50,6 +50,7 @@ CONFIG_CLK_VEXPRESS_OSC=y
|
||||
# CONFIG_COMPAT_32BIT_TIME is not set
|
||||
CONFIG_CPU_IDLE=y
|
||||
CONFIG_CPU_IDLE_GOV_MENU=y
|
||||
CONFIG_CPU_LITTLE_ENDIAN=y
|
||||
CONFIG_CPU_PM=y
|
||||
CONFIG_CRYPTO_AES_ARM64=y
|
||||
CONFIG_CRYPTO_AES_ARM64_BS=y
|
||||
|
||||
@ -11,6 +11,7 @@ FEATURES:=ext4 squashfs targz usbgadget ubifs
|
||||
SUBTARGETS:=sama7 sama5 sam9x
|
||||
|
||||
KERNEL_PATCHVER:=5.10
|
||||
KERNEL_TESTING_PATCHVER:=5.15
|
||||
|
||||
include $(INCLUDE_DIR)/target.mk
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,89 @@
|
||||
From 63a0c32028148e91ea91cfbf95841c4ecd69d21b Mon Sep 17 00:00:00 2001
|
||||
From: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Date: Mon, 11 Oct 2021 14:27:06 +0300
|
||||
Subject: [PATCH 235/247] clk: at91: pmc: execute suspend/resume only for
|
||||
backup mode
|
||||
|
||||
Before going to backup mode architecture specific PM code sets the first
|
||||
word in securam (file arch/arm/mach-at91/pm.c, function at91_pm_begin()).
|
||||
Thus take this into account when suspending/resuming clocks. This will
|
||||
avoid executing unnecessary instructions when suspending to non backup
|
||||
modes.
|
||||
|
||||
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Link: https://lore.kernel.org/r/20211011112719.3951784-3-claudiu.beznea@microchip.com
|
||||
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
|
||||
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
---
|
||||
drivers/clk/at91/pmc.c | 39 +++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 39 insertions(+)
|
||||
|
||||
--- a/drivers/clk/at91/pmc.c
|
||||
+++ b/drivers/clk/at91/pmc.c
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <linux/clkdev.h>
|
||||
#include <linux/clk/at91_pmc.h>
|
||||
#include <linux/of.h>
|
||||
+#include <linux/of_address.h>
|
||||
#include <linux/mfd/syscon.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/regmap.h>
|
||||
@@ -110,13 +111,35 @@ struct pmc_data *pmc_data_allocate(unsig
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
+
|
||||
+/* Address in SECURAM that say if we suspend to backup mode. */
|
||||
+static void __iomem *at91_pmc_backup_suspend;
|
||||
+
|
||||
static int at91_pmc_suspend(void)
|
||||
{
|
||||
+ unsigned int backup;
|
||||
+
|
||||
+ if (!at91_pmc_backup_suspend)
|
||||
+ return 0;
|
||||
+
|
||||
+ backup = readl_relaxed(at91_pmc_backup_suspend);
|
||||
+ if (!backup)
|
||||
+ return 0;
|
||||
+
|
||||
return clk_save_context();
|
||||
}
|
||||
|
||||
static void at91_pmc_resume(void)
|
||||
{
|
||||
+ unsigned int backup;
|
||||
+
|
||||
+ if (!at91_pmc_backup_suspend)
|
||||
+ return;
|
||||
+
|
||||
+ backup = readl_relaxed(at91_pmc_backup_suspend);
|
||||
+ if (!backup)
|
||||
+ return;
|
||||
+
|
||||
clk_restore_context();
|
||||
}
|
||||
|
||||
@@ -144,6 +167,22 @@ static int __init pmc_register_ops(void)
|
||||
}
|
||||
of_node_put(np);
|
||||
|
||||
+ np = of_find_compatible_node(NULL, NULL, "atmel,sama5d2-securam");
|
||||
+ if (!np)
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ if (!of_device_is_available(np)) {
|
||||
+ of_node_put(np);
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+ of_node_put(np);
|
||||
+
|
||||
+ at91_pmc_backup_suspend = of_iomap(np, 0);
|
||||
+ if (!at91_pmc_backup_suspend) {
|
||||
+ pr_warn("%s(): unable to map securam\n", __func__);
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+
|
||||
register_syscore_ops(&pmc_syscore_ops);
|
||||
|
||||
return 0;
|
||||
@ -0,0 +1,124 @@
|
||||
From c716562753d1e51a1c53647aa77a332f97187d15 Mon Sep 17 00:00:00 2001
|
||||
From: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Date: Mon, 11 Oct 2021 14:27:08 +0300
|
||||
Subject: [PATCH 237/247] clk: at91: clk-master: add register definition for
|
||||
sama7g5's master clock
|
||||
|
||||
SAMA7G5 has 4 master clocks (MCK1..4) which are controlled though the
|
||||
register at offset 0x30 (relative to PMC). In the last/first phase of
|
||||
suspend/resume procedure (which is architecture specific) the parent
|
||||
of master clocks are changed (via assembly code) for more power saving
|
||||
(see file arch/arm/mach-at91/pm_suspend.S, macros at91_mckx_ps_enable
|
||||
and at91_mckx_ps_restore). Thus the macros corresponding to register
|
||||
at offset 0x30 need to be shared b/w clk-master.c and pm_suspend.S.
|
||||
commit ec03f18cc222 ("clk: at91: add register definition for sama7g5's
|
||||
master clock") introduced the proper macros but didn't adapted the
|
||||
clk-master.c as well. Thus, this commit adapt the clk-master.c to use
|
||||
the macros introduced in commit ec03f18cc222 ("clk: at91: add register
|
||||
definition for sama7g5's master clock").
|
||||
|
||||
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Link: https://lore.kernel.org/r/20211011112719.3951784-5-claudiu.beznea@microchip.com
|
||||
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
|
||||
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
---
|
||||
drivers/clk/at91/clk-master.c | 50 ++++++++++++++++-------------------
|
||||
1 file changed, 23 insertions(+), 27 deletions(-)
|
||||
|
||||
--- a/drivers/clk/at91/clk-master.c
|
||||
+++ b/drivers/clk/at91/clk-master.c
|
||||
@@ -17,15 +17,7 @@
|
||||
#define MASTER_DIV_SHIFT 8
|
||||
#define MASTER_DIV_MASK 0x7
|
||||
|
||||
-#define PMC_MCR 0x30
|
||||
-#define PMC_MCR_ID_MSK GENMASK(3, 0)
|
||||
-#define PMC_MCR_CMD BIT(7)
|
||||
-#define PMC_MCR_DIV GENMASK(10, 8)
|
||||
-#define PMC_MCR_CSS GENMASK(20, 16)
|
||||
#define PMC_MCR_CSS_SHIFT (16)
|
||||
-#define PMC_MCR_EN BIT(28)
|
||||
-
|
||||
-#define PMC_MCR_ID(x) ((x) & PMC_MCR_ID_MSK)
|
||||
|
||||
#define MASTER_MAX_ID 4
|
||||
|
||||
@@ -687,20 +679,22 @@ static void clk_sama7g5_master_set(struc
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned int val, cparent;
|
||||
- unsigned int enable = status ? PMC_MCR_EN : 0;
|
||||
+ unsigned int enable = status ? AT91_PMC_MCR_V2_EN : 0;
|
||||
|
||||
spin_lock_irqsave(master->lock, flags);
|
||||
|
||||
- regmap_write(master->regmap, PMC_MCR, PMC_MCR_ID(master->id));
|
||||
- regmap_read(master->regmap, PMC_MCR, &val);
|
||||
- regmap_update_bits(master->regmap, PMC_MCR,
|
||||
- enable | PMC_MCR_CSS | PMC_MCR_DIV |
|
||||
- PMC_MCR_CMD | PMC_MCR_ID_MSK,
|
||||
+ regmap_write(master->regmap, AT91_PMC_MCR_V2,
|
||||
+ AT91_PMC_MCR_V2_ID(master->id));
|
||||
+ regmap_read(master->regmap, AT91_PMC_MCR_V2, &val);
|
||||
+ regmap_update_bits(master->regmap, AT91_PMC_MCR_V2,
|
||||
+ enable | AT91_PMC_MCR_V2_CSS | AT91_PMC_MCR_V2_DIV |
|
||||
+ AT91_PMC_MCR_V2_CMD | AT91_PMC_MCR_V2_ID_MSK,
|
||||
enable | (master->parent << PMC_MCR_CSS_SHIFT) |
|
||||
(master->div << MASTER_DIV_SHIFT) |
|
||||
- PMC_MCR_CMD | PMC_MCR_ID(master->id));
|
||||
+ AT91_PMC_MCR_V2_CMD |
|
||||
+ AT91_PMC_MCR_V2_ID(master->id));
|
||||
|
||||
- cparent = (val & PMC_MCR_CSS) >> PMC_MCR_CSS_SHIFT;
|
||||
+ cparent = (val & AT91_PMC_MCR_V2_CSS) >> PMC_MCR_CSS_SHIFT;
|
||||
|
||||
/* Wait here only if parent is being changed. */
|
||||
while ((cparent != master->parent) && !clk_master_ready(master))
|
||||
@@ -725,10 +719,12 @@ static void clk_sama7g5_master_disable(s
|
||||
|
||||
spin_lock_irqsave(master->lock, flags);
|
||||
|
||||
- regmap_write(master->regmap, PMC_MCR, master->id);
|
||||
- regmap_update_bits(master->regmap, PMC_MCR,
|
||||
- PMC_MCR_EN | PMC_MCR_CMD | PMC_MCR_ID_MSK,
|
||||
- PMC_MCR_CMD | PMC_MCR_ID(master->id));
|
||||
+ regmap_write(master->regmap, AT91_PMC_MCR_V2, master->id);
|
||||
+ regmap_update_bits(master->regmap, AT91_PMC_MCR_V2,
|
||||
+ AT91_PMC_MCR_V2_EN | AT91_PMC_MCR_V2_CMD |
|
||||
+ AT91_PMC_MCR_V2_ID_MSK,
|
||||
+ AT91_PMC_MCR_V2_CMD |
|
||||
+ AT91_PMC_MCR_V2_ID(master->id));
|
||||
|
||||
spin_unlock_irqrestore(master->lock, flags);
|
||||
}
|
||||
@@ -741,12 +737,12 @@ static int clk_sama7g5_master_is_enabled
|
||||
|
||||
spin_lock_irqsave(master->lock, flags);
|
||||
|
||||
- regmap_write(master->regmap, PMC_MCR, master->id);
|
||||
- regmap_read(master->regmap, PMC_MCR, &val);
|
||||
+ regmap_write(master->regmap, AT91_PMC_MCR_V2, master->id);
|
||||
+ regmap_read(master->regmap, AT91_PMC_MCR_V2, &val);
|
||||
|
||||
spin_unlock_irqrestore(master->lock, flags);
|
||||
|
||||
- return !!(val & PMC_MCR_EN);
|
||||
+ return !!(val & AT91_PMC_MCR_V2_EN);
|
||||
}
|
||||
|
||||
static int clk_sama7g5_master_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
@@ -842,10 +838,10 @@ at91_clk_sama7g5_register_master(struct
|
||||
master->mux_table = mux_table;
|
||||
|
||||
spin_lock_irqsave(master->lock, flags);
|
||||
- regmap_write(master->regmap, PMC_MCR, master->id);
|
||||
- regmap_read(master->regmap, PMC_MCR, &val);
|
||||
- master->parent = (val & PMC_MCR_CSS) >> PMC_MCR_CSS_SHIFT;
|
||||
- master->div = (val & PMC_MCR_DIV) >> MASTER_DIV_SHIFT;
|
||||
+ regmap_write(master->regmap, AT91_PMC_MCR_V2, master->id);
|
||||
+ regmap_read(master->regmap, AT91_PMC_MCR_V2, &val);
|
||||
+ master->parent = (val & AT91_PMC_MCR_V2_CSS) >> PMC_MCR_CSS_SHIFT;
|
||||
+ master->div = (val & AT91_PMC_MCR_V2_DIV) >> MASTER_DIV_SHIFT;
|
||||
spin_unlock_irqrestore(master->lock, flags);
|
||||
|
||||
hw = &master->hw;
|
||||
@ -0,0 +1,40 @@
|
||||
From 17b53ad1574cb5f41789993289d3d94f7a50f0ce Mon Sep 17 00:00:00 2001
|
||||
From: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Date: Mon, 11 Oct 2021 14:27:09 +0300
|
||||
Subject: [PATCH 238/247] clk: at91: clk-master: improve readability by using
|
||||
local variables
|
||||
|
||||
Improve readability in clk_sama7g5_master_set() by using local
|
||||
variables.
|
||||
|
||||
Suggested-by: Nicolas Ferre <nicolas.ferre@microchip.com>
|
||||
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Link: https://lore.kernel.org/r/20211011112719.3951784-6-claudiu.beznea@microchip.com
|
||||
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
|
||||
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
---
|
||||
drivers/clk/at91/clk-master.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/clk/at91/clk-master.c
|
||||
+++ b/drivers/clk/at91/clk-master.c
|
||||
@@ -680,6 +680,8 @@ static void clk_sama7g5_master_set(struc
|
||||
unsigned long flags;
|
||||
unsigned int val, cparent;
|
||||
unsigned int enable = status ? AT91_PMC_MCR_V2_EN : 0;
|
||||
+ unsigned int parent = master->parent << PMC_MCR_CSS_SHIFT;
|
||||
+ unsigned int div = master->div << MASTER_DIV_SHIFT;
|
||||
|
||||
spin_lock_irqsave(master->lock, flags);
|
||||
|
||||
@@ -689,9 +691,7 @@ static void clk_sama7g5_master_set(struc
|
||||
regmap_update_bits(master->regmap, AT91_PMC_MCR_V2,
|
||||
enable | AT91_PMC_MCR_V2_CSS | AT91_PMC_MCR_V2_DIV |
|
||||
AT91_PMC_MCR_V2_CMD | AT91_PMC_MCR_V2_ID_MSK,
|
||||
- enable | (master->parent << PMC_MCR_CSS_SHIFT) |
|
||||
- (master->div << MASTER_DIV_SHIFT) |
|
||||
- AT91_PMC_MCR_V2_CMD |
|
||||
+ enable | parent | div | AT91_PMC_MCR_V2_CMD |
|
||||
AT91_PMC_MCR_V2_ID(master->id));
|
||||
|
||||
cparent = (val & AT91_PMC_MCR_V2_CSS) >> PMC_MCR_CSS_SHIFT;
|
||||
@ -0,0 +1,39 @@
|
||||
From 8a38e0dda46c9d941a61d8b2e6c14704531b7871 Mon Sep 17 00:00:00 2001
|
||||
From: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Date: Mon, 11 Oct 2021 14:27:10 +0300
|
||||
Subject: [PATCH 239/247] clk: at91: pmc: add sama7g5 to the list of available
|
||||
pmcs
|
||||
|
||||
Add SAMA7G5 to the list of available PMCs such that the suspend/resume
|
||||
code for clocks to be used on backup mode.
|
||||
|
||||
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Link: https://lore.kernel.org/r/20211011112719.3951784-7-claudiu.beznea@microchip.com
|
||||
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
|
||||
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
---
|
||||
drivers/clk/at91/pmc.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/clk/at91/pmc.c
|
||||
+++ b/drivers/clk/at91/pmc.c
|
||||
@@ -148,8 +148,9 @@ static struct syscore_ops pmc_syscore_op
|
||||
.resume = at91_pmc_resume,
|
||||
};
|
||||
|
||||
-static const struct of_device_id sama5d2_pmc_dt_ids[] = {
|
||||
+static const struct of_device_id pmc_dt_ids[] = {
|
||||
{ .compatible = "atmel,sama5d2-pmc" },
|
||||
+ { .compatible = "microchip,sama7g5-pmc", },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
|
||||
@@ -157,7 +158,7 @@ static int __init pmc_register_ops(void)
|
||||
{
|
||||
struct device_node *np;
|
||||
|
||||
- np = of_find_matching_node(NULL, sama5d2_pmc_dt_ids);
|
||||
+ np = of_find_matching_node(NULL, pmc_dt_ids);
|
||||
if (!np)
|
||||
return -ENODEV;
|
||||
|
||||
@ -0,0 +1,46 @@
|
||||
From 27c11c09346b7b9f67eeb39db1b943f4a9742ff3 Mon Sep 17 00:00:00 2001
|
||||
From: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Date: Mon, 11 Oct 2021 14:27:13 +0300
|
||||
Subject: [PATCH 241/247] clk: at91: clk-master: mask mckr against layout->mask
|
||||
|
||||
Mask values read/written from/to MCKR against layout->mask as this
|
||||
mask may be different b/w PMC versions.
|
||||
|
||||
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Link: https://lore.kernel.org/r/20211011112719.3951784-10-claudiu.beznea@microchip.com
|
||||
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
|
||||
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
---
|
||||
drivers/clk/at91/clk-master.c | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/clk/at91/clk-master.c
|
||||
+++ b/drivers/clk/at91/clk-master.c
|
||||
@@ -186,8 +186,8 @@ static int clk_master_div_set_rate(struc
|
||||
if (ret)
|
||||
goto unlock;
|
||||
|
||||
- tmp = mckr & master->layout->mask;
|
||||
- tmp = (tmp >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
|
||||
+ mckr &= master->layout->mask;
|
||||
+ tmp = (mckr >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
|
||||
if (tmp == div)
|
||||
goto unlock;
|
||||
|
||||
@@ -384,6 +384,7 @@ static unsigned long clk_master_pres_rec
|
||||
regmap_read(master->regmap, master->layout->offset, &val);
|
||||
spin_unlock_irqrestore(master->lock, flags);
|
||||
|
||||
+ val &= master->layout->mask;
|
||||
pres = (val >> master->layout->pres_shift) & MASTER_PRES_MASK;
|
||||
if (pres == MASTER_PRES_MAX && characteristics->have_div3_pres)
|
||||
pres = 3;
|
||||
@@ -403,6 +404,8 @@ static u8 clk_master_pres_get_parent(str
|
||||
regmap_read(master->regmap, master->layout->offset, &mckr);
|
||||
spin_unlock_irqrestore(master->lock, flags);
|
||||
|
||||
+ mckr &= master->layout->mask;
|
||||
+
|
||||
return mckr & AT91_PMC_CSS;
|
||||
}
|
||||
|
||||
@ -0,0 +1,312 @@
|
||||
From e76d2af5009f52aa02d3db7ae32d150ad66398f9 Mon Sep 17 00:00:00 2001
|
||||
From: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Date: Mon, 11 Oct 2021 14:27:15 +0300
|
||||
Subject: [PATCH 243/247] clk: at91: clk-sam9x60-pll: add notifier for div part
|
||||
of PLL
|
||||
|
||||
SAM9X60's PLL which is also part of SAMA7G5 is composed of 2 parts:
|
||||
one fractional part and one divider. On SAMA7G5 the CPU PLL could be
|
||||
changed at run-time to implement DVFS. The hardware clock tree on
|
||||
SAMA7G5 for CPU PLL is as follows:
|
||||
|
||||
+---- div1 ----------------> cpuck
|
||||
|
|
||||
FRAC PLL ---> DIV PLL -+-> prescaler ---> div0 ---> mck0
|
||||
|
||||
The div1 block is not implemented in Linux; on prescaler block it has
|
||||
been discovered a bug on some scenarios and will be removed from Linux
|
||||
in next commits. Thus, the final clock tree that will be used in Linux
|
||||
will be as follows:
|
||||
|
||||
+-----------> cpuck
|
||||
|
|
||||
FRAC PLL ---> DIV PLL -+-> div0 ---> mck0
|
||||
|
||||
It has been proposed in [1] to not introduce a new CPUFreq driver but
|
||||
to overload the proper clock drivers with proper operation such that
|
||||
cpufreq-dt to be used. To accomplish this DIV PLL and div0 implement
|
||||
clock notifiers which applies safe dividers before FRAC PLL is changed.
|
||||
The current commit treats only the DIV PLL by adding a notifier that
|
||||
sets a safe divider on PRE_RATE_CHANGE events. The safe divider is
|
||||
provided by initialization clock code (sama7g5.c). The div0 is treated
|
||||
in next commits (to keep the changes as clean as possible).
|
||||
|
||||
[1] https://lore.kernel.org/lkml/20210105104426.4tmgc2l3vyicwedd@vireshk-i7/
|
||||
|
||||
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Link: https://lore.kernel.org/r/20211011112719.3951784-12-claudiu.beznea@microchip.com
|
||||
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
|
||||
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
---
|
||||
drivers/clk/at91/clk-sam9x60-pll.c | 102 ++++++++++++++++++++++-------
|
||||
drivers/clk/at91/pmc.h | 3 +-
|
||||
drivers/clk/at91/sam9x60.c | 6 +-
|
||||
drivers/clk/at91/sama7g5.c | 13 +++-
|
||||
4 files changed, 95 insertions(+), 29 deletions(-)
|
||||
|
||||
--- a/drivers/clk/at91/clk-sam9x60-pll.c
|
||||
+++ b/drivers/clk/at91/clk-sam9x60-pll.c
|
||||
@@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/bitfield.h>
|
||||
+#include <linux/clk.h>
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/clkdev.h>
|
||||
#include <linux/clk/at91_pmc.h>
|
||||
@@ -47,12 +48,15 @@ struct sam9x60_div {
|
||||
struct sam9x60_pll_core core;
|
||||
struct at91_clk_pms pms;
|
||||
u8 div;
|
||||
+ u8 safe_div;
|
||||
};
|
||||
|
||||
#define to_sam9x60_pll_core(hw) container_of(hw, struct sam9x60_pll_core, hw)
|
||||
#define to_sam9x60_frac(core) container_of(core, struct sam9x60_frac, core)
|
||||
#define to_sam9x60_div(core) container_of(core, struct sam9x60_div, core)
|
||||
|
||||
+static struct sam9x60_div *notifier_div;
|
||||
+
|
||||
static inline bool sam9x60_pll_ready(struct regmap *regmap, int id)
|
||||
{
|
||||
unsigned int status;
|
||||
@@ -329,6 +333,26 @@ static const struct clk_ops sam9x60_frac
|
||||
.restore_context = sam9x60_frac_pll_restore_context,
|
||||
};
|
||||
|
||||
+/* This function should be called with spinlock acquired. */
|
||||
+static void sam9x60_div_pll_set_div(struct sam9x60_pll_core *core, u32 div,
|
||||
+ bool enable)
|
||||
+{
|
||||
+ struct regmap *regmap = core->regmap;
|
||||
+ u32 ena_msk = enable ? core->layout->endiv_mask : 0;
|
||||
+ u32 ena_val = enable ? (1 << core->layout->endiv_shift) : 0;
|
||||
+
|
||||
+ regmap_update_bits(regmap, AT91_PMC_PLL_CTRL0,
|
||||
+ core->layout->div_mask | ena_msk,
|
||||
+ (div << core->layout->div_shift) | ena_val);
|
||||
+
|
||||
+ regmap_update_bits(regmap, AT91_PMC_PLL_UPDT,
|
||||
+ AT91_PMC_PLL_UPDT_UPDATE | AT91_PMC_PLL_UPDT_ID_MSK,
|
||||
+ AT91_PMC_PLL_UPDT_UPDATE | core->id);
|
||||
+
|
||||
+ while (!sam9x60_pll_ready(regmap, core->id))
|
||||
+ cpu_relax();
|
||||
+}
|
||||
+
|
||||
static int sam9x60_div_pll_set(struct sam9x60_pll_core *core)
|
||||
{
|
||||
struct sam9x60_div *div = to_sam9x60_div(core);
|
||||
@@ -346,17 +370,7 @@ static int sam9x60_div_pll_set(struct sa
|
||||
if (!!(val & core->layout->endiv_mask) && cdiv == div->div)
|
||||
goto unlock;
|
||||
|
||||
- regmap_update_bits(regmap, AT91_PMC_PLL_CTRL0,
|
||||
- core->layout->div_mask | core->layout->endiv_mask,
|
||||
- (div->div << core->layout->div_shift) |
|
||||
- (1 << core->layout->endiv_shift));
|
||||
-
|
||||
- regmap_update_bits(regmap, AT91_PMC_PLL_UPDT,
|
||||
- AT91_PMC_PLL_UPDT_UPDATE | AT91_PMC_PLL_UPDT_ID_MSK,
|
||||
- AT91_PMC_PLL_UPDT_UPDATE | core->id);
|
||||
-
|
||||
- while (!sam9x60_pll_ready(regmap, core->id))
|
||||
- cpu_relax();
|
||||
+ sam9x60_div_pll_set_div(core, div->div, 1);
|
||||
|
||||
unlock:
|
||||
spin_unlock_irqrestore(core->lock, flags);
|
||||
@@ -502,16 +516,7 @@ static int sam9x60_div_pll_set_rate_chg(
|
||||
if (cdiv == div->div)
|
||||
goto unlock;
|
||||
|
||||
- regmap_update_bits(regmap, AT91_PMC_PLL_CTRL0,
|
||||
- core->layout->div_mask,
|
||||
- (div->div << core->layout->div_shift));
|
||||
-
|
||||
- regmap_update_bits(regmap, AT91_PMC_PLL_UPDT,
|
||||
- AT91_PMC_PLL_UPDT_UPDATE | AT91_PMC_PLL_UPDT_ID_MSK,
|
||||
- AT91_PMC_PLL_UPDT_UPDATE | core->id);
|
||||
-
|
||||
- while (!sam9x60_pll_ready(regmap, core->id))
|
||||
- cpu_relax();
|
||||
+ sam9x60_div_pll_set_div(core, div->div, 0);
|
||||
|
||||
unlock:
|
||||
spin_unlock_irqrestore(core->lock, irqflags);
|
||||
@@ -538,6 +543,48 @@ static void sam9x60_div_pll_restore_cont
|
||||
sam9x60_div_pll_set(core);
|
||||
}
|
||||
|
||||
+static int sam9x60_div_pll_notifier_fn(struct notifier_block *notifier,
|
||||
+ unsigned long code, void *data)
|
||||
+{
|
||||
+ struct sam9x60_div *div = notifier_div;
|
||||
+ struct sam9x60_pll_core core = div->core;
|
||||
+ struct regmap *regmap = core.regmap;
|
||||
+ unsigned long irqflags;
|
||||
+ u32 val, cdiv;
|
||||
+ int ret = NOTIFY_DONE;
|
||||
+
|
||||
+ if (code != PRE_RATE_CHANGE)
|
||||
+ return ret;
|
||||
+
|
||||
+ /*
|
||||
+ * We switch to safe divider to avoid overclocking of other domains
|
||||
+ * feed by us while the frac PLL (our parent) is changed.
|
||||
+ */
|
||||
+ div->div = div->safe_div;
|
||||
+
|
||||
+ spin_lock_irqsave(core.lock, irqflags);
|
||||
+ regmap_update_bits(regmap, AT91_PMC_PLL_UPDT, AT91_PMC_PLL_UPDT_ID_MSK,
|
||||
+ core.id);
|
||||
+ regmap_read(regmap, AT91_PMC_PLL_CTRL0, &val);
|
||||
+ cdiv = (val & core.layout->div_mask) >> core.layout->div_shift;
|
||||
+
|
||||
+ /* Stop if nothing changed. */
|
||||
+ if (cdiv == div->safe_div)
|
||||
+ goto unlock;
|
||||
+
|
||||
+ sam9x60_div_pll_set_div(&core, div->div, 0);
|
||||
+ ret = NOTIFY_OK;
|
||||
+
|
||||
+unlock:
|
||||
+ spin_unlock_irqrestore(core.lock, irqflags);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static struct notifier_block sam9x60_div_pll_notifier = {
|
||||
+ .notifier_call = sam9x60_div_pll_notifier_fn,
|
||||
+};
|
||||
+
|
||||
static const struct clk_ops sam9x60_div_pll_ops = {
|
||||
.prepare = sam9x60_div_pll_prepare,
|
||||
.unprepare = sam9x60_div_pll_unprepare,
|
||||
@@ -647,7 +694,8 @@ struct clk_hw * __init
|
||||
sam9x60_clk_register_div_pll(struct regmap *regmap, spinlock_t *lock,
|
||||
const char *name, const char *parent_name, u8 id,
|
||||
const struct clk_pll_characteristics *characteristics,
|
||||
- const struct clk_pll_layout *layout, u32 flags)
|
||||
+ const struct clk_pll_layout *layout, u32 flags,
|
||||
+ u32 safe_div)
|
||||
{
|
||||
struct sam9x60_div *div;
|
||||
struct clk_hw *hw;
|
||||
@@ -656,9 +704,13 @@ sam9x60_clk_register_div_pll(struct regm
|
||||
unsigned int val;
|
||||
int ret;
|
||||
|
||||
- if (id > PLL_MAX_ID || !lock)
|
||||
+ /* We only support one changeable PLL. */
|
||||
+ if (id > PLL_MAX_ID || !lock || (safe_div && notifier_div))
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
+ if (safe_div >= PLL_DIV_MAX)
|
||||
+ safe_div = PLL_DIV_MAX - 1;
|
||||
+
|
||||
div = kzalloc(sizeof(*div), GFP_KERNEL);
|
||||
if (!div)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
@@ -678,6 +730,7 @@ sam9x60_clk_register_div_pll(struct regm
|
||||
div->core.layout = layout;
|
||||
div->core.regmap = regmap;
|
||||
div->core.lock = lock;
|
||||
+ div->safe_div = safe_div;
|
||||
|
||||
spin_lock_irqsave(div->core.lock, irqflags);
|
||||
|
||||
@@ -693,6 +746,9 @@ sam9x60_clk_register_div_pll(struct regm
|
||||
if (ret) {
|
||||
kfree(div);
|
||||
hw = ERR_PTR(ret);
|
||||
+ } else if (div->safe_div) {
|
||||
+ notifier_div = div;
|
||||
+ clk_notifier_register(hw->clk, &sam9x60_div_pll_notifier);
|
||||
}
|
||||
|
||||
return hw;
|
||||
--- a/drivers/clk/at91/pmc.h
|
||||
+++ b/drivers/clk/at91/pmc.h
|
||||
@@ -214,7 +214,8 @@ struct clk_hw * __init
|
||||
sam9x60_clk_register_div_pll(struct regmap *regmap, spinlock_t *lock,
|
||||
const char *name, const char *parent_name, u8 id,
|
||||
const struct clk_pll_characteristics *characteristics,
|
||||
- const struct clk_pll_layout *layout, u32 flags);
|
||||
+ const struct clk_pll_layout *layout, u32 flags,
|
||||
+ u32 safe_div);
|
||||
|
||||
struct clk_hw * __init
|
||||
sam9x60_clk_register_frac_pll(struct regmap *regmap, spinlock_t *lock,
|
||||
--- a/drivers/clk/at91/sam9x60.c
|
||||
+++ b/drivers/clk/at91/sam9x60.c
|
||||
@@ -242,7 +242,7 @@ static void __init sam9x60_pmc_setup(str
|
||||
* This feeds CPU. It should not
|
||||
* be disabled.
|
||||
*/
|
||||
- CLK_IS_CRITICAL | CLK_SET_RATE_GATE);
|
||||
+ CLK_IS_CRITICAL | CLK_SET_RATE_GATE, 0);
|
||||
if (IS_ERR(hw))
|
||||
goto err_free;
|
||||
|
||||
@@ -260,7 +260,7 @@ static void __init sam9x60_pmc_setup(str
|
||||
&pll_div_layout,
|
||||
CLK_SET_RATE_GATE |
|
||||
CLK_SET_PARENT_GATE |
|
||||
- CLK_SET_RATE_PARENT);
|
||||
+ CLK_SET_RATE_PARENT, 0);
|
||||
if (IS_ERR(hw))
|
||||
goto err_free;
|
||||
|
||||
@@ -279,7 +279,7 @@ static void __init sam9x60_pmc_setup(str
|
||||
hw = at91_clk_register_master_div(regmap, "masterck_div",
|
||||
"masterck_pres", &sam9x60_master_layout,
|
||||
&mck_characteristics, &mck_lock,
|
||||
- CLK_SET_RATE_GATE);
|
||||
+ CLK_SET_RATE_GATE, 0);
|
||||
if (IS_ERR(hw))
|
||||
goto err_free;
|
||||
|
||||
--- a/drivers/clk/at91/sama7g5.c
|
||||
+++ b/drivers/clk/at91/sama7g5.c
|
||||
@@ -127,6 +127,8 @@ static const struct clk_pll_characterist
|
||||
* @t: clock type
|
||||
* @f: clock flags
|
||||
* @eid: export index in sama7g5->chws[] array
|
||||
+ * @safe_div: intermediate divider need to be set on PRE_RATE_CHANGE
|
||||
+ * notification
|
||||
*/
|
||||
static const struct {
|
||||
const char *n;
|
||||
@@ -136,6 +138,7 @@ static const struct {
|
||||
unsigned long f;
|
||||
u8 t;
|
||||
u8 eid;
|
||||
+ u8 safe_div;
|
||||
} sama7g5_plls[][PLL_ID_MAX] = {
|
||||
[PLL_ID_CPU] = {
|
||||
{ .n = "cpupll_fracck",
|
||||
@@ -156,7 +159,12 @@ static const struct {
|
||||
.t = PLL_TYPE_DIV,
|
||||
/* This feeds CPU. It should not be disabled. */
|
||||
.f = CLK_IS_CRITICAL | CLK_SET_RATE_PARENT,
|
||||
- .eid = PMC_CPUPLL, },
|
||||
+ .eid = PMC_CPUPLL,
|
||||
+ /*
|
||||
+ * Safe div=15 should be safe even for switching b/w 1GHz and
|
||||
+ * 90MHz (frac pll might go up to 1.2GHz).
|
||||
+ */
|
||||
+ .safe_div = 15, },
|
||||
},
|
||||
|
||||
[PLL_ID_SYS] = {
|
||||
@@ -966,7 +974,8 @@ static void __init sama7g5_pmc_setup(str
|
||||
sama7g5_plls[i][j].p, i,
|
||||
sama7g5_plls[i][j].c,
|
||||
sama7g5_plls[i][j].l,
|
||||
- sama7g5_plls[i][j].f);
|
||||
+ sama7g5_plls[i][j].f,
|
||||
+ sama7g5_plls[i][j].safe_div);
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -0,0 +1,519 @@
|
||||
From 75d5d1d584ae73ba0c36d1d7255db6153ca4d3f3 Mon Sep 17 00:00:00 2001
|
||||
From: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Date: Mon, 11 Oct 2021 14:27:16 +0300
|
||||
Subject: [PATCH 244/247] clk: at91: clk-master: add notifier for divider
|
||||
|
||||
SAMA7G5 supports DVFS by changing cpuck. On SAMA7G5 mck0 shares the same
|
||||
parent with cpuck as seen in the following clock tree:
|
||||
|
||||
+----------> cpuck
|
||||
|
|
||||
FRAC PLL ---> DIV PLL -+-> DIV ---> mck0
|
||||
|
||||
mck0 could go b/w 32KHz and 200MHz on SAMA7G5. To avoid mck0 overclocking
|
||||
while changing FRAC PLL or DIV PLL the commit implements a notifier for
|
||||
mck0 which applies a safe divider to register (maximum value of the divider
|
||||
which is 5) on PRE_RATE_CHANGE events (such that changes on PLL to not
|
||||
overclock mck0) and sets the maximum allowed rate on POST_RATE_CHANGE
|
||||
events.
|
||||
|
||||
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Link: https://lore.kernel.org/r/20211011112719.3951784-13-claudiu.beznea@microchip.com
|
||||
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
|
||||
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
---
|
||||
drivers/clk/at91/at91rm9200.c | 2 +-
|
||||
drivers/clk/at91/at91sam9260.c | 2 +-
|
||||
drivers/clk/at91/at91sam9g45.c | 2 +-
|
||||
drivers/clk/at91/at91sam9n12.c | 2 +-
|
||||
drivers/clk/at91/at91sam9rl.c | 2 +-
|
||||
drivers/clk/at91/at91sam9x5.c | 2 +-
|
||||
drivers/clk/at91/clk-master.c | 244 +++++++++++++++++++++++----------
|
||||
drivers/clk/at91/dt-compat.c | 2 +-
|
||||
drivers/clk/at91/pmc.h | 2 +-
|
||||
drivers/clk/at91/sama5d2.c | 2 +-
|
||||
drivers/clk/at91/sama5d3.c | 2 +-
|
||||
drivers/clk/at91/sama5d4.c | 2 +-
|
||||
drivers/clk/at91/sama7g5.c | 2 +-
|
||||
13 files changed, 186 insertions(+), 82 deletions(-)
|
||||
|
||||
--- a/drivers/clk/at91/at91rm9200.c
|
||||
+++ b/drivers/clk/at91/at91rm9200.c
|
||||
@@ -152,7 +152,7 @@ static void __init at91rm9200_pmc_setup(
|
||||
"masterck_pres",
|
||||
&at91rm9200_master_layout,
|
||||
&rm9200_mck_characteristics,
|
||||
- &rm9200_mck_lock, CLK_SET_RATE_GATE);
|
||||
+ &rm9200_mck_lock, CLK_SET_RATE_GATE, 0);
|
||||
if (IS_ERR(hw))
|
||||
goto err_free;
|
||||
|
||||
--- a/drivers/clk/at91/at91sam9260.c
|
||||
+++ b/drivers/clk/at91/at91sam9260.c
|
||||
@@ -429,7 +429,7 @@ static void __init at91sam926x_pmc_setup
|
||||
&at91rm9200_master_layout,
|
||||
data->mck_characteristics,
|
||||
&at91sam9260_mck_lock,
|
||||
- CLK_SET_RATE_GATE);
|
||||
+ CLK_SET_RATE_GATE, 0);
|
||||
if (IS_ERR(hw))
|
||||
goto err_free;
|
||||
|
||||
--- a/drivers/clk/at91/at91sam9g45.c
|
||||
+++ b/drivers/clk/at91/at91sam9g45.c
|
||||
@@ -164,7 +164,7 @@ static void __init at91sam9g45_pmc_setup
|
||||
&at91rm9200_master_layout,
|
||||
&mck_characteristics,
|
||||
&at91sam9g45_mck_lock,
|
||||
- CLK_SET_RATE_GATE);
|
||||
+ CLK_SET_RATE_GATE, 0);
|
||||
if (IS_ERR(hw))
|
||||
goto err_free;
|
||||
|
||||
--- a/drivers/clk/at91/at91sam9n12.c
|
||||
+++ b/drivers/clk/at91/at91sam9n12.c
|
||||
@@ -191,7 +191,7 @@ static void __init at91sam9n12_pmc_setup
|
||||
&at91sam9x5_master_layout,
|
||||
&mck_characteristics,
|
||||
&at91sam9n12_mck_lock,
|
||||
- CLK_SET_RATE_GATE);
|
||||
+ CLK_SET_RATE_GATE, 0);
|
||||
if (IS_ERR(hw))
|
||||
goto err_free;
|
||||
|
||||
--- a/drivers/clk/at91/at91sam9rl.c
|
||||
+++ b/drivers/clk/at91/at91sam9rl.c
|
||||
@@ -132,7 +132,7 @@ static void __init at91sam9rl_pmc_setup(
|
||||
"masterck_pres",
|
||||
&at91rm9200_master_layout,
|
||||
&sam9rl_mck_characteristics,
|
||||
- &sam9rl_mck_lock, CLK_SET_RATE_GATE);
|
||||
+ &sam9rl_mck_lock, CLK_SET_RATE_GATE, 0);
|
||||
if (IS_ERR(hw))
|
||||
goto err_free;
|
||||
|
||||
--- a/drivers/clk/at91/at91sam9x5.c
|
||||
+++ b/drivers/clk/at91/at91sam9x5.c
|
||||
@@ -210,7 +210,7 @@ static void __init at91sam9x5_pmc_setup(
|
||||
"masterck_pres",
|
||||
&at91sam9x5_master_layout,
|
||||
&mck_characteristics, &mck_lock,
|
||||
- CLK_SET_RATE_GATE);
|
||||
+ CLK_SET_RATE_GATE, 0);
|
||||
if (IS_ERR(hw))
|
||||
goto err_free;
|
||||
|
||||
--- a/drivers/clk/at91/clk-master.c
|
||||
+++ b/drivers/clk/at91/clk-master.c
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/clkdev.h>
|
||||
+#include <linux/clk.h>
|
||||
#include <linux/clk/at91_pmc.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/mfd/syscon.h>
|
||||
@@ -36,8 +37,12 @@ struct clk_master {
|
||||
u8 id;
|
||||
u8 parent;
|
||||
u8 div;
|
||||
+ u32 safe_div;
|
||||
};
|
||||
|
||||
+/* MCK div reference to be used by notifier. */
|
||||
+static struct clk_master *master_div;
|
||||
+
|
||||
static inline bool clk_master_ready(struct clk_master *master)
|
||||
{
|
||||
unsigned int bit = master->id ? AT91_PMC_MCKXRDY : AT91_PMC_MCKRDY;
|
||||
@@ -153,107 +158,81 @@ static const struct clk_ops master_div_o
|
||||
.restore_context = clk_master_div_restore_context,
|
||||
};
|
||||
|
||||
-static int clk_master_div_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
- unsigned long parent_rate)
|
||||
+/* This function must be called with lock acquired. */
|
||||
+static int clk_master_div_set(struct clk_master *master,
|
||||
+ unsigned long parent_rate, int div)
|
||||
{
|
||||
- struct clk_master *master = to_clk_master(hw);
|
||||
const struct clk_master_characteristics *characteristics =
|
||||
master->characteristics;
|
||||
- unsigned long flags;
|
||||
- unsigned int mckr, tmp;
|
||||
- int div, i;
|
||||
+ unsigned long rate = parent_rate;
|
||||
+ unsigned int max_div = 0, div_index = 0, max_div_index = 0;
|
||||
+ unsigned int i, mckr, tmp;
|
||||
int ret;
|
||||
|
||||
- div = DIV_ROUND_CLOSEST(parent_rate, rate);
|
||||
- if (div > ARRAY_SIZE(characteristics->divisors))
|
||||
- return -EINVAL;
|
||||
-
|
||||
for (i = 0; i < ARRAY_SIZE(characteristics->divisors); i++) {
|
||||
if (!characteristics->divisors[i])
|
||||
break;
|
||||
|
||||
- if (div == characteristics->divisors[i]) {
|
||||
- div = i;
|
||||
- break;
|
||||
+ if (div == characteristics->divisors[i])
|
||||
+ div_index = i;
|
||||
+
|
||||
+ if (max_div < characteristics->divisors[i]) {
|
||||
+ max_div = characteristics->divisors[i];
|
||||
+ max_div_index = i;
|
||||
}
|
||||
}
|
||||
|
||||
- if (i == ARRAY_SIZE(characteristics->divisors))
|
||||
- return -EINVAL;
|
||||
+ if (div > max_div)
|
||||
+ div_index = max_div_index;
|
||||
|
||||
- spin_lock_irqsave(master->lock, flags);
|
||||
ret = regmap_read(master->regmap, master->layout->offset, &mckr);
|
||||
if (ret)
|
||||
- goto unlock;
|
||||
+ return ret;
|
||||
|
||||
mckr &= master->layout->mask;
|
||||
tmp = (mckr >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
|
||||
- if (tmp == div)
|
||||
- goto unlock;
|
||||
+ if (tmp == div_index)
|
||||
+ return 0;
|
||||
+
|
||||
+ rate /= characteristics->divisors[div_index];
|
||||
+ if (rate < characteristics->output.min)
|
||||
+ pr_warn("master clk div is underclocked");
|
||||
+ else if (rate > characteristics->output.max)
|
||||
+ pr_warn("master clk div is overclocked");
|
||||
|
||||
mckr &= ~(MASTER_DIV_MASK << MASTER_DIV_SHIFT);
|
||||
- mckr |= (div << MASTER_DIV_SHIFT);
|
||||
+ mckr |= (div_index << MASTER_DIV_SHIFT);
|
||||
ret = regmap_write(master->regmap, master->layout->offset, mckr);
|
||||
if (ret)
|
||||
- goto unlock;
|
||||
+ return ret;
|
||||
|
||||
while (!clk_master_ready(master))
|
||||
cpu_relax();
|
||||
-unlock:
|
||||
- spin_unlock_irqrestore(master->lock, flags);
|
||||
+
|
||||
+ master->div = characteristics->divisors[div_index];
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int clk_master_div_determine_rate(struct clk_hw *hw,
|
||||
- struct clk_rate_request *req)
|
||||
+static unsigned long clk_master_div_recalc_rate_chg(struct clk_hw *hw,
|
||||
+ unsigned long parent_rate)
|
||||
{
|
||||
struct clk_master *master = to_clk_master(hw);
|
||||
- const struct clk_master_characteristics *characteristics =
|
||||
- master->characteristics;
|
||||
- struct clk_hw *parent;
|
||||
- unsigned long parent_rate, tmp_rate, best_rate = 0;
|
||||
- int i, best_diff = INT_MIN, tmp_diff;
|
||||
-
|
||||
- parent = clk_hw_get_parent(hw);
|
||||
- if (!parent)
|
||||
- return -EINVAL;
|
||||
-
|
||||
- parent_rate = clk_hw_get_rate(parent);
|
||||
- if (!parent_rate)
|
||||
- return -EINVAL;
|
||||
|
||||
- for (i = 0; i < ARRAY_SIZE(characteristics->divisors); i++) {
|
||||
- if (!characteristics->divisors[i])
|
||||
- break;
|
||||
-
|
||||
- tmp_rate = DIV_ROUND_CLOSEST_ULL(parent_rate,
|
||||
- characteristics->divisors[i]);
|
||||
- tmp_diff = abs(tmp_rate - req->rate);
|
||||
-
|
||||
- if (!best_rate || best_diff > tmp_diff) {
|
||||
- best_diff = tmp_diff;
|
||||
- best_rate = tmp_rate;
|
||||
- }
|
||||
-
|
||||
- if (!best_diff)
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
- req->best_parent_rate = best_rate;
|
||||
- req->best_parent_hw = parent;
|
||||
- req->rate = best_rate;
|
||||
-
|
||||
- return 0;
|
||||
+ return DIV_ROUND_CLOSEST_ULL(parent_rate, master->div);
|
||||
}
|
||||
|
||||
static void clk_master_div_restore_context_chg(struct clk_hw *hw)
|
||||
{
|
||||
struct clk_master *master = to_clk_master(hw);
|
||||
+ unsigned long flags;
|
||||
int ret;
|
||||
|
||||
- ret = clk_master_div_set_rate(hw, master->pms.rate,
|
||||
- master->pms.parent_rate);
|
||||
+ spin_lock_irqsave(master->lock, flags);
|
||||
+ ret = clk_master_div_set(master, master->pms.parent_rate,
|
||||
+ DIV_ROUND_CLOSEST(master->pms.parent_rate,
|
||||
+ master->pms.rate));
|
||||
+ spin_unlock_irqrestore(master->lock, flags);
|
||||
if (ret)
|
||||
pr_warn("Failed to restore MCK DIV clock\n");
|
||||
}
|
||||
@@ -261,13 +240,116 @@ static void clk_master_div_restore_conte
|
||||
static const struct clk_ops master_div_ops_chg = {
|
||||
.prepare = clk_master_prepare,
|
||||
.is_prepared = clk_master_is_prepared,
|
||||
- .recalc_rate = clk_master_div_recalc_rate,
|
||||
- .determine_rate = clk_master_div_determine_rate,
|
||||
- .set_rate = clk_master_div_set_rate,
|
||||
+ .recalc_rate = clk_master_div_recalc_rate_chg,
|
||||
.save_context = clk_master_div_save_context,
|
||||
.restore_context = clk_master_div_restore_context_chg,
|
||||
};
|
||||
|
||||
+static int clk_master_div_notifier_fn(struct notifier_block *notifier,
|
||||
+ unsigned long code, void *data)
|
||||
+{
|
||||
+ const struct clk_master_characteristics *characteristics =
|
||||
+ master_div->characteristics;
|
||||
+ struct clk_notifier_data *cnd = data;
|
||||
+ unsigned long flags, new_parent_rate, new_rate;
|
||||
+ unsigned int mckr, div, new_div = 0;
|
||||
+ int ret, i;
|
||||
+ long tmp_diff;
|
||||
+ long best_diff = -1;
|
||||
+
|
||||
+ spin_lock_irqsave(master_div->lock, flags);
|
||||
+ switch (code) {
|
||||
+ case PRE_RATE_CHANGE:
|
||||
+ /*
|
||||
+ * We want to avoid any overclocking of MCK DIV domain. To do
|
||||
+ * this we set a safe divider (the underclocking is not of
|
||||
+ * interest as we can go as low as 32KHz). The relation
|
||||
+ * b/w this clock and its parents are as follows:
|
||||
+ *
|
||||
+ * FRAC PLL -> DIV PLL -> MCK DIV
|
||||
+ *
|
||||
+ * With the proper safe divider we should be good even with FRAC
|
||||
+ * PLL at its maximum value.
|
||||
+ */
|
||||
+ ret = regmap_read(master_div->regmap, master_div->layout->offset,
|
||||
+ &mckr);
|
||||
+ if (ret) {
|
||||
+ ret = NOTIFY_STOP_MASK;
|
||||
+ goto unlock;
|
||||
+ }
|
||||
+
|
||||
+ mckr &= master_div->layout->mask;
|
||||
+ div = (mckr >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
|
||||
+
|
||||
+ /* Switch to safe divider. */
|
||||
+ clk_master_div_set(master_div,
|
||||
+ cnd->old_rate * characteristics->divisors[div],
|
||||
+ master_div->safe_div);
|
||||
+ break;
|
||||
+
|
||||
+ case POST_RATE_CHANGE:
|
||||
+ /*
|
||||
+ * At this point we want to restore MCK DIV domain to its maximum
|
||||
+ * allowed rate.
|
||||
+ */
|
||||
+ ret = regmap_read(master_div->regmap, master_div->layout->offset,
|
||||
+ &mckr);
|
||||
+ if (ret) {
|
||||
+ ret = NOTIFY_STOP_MASK;
|
||||
+ goto unlock;
|
||||
+ }
|
||||
+
|
||||
+ mckr &= master_div->layout->mask;
|
||||
+ div = (mckr >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
|
||||
+ new_parent_rate = cnd->new_rate * characteristics->divisors[div];
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(characteristics->divisors); i++) {
|
||||
+ if (!characteristics->divisors[i])
|
||||
+ break;
|
||||
+
|
||||
+ new_rate = DIV_ROUND_CLOSEST_ULL(new_parent_rate,
|
||||
+ characteristics->divisors[i]);
|
||||
+
|
||||
+ tmp_diff = characteristics->output.max - new_rate;
|
||||
+ if (tmp_diff < 0)
|
||||
+ continue;
|
||||
+
|
||||
+ if (best_diff < 0 || best_diff > tmp_diff) {
|
||||
+ new_div = characteristics->divisors[i];
|
||||
+ best_diff = tmp_diff;
|
||||
+ }
|
||||
+
|
||||
+ if (!tmp_diff)
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (!new_div) {
|
||||
+ ret = NOTIFY_STOP_MASK;
|
||||
+ goto unlock;
|
||||
+ }
|
||||
+
|
||||
+ /* Update the div to preserve MCK DIV clock rate. */
|
||||
+ clk_master_div_set(master_div, new_parent_rate,
|
||||
+ new_div);
|
||||
+
|
||||
+ ret = NOTIFY_OK;
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ ret = NOTIFY_DONE;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+unlock:
|
||||
+ spin_unlock_irqrestore(master_div->lock, flags);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static struct notifier_block clk_master_div_notifier = {
|
||||
+ .notifier_call = clk_master_div_notifier_fn,
|
||||
+};
|
||||
+
|
||||
static void clk_sama7g5_master_best_diff(struct clk_rate_request *req,
|
||||
struct clk_hw *parent,
|
||||
unsigned long parent_rate,
|
||||
@@ -496,6 +578,8 @@ at91_clk_register_master_internal(struct
|
||||
struct clk_master *master;
|
||||
struct clk_init_data init;
|
||||
struct clk_hw *hw;
|
||||
+ unsigned int mckr;
|
||||
+ unsigned long irqflags;
|
||||
int ret;
|
||||
|
||||
if (!name || !num_parents || !parent_names || !lock)
|
||||
@@ -518,6 +602,16 @@ at91_clk_register_master_internal(struct
|
||||
master->chg_pid = chg_pid;
|
||||
master->lock = lock;
|
||||
|
||||
+ if (ops == &master_div_ops_chg) {
|
||||
+ spin_lock_irqsave(master->lock, irqflags);
|
||||
+ regmap_read(master->regmap, master->layout->offset, &mckr);
|
||||
+ spin_unlock_irqrestore(master->lock, irqflags);
|
||||
+
|
||||
+ mckr &= layout->mask;
|
||||
+ mckr = (mckr >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
|
||||
+ master->div = characteristics->divisors[mckr];
|
||||
+ }
|
||||
+
|
||||
hw = &master->hw;
|
||||
ret = clk_hw_register(NULL, &master->hw);
|
||||
if (ret) {
|
||||
@@ -554,19 +648,29 @@ at91_clk_register_master_div(struct regm
|
||||
const char *name, const char *parent_name,
|
||||
const struct clk_master_layout *layout,
|
||||
const struct clk_master_characteristics *characteristics,
|
||||
- spinlock_t *lock, u32 flags)
|
||||
+ spinlock_t *lock, u32 flags, u32 safe_div)
|
||||
{
|
||||
const struct clk_ops *ops;
|
||||
+ struct clk_hw *hw;
|
||||
|
||||
if (flags & CLK_SET_RATE_GATE)
|
||||
ops = &master_div_ops;
|
||||
else
|
||||
ops = &master_div_ops_chg;
|
||||
|
||||
- return at91_clk_register_master_internal(regmap, name, 1,
|
||||
- &parent_name, layout,
|
||||
- characteristics, ops,
|
||||
- lock, flags, -EINVAL);
|
||||
+ hw = at91_clk_register_master_internal(regmap, name, 1,
|
||||
+ &parent_name, layout,
|
||||
+ characteristics, ops,
|
||||
+ lock, flags, -EINVAL);
|
||||
+
|
||||
+ if (!IS_ERR(hw) && safe_div) {
|
||||
+ master_div = to_clk_master(hw);
|
||||
+ master_div->safe_div = safe_div;
|
||||
+ clk_notifier_register(hw->clk,
|
||||
+ &clk_master_div_notifier);
|
||||
+ }
|
||||
+
|
||||
+ return hw;
|
||||
}
|
||||
|
||||
static unsigned long
|
||||
--- a/drivers/clk/at91/dt-compat.c
|
||||
+++ b/drivers/clk/at91/dt-compat.c
|
||||
@@ -399,7 +399,7 @@ of_at91_clk_master_setup(struct device_n
|
||||
|
||||
hw = at91_clk_register_master_div(regmap, name, "masterck_pres",
|
||||
layout, characteristics,
|
||||
- &mck_lock, CLK_SET_RATE_GATE);
|
||||
+ &mck_lock, CLK_SET_RATE_GATE, 0);
|
||||
if (IS_ERR(hw))
|
||||
goto out_free_characteristics;
|
||||
|
||||
--- a/drivers/clk/at91/pmc.h
|
||||
+++ b/drivers/clk/at91/pmc.h
|
||||
@@ -182,7 +182,7 @@ at91_clk_register_master_div(struct regm
|
||||
const char *parent_names,
|
||||
const struct clk_master_layout *layout,
|
||||
const struct clk_master_characteristics *characteristics,
|
||||
- spinlock_t *lock, u32 flags);
|
||||
+ spinlock_t *lock, u32 flags, u32 safe_div);
|
||||
|
||||
struct clk_hw * __init
|
||||
at91_clk_sama7g5_register_master(struct regmap *regmap,
|
||||
--- a/drivers/clk/at91/sama5d2.c
|
||||
+++ b/drivers/clk/at91/sama5d2.c
|
||||
@@ -249,7 +249,7 @@ static void __init sama5d2_pmc_setup(str
|
||||
"masterck_pres",
|
||||
&at91sam9x5_master_layout,
|
||||
&mck_characteristics, &mck_lock,
|
||||
- CLK_SET_RATE_GATE);
|
||||
+ CLK_SET_RATE_GATE, 0);
|
||||
if (IS_ERR(hw))
|
||||
goto err_free;
|
||||
|
||||
--- a/drivers/clk/at91/sama5d3.c
|
||||
+++ b/drivers/clk/at91/sama5d3.c
|
||||
@@ -184,7 +184,7 @@ static void __init sama5d3_pmc_setup(str
|
||||
"masterck_pres",
|
||||
&at91sam9x5_master_layout,
|
||||
&mck_characteristics, &mck_lock,
|
||||
- CLK_SET_RATE_GATE);
|
||||
+ CLK_SET_RATE_GATE, 0);
|
||||
if (IS_ERR(hw))
|
||||
goto err_free;
|
||||
|
||||
--- a/drivers/clk/at91/sama5d4.c
|
||||
+++ b/drivers/clk/at91/sama5d4.c
|
||||
@@ -199,7 +199,7 @@ static void __init sama5d4_pmc_setup(str
|
||||
"masterck_pres",
|
||||
&at91sam9x5_master_layout,
|
||||
&mck_characteristics, &mck_lock,
|
||||
- CLK_SET_RATE_GATE);
|
||||
+ CLK_SET_RATE_GATE, 0);
|
||||
if (IS_ERR(hw))
|
||||
goto err_free;
|
||||
|
||||
--- a/drivers/clk/at91/sama7g5.c
|
||||
+++ b/drivers/clk/at91/sama7g5.c
|
||||
@@ -993,7 +993,7 @@ static void __init sama7g5_pmc_setup(str
|
||||
parent_names[0] = "cpupll_divpmcck";
|
||||
hw = at91_clk_register_master_div(regmap, "mck0", "cpupll_divpmcck",
|
||||
&mck0_layout, &mck0_characteristics,
|
||||
- &pmc_mck0_lock, 0);
|
||||
+ &pmc_mck0_lock, CLK_GET_RATE_NOCACHE, 5);
|
||||
if (IS_ERR(hw))
|
||||
goto err_free;
|
||||
|
||||
@ -0,0 +1,26 @@
|
||||
From 9fd5a49f6da9de5da83f4a53eccefad647ab15ed Mon Sep 17 00:00:00 2001
|
||||
From: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Date: Mon, 11 Oct 2021 14:27:18 +0300
|
||||
Subject: [PATCH 246/247] clk: at91: sama7g5: set low limit for mck0 at 32KHz
|
||||
|
||||
MCK0 could go as low as 32KHz. Set this limit.
|
||||
|
||||
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Link: https://lore.kernel.org/r/20211011112719.3951784-15-claudiu.beznea@microchip.com
|
||||
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
|
||||
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
---
|
||||
drivers/clk/at91/sama7g5.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/clk/at91/sama7g5.c
|
||||
+++ b/drivers/clk/at91/sama7g5.c
|
||||
@@ -849,7 +849,7 @@ static const struct {
|
||||
|
||||
/* MCK0 characteristics. */
|
||||
static const struct clk_master_characteristics mck0_characteristics = {
|
||||
- .output = { .min = 50000000, .max = 200000000 },
|
||||
+ .output = { .min = 32768, .max = 200000000 },
|
||||
.divisors = { 1, 2, 4, 3, 5 },
|
||||
.have_div3_pres = 1,
|
||||
};
|
||||
@ -0,0 +1,32 @@
|
||||
From fe07791494a78d5a4be1363385e6ba7940740644 Mon Sep 17 00:00:00 2001
|
||||
From: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Date: Mon, 11 Oct 2021 14:27:19 +0300
|
||||
Subject: [PATCH 247/247] clk: use clk_core_get_rate_recalc() in clk_rate_get()
|
||||
|
||||
In case clock flags contains CLK_GET_RATE_NOCACHE the clk_rate_get()
|
||||
will return the cached rate. Thus, use clk_core_get_rate_recalc() which
|
||||
takes proper action when clock flags contains CLK_GET_RATE_NOCACHE.
|
||||
|
||||
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Link: https://lore.kernel.org/r/20211011112719.3951784-16-claudiu.beznea@microchip.com
|
||||
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
|
||||
[sboyd@kernel.org: Grab prepare lock around operation]
|
||||
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
---
|
||||
drivers/clk/clk.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/clk/clk.c
|
||||
+++ b/drivers/clk/clk.c
|
||||
@@ -3131,7 +3131,10 @@ static int clk_rate_get(void *data, u64
|
||||
{
|
||||
struct clk_core *core = data;
|
||||
|
||||
- *val = core->rate;
|
||||
+ clk_prepare_lock();
|
||||
+ *val = clk_core_get_rate_recalc(core);
|
||||
+ clk_prepare_unlock();
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -21,7 +21,6 @@ CONFIG_ARM_L1_CACHE_SHIFT=5
|
||||
CONFIG_ARM_PATCH_PHYS_VIRT=y
|
||||
CONFIG_ARM_THUMB=y
|
||||
CONFIG_ARM_UNWIND=y
|
||||
# CONFIG_ASN1 is not set
|
||||
# CONFIG_AT91RM9200_WATCHDOG is not set
|
||||
CONFIG_AT91SAM9X_WATCHDOG=y
|
||||
# CONFIG_AT91_ADC is not set
|
||||
319
target/linux/at91/sam9x/config-5.15
Normal file
319
target/linux/at91/sam9x/config-5.15
Normal file
@ -0,0 +1,319 @@
|
||||
CONFIG_ALIGNMENT_TRAP=y
|
||||
CONFIG_ARCH_32BIT_OFF_T=y
|
||||
CONFIG_ARCH_AT91=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_KEEP_MEMBLOCK=y
|
||||
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
|
||||
CONFIG_ARCH_MULTIPLATFORM=y
|
||||
# CONFIG_ARCH_MULTI_V4 is not set
|
||||
CONFIG_ARCH_MULTI_V4T=y
|
||||
CONFIG_ARCH_MULTI_V4_V5=y
|
||||
CONFIG_ARCH_MULTI_V5=y
|
||||
CONFIG_ARCH_NR_GPIO=0
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
|
||||
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
|
||||
CONFIG_ARCH_SPARSEMEM_ENABLE=y
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARM_CPU_SUSPEND=y
|
||||
CONFIG_ARM_HAS_SG_CHAIN=y
|
||||
CONFIG_ARM_L1_CACHE_SHIFT=5
|
||||
CONFIG_ARM_PATCH_PHYS_VIRT=y
|
||||
CONFIG_ARM_THUMB=y
|
||||
CONFIG_ARM_UNWIND=y
|
||||
# CONFIG_AT91RM9200_WATCHDOG is not set
|
||||
CONFIG_AT91SAM9X_WATCHDOG=y
|
||||
# CONFIG_AT91_ADC is not set
|
||||
CONFIG_AT91_SAMA5D2_ADC=y
|
||||
CONFIG_AT91_SOC_ID=y
|
||||
# CONFIG_AT91_SOC_SFR is not set
|
||||
CONFIG_ATMEL_AIC5_IRQ=y
|
||||
CONFIG_ATMEL_AIC_IRQ=y
|
||||
CONFIG_ATMEL_CLOCKSOURCE_PIT=y
|
||||
CONFIG_ATMEL_CLOCKSOURCE_TCB=y
|
||||
CONFIG_ATMEL_EBI=y
|
||||
CONFIG_ATMEL_PIT=y
|
||||
CONFIG_ATMEL_PM=y
|
||||
CONFIG_ATMEL_SDRAMC=y
|
||||
CONFIG_ATMEL_SSC=y
|
||||
CONFIG_ATMEL_ST=y
|
||||
CONFIG_ATMEL_TCB_CLKSRC=y
|
||||
CONFIG_AT_HDMAC=y
|
||||
CONFIG_AT_XDMAC=y
|
||||
CONFIG_AUTO_ZRELADDR=y
|
||||
CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
|
||||
CONFIG_BLK_PM=y
|
||||
CONFIG_CLKSRC_MMIO=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMMON_CLK_AT91=y
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
CONFIG_CONFIGFS_FS=y
|
||||
CONFIG_CPU_32v4T=y
|
||||
CONFIG_CPU_32v5=y
|
||||
CONFIG_CPU_ABRT_EV4T=y
|
||||
CONFIG_CPU_ABRT_EV5TJ=y
|
||||
CONFIG_CPU_ARM920T=y
|
||||
CONFIG_CPU_ARM926T=y
|
||||
# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
|
||||
CONFIG_CPU_CACHE_V4WT=y
|
||||
CONFIG_CPU_CACHE_VIVT=y
|
||||
CONFIG_CPU_COPY_V4WB=y
|
||||
CONFIG_CPU_CP15=y
|
||||
CONFIG_CPU_CP15_MMU=y
|
||||
# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
|
||||
CONFIG_CPU_NO_EFFICIENT_FFS=y
|
||||
CONFIG_CPU_PABRT_LEGACY=y
|
||||
CONFIG_CPU_PM=y
|
||||
CONFIG_CPU_THUMB_CAPABLE=y
|
||||
CONFIG_CPU_TLB_V4WBI=y
|
||||
CONFIG_CPU_USE_DOMAINS=y
|
||||
CONFIG_CRC16=y
|
||||
CONFIG_CRC7=y
|
||||
CONFIG_CRC_CCITT=y
|
||||
CONFIG_CRC_ITU_T=y
|
||||
CONFIG_CRYPTO_CRC32C=y
|
||||
CONFIG_CRYPTO_DEFLATE=y
|
||||
CONFIG_CRYPTO_HASH_INFO=y
|
||||
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
||||
CONFIG_CRYPTO_LZO=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_ZSTD=y
|
||||
CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_DMA_ENGINE=y
|
||||
CONFIG_DMA_OF=y
|
||||
CONFIG_DMA_OPS=y
|
||||
CONFIG_DMA_REMAP=y
|
||||
CONFIG_DTC=y
|
||||
CONFIG_EDAC_ATOMIC_SCRUB=y
|
||||
CONFIG_EDAC_SUPPORT=y
|
||||
CONFIG_EEPROM_AT24=y
|
||||
CONFIG_EXT4_FS=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FIX_EARLYCON_MEM=y
|
||||
CONFIG_FREEZER=y
|
||||
CONFIG_FS_IOMAP=y
|
||||
CONFIG_FS_MBCACHE=y
|
||||
CONFIG_FWNODE_MDIO=y
|
||||
CONFIG_FW_CACHE=y
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
CONFIG_GENERIC_ALLOCATOR=y
|
||||
CONFIG_GENERIC_ATOMIC64=y
|
||||
CONFIG_GENERIC_BUG=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_EARLY_IOREMAP=y
|
||||
CONFIG_GENERIC_IDLE_POLL_SETUP=y
|
||||
CONFIG_GENERIC_IRQ_CHIP=y
|
||||
CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
|
||||
CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=y
|
||||
CONFIG_GENERIC_PINCONF=y
|
||||
CONFIG_GENERIC_PINCTRL_GROUPS=y
|
||||
CONFIG_GENERIC_PINMUX_FUNCTIONS=y
|
||||
CONFIG_GENERIC_SCHED_CLOCK=y
|
||||
CONFIG_GENERIC_SMP_IDLE_THREAD=y
|
||||
CONFIG_GENERIC_STRNCPY_FROM_USER=y
|
||||
CONFIG_GENERIC_STRNLEN_USER=y
|
||||
CONFIG_GLOB=y
|
||||
CONFIG_GPIOLIB_IRQCHIP=y
|
||||
CONFIG_GPIO_CDEV=y
|
||||
CONFIG_HANDLE_DOMAIN_IRQ=y
|
||||
CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_ATMEL=y
|
||||
CONFIG_HZ=128
|
||||
CONFIG_HZ_FIXED=128
|
||||
CONFIG_HZ_PERIODIC=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_ALGOBIT=y
|
||||
CONFIG_I2C_AT91=y
|
||||
# CONFIG_I2C_AT91_SLAVE_EXPERIMENTAL is not set
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
CONFIG_I2C_COMPAT=y
|
||||
CONFIG_I2C_GPIO=y
|
||||
CONFIG_IIO=y
|
||||
CONFIG_IIO_BUFFER=y
|
||||
CONFIG_IIO_KFIFO_BUF=y
|
||||
CONFIG_IIO_TRIGGER=y
|
||||
CONFIG_IIO_TRIGGERED_BUFFER=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_INPUT=y
|
||||
CONFIG_IRQCHIP=y
|
||||
CONFIG_IRQ_DOMAIN=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
CONFIG_JBD2=y
|
||||
CONFIG_LEDS_GPIO=y
|
||||
CONFIG_LEDS_PWM=y
|
||||
CONFIG_LEDS_TRIGGER_CPU=y
|
||||
CONFIG_LEDS_TRIGGER_GPIO=y
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
CONFIG_LZO_COMPRESS=y
|
||||
CONFIG_LZO_DECOMPRESS=y
|
||||
CONFIG_MACB=y
|
||||
CONFIG_MACB_USE_HWSTAMP=y
|
||||
CONFIG_MDIO_BUS=y
|
||||
CONFIG_MDIO_DEVICE=y
|
||||
CONFIG_MDIO_DEVRES=y
|
||||
CONFIG_MEMFD_CREATE=y
|
||||
CONFIG_MEMORY=y
|
||||
CONFIG_MFD_AT91_USART=y
|
||||
CONFIG_MFD_ATMEL_FLEXCOM=y
|
||||
CONFIG_MFD_ATMEL_HLCDC=y
|
||||
CONFIG_MFD_ATMEL_SMC=y
|
||||
CONFIG_MFD_CORE=y
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_MICREL_PHY=y
|
||||
CONFIG_MICROCHIP_PIT64B=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_ATMELMCI=y
|
||||
CONFIG_MMC_BLOCK=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_OF_AT91=y
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
CONFIG_MODULES_USE_ELF_REL=y
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
CONFIG_MTD_DATAFLASH=y
|
||||
# CONFIG_MTD_DATAFLASH_OTP is not set
|
||||
# CONFIG_MTD_DATAFLASH_WRITE_VERIFY is not set
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
CONFIG_MTD_UBI=y
|
||||
CONFIG_MTD_UBI_BEB_LIMIT=20
|
||||
# CONFIG_MTD_UBI_BLOCK is not set
|
||||
CONFIG_MTD_UBI_FASTMAP=y
|
||||
CONFIG_MTD_UBI_GLUEBI=y
|
||||
CONFIG_MTD_UBI_WL_THRESHOLD=4096
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NEED_KUSER_HELPERS=y
|
||||
CONFIG_NEED_PER_CPU_KM=y
|
||||
CONFIG_NET_PTP_CLASSIFY=y
|
||||
CONFIG_NET_SELFTESTS=y
|
||||
CONFIG_NLS=y
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_NVMEM_SYSFS=y
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
CONFIG_OF_FLATTREE=y
|
||||
CONFIG_OF_GPIO=y
|
||||
CONFIG_OF_IRQ=y
|
||||
CONFIG_OF_KOBJ=y
|
||||
CONFIG_OF_MDIO=y
|
||||
CONFIG_OLD_SIGACTION=y
|
||||
CONFIG_OLD_SIGSUSPEND3=y
|
||||
CONFIG_PAGE_OFFSET=0xC0000000
|
||||
CONFIG_PERF_USE_VMALLOC=y
|
||||
CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHYLINK=y
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_PINCTRL_AT91=y
|
||||
# CONFIG_PINCTRL_AT91PIO4 is not set
|
||||
CONFIG_PINCTRL_MCP23S08=y
|
||||
CONFIG_PINCTRL_MCP23S08_I2C=y
|
||||
CONFIG_PINCTRL_MCP23S08_SPI=y
|
||||
CONFIG_PM=y
|
||||
CONFIG_PM_CLK=y
|
||||
CONFIG_PM_SLEEP=y
|
||||
CONFIG_POWER_RESET=y
|
||||
CONFIG_POWER_RESET_AT91_POWEROFF=y
|
||||
CONFIG_POWER_RESET_AT91_RESET=y
|
||||
CONFIG_POWER_RESET_AT91_SAMA5D2_SHDWC=y
|
||||
CONFIG_POWER_SUPPLY=y
|
||||
CONFIG_PPS=y
|
||||
CONFIG_PTP_1588_CLOCK=y
|
||||
CONFIG_PTP_1588_CLOCK_OPTIONAL=y
|
||||
CONFIG_PWM=y
|
||||
CONFIG_PWM_ATMEL=y
|
||||
CONFIG_PWM_ATMEL_HLCDC_PWM=y
|
||||
CONFIG_PWM_ATMEL_TCB=y
|
||||
CONFIG_PWM_SYSFS=y
|
||||
CONFIG_RATIONAL=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_I2C=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_REGMAP_SPI=y
|
||||
CONFIG_REGULATOR=y
|
||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_AT91RM9200=y
|
||||
CONFIG_RTC_DRV_AT91SAM9=y
|
||||
CONFIG_RTC_I2C_AND_SPI=y
|
||||
CONFIG_RTC_MC146818_LIB=y
|
||||
CONFIG_SAMA5D4_WATCHDOG=y
|
||||
# CONFIG_SERIAL_8250 is not set
|
||||
CONFIG_SERIAL_ATMEL=y
|
||||
CONFIG_SERIAL_ATMEL_CONSOLE=y
|
||||
CONFIG_SERIAL_ATMEL_PDC=y
|
||||
# CONFIG_SERIAL_ATMEL_TTYAT is not set
|
||||
CONFIG_SERIAL_MCTRL_GPIO=y
|
||||
CONFIG_SGL_ALLOC=y
|
||||
CONFIG_SOC_AT91RM9200=y
|
||||
CONFIG_SOC_AT91SAM9=y
|
||||
CONFIG_SOC_BUS=y
|
||||
CONFIG_SOC_SAM9X60=y
|
||||
CONFIG_SOC_SAM_V4_V5=y
|
||||
CONFIG_SPARSE_IRQ=y
|
||||
CONFIG_SPI=y
|
||||
# CONFIG_SPI_AT91_USART is not set
|
||||
CONFIG_SPI_ATMEL=y
|
||||
CONFIG_SPI_ATMEL_QUADSPI=y
|
||||
CONFIG_SPI_BITBANG=y
|
||||
CONFIG_SPI_GPIO=y
|
||||
CONFIG_SPI_MASTER=y
|
||||
CONFIG_SPI_MEM=y
|
||||
CONFIG_SPI_SPIDEV=y
|
||||
CONFIG_SPLIT_PTLOCK_CPUS=999999
|
||||
CONFIG_SRAM=y
|
||||
CONFIG_SRAM_EXEC=y
|
||||
CONFIG_SRCU=y
|
||||
CONFIG_SUSPEND=y
|
||||
CONFIG_SUSPEND_FREEZER=y
|
||||
CONFIG_SWPHY=y
|
||||
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
|
||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||
CONFIG_TIMER_OF=y
|
||||
CONFIG_TIMER_PROBE=y
|
||||
CONFIG_TINY_SRCU=y
|
||||
CONFIG_UBIFS_FS=y
|
||||
CONFIG_UBIFS_FS_ADVANCED_COMPR=y
|
||||
CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
|
||||
CONFIG_UNWINDER_ARM=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_ACM=y
|
||||
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
|
||||
# CONFIG_USB_AT91 is not set
|
||||
# CONFIG_USB_ATMEL_USBA is not set
|
||||
CONFIG_USB_COMMON=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_HCD_AT91=y
|
||||
# CONFIG_USB_EHCI_HCD_PLATFORM is not set
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD_AT91=y
|
||||
CONFIG_USB_OHCI_HCD_PLATFORM=y
|
||||
CONFIG_USB_SERIAL=y
|
||||
# CONFIG_USB_SERIAL_CONSOLE is not set
|
||||
CONFIG_USB_SERIAL_FTDI_SIO=y
|
||||
CONFIG_USB_SERIAL_PL2303=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USE_OF=y
|
||||
# CONFIG_VFP is not set
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_XXHASH=y
|
||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||
CONFIG_ZLIB_DEFLATE=y
|
||||
CONFIG_ZLIB_INFLATE=y
|
||||
CONFIG_ZSTD_COMPRESS=y
|
||||
CONFIG_ZSTD_DECOMPRESS=y
|
||||
@ -25,7 +25,6 @@ CONFIG_ARM_PATCH_PHYS_VIRT=y
|
||||
CONFIG_ARM_THUMB=y
|
||||
CONFIG_ARM_UNWIND=y
|
||||
CONFIG_ARM_VIRT_EXT=y
|
||||
# CONFIG_ASN1 is not set
|
||||
CONFIG_AT91SAM9X_WATCHDOG=y
|
||||
CONFIG_AT91_ADC=y
|
||||
CONFIG_AT91_SAMA5D2_ADC=y
|
||||
@ -172,6 +171,7 @@ CONFIG_GENERIC_ALLOCATOR=y
|
||||
CONFIG_GENERIC_BUG=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_CPU_VULNERABILITIES=y
|
||||
CONFIG_GENERIC_EARLY_IOREMAP=y
|
||||
CONFIG_GENERIC_GETTIMEOFDAY=y
|
||||
CONFIG_GENERIC_IDLE_POLL_SETUP=y
|
||||
489
target/linux/at91/sama5/config-5.15
Normal file
489
target/linux/at91/sama5/config-5.15
Normal file
@ -0,0 +1,489 @@
|
||||
CONFIG_ALIGNMENT_TRAP=y
|
||||
CONFIG_ARCH_32BIT_OFF_T=y
|
||||
CONFIG_ARCH_AT91=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_KEEP_MEMBLOCK=y
|
||||
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
|
||||
CONFIG_ARCH_MULTIPLATFORM=y
|
||||
CONFIG_ARCH_MULTI_V6_V7=y
|
||||
CONFIG_ARCH_MULTI_V7=y
|
||||
CONFIG_ARCH_NR_GPIO=0
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
|
||||
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
|
||||
CONFIG_ARCH_SPARSEMEM_ENABLE=y
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARM_AT91_CPUIDLE=y
|
||||
CONFIG_ARM_CPU_SUSPEND=y
|
||||
CONFIG_ARM_HAS_SG_CHAIN=y
|
||||
CONFIG_ARM_HEAVY_MB=y
|
||||
CONFIG_ARM_L1_CACHE_SHIFT=6
|
||||
CONFIG_ARM_L1_CACHE_SHIFT_6=y
|
||||
CONFIG_ARM_PATCH_IDIV=y
|
||||
CONFIG_ARM_PATCH_PHYS_VIRT=y
|
||||
CONFIG_ARM_THUMB=y
|
||||
CONFIG_ARM_UNWIND=y
|
||||
CONFIG_ARM_VIRT_EXT=y
|
||||
CONFIG_AT91SAM9X_WATCHDOG=y
|
||||
CONFIG_AT91_ADC=y
|
||||
CONFIG_AT91_SAMA5D2_ADC=y
|
||||
CONFIG_AT91_SOC_ID=y
|
||||
# CONFIG_AT91_SOC_SFR is not set
|
||||
CONFIG_ATMEL_AIC5_IRQ=y
|
||||
# CONFIG_ATMEL_CLOCKSOURCE_PIT is not set
|
||||
CONFIG_ATMEL_CLOCKSOURCE_TCB=y
|
||||
CONFIG_ATMEL_EBI=y
|
||||
CONFIG_ATMEL_PM=y
|
||||
CONFIG_ATMEL_SDRAMC=y
|
||||
CONFIG_ATMEL_SSC=y
|
||||
CONFIG_ATMEL_TCB_CLKSRC=y
|
||||
CONFIG_AT_HDMAC=y
|
||||
CONFIG_AT_XDMAC=y
|
||||
CONFIG_AUTO_ZRELADDR=y
|
||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||
CONFIG_BACKLIGHT_PWM=y
|
||||
CONFIG_BATTERY_ACT8945A=y
|
||||
CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_BLK_DEV_RAM_COUNT=4
|
||||
CONFIG_BLK_DEV_RAM_SIZE=8192
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_BLK_PM=y
|
||||
CONFIG_CACHE_L2X0=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_CMA=y
|
||||
CONFIG_CMA_ALIGNMENT=8
|
||||
CONFIG_CMA_AREAS=7
|
||||
# CONFIG_CMA_DEBUG is not set
|
||||
# CONFIG_CMA_DEBUGFS is not set
|
||||
CONFIG_CMA_SIZE_MBYTES=16
|
||||
# CONFIG_CMA_SIZE_SEL_MAX is not set
|
||||
CONFIG_CMA_SIZE_SEL_MBYTES=y
|
||||
# CONFIG_CMA_SIZE_SEL_MIN is not set
|
||||
# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
|
||||
# CONFIG_CMA_SYSFS is not set
|
||||
CONFIG_CMDLINE="console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 rw"
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMMON_CLK_AT91=y
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
CONFIG_CONFIGFS_FS=y
|
||||
CONFIG_CONTIG_ALLOC=y
|
||||
CONFIG_COREDUMP=y
|
||||
CONFIG_CPU_32v6K=y
|
||||
CONFIG_CPU_32v7=y
|
||||
CONFIG_CPU_ABRT_EV7=y
|
||||
CONFIG_CPU_CACHE_V7=y
|
||||
CONFIG_CPU_CACHE_VIPT=y
|
||||
CONFIG_CPU_COPY_V6=y
|
||||
CONFIG_CPU_CP15=y
|
||||
CONFIG_CPU_CP15_MMU=y
|
||||
CONFIG_CPU_HAS_ASID=y
|
||||
CONFIG_CPU_IDLE=y
|
||||
CONFIG_CPU_IDLE_GOV_LADDER=y
|
||||
CONFIG_CPU_IDLE_GOV_MENU=y
|
||||
CONFIG_CPU_PABRT_V7=y
|
||||
CONFIG_CPU_PM=y
|
||||
CONFIG_CPU_SPECTRE=y
|
||||
CONFIG_CPU_THUMB_CAPABLE=y
|
||||
CONFIG_CPU_TLB_V7=y
|
||||
CONFIG_CPU_V7=y
|
||||
CONFIG_CRASH_CORE=y
|
||||
CONFIG_CRASH_DUMP=y
|
||||
CONFIG_CRC16=y
|
||||
# CONFIG_CRC32_SARWATE is not set
|
||||
CONFIG_CRC32_SLICEBY8=y
|
||||
CONFIG_CROSS_MEMORY_ATTACH=y
|
||||
CONFIG_CRYPTO_CRC32C=y
|
||||
CONFIG_CRYPTO_DEFLATE=y
|
||||
CONFIG_CRYPTO_DRBG=y
|
||||
CONFIG_CRYPTO_DRBG_HMAC=y
|
||||
CONFIG_CRYPTO_DRBG_MENU=y
|
||||
CONFIG_CRYPTO_HASH_INFO=y
|
||||
CONFIG_CRYPTO_HMAC=y
|
||||
CONFIG_CRYPTO_JITTERENTROPY=y
|
||||
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
||||
CONFIG_CRYPTO_LIB_SHA256=y
|
||||
CONFIG_CRYPTO_LZO=y
|
||||
CONFIG_CRYPTO_RNG=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_RNG_DEFAULT=y
|
||||
CONFIG_CRYPTO_SEQIV=y
|
||||
CONFIG_CRYPTO_SHA256=y
|
||||
CONFIG_CRYPTO_SHA512=y
|
||||
CONFIG_CRYPTO_ZSTD=y
|
||||
CONFIG_DCACHE_WORD_ACCESS=y
|
||||
CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
|
||||
CONFIG_DEBUG_MEMORY_INIT=y
|
||||
CONFIG_DEBUG_USER=y
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_DMA_CMA=y
|
||||
CONFIG_DMA_ENGINE=y
|
||||
CONFIG_DMA_OF=y
|
||||
CONFIG_DMA_OPS=y
|
||||
CONFIG_DMA_REMAP=y
|
||||
CONFIG_DMA_SHARED_BUFFER=y
|
||||
CONFIG_DNOTIFY=y
|
||||
CONFIG_DRM=y
|
||||
CONFIG_DRM_ATMEL_HLCDC=y
|
||||
CONFIG_DRM_BRIDGE=y
|
||||
CONFIG_DRM_DP_AUX_BUS=y
|
||||
CONFIG_DRM_FBDEV_EMULATION=y
|
||||
CONFIG_DRM_FBDEV_OVERALLOC=100
|
||||
CONFIG_DRM_GEM_CMA_HELPER=y
|
||||
CONFIG_DRM_KMS_CMA_HELPER=y
|
||||
CONFIG_DRM_KMS_HELPER=y
|
||||
CONFIG_DRM_PANEL=y
|
||||
CONFIG_DRM_PANEL_BRIDGE=y
|
||||
CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
|
||||
CONFIG_DRM_PANEL_SIMPLE=y
|
||||
CONFIG_DTC=y
|
||||
CONFIG_DVB_CORE=y
|
||||
CONFIG_EDAC_ATOMIC_SCRUB=y
|
||||
CONFIG_EDAC_SUPPORT=y
|
||||
CONFIG_EEPROM_AT24=y
|
||||
CONFIG_ELF_CORE=y
|
||||
CONFIG_EXT4_FS=y
|
||||
CONFIG_FAT_FS=y
|
||||
CONFIG_FB=y
|
||||
CONFIG_FB_CFB_COPYAREA=y
|
||||
CONFIG_FB_CFB_FILLRECT=y
|
||||
CONFIG_FB_CFB_IMAGEBLIT=y
|
||||
CONFIG_FB_CMDLINE=y
|
||||
CONFIG_FB_DEFERRED_IO=y
|
||||
CONFIG_FB_SYS_COPYAREA=y
|
||||
CONFIG_FB_SYS_FILLRECT=y
|
||||
CONFIG_FB_SYS_FOPS=y
|
||||
CONFIG_FB_SYS_IMAGEBLIT=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FIX_EARLYCON_MEM=y
|
||||
CONFIG_FORCE_MAX_ZONEORDER=15
|
||||
CONFIG_FREEZER=y
|
||||
CONFIG_FS_IOMAP=y
|
||||
CONFIG_FS_MBCACHE=y
|
||||
CONFIG_FWNODE_MDIO=y
|
||||
CONFIG_FW_CACHE=y
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
CONFIG_GENERIC_ALLOCATOR=y
|
||||
CONFIG_GENERIC_BUG=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_CPU_VULNERABILITIES=y
|
||||
CONFIG_GENERIC_EARLY_IOREMAP=y
|
||||
CONFIG_GENERIC_GETTIMEOFDAY=y
|
||||
CONFIG_GENERIC_IDLE_POLL_SETUP=y
|
||||
CONFIG_GENERIC_IRQ_CHIP=y
|
||||
CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
|
||||
CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=y
|
||||
CONFIG_GENERIC_PINCONF=y
|
||||
CONFIG_GENERIC_SCHED_CLOCK=y
|
||||
CONFIG_GENERIC_SMP_IDLE_THREAD=y
|
||||
CONFIG_GENERIC_STRNCPY_FROM_USER=y
|
||||
CONFIG_GENERIC_STRNLEN_USER=y
|
||||
CONFIG_GENERIC_TIME_VSYSCALL=y
|
||||
CONFIG_GENERIC_VDSO_32=y
|
||||
CONFIG_GLOB=y
|
||||
CONFIG_GPIOLIB_IRQCHIP=y
|
||||
CONFIG_GPIO_CDEV=y
|
||||
CONFIG_HANDLE_DOMAIN_IRQ=y
|
||||
CONFIG_HARDEN_BRANCH_PREDICTOR=y
|
||||
CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HAVE_SMP=y
|
||||
CONFIG_HDMI=y
|
||||
CONFIG_HID=y
|
||||
CONFIG_HID_GENERIC=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_ATMEL=y
|
||||
CONFIG_HZ_FIXED=0
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_ALGOBIT=y
|
||||
CONFIG_I2C_AT91=y
|
||||
# CONFIG_I2C_AT91_SLAVE_EXPERIMENTAL is not set
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
CONFIG_I2C_COMPAT=y
|
||||
CONFIG_I2C_GPIO=y
|
||||
CONFIG_I2C_HELPER_AUTO=y
|
||||
CONFIG_IIO=y
|
||||
CONFIG_IIO_BUFFER=y
|
||||
CONFIG_IIO_KFIFO_BUF=y
|
||||
CONFIG_IIO_TRIGGER=y
|
||||
CONFIG_IIO_TRIGGERED_BUFFER=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_INPUT=y
|
||||
CONFIG_INPUT_EVDEV=y
|
||||
CONFIG_INPUT_KEYBOARD=y
|
||||
CONFIG_INPUT_LEDS=y
|
||||
CONFIG_INPUT_TOUCHSCREEN=y
|
||||
CONFIG_IRQCHIP=y
|
||||
CONFIG_IRQ_DOMAIN=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
CONFIG_JBD2=y
|
||||
# CONFIG_JFFS2_FS is not set
|
||||
CONFIG_KCMP=y
|
||||
CONFIG_KERNEL_GZIP=y
|
||||
# CONFIG_KERNEL_XZ is not set
|
||||
CONFIG_KEXEC=y
|
||||
CONFIG_KEXEC_CORE=y
|
||||
CONFIG_KEYBOARD_GPIO=y
|
||||
CONFIG_KEYBOARD_QT1070=y
|
||||
CONFIG_LEDS_GPIO=y
|
||||
CONFIG_LEDS_PWM=y
|
||||
CONFIG_LEDS_TRIGGER_CPU=y
|
||||
CONFIG_LEDS_TRIGGER_GPIO=y
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LOCALVERSION_AUTO=y
|
||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
CONFIG_LOG_BUF_SHIFT=16
|
||||
CONFIG_LZO_COMPRESS=y
|
||||
CONFIG_LZO_DECOMPRESS=y
|
||||
CONFIG_MACB=y
|
||||
CONFIG_MACB_USE_HWSTAMP=y
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_MDIO_BUS=y
|
||||
CONFIG_MDIO_DEVICE=y
|
||||
CONFIG_MDIO_DEVRES=y
|
||||
CONFIG_MEDIA_ANALOG_TV_SUPPORT=y
|
||||
CONFIG_MEDIA_ATTACH=y
|
||||
CONFIG_MEDIA_CAMERA_SUPPORT=y
|
||||
CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
|
||||
CONFIG_MEDIA_PLATFORM_SUPPORT=y
|
||||
CONFIG_MEDIA_RADIO_SUPPORT=y
|
||||
CONFIG_MEDIA_SDR_SUPPORT=y
|
||||
CONFIG_MEDIA_SUPPORT=y
|
||||
CONFIG_MEDIA_TEST_SUPPORT=y
|
||||
CONFIG_MEDIA_TUNER=y
|
||||
CONFIG_MEDIA_USB_SUPPORT=y
|
||||
CONFIG_MEMFD_CREATE=y
|
||||
CONFIG_MEMORY=y
|
||||
CONFIG_MEMORY_ISOLATION=y
|
||||
CONFIG_MFD_ACT8945A=y
|
||||
CONFIG_MFD_AT91_USART=y
|
||||
CONFIG_MFD_ATMEL_FLEXCOM=y
|
||||
CONFIG_MFD_ATMEL_HLCDC=y
|
||||
CONFIG_MFD_ATMEL_SMC=y
|
||||
CONFIG_MFD_CORE=y
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_MICREL_PHY=y
|
||||
CONFIG_MIGHT_HAVE_CACHE_L2X0=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_ATMELMCI=y
|
||||
CONFIG_MMC_BLOCK=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_OF_AT91=y
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
CONFIG_MODULES_USE_ELF_REL=y
|
||||
# CONFIG_MTD_CFI_AMDSTD is not set
|
||||
# CONFIG_MTD_CFI_INTELEXT is not set
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
# CONFIG_MTD_COMPLEX_MAPPINGS is not set
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
CONFIG_MTD_UBI=y
|
||||
CONFIG_MTD_UBI_BEB_LIMIT=20
|
||||
# CONFIG_MTD_UBI_BLOCK is not set
|
||||
CONFIG_MTD_UBI_FASTMAP=y
|
||||
CONFIG_MTD_UBI_WL_THRESHOLD=4096
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NEED_PER_CPU_KM=y
|
||||
# CONFIG_NEON is not set
|
||||
CONFIG_NET_PTP_CLASSIFY=y
|
||||
CONFIG_NET_SELFTESTS=y
|
||||
CONFIG_NLS=y
|
||||
CONFIG_NLS_CODEPAGE_437=y
|
||||
CONFIG_NLS_CODEPAGE_850=y
|
||||
CONFIG_NLS_ISO8859_1=y
|
||||
CONFIG_NLS_UTF8=y
|
||||
CONFIG_NO_HZ_COMMON=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_NVMEM_SYSFS=y
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
CONFIG_OF_FLATTREE=y
|
||||
CONFIG_OF_GPIO=y
|
||||
CONFIG_OF_IRQ=y
|
||||
CONFIG_OF_KOBJ=y
|
||||
CONFIG_OF_MDIO=y
|
||||
CONFIG_OLD_SIGACTION=y
|
||||
CONFIG_OLD_SIGSUSPEND3=y
|
||||
CONFIG_OUTER_CACHE=y
|
||||
CONFIG_OUTER_CACHE_SYNC=y
|
||||
CONFIG_PAGE_OFFSET=0xC0000000
|
||||
# CONFIG_PARTITION_ADVANCED is not set
|
||||
CONFIG_PERF_USE_VMALLOC=y
|
||||
CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHYLINK=y
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_PINCTRL_AT91=y
|
||||
CONFIG_PINCTRL_AT91PIO4=y
|
||||
# CONFIG_PINCTRL_SINGLE is not set
|
||||
CONFIG_PM=y
|
||||
CONFIG_PM_CLK=y
|
||||
CONFIG_PM_SLEEP=y
|
||||
CONFIG_POWER_RESET=y
|
||||
CONFIG_POWER_RESET_AT91_POWEROFF=y
|
||||
CONFIG_POWER_RESET_AT91_RESET=y
|
||||
CONFIG_POWER_RESET_AT91_SAMA5D2_SHDWC=y
|
||||
CONFIG_POWER_SUPPLY=y
|
||||
CONFIG_PPS=y
|
||||
# CONFIG_PREVENT_FIRMWARE_BUILD is not set
|
||||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_PROC_VMCORE=y
|
||||
CONFIG_PTP_1588_CLOCK=y
|
||||
CONFIG_PTP_1588_CLOCK_OPTIONAL=y
|
||||
CONFIG_PWM=y
|
||||
CONFIG_PWM_ATMEL=y
|
||||
CONFIG_PWM_ATMEL_HLCDC_PWM=y
|
||||
CONFIG_PWM_ATMEL_TCB=y
|
||||
CONFIG_PWM_SYSFS=y
|
||||
CONFIG_RATIONAL=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_I2C=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_REGMAP_SPI=y
|
||||
CONFIG_REGULATOR=y
|
||||
CONFIG_REGULATOR_ACT8865=y
|
||||
CONFIG_REGULATOR_ACT8945A=y
|
||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_AT91RM9200=y
|
||||
# CONFIG_RTC_DRV_AT91SAM9 is not set
|
||||
# CONFIG_RTC_DRV_CMOS is not set
|
||||
CONFIG_RTC_I2C_AND_SPI=y
|
||||
CONFIG_SAMA5D4_WATCHDOG=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_SCSI_COMMON=y
|
||||
# CONFIG_SCSI_LOWLEVEL is not set
|
||||
# CONFIG_SERIAL_8250 is not set
|
||||
CONFIG_SERIAL_ATMEL=y
|
||||
CONFIG_SERIAL_ATMEL_CONSOLE=y
|
||||
CONFIG_SERIAL_ATMEL_PDC=y
|
||||
# CONFIG_SERIAL_ATMEL_TTYAT is not set
|
||||
CONFIG_SERIAL_MCTRL_GPIO=y
|
||||
CONFIG_SGL_ALLOC=y
|
||||
CONFIG_SG_POOL=y
|
||||
CONFIG_SND=y
|
||||
CONFIG_SND_ARM=y
|
||||
# CONFIG_SND_AT73C213 is not set
|
||||
# CONFIG_SND_AT91_SOC_SAM9G20_WM8731 is not set
|
||||
# CONFIG_SND_AT91_SOC_SAM9X5_WM8731 is not set
|
||||
CONFIG_SND_ATMEL_SOC=y
|
||||
CONFIG_SND_ATMEL_SOC_CLASSD=y
|
||||
CONFIG_SND_ATMEL_SOC_DMA=y
|
||||
CONFIG_SND_ATMEL_SOC_I2S=y
|
||||
CONFIG_SND_ATMEL_SOC_PDC=y
|
||||
# CONFIG_SND_ATMEL_SOC_PDMIC is not set
|
||||
CONFIG_SND_ATMEL_SOC_SSC=y
|
||||
CONFIG_SND_ATMEL_SOC_SSC_DMA=y
|
||||
# CONFIG_SND_ATMEL_SOC_SSC_PDC is not set
|
||||
# CONFIG_SND_ATMEL_SOC_TSE850_PCM5142 is not set
|
||||
CONFIG_SND_ATMEL_SOC_WM8904=y
|
||||
# CONFIG_SND_COMPRESS_OFFLOAD is not set
|
||||
CONFIG_SND_DMAENGINE_PCM=y
|
||||
CONFIG_SND_JACK=y
|
||||
CONFIG_SND_JACK_INPUT_DEV=y
|
||||
# CONFIG_SND_MCHP_SOC_I2S_MCC is not set
|
||||
# CONFIG_SND_MCHP_SOC_SPDIFRX is not set
|
||||
# CONFIG_SND_MCHP_SOC_SPDIFTX is not set
|
||||
CONFIG_SND_PCM=y
|
||||
CONFIG_SND_PCM_TIMER=y
|
||||
CONFIG_SND_SOC=y
|
||||
CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y
|
||||
CONFIG_SND_SOC_I2C_AND_SPI=y
|
||||
CONFIG_SND_SOC_MIKROE_PROTO=y
|
||||
CONFIG_SND_SOC_WM8731=y
|
||||
CONFIG_SND_SOC_WM8904=y
|
||||
CONFIG_SND_SPI=y
|
||||
CONFIG_SND_SUPPORT_OLD_API=y
|
||||
CONFIG_SND_TIMER=y
|
||||
CONFIG_SOC_BUS=y
|
||||
CONFIG_SOC_SAMA5=y
|
||||
CONFIG_SOC_SAMA5D2=y
|
||||
CONFIG_SOC_SAMA5D3=y
|
||||
CONFIG_SOC_SAMA5D4=y
|
||||
# CONFIG_SOC_SAMA7G5 is not set
|
||||
CONFIG_SOC_SAM_V7=y
|
||||
CONFIG_SOUND=y
|
||||
CONFIG_SOUND_OSS_CORE=y
|
||||
CONFIG_SPARSE_IRQ=y
|
||||
CONFIG_SPI=y
|
||||
# CONFIG_SPI_AT91_USART is not set
|
||||
CONFIG_SPI_ATMEL=y
|
||||
CONFIG_SPI_ATMEL_QUADSPI=y
|
||||
CONFIG_SPI_BITBANG=y
|
||||
CONFIG_SPI_GPIO=y
|
||||
CONFIG_SPI_MASTER=y
|
||||
CONFIG_SPI_MEM=y
|
||||
# CONFIG_SQUASHFS is not set
|
||||
CONFIG_SRAM=y
|
||||
CONFIG_SRAM_EXEC=y
|
||||
CONFIG_SRCU=y
|
||||
# CONFIG_STANDALONE is not set
|
||||
CONFIG_SUSPEND=y
|
||||
CONFIG_SUSPEND_FREEZER=y
|
||||
CONFIG_SWPHY=y
|
||||
# CONFIG_SWP_EMULATE is not set
|
||||
CONFIG_SYNC_FILE=y
|
||||
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
|
||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||
CONFIG_TIMER_OF=y
|
||||
CONFIG_TIMER_PROBE=y
|
||||
CONFIG_TINY_SRCU=y
|
||||
CONFIG_TOUCHSCREEN_ATMEL_MXT=y
|
||||
CONFIG_UACCESS_WITH_MEMCPY=y
|
||||
CONFIG_UBIFS_FS=y
|
||||
CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
|
||||
CONFIG_UNWINDER_ARM=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_ACM=y
|
||||
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
|
||||
# CONFIG_USB_AT91 is not set
|
||||
# CONFIG_USB_ATMEL_USBA is not set
|
||||
CONFIG_USB_COMMON=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_HCD_AT91=y
|
||||
# CONFIG_USB_EHCI_HCD_PLATFORM is not set
|
||||
# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_HID=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD_AT91=y
|
||||
CONFIG_USB_OHCI_HCD_PLATFORM=y
|
||||
# CONFIG_USB_PWC is not set
|
||||
CONFIG_USB_SERIAL=y
|
||||
# CONFIG_USB_SERIAL_CONSOLE is not set
|
||||
CONFIG_USB_SERIAL_FTDI_SIO=y
|
||||
CONFIG_USB_SERIAL_PL2303=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USE_OF=y
|
||||
CONFIG_V4L_PLATFORM_DRIVERS=y
|
||||
CONFIG_VFAT_FS=y
|
||||
CONFIG_VFP=y
|
||||
CONFIG_VFPv3=y
|
||||
CONFIG_VIDEOMODE_HELPERS=y
|
||||
# CONFIG_VIDEO_CPIA2 is not set
|
||||
CONFIG_VIDEO_DEV=y
|
||||
CONFIG_VIDEO_V4L2=y
|
||||
CONFIG_VIDEO_V4L2_I2C=y
|
||||
CONFIG_VM_EVENT_COUNTERS=y
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set
|
||||
CONFIG_XXHASH=y
|
||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||
CONFIG_ZLIB_DEFLATE=y
|
||||
CONFIG_ZLIB_INFLATE=y
|
||||
CONFIG_ZSTD_COMPRESS=y
|
||||
CONFIG_ZSTD_DECOMPRESS=y
|
||||
403
target/linux/at91/sama7/config-5.15
Normal file
403
target/linux/at91/sama7/config-5.15
Normal file
@ -0,0 +1,403 @@
|
||||
CONFIG_ALIGNMENT_TRAP=y
|
||||
# CONFIG_ALLOW_DEV_COREDUMP is not set
|
||||
CONFIG_ARCH_32BIT_OFF_T=y
|
||||
CONFIG_ARCH_AT91=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_KEEP_MEMBLOCK=y
|
||||
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
|
||||
CONFIG_ARCH_MULTIPLATFORM=y
|
||||
CONFIG_ARCH_MULTI_V6_V7=y
|
||||
CONFIG_ARCH_MULTI_V7=y
|
||||
CONFIG_ARCH_NR_GPIO=0
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
|
||||
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
|
||||
CONFIG_ARCH_SPARSEMEM_ENABLE=y
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARM_GIC=y
|
||||
CONFIG_ARM_HAS_SG_CHAIN=y
|
||||
CONFIG_ARM_L1_CACHE_SHIFT=6
|
||||
CONFIG_ARM_L1_CACHE_SHIFT_6=y
|
||||
# CONFIG_ARM_PATCH_IDIV is not set
|
||||
CONFIG_ARM_PATCH_PHYS_VIRT=y
|
||||
CONFIG_ARM_THUMB=y
|
||||
CONFIG_ARM_UNWIND=y
|
||||
CONFIG_ARM_VIRT_EXT=y
|
||||
# CONFIG_AT91SAM9X_WATCHDOG is not set
|
||||
# CONFIG_AT91_ADC is not set
|
||||
CONFIG_AT91_SAMA5D2_ADC=y
|
||||
CONFIG_AT91_SOC_ID=y
|
||||
# CONFIG_AT91_SOC_SFR is not set
|
||||
CONFIG_ATMEL_CLOCKSOURCE_TCB=y
|
||||
# CONFIG_ATMEL_EBI is not set
|
||||
CONFIG_ATMEL_SDRAMC=y
|
||||
CONFIG_ATMEL_TCB_CLKSRC=y
|
||||
# CONFIG_AT_HDMAC is not set
|
||||
CONFIG_AT_XDMAC=y
|
||||
CONFIG_AUTO_ZRELADDR=y
|
||||
CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_BLK_DEV_RAM_COUNT=1
|
||||
CONFIG_BLK_DEV_RAM_SIZE=8192
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
# CONFIG_CACHE_L2X0 is not set
|
||||
CONFIG_CAN=y
|
||||
CONFIG_CLKSRC_MMIO=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_CMA=y
|
||||
CONFIG_CMA_ALIGNMENT=9
|
||||
CONFIG_CMA_AREAS=7
|
||||
# CONFIG_CMA_DEBUG is not set
|
||||
# CONFIG_CMA_DEBUGFS is not set
|
||||
CONFIG_CMA_SIZE_MBYTES=256
|
||||
# CONFIG_CMA_SIZE_SEL_MAX is not set
|
||||
CONFIG_CMA_SIZE_SEL_MBYTES=y
|
||||
# CONFIG_CMA_SIZE_SEL_MIN is not set
|
||||
# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
|
||||
# CONFIG_CMA_SYSFS is not set
|
||||
CONFIG_CMDLINE="console=ttyS0,115200 earlyprintk nocache ignore_loglevel"
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMMON_CLK_AT91=y
|
||||
# CONFIG_COMPACTION is not set
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
CONFIG_CONFIGFS_FS=y
|
||||
CONFIG_CONSOLE_TRANSLATIONS=y
|
||||
CONFIG_CONTIG_ALLOC=y
|
||||
CONFIG_CPUFREQ_DT=y
|
||||
CONFIG_CPUFREQ_DT_PLATDEV=y
|
||||
CONFIG_CPU_32v6K=y
|
||||
CONFIG_CPU_32v7=y
|
||||
CONFIG_CPU_ABRT_EV7=y
|
||||
CONFIG_CPU_CACHE_V7=y
|
||||
CONFIG_CPU_CACHE_VIPT=y
|
||||
CONFIG_CPU_COPY_V6=y
|
||||
CONFIG_CPU_CP15=y
|
||||
CONFIG_CPU_CP15_MMU=y
|
||||
CONFIG_CPU_FREQ=y
|
||||
CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE=y
|
||||
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
|
||||
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_USERSPACE=y
|
||||
CONFIG_CPU_FREQ_STAT=y
|
||||
CONFIG_CPU_HAS_ASID=y
|
||||
CONFIG_CPU_PABRT_V7=y
|
||||
CONFIG_CPU_SPECTRE=y
|
||||
# CONFIG_CPU_SW_DOMAIN_PAN is not set
|
||||
CONFIG_CPU_THUMB_CAPABLE=y
|
||||
CONFIG_CPU_TLB_V7=y
|
||||
CONFIG_CPU_V7=y
|
||||
CONFIG_CRC16=y
|
||||
CONFIG_CRC_CCITT=y
|
||||
CONFIG_CRC_ITU_T=y
|
||||
CONFIG_CRYPTO_CMAC=y
|
||||
CONFIG_CRYPTO_CRC32C=y
|
||||
CONFIG_CRYPTO_DEFLATE=y
|
||||
CONFIG_CRYPTO_DRBG=y
|
||||
CONFIG_CRYPTO_DRBG_HMAC=y
|
||||
CONFIG_CRYPTO_DRBG_MENU=y
|
||||
CONFIG_CRYPTO_ECB=y
|
||||
CONFIG_CRYPTO_ECC=y
|
||||
CONFIG_CRYPTO_ECDH=y
|
||||
CONFIG_CRYPTO_HMAC=y
|
||||
CONFIG_CRYPTO_JITTERENTROPY=y
|
||||
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
||||
CONFIG_CRYPTO_LIB_SHA256=y
|
||||
CONFIG_CRYPTO_LZO=y
|
||||
CONFIG_CRYPTO_RNG=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_RNG_DEFAULT=y
|
||||
CONFIG_CRYPTO_SHA256=y
|
||||
CONFIG_CRYPTO_SHA512=y
|
||||
CONFIG_DCACHE_WORD_ACCESS=y
|
||||
CONFIG_DEBUG_AT91_SAMA7G5_FLEXCOM3=y
|
||||
CONFIG_DEBUG_AT91_UART=y
|
||||
CONFIG_DEBUG_LL=y
|
||||
CONFIG_DEBUG_LL_INCLUDE="debug/at91.S"
|
||||
CONFIG_DEBUG_UART_PHYS=0xe1824200
|
||||
CONFIG_DEBUG_UART_VIRT=0xe0824200
|
||||
# CONFIG_DEBUG_UNCOMPRESS is not set
|
||||
CONFIG_DEBUG_USER=y
|
||||
CONFIG_DEVTMPFS=y
|
||||
CONFIG_DEVTMPFS_MOUNT=y
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_DMATEST=y
|
||||
CONFIG_DMA_CMA=y
|
||||
CONFIG_DMA_ENGINE=y
|
||||
CONFIG_DMA_ENGINE_RAID=y
|
||||
CONFIG_DMA_OF=y
|
||||
CONFIG_DMA_OPS=y
|
||||
CONFIG_DMA_REMAP=y
|
||||
CONFIG_DTC=y
|
||||
CONFIG_DUMMY_CONSOLE=y
|
||||
CONFIG_EARLY_PRINTK=y
|
||||
CONFIG_EDAC_ATOMIC_SCRUB=y
|
||||
CONFIG_EDAC_SUPPORT=y
|
||||
CONFIG_EEPROM_AT24=y
|
||||
# CONFIG_EFI_PARTITION is not set
|
||||
CONFIG_EXT4_FS=y
|
||||
CONFIG_FANOTIFY=y
|
||||
CONFIG_FAT_FS=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FIX_EARLYCON_MEM=y
|
||||
CONFIG_FORCE_MAX_ZONEORDER=15
|
||||
CONFIG_FS_IOMAP=y
|
||||
CONFIG_FS_MBCACHE=y
|
||||
CONFIG_FWNODE_MDIO=y
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
CONFIG_GENERIC_ALLOCATOR=y
|
||||
CONFIG_GENERIC_BUG=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_CPU_VULNERABILITIES=y
|
||||
CONFIG_GENERIC_EARLY_IOREMAP=y
|
||||
CONFIG_GENERIC_GETTIMEOFDAY=y
|
||||
CONFIG_GENERIC_IDLE_POLL_SETUP=y
|
||||
CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
|
||||
CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
|
||||
CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=y
|
||||
CONFIG_GENERIC_PINCONF=y
|
||||
CONFIG_GENERIC_PINCTRL_GROUPS=y
|
||||
CONFIG_GENERIC_PINMUX_FUNCTIONS=y
|
||||
CONFIG_GENERIC_SCHED_CLOCK=y
|
||||
CONFIG_GENERIC_SMP_IDLE_THREAD=y
|
||||
CONFIG_GENERIC_STRNCPY_FROM_USER=y
|
||||
CONFIG_GENERIC_STRNLEN_USER=y
|
||||
CONFIG_GENERIC_TIME_VSYSCALL=y
|
||||
CONFIG_GENERIC_VDSO_32=y
|
||||
CONFIG_GLOB=y
|
||||
CONFIG_GPIOLIB_IRQCHIP=y
|
||||
CONFIG_GPIO_CDEV=y
|
||||
CONFIG_GRACE_PERIOD=y
|
||||
CONFIG_HANDLE_DOMAIN_IRQ=y
|
||||
CONFIG_HARDEN_BRANCH_PREDICTOR=y
|
||||
CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HAVE_SMP=y
|
||||
CONFIG_HW_CONSOLE=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HZ_FIXED=0
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_AT91=y
|
||||
# CONFIG_I2C_AT91_SLAVE_EXPERIMENTAL is not set
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
CONFIG_IIO=y
|
||||
CONFIG_IIO_BUFFER=y
|
||||
CONFIG_IIO_CONFIGFS=y
|
||||
# CONFIG_IIO_HRTIMER_TRIGGER is not set
|
||||
CONFIG_IIO_KFIFO_BUF=y
|
||||
CONFIG_IIO_SW_TRIGGER=y
|
||||
# CONFIG_IIO_TIGHTLOOP_TRIGGER is not set
|
||||
CONFIG_IIO_TRIGGER=y
|
||||
CONFIG_IIO_TRIGGERED_BUFFER=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_INPUT=y
|
||||
CONFIG_IP_PNP=y
|
||||
# CONFIG_IP_PNP_BOOTP is not set
|
||||
CONFIG_IP_PNP_DHCP=y
|
||||
# CONFIG_IP_PNP_RARP is not set
|
||||
CONFIG_IRQCHIP=y
|
||||
CONFIG_IRQ_DOMAIN=y
|
||||
CONFIG_IRQ_DOMAIN_HIERARCHY=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
CONFIG_JBD2=y
|
||||
CONFIG_LEDS_GPIO=y
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LOCKD=y
|
||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
CONFIG_LOG_BUF_SHIFT=16
|
||||
CONFIG_LSM="N"
|
||||
CONFIG_LZO_COMPRESS=y
|
||||
CONFIG_LZO_DECOMPRESS=y
|
||||
CONFIG_MACB=y
|
||||
CONFIG_MACB_USE_HWSTAMP=y
|
||||
CONFIG_MDIO_BUS=y
|
||||
CONFIG_MDIO_DEVICE=y
|
||||
CONFIG_MDIO_DEVRES=y
|
||||
CONFIG_MEDIA_CAMERA_SUPPORT=y
|
||||
CONFIG_MEDIA_CONTROLLER=y
|
||||
CONFIG_MEDIA_PLATFORM_SUPPORT=y
|
||||
CONFIG_MEDIA_SUPPORT=y
|
||||
CONFIG_MEDIA_SUPPORT_FILTER=y
|
||||
CONFIG_MEMFD_CREATE=y
|
||||
CONFIG_MEMORY=y
|
||||
CONFIG_MEMORY_ISOLATION=y
|
||||
CONFIG_MESSAGE_LOGLEVEL_DEFAULT=7
|
||||
CONFIG_MFD_AT91_USART=y
|
||||
CONFIG_MFD_ATMEL_FLEXCOM=y
|
||||
CONFIG_MFD_CORE=y
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_MICREL_PHY=y
|
||||
CONFIG_MICROCHIP_PIT64B=y
|
||||
CONFIG_MIGHT_HAVE_CACHE_L2X0=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MMC=y
|
||||
# CONFIG_MMC_ATMELMCI is not set
|
||||
CONFIG_MMC_BLOCK=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_OF_AT91=y
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
CONFIG_MODULES_USE_ELF_REL=y
|
||||
CONFIG_MODULE_FORCE_LOAD=y
|
||||
CONFIG_MODULE_FORCE_UNLOAD=y
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NEED_PER_CPU_KM=y
|
||||
CONFIG_NEON=y
|
||||
CONFIG_NET_PTP_CLASSIFY=y
|
||||
CONFIG_NET_SELFTESTS=y
|
||||
CONFIG_NET_SWITCHDEV=y
|
||||
CONFIG_NFS_FS=y
|
||||
CONFIG_NLS=y
|
||||
CONFIG_NLS_CODEPAGE_437=y
|
||||
CONFIG_NLS_CODEPAGE_850=y
|
||||
CONFIG_NLS_ISO8859_1=y
|
||||
CONFIG_NLS_UTF8=y
|
||||
CONFIG_NO_HZ_COMMON=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_NVMEM_SYSFS=y
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
CONFIG_OF_FLATTREE=y
|
||||
CONFIG_OF_GPIO=y
|
||||
CONFIG_OF_IRQ=y
|
||||
CONFIG_OF_KOBJ=y
|
||||
CONFIG_OF_MDIO=y
|
||||
CONFIG_OLD_SIGACTION=y
|
||||
CONFIG_OLD_SIGSUSPEND3=y
|
||||
CONFIG_PAGE_OFFSET=0xC0000000
|
||||
CONFIG_PCCARD=y
|
||||
CONFIG_PERF_USE_VMALLOC=y
|
||||
CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHYLINK=y
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_PINCTRL_AT91=y
|
||||
CONFIG_PINCTRL_AT91PIO4=y
|
||||
CONFIG_PM_OPP=y
|
||||
CONFIG_POWER_RESET=y
|
||||
# CONFIG_POWER_RESET_AT91_POWEROFF is not set
|
||||
CONFIG_POWER_RESET_AT91_RESET=y
|
||||
CONFIG_POWER_RESET_AT91_SAMA5D2_SHDWC=y
|
||||
CONFIG_PPS=y
|
||||
# CONFIG_PREVENT_FIRMWARE_BUILD is not set
|
||||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_PTP_1588_CLOCK=y
|
||||
CONFIG_PTP_1588_CLOCK_OPTIONAL=y
|
||||
CONFIG_PWM=y
|
||||
CONFIG_PWM_ATMEL=y
|
||||
CONFIG_PWM_SYSFS=y
|
||||
CONFIG_RATIONAL=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_I2C=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_REGMAP_SPI=y
|
||||
CONFIG_REGULATOR=y
|
||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||
CONFIG_REGULATOR_MCP16502=y
|
||||
CONFIG_ROOT_NFS=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_AT91RM9200=y
|
||||
CONFIG_RTC_DRV_AT91SAM9=y
|
||||
CONFIG_RTC_I2C_AND_SPI=y
|
||||
CONFIG_RTC_MC146818_LIB=y
|
||||
# CONFIG_RUNTIME_TESTING_MENU is not set
|
||||
CONFIG_SAMA5D4_WATCHDOG=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_SCSI_COMMON=y
|
||||
# CONFIG_SERIAL_8250 is not set
|
||||
CONFIG_SERIAL_ATMEL=y
|
||||
CONFIG_SERIAL_ATMEL_CONSOLE=y
|
||||
CONFIG_SERIAL_ATMEL_PDC=y
|
||||
# CONFIG_SERIAL_ATMEL_TTYAT is not set
|
||||
CONFIG_SERIAL_MCTRL_GPIO=y
|
||||
CONFIG_SGL_ALLOC=y
|
||||
CONFIG_SG_POOL=y
|
||||
CONFIG_SND=y
|
||||
CONFIG_SND_ATMEL_SOC=y
|
||||
# CONFIG_SND_ATMEL_SOC_CLASSD is not set
|
||||
# CONFIG_SND_ATMEL_SOC_I2S is not set
|
||||
# CONFIG_SND_ATMEL_SOC_PDMIC is not set
|
||||
# CONFIG_SND_COMPRESS_OFFLOAD is not set
|
||||
CONFIG_SND_DMAENGINE_PCM=y
|
||||
CONFIG_SND_JACK=y
|
||||
CONFIG_SND_JACK_INPUT_DEV=y
|
||||
CONFIG_SND_MCHP_SOC_I2S_MCC=y
|
||||
CONFIG_SND_MCHP_SOC_SPDIFRX=y
|
||||
CONFIG_SND_MCHP_SOC_SPDIFTX=y
|
||||
CONFIG_SND_PCM=y
|
||||
CONFIG_SND_SIMPLE_CARD=y
|
||||
CONFIG_SND_SIMPLE_CARD_UTILS=y
|
||||
CONFIG_SND_SOC=y
|
||||
CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y
|
||||
CONFIG_SND_SOC_I2C_AND_SPI=y
|
||||
# CONFIG_SND_SOC_MIKROE_PROTO is not set
|
||||
CONFIG_SND_SOC_PCM5102A=y
|
||||
CONFIG_SND_SOC_SPDIF=y
|
||||
CONFIG_SOC_BUS=y
|
||||
# CONFIG_SOC_SAMA5D2 is not set
|
||||
# CONFIG_SOC_SAMA5D3 is not set
|
||||
# CONFIG_SOC_SAMA5D4 is not set
|
||||
CONFIG_SOC_SAMA7=y
|
||||
CONFIG_SOC_SAMA7G5=y
|
||||
CONFIG_SOC_SAM_V7=y
|
||||
CONFIG_SOUND=y
|
||||
CONFIG_SOUND_OSS_CORE=y
|
||||
CONFIG_SPARSE_IRQ=y
|
||||
CONFIG_SPI=y
|
||||
# CONFIG_SPI_AT91_USART is not set
|
||||
CONFIG_SPI_ATMEL=y
|
||||
# CONFIG_SPI_ATMEL_QUADSPI is not set
|
||||
CONFIG_SPI_MASTER=y
|
||||
CONFIG_SPI_MEM=y
|
||||
CONFIG_SRCU=y
|
||||
CONFIG_STACKTRACE=y
|
||||
# CONFIG_STANDALONE is not set
|
||||
CONFIG_SUNRPC=y
|
||||
# CONFIG_SWAP is not set
|
||||
CONFIG_SWPHY=y
|
||||
# CONFIG_SWP_EMULATE is not set
|
||||
CONFIG_SYSFS_DEPRECATED=y
|
||||
CONFIG_SYSFS_DEPRECATED_V2=y
|
||||
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
|
||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||
CONFIG_TIMER_OF=y
|
||||
CONFIG_TIMER_PROBE=y
|
||||
CONFIG_TINY_SRCU=y
|
||||
CONFIG_UACCESS_WITH_MEMCPY=y
|
||||
CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
|
||||
CONFIG_UNWINDER_ARM=y
|
||||
CONFIG_USE_OF=y
|
||||
CONFIG_V4L_PLATFORM_DRIVERS=y
|
||||
CONFIG_VFAT_FS=y
|
||||
CONFIG_VFP=y
|
||||
CONFIG_VFPv3=y
|
||||
# CONFIG_VIDEO_ATMEL_XISC is not set
|
||||
CONFIG_VIDEO_DEV=y
|
||||
# CONFIG_VIDEO_IMX208 is not set
|
||||
CONFIG_VIDEO_V4L2=y
|
||||
CONFIG_VIDEO_V4L2_I2C=y
|
||||
CONFIG_VIDEO_V4L2_SUBDEV_API=y
|
||||
CONFIG_VT=y
|
||||
CONFIG_VT_CONSOLE=y
|
||||
# CONFIG_VT_HW_CONSOLE_BINDING is not set
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||
CONFIG_ZLIB_DEFLATE=y
|
||||
CONFIG_ZLIB_INFLATE=y
|
||||
@ -147,7 +147,7 @@
|
||||
};
|
||||
|
||||
&ref {
|
||||
clock-frequency = <25000000>;
|
||||
clock-frequency = <40000000>;
|
||||
};
|
||||
|
||||
&spi {
|
||||
|
||||
@ -120,6 +120,7 @@ CONFIG_CPU_FREQ_STAT=y
|
||||
CONFIG_CPU_IDLE=y
|
||||
CONFIG_CPU_IDLE_GOV_LADDER=y
|
||||
CONFIG_CPU_IDLE_GOV_MENU=y
|
||||
CONFIG_CPU_LITTLE_ENDIAN=y
|
||||
CONFIG_CPU_PM=y
|
||||
CONFIG_CPU_RMAP=y
|
||||
CONFIG_CRC16=y
|
||||
|
||||
@ -124,6 +124,7 @@ CONFIG_CPU_FREQ_STAT=y
|
||||
CONFIG_CPU_IDLE=y
|
||||
CONFIG_CPU_IDLE_GOV_LADDER=y
|
||||
CONFIG_CPU_IDLE_GOV_MENU=y
|
||||
CONFIG_CPU_LITTLE_ENDIAN=y
|
||||
CONFIG_CPU_PM=y
|
||||
CONFIG_CPU_RMAP=y
|
||||
CONFIG_CRC16=y
|
||||
|
||||
@ -47,6 +47,7 @@ CONFIG_CMDLINE="earlycon=bcm63xx_uart,0xff800640 console=ttyS0,115200"
|
||||
CONFIG_CMDLINE_FORCE=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
# CONFIG_COMPAT_32BIT_TIME is not set
|
||||
CONFIG_CPU_LITTLE_ENDIAN=y
|
||||
CONFIG_CPU_RMAP=y
|
||||
CONFIG_CRC16=y
|
||||
CONFIG_CRYPTO_AES_ARM64=y
|
||||
|
||||
@ -46,7 +46,6 @@ CONFIG_CPU_GENERIC_DUMP_TLB=y
|
||||
CONFIG_CPU_HAS_PREFETCH=y
|
||||
CONFIG_CPU_HAS_RIXI=y
|
||||
CONFIG_CPU_HAS_SYNC=y
|
||||
# CONFIG_CPU_LITTLE_ENDIAN is not set
|
||||
CONFIG_CPU_MIPS32=y
|
||||
CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y
|
||||
CONFIG_CPU_NO_EFFICIENT_FFS=y
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user