mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-03-09 15:40:20 +00:00
Compare commits
No commits in common. "develop" and "v0.61" have entirely different histories.
1261 changed files with 1622 additions and 440657 deletions
|
@ -239,21 +239,6 @@ define Device/glinet_gl-mt3000
|
|||
endef
|
||||
TARGET_DEVICES += glinet_gl-mt3000
|
||||
|
||||
define Device/glinet_gl-mt6000
|
||||
DEVICE_VENDOR := GL.iNet
|
||||
DEVICE_MODEL := GL-MT6000
|
||||
DEVICE_DTS := mt7986a-glinet-gl-mt6000
|
||||
DEVICE_DTS_DIR := ../dts
|
||||
DEVICE_PACKAGES := e2fsprogs f2fsck mkf2fs kmod-usb3 kmod-mt7986-firmware mt7986-wo-firmware
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-kernel | pad-to 32M | append-rootfs
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-gl-metadata
|
||||
ARTIFACTS := preloader.bin bl31-uboot.fip
|
||||
ARTIFACT/preloader.bin := mt7986-bl2 emmc-ddr4
|
||||
ARTIFACT/bl31-uboot.fip := mt7986-bl31-uboot glinet_gl-mt6000
|
||||
endef
|
||||
TARGET_DEVICES += glinet_gl-mt6000
|
||||
|
||||
define Device/h3c_magic-nx30-pro
|
||||
DEVICE_VENDOR := H3C
|
||||
DEVICE_MODEL := Magic NX30 Pro
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
LINUX_VERSION-6.12 = .14
|
||||
LINUX_KERNEL_HASH-6.12.14 = 9423f4bfb4d875417e39cb0b017b5499fea47da56119f0cd28a201735d898f14
|
|
@ -1,195 +0,0 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2006-2020 OpenWrt.org
|
||||
|
||||
ifdef CONFIG_STRIP_KERNEL_EXPORTS
|
||||
KERNEL_MAKEOPTS_IMAGE += \
|
||||
EXTRA_LDSFLAGS="-I$(KERNEL_BUILD_DIR) -include symtab.h"
|
||||
endif
|
||||
|
||||
INITRAMFS_EXTRA_FILES ?= $(GENERIC_PLATFORM_DIR)/image/initramfs-base-files.txt
|
||||
|
||||
export HOST_EXTRACFLAGS=-I$(STAGING_DIR_HOST)/include
|
||||
|
||||
# defined in quilt.mk
|
||||
Kernel/Patch:=$(Kernel/Patch/Default)
|
||||
|
||||
ifneq (,$(findstring .xz,$(LINUX_SOURCE)))
|
||||
LINUX_CAT:=xzcat
|
||||
else
|
||||
LINUX_CAT:=$(STAGING_DIR_HOST)/bin/libdeflate-gzip -dc
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
|
||||
ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"")
|
||||
define Kernel/Prepare/Default
|
||||
$(LINUX_CAT) $(DL_DIR)/$(LINUX_SOURCE) | $(TAR) -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS)
|
||||
$(Kernel/Patch)
|
||||
$(if $(QUILT),touch $(LINUX_DIR)/.quilt_used)
|
||||
endef
|
||||
else
|
||||
define Kernel/Prepare/Default
|
||||
$(LINUX_CAT) $(DL_DIR)/$(LINUX_SOURCE) | $(TAR) -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS)
|
||||
$(Kernel/Patch)
|
||||
$(if $(QUILT),touch $(LINUX_DIR)/.quilt_used)
|
||||
endef
|
||||
endif
|
||||
else
|
||||
define Kernel/Prepare/Default
|
||||
mkdir -p $(KERNEL_BUILD_DIR)
|
||||
if [ -d $(LINUX_DIR) ]; then \
|
||||
rmdir $(LINUX_DIR); \
|
||||
fi
|
||||
ln -s $(CONFIG_EXTERNAL_KERNEL_TREE) $(LINUX_DIR)
|
||||
if [ -d $(LINUX_DIR)/user_headers ]; then \
|
||||
rm -rf $(LINUX_DIR)/user_headers; \
|
||||
fi
|
||||
endef
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
|
||||
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE),y)
|
||||
define Kernel/SetInitramfs/PreConfigure
|
||||
grep -v -e CONFIG_BLK_DEV_INITRD $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config
|
||||
echo 'CONFIG_BLK_DEV_INITRD=y' >> $(LINUX_DIR)/.config
|
||||
echo 'CONFIG_INITRAMFS_SOURCE=""' >> $(LINUX_DIR)/.config
|
||||
endef
|
||||
else
|
||||
ifeq ($(strip $(CONFIG_EXTERNAL_CPIO)),"")
|
||||
define Kernel/SetInitramfs/PreConfigure
|
||||
grep -v -e INITRAMFS -e CONFIG_RD_ -e CONFIG_BLK_DEV_INITRD $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config
|
||||
echo 'CONFIG_BLK_DEV_INITRD=y' >> $(LINUX_DIR)/.config
|
||||
echo 'CONFIG_INITRAMFS_SOURCE="$(strip $(TARGET_DIR) $(INITRAMFS_EXTRA_FILES))"' >> $(LINUX_DIR)/.config
|
||||
endef
|
||||
else
|
||||
define Kernel/SetInitramfs/PreConfigure
|
||||
grep -v INITRAMFS $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config
|
||||
echo 'CONFIG_INITRAMFS_SOURCE="$(call qstrip,$(CONFIG_EXTERNAL_CPIO))"' >> $(LINUX_DIR)/.config
|
||||
endef
|
||||
endif
|
||||
endif
|
||||
|
||||
define Kernel/SetInitramfs
|
||||
rm -f $(LINUX_DIR)/.config.prev
|
||||
mv $(LINUX_DIR)/.config $(LINUX_DIR)/.config.old
|
||||
$(call Kernel/SetInitramfs/PreConfigure)
|
||||
echo "# CONFIG_INITRAMFS_PRESERVE_MTIME is not set" >> $(LINUX_DIR)/.config
|
||||
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE),y)
|
||||
echo 'CONFIG_INITRAMFS_ROOT_UID=$(shell id -u)' >> $(LINUX_DIR)/.config
|
||||
echo 'CONFIG_INITRAMFS_ROOT_GID=$(shell id -g)' >> $(LINUX_DIR)/.config
|
||||
echo "$(if $(CONFIG_TARGET_INITRAMFS_FORCE),CONFIG_INITRAMFS_FORCE=y,# CONFIG_INITRAMFS_FORCE is not set)" >> $(LINUX_DIR)/.config
|
||||
else
|
||||
echo "# CONFIG_INITRAMFS_FORCE is not set" >> $(LINUX_DIR)/.config
|
||||
endif
|
||||
echo "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_NONE),CONFIG_INITRAMFS_COMPRESSION_NONE=y,# CONFIG_INITRAMFS_COMPRESSION_NONE is not set)" >> $(LINUX_DIR)/.config
|
||||
echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_GZIP),CONFIG_INITRAMFS_COMPRESSION_GZIP=y\nCONFIG_RD_GZIP=y,# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set\n# CONFIG_RD_GZIP is not set)" >> $(LINUX_DIR)/.config
|
||||
echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_BZIP2),CONFIG_INITRAMFS_COMPRESSION_BZIP2=y\nCONFIG_RD_BZIP2=y,# CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set\n# CONFIG_RD_BZIP2 is not set)" >> $(LINUX_DIR)/.config
|
||||
echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZMA),CONFIG_INITRAMFS_COMPRESSION_LZMA=y\nCONFIG_RD_LZMA=y,# CONFIG_INITRAMFS_COMPRESSION_LZMA is not set\n# CONFIG_RD_LZMA is not set)" >> $(LINUX_DIR)/.config
|
||||
echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZO),CONFIG_INITRAMFS_COMPRESSION_LZO=y\nCONFIG_RD_LZO=y,# CONFIG_INITRAMFS_COMPRESSION_LZO is not set\n# CONFIG_RD_LZO is not set)" >> $(LINUX_DIR)/.config
|
||||
echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_XZ),CONFIG_INITRAMFS_COMPRESSION_XZ=y\nCONFIG_RD_XZ=y,# CONFIG_INITRAMFS_COMPRESSION_XZ is not set\n# CONFIG_RD_XZ is not set)" >> $(LINUX_DIR)/.config
|
||||
echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZ4),CONFIG_INITRAMFS_COMPRESSION_LZ4=y\nCONFIG_RD_LZ4=y,# CONFIG_INITRAMFS_COMPRESSION_LZ4 is not set\n# CONFIG_RD_LZ4 is not set)" >> $(LINUX_DIR)/.config
|
||||
echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_ZSTD),CONFIG_INITRAMFS_COMPRESSION_ZSTD=y\nCONFIG_RD_ZSTD=y,# CONFIG_INITRAMFS_COMPRESSION_ZSTD is not set\n# CONFIG_RD_ZSTD is not set)" >> $(LINUX_DIR)/.config
|
||||
endef
|
||||
else
|
||||
endif
|
||||
|
||||
define Kernel/SetNoInitramfs
|
||||
mv $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config.old
|
||||
grep -v INITRAMFS $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config.set
|
||||
echo 'CONFIG_INITRAMFS_SOURCE=""' >> $(LINUX_DIR)/.config.set
|
||||
echo '# CONFIG_INITRAMFS_FORCE is not set' >> $(LINUX_DIR)/.config.set
|
||||
echo "# CONFIG_INITRAMFS_PRESERVE_MTIME is not set" >> $(LINUX_DIR)/.config.set
|
||||
endef
|
||||
|
||||
define Kernel/Configure/Default
|
||||
rm -f $(LINUX_DIR)/localversion
|
||||
$(LINUX_CONF_CMD) > $(LINUX_DIR)/.config.target
|
||||
# copy CONFIG_KERNEL_* settings over to .config.target
|
||||
awk '/^(#[[:space:]]+)?CONFIG_KERNEL/{sub("CONFIG_KERNEL_","CONFIG_");print}' $(TOPDIR)/.config >> $(LINUX_DIR)/.config.target
|
||||
echo "# CONFIG_KALLSYMS_EXTRA_PASS is not set" >> $(LINUX_DIR)/.config.target
|
||||
echo "# CONFIG_KALLSYMS_ALL is not set" >> $(LINUX_DIR)/.config.target
|
||||
echo "CONFIG_KALLSYMS_UNCOMPRESSED=y" >> $(LINUX_DIR)/.config.target
|
||||
$(SCRIPT_DIR)/package-metadata.pl kconfig $(TMP_DIR)/.packageinfo $(TOPDIR)/.config $(KERNEL_PATCHVER) > $(LINUX_DIR)/.config.override
|
||||
$(SCRIPT_DIR)/kconfig.pl 'm+' '+' $(LINUX_DIR)/.config.target /dev/null $(LINUX_DIR)/.config.override > $(LINUX_DIR)/.config.set
|
||||
$(call Kernel/SetNoInitramfs)
|
||||
rm -rf $(KERNEL_BUILD_DIR)/modules
|
||||
cmp -s $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config.prev || { \
|
||||
cp $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config; \
|
||||
cp $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config.prev; \
|
||||
}
|
||||
$(_SINGLE) [ -d $(LINUX_DIR)/user_headers ] || $(KERNEL_MAKE) $(if $(findstring uml,$(BOARD)),ARCH=$(ARCH)) INSTALL_HDR_PATH=$(LINUX_DIR)/user_headers headers_install
|
||||
grep '=[ym]' $(LINUX_DIR)/.config.set | LC_ALL=C sort | $(MKHASH) md5 > $(LINUX_DIR)/.vermagic
|
||||
endef
|
||||
|
||||
define Kernel/Configure/Initramfs
|
||||
$(call Kernel/SetInitramfs)
|
||||
endef
|
||||
|
||||
define Kernel/CompileModules/Default
|
||||
rm -f $(LINUX_DIR)/vmlinux $(LINUX_DIR)/System.map
|
||||
+$(KERNEL_MAKE) $(if $(KERNELNAME),$(KERNELNAME),all) modules
|
||||
# If .config did not change, use the previous timestamp to avoid package rebuilds
|
||||
cmp -s $(LINUX_DIR)/.config $(LINUX_DIR)/.config.modules.save && \
|
||||
mv $(LINUX_DIR)/.config.modules.save $(LINUX_DIR)/.config; \
|
||||
$(CP) $(LINUX_DIR)/.config $(LINUX_DIR)/.config.modules.save
|
||||
endef
|
||||
|
||||
OBJCOPY_STRIP = -R .reginfo -R .notes -R .note -R .comment -R .mdebug -R .note.gnu.build-id
|
||||
|
||||
# AMD64 shares the location with x86
|
||||
ifeq ($(LINUX_KARCH),x86_64)
|
||||
IMAGES_DIR:=../../x86/boot
|
||||
endif
|
||||
|
||||
define Kernel/CopyImage
|
||||
cmp -s $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux$(1).debug || { \
|
||||
$(KERNEL_CROSS)objcopy -O binary $(OBJCOPY_STRIP) -S $(LINUX_DIR)/vmlinux $(LINUX_KERNEL)$(1); \
|
||||
$(KERNEL_CROSS)objcopy $(OBJCOPY_STRIP) -S $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux$(1).elf; \
|
||||
$(CP) $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux$(1).debug; \
|
||||
$(foreach k, \
|
||||
$(if $(KERNEL_IMAGES),$(KERNEL_IMAGES),$(filter-out vmlinux dtbs,$(KERNELNAME))), \
|
||||
$(CP) $(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/$(IMAGES_DIR)/$(k) $(KERNEL_BUILD_DIR)/$(k)$(1); \
|
||||
) \
|
||||
}
|
||||
endef
|
||||
|
||||
define Kernel/CompileImage/Default
|
||||
rm -f $(TARGET_DIR)/init
|
||||
+$(KERNEL_MAKE) $(KERNEL_MAKEOPTS_IMAGE) $(if $(KERNELNAME),$(KERNELNAME),all)
|
||||
$(call Kernel/CopyImage)
|
||||
endef
|
||||
|
||||
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
|
||||
define Kernel/CompileImage/Initramfs
|
||||
$(call Kernel/Configure/Initramfs)
|
||||
$(CP) $(GENERIC_PLATFORM_DIR)/other-files/init $(TARGET_DIR)/init
|
||||
$(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $(TARGET_DIR) $(TARGET_DIR)/init)
|
||||
rm -rf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/usr/initramfs_data.cpio*
|
||||
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE),y)
|
||||
ifneq ($(call qstrip,$(CONFIG_EXTERNAL_CPIO)),)
|
||||
$(CP) $(CONFIG_EXTERNAL_CPIO) $(KERNEL_BUILD_DIR)/initrd.cpio
|
||||
else
|
||||
( cd $(TARGET_DIR); find . | LC_ALL=C sort | $(STAGING_DIR_HOST)/bin/cpio --reproducible -o -H newc -R 0:0 > $(KERNEL_BUILD_DIR)/initrd.cpio )
|
||||
endif
|
||||
$(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $(KERNEL_BUILD_DIR)/initrd.cpio)
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_BZIP2),$(STAGING_DIR_HOST)/bin/bzip2 -9 -c < $(KERNEL_BUILD_DIR)/initrd.cpio > $(KERNEL_BUILD_DIR)/initrd.cpio.bzip2)
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_GZIP),$(STAGING_DIR_HOST)/bin/libdeflate-gzip -n -f -S .gzip -12 $(KERNEL_BUILD_DIR)/initrd.cpio)
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZ4),$(STAGING_DIR_HOST)/bin/lz4c -l -c1 -fz --favor-decSpeed $(KERNEL_BUILD_DIR)/initrd.cpio)
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZMA),$(STAGING_DIR_HOST)/bin/lzma e -lc1 -lp2 -pb2 $(KERNEL_BUILD_DIR)/initrd.cpio $(KERNEL_BUILD_DIR)/initrd.cpio.lzma)
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZO),$(STAGING_DIR_HOST)/bin/lzop -9 -f $(KERNEL_BUILD_DIR)/initrd.cpio)
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_XZ),$(STAGING_DIR_HOST)/bin/xz -T$(if $(filter 1,$(NPROC)),2,0) -9 -fz --check=crc32 $(KERNEL_BUILD_DIR)/initrd.cpio)
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_ZSTD),$(STAGING_DIR_HOST)/bin/zstd -T0 -f -o $(KERNEL_BUILD_DIR)/initrd.cpio.zstd $(KERNEL_BUILD_DIR)/initrd.cpio)
|
||||
endif
|
||||
+$(KERNEL_MAKE) $(KERNEL_MAKEOPTS_IMAGE) $(if $(KERNELNAME),$(KERNELNAME),all)
|
||||
$(call Kernel/CopyImage,-initramfs)
|
||||
endef
|
||||
else
|
||||
define Kernel/CompileImage/Initramfs
|
||||
endef
|
||||
endif
|
||||
|
||||
define Kernel/Clean/Default
|
||||
rm -f $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/.configured
|
||||
rm -f $(LINUX_KERNEL)
|
||||
$(_SINGLE)$(MAKE) -C $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) clean
|
||||
endef
|
|
@ -1,127 +0,0 @@
|
|||
#
|
||||
# Copyright (C) 2021 OpenWrt.org
|
||||
#
|
||||
|
||||
[ -e /etc/config/ubootenv ] && exit 0
|
||||
|
||||
touch /etc/config/ubootenv
|
||||
|
||||
. /lib/uboot-envtools.sh
|
||||
. /lib/functions.sh
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
asus,rt-ax59u)
|
||||
ubootenv_add_uci_config "/dev/mtd0" "0x100000" "0x20000" "0x20000"
|
||||
;;
|
||||
bananapi,bpi-r3)
|
||||
rootdev="$(cmdline_get_var root)"
|
||||
rootdev="${rootdev##*/}"
|
||||
rootdev="${rootdev%%p[0-9]*}"
|
||||
case "$rootdev" in
|
||||
mmc*)
|
||||
local envdev=$(find_mmc_part "ubootenv" $rootdev)
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x40000" "0x40000" "1"
|
||||
ubootenv_add_uci_config "$envdev" "0x40000" "0x40000" "0x40000" "1"
|
||||
;;
|
||||
mtd*)
|
||||
local envdev=/dev/mtd$(find_mtd_index "u-boot-env")
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x20000" "0x20000" "1"
|
||||
ubootenv_add_uci_config "$envdev" "0x20000" "0x20000" "0x20000" "1"
|
||||
;;
|
||||
ubi*)
|
||||
. /lib/upgrade/nand.sh
|
||||
local envubi=$(nand_find_ubi ubi)
|
||||
local envdev=/dev/$(nand_find_volume $envubi ubootenv)
|
||||
local envdev2=/dev/$(nand_find_volume $envubi ubootenv2)
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x1f000" "0x1f000" "1"
|
||||
ubootenv_add_uci_config "$envdev2" "0x0" "0x1f000" "0x1f000" "1"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
cmcc,rax3000m)
|
||||
case "$(cmdline_get_var root)" in
|
||||
/dev/mmc*)
|
||||
local envdev=$(find_mmc_part "ubootenv" "mmcblk0")
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x40000" "0x40000" "1"
|
||||
ubootenv_add_uci_config "$envdev" "0x40000" "0x40000" "0x40000" "1"
|
||||
;;
|
||||
*)
|
||||
. /lib/upgrade/nand.sh
|
||||
local envubi=$(nand_find_ubi ubi)
|
||||
local envdev=/dev/$(nand_find_volume $envubi ubootenv)
|
||||
local envdev2=/dev/$(nand_find_volume $envubi ubootenv2)
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x1f000" "0x1f000" "1"
|
||||
ubootenv_add_uci_config "$envdev2" "0x0" "0x1f000" "0x1f000" "1"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
cetron,ct3003|\
|
||||
netgear,wax220|\
|
||||
zbtlink,zbt-z8102ax|\
|
||||
z8102ax-128m|\
|
||||
z8102ax-64m|\
|
||||
zbtlink,zbt-z8103ax)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
|
||||
;;
|
||||
h3c,magic-nx30-pro|\
|
||||
jcg,q30-pro|\
|
||||
qihoo,360t7|\
|
||||
tplink,tl-xdr4288|\
|
||||
tplink,tl-xdr6086|\
|
||||
tplink,tl-xdr6088|\
|
||||
xiaomi,mi-router-ax3000t-ubootmod|\
|
||||
xiaomi,mi-router-wr30u-ubootmod|\
|
||||
xiaomi,redmi-router-ax6000-ubootmod)
|
||||
. /lib/upgrade/nand.sh
|
||||
local envubi=$(nand_find_ubi ubi)
|
||||
local envdev=/dev/$(nand_find_volume $envubi ubootenv)
|
||||
local envdev2=/dev/$(nand_find_volume $envubi ubootenv2)
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x1f000" "0x20000" "1"
|
||||
ubootenv_add_uci_config "$envdev2" "0x0" "0x1f000" "0x20000" "1"
|
||||
;;
|
||||
glinet,gl-mt2500|\
|
||||
glinet,gl-mt6000)
|
||||
local envdev=$(find_mmc_part "u-boot-env")
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x80000"
|
||||
;;
|
||||
glinet,gl-mt3000)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x20000"
|
||||
;;
|
||||
mercusys,mr90x-v1|\
|
||||
routerich,ax3000)
|
||||
local envdev=/dev/mtd$(find_mtd_index "u-boot-env")
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x20000" "0x20000" "1"
|
||||
;;
|
||||
ubnt,unifi-6-plus)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x10000"
|
||||
;;
|
||||
xiaomi,mi-router-ax3000t|\
|
||||
xiaomi,mi-router-wr30u-112m-nmbm|\
|
||||
xiaomi,mi-router-wr30u-stock|\
|
||||
xiaomi,redmi-router-ax6000-stock)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
|
||||
ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x10000" "0x20000"
|
||||
;;
|
||||
zyxel,ex5601-t0)
|
||||
local envdev=/dev/mtd$(find_mtd_index "u-boot-env")
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x20000" "0x40000" "2"
|
||||
;;
|
||||
zyxel,ex5601-t0-ubootmod)
|
||||
. /lib/upgrade/nand.sh
|
||||
local envubi=$(nand_find_ubi ubi)
|
||||
local envdev=/dev/$(nand_find_volume $envubi ubootenv)
|
||||
local envdev2=/dev/$(nand_find_volume $envubi ubootenv2)
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x1f000" "0x20000" "1"
|
||||
ubootenv_add_uci_config "$envdev2" "0x0" "0x1f000" "0x20000" "1"
|
||||
;;
|
||||
zyxel,ex5700-telenor)
|
||||
ubootenv_add_uci_config "/dev/ubootenv" "0x0" "0x4000" "0x4000" "1"
|
||||
;;
|
||||
esac
|
||||
|
||||
config_load ubootenv
|
||||
config_foreach ubootenv_add_app_config
|
||||
|
||||
exit 0
|
File diff suppressed because it is too large
Load diff
|
@ -1,26 +0,0 @@
|
|||
diff --git a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
|
||||
index 1dd0ff2a1a1abf..8537a93d6a8d2f 100644
|
||||
--- a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
|
||||
+++ b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
|
||||
@@ -674,7 +674,11 @@ static void gpio_keys_irq_close(struct gpio_keys_button_dev *bdev)
|
||||
}
|
||||
}
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
|
||||
static int gpio_keys_remove(struct platform_device *pdev)
|
||||
+#else
|
||||
+static void gpio_keys_remove(struct platform_device *pdev)
|
||||
+#endif
|
||||
{
|
||||
struct gpio_keys_button_dev *bdev = platform_get_drvdata(pdev);
|
||||
|
||||
@@ -685,7 +689,9 @@ static int gpio_keys_remove(struct platform_device *pdev)
|
||||
else
|
||||
gpio_keys_irq_close(bdev);
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
|
||||
return 0;
|
||||
+#endif
|
||||
}
|
||||
|
||||
static struct platform_driver gpio_keys_driver = {
|
|
@ -1,26 +0,0 @@
|
|||
diff --git a/package/kernel/gpio-nct5104d/src/gpio-nct5104d.c b/package/kernel/gpio-nct5104d/src/gpio-nct5104d.c
|
||||
index eb1cf8494abe2..00dc4dcd9424f 100644
|
||||
--- a/package/kernel/gpio-nct5104d/src/gpio-nct5104d.c
|
||||
+++ b/package/kernel/gpio-nct5104d/src/gpio-nct5104d.c
|
||||
@@ -300,7 +300,11 @@ static int nct5104d_gpio_probe(struct platform_device *pdev)
|
||||
return err;
|
||||
}
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
|
||||
static int nct5104d_gpio_remove(struct platform_device *pdev)
|
||||
+#else
|
||||
+static void nct5104d_gpio_remove(struct platform_device *pdev)
|
||||
+#endif
|
||||
{
|
||||
int i;
|
||||
struct nct5104d_gpio_data *data = platform_get_drvdata(pdev);
|
||||
@@ -311,7 +315,9 @@ static int nct5104d_gpio_remove(struct platform_device *pdev)
|
||||
gpiochip_remove (&bank->chip);
|
||||
}
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
|
||||
return 0;
|
||||
+#endif
|
||||
}
|
||||
|
||||
static int __init nct5104d_find(int addr, struct nct5104d_sio *sio)
|
|
@ -1,723 +0,0 @@
|
|||
#
|
||||
# Copyright (C) 2006-2011 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
FS_MENU:=Filesystems
|
||||
|
||||
define KernelPackage/fs-9p
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=Plan 9 Resource Sharing Support
|
||||
DEPENDS:=+kmod-9pnet +LINUX_6_1:kmod-fs-netfs +LINUX_6_6:kmod-fs-netfs
|
||||
KCONFIG:=\
|
||||
CONFIG_9P_FS \
|
||||
CONFIG_9P_FS_POSIX_ACL=n \
|
||||
CONFIG_9P_FS_SECURITY=n \
|
||||
CONFIG_9P_FSCACHE=n
|
||||
FILES:=$(LINUX_DIR)/fs/9p/9p.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,9p)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-9p/description
|
||||
Kernel module for Plan 9 Resource Sharing Support support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-9p))
|
||||
|
||||
|
||||
define KernelPackage/fs-afs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=Andrew FileSystem client
|
||||
DEFAULT:=n
|
||||
DEPENDS:=+kmod-rxrpc +kmod-dnsresolver +kmod-fs-fscache
|
||||
KCONFIG:=\
|
||||
CONFIG_AFS_FS=m \
|
||||
CONFIG_AFS_DEBUG=n \
|
||||
CONFIG_AFS_FSCACHE=y
|
||||
FILES:=$(LINUX_DIR)/fs/afs/kafs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,kafs)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-afs/description
|
||||
Kernel module for Andrew FileSystem client support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-afs))
|
||||
|
||||
define KernelPackage/fs-autofs4
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=AUTOFS4 filesystem support
|
||||
KCONFIG:= \
|
||||
CONFIG_AUTOFS4_FS \
|
||||
CONFIG_AUTOFS_FS
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/autofs/autofs4.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,autofs4)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-autofs4/description
|
||||
Kernel module for AutoFS4 support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-autofs4))
|
||||
|
||||
|
||||
define KernelPackage/fs-btrfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=BTRFS filesystem support
|
||||
DEPENDS:=+kmod-lib-crc32c +kmod-lib-lzo +kmod-lib-zlib-inflate +kmod-lib-zlib-deflate +kmod-lib-raid6 +kmod-lib-xor +kmod-lib-zstd
|
||||
KCONFIG:=\
|
||||
CONFIG_BTRFS_FS \
|
||||
CONFIG_BTRFS_FS_CHECK_INTEGRITY=n
|
||||
FILES:=\
|
||||
$(LINUX_DIR)/fs/btrfs/btrfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,btrfs,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-btrfs/description
|
||||
Kernel module for BTRFS support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-btrfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-smbfs-common
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=SMBFS common dependencies support
|
||||
HIDDEN:=1
|
||||
DEPENDS:=+LINUX_6_6:kmod-fs-netfs +LINUX_6_6:kmod-nls-ucs2-utils
|
||||
KCONFIG:=\
|
||||
CONFIG_SMBFS_COMMON@lt6.1 \
|
||||
CONFIG_SMBFS@ge6.1
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/smbfs_common/cifs_arc4.ko@lt6.1 \
|
||||
$(LINUX_DIR)/fs/smbfs_common/cifs_md4.ko@lt6.1 \
|
||||
$(LINUX_DIR)/fs/smb/common/cifs_arc4.ko@ge6.1 \
|
||||
$(LINUX_DIR)/fs/smb/common/cifs_md4.ko@ge6.1
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-smbfs-common/description
|
||||
Kernel module dependency for CIFS or SMB_SERVER support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-smbfs-common))
|
||||
|
||||
|
||||
define KernelPackage/fs-cifs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=CIFS support
|
||||
KCONFIG:= \
|
||||
CONFIG_CIFS \
|
||||
CONFIG_CIFS_DFS_UPCALL=n \
|
||||
CONFIG_CIFS_UPCALL=n
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/cifs/cifs.ko@lt6.1 \
|
||||
$(LINUX_DIR)/fs/smb/client/cifs.ko@ge6.1
|
||||
AUTOLOAD:=$(call AutoLoad,30,cifs)
|
||||
$(call AddDepends/nls)
|
||||
DEPENDS+= \
|
||||
+kmod-fs-smbfs-common \
|
||||
+kmod-crypto-md5 \
|
||||
+kmod-crypto-sha256 \
|
||||
+kmod-crypto-sha512 \
|
||||
+kmod-crypto-cmac \
|
||||
+kmod-crypto-hmac \
|
||||
+kmod-crypto-aead \
|
||||
+kmod-crypto-ccm \
|
||||
+kmod-crypto-ecb \
|
||||
+kmod-crypto-des \
|
||||
+kmod-asn1-decoder \
|
||||
+kmod-oid-registry \
|
||||
+kmod-dnsresolver
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-cifs/description
|
||||
Kernel module for CIFS support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-cifs))
|
||||
|
||||
|
||||
define KernelPackage/fs-configfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=Configuration filesystem support
|
||||
KCONFIG:= \
|
||||
CONFIG_CONFIGFS_FS
|
||||
FILES:=$(LINUX_DIR)/fs/configfs/configfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,configfs)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-configfs/description
|
||||
Kernel module for configfs support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-configfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-cramfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=Compressed RAM/ROM filesystem support
|
||||
DEPENDS:=+kmod-lib-zlib-inflate
|
||||
KCONFIG:= \
|
||||
CONFIG_CRAMFS
|
||||
FILES:=$(LINUX_DIR)/fs/cramfs/cramfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,cramfs)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-cramfs/description
|
||||
Kernel module for cramfs support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-cramfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-efivarfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=efivar filesystem support
|
||||
KCONFIG:=CONFIG_EFIVAR_FS
|
||||
FILES:=$(LINUX_DIR)/fs/efivarfs/efivarfs.ko
|
||||
DEPENDS:=@(x86_64||x86)
|
||||
AUTOLOAD:=$(call Autoload,90,efivarfs)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-efivarfs/description
|
||||
Kernel module to support efivarfs file system mountpoint.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-efivarfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-exfat
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=exFAT filesystem support
|
||||
KCONFIG:= \
|
||||
CONFIG_EXFAT_FS \
|
||||
CONFIG_EXFAT_DEFAULT_IOCHARSET="utf8"
|
||||
FILES:= $(LINUX_DIR)/fs/exfat/exfat.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,exfat,1)
|
||||
DEPENDS:=+kmod-nls-base
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-exfat/description
|
||||
Kernel module for exFAT filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-exfat))
|
||||
|
||||
|
||||
define KernelPackage/fs-exportfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=exportfs kernel server support
|
||||
KCONFIG:=CONFIG_EXPORTFS
|
||||
FILES=$(LINUX_DIR)/fs/exportfs/exportfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,20,exportfs,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-exportfs/description
|
||||
Kernel module for exportfs. Needed for some other modules.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-exportfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-ext4
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=EXT4 filesystem support
|
||||
DEPENDS := \
|
||||
+kmod-lib-crc16 \
|
||||
+kmod-crypto-hash \
|
||||
+kmod-crypto-crc32c
|
||||
KCONFIG:= \
|
||||
CONFIG_EXT4_FS \
|
||||
CONFIG_EXT4_ENCRYPTION=n \
|
||||
CONFIG_JBD2
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/ext4/ext4.ko \
|
||||
$(LINUX_DIR)/fs/jbd2/jbd2.ko \
|
||||
$(LINUX_DIR)/fs/mbcache.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,mbcache jbd2 ext4,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-ext4/description
|
||||
Kernel module for EXT4 filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-ext4))
|
||||
|
||||
|
||||
define KernelPackage/fs-f2fs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=F2FS filesystem support
|
||||
DEPENDS:= +kmod-crypto-hash +kmod-crypto-crc32 +kmod-nls-base
|
||||
KCONFIG:=CONFIG_F2FS_FS
|
||||
FILES:=$(LINUX_DIR)/fs/f2fs/f2fs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,f2fs,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-f2fs/description
|
||||
Kernel module for F2FS filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-f2fs))
|
||||
|
||||
|
||||
#define KernelPackage/fs-fscache
|
||||
# SUBMENU:=$(FS_MENU)
|
||||
# TITLE:=General filesystem local cache manager
|
||||
# DEPENDS:=+kmod-fs-netfs
|
||||
# KCONFIG:=\
|
||||
# CONFIG_FSCACHE \
|
||||
# CONFIG_FSCACHE_STATS=y \
|
||||
# CONFIG_FSCACHE_HISTOGRAM=n \
|
||||
# CONFIG_FSCACHE_DEBUG=n \
|
||||
# CONFIG_FSCACHE_OBJECT_LIST=n \
|
||||
# CONFIG_CACHEFILES \
|
||||
# CONFIG_CACHEFILES_DEBUG=n \
|
||||
# CONFIG_CACHEFILES_HISTOGRAM=n \
|
||||
# CONFIG_CACHEFILES_ERROR_INJECTION=n@ge5.17 \
|
||||
# CONFIG_CACHEFILES_ONDEMAND=n@ge5.19
|
||||
# FILES:= \
|
||||
# $(LINUX_DIR)/fs/fscache/fscache.ko \
|
||||
# $(LINUX_DIR)/fs/cachefiles/cachefiles.ko
|
||||
# AUTOLOAD:=$(call AutoLoad,29,fscache cachefiles)
|
||||
#endef
|
||||
|
||||
#$(eval $(call KernelPackage,fs-fscache))
|
||||
|
||||
|
||||
define KernelPackage/fs-hfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=HFS filesystem support
|
||||
DEPENDS:=+kmod-cdrom
|
||||
KCONFIG:=CONFIG_HFS_FS
|
||||
FILES:=$(LINUX_DIR)/fs/hfs/hfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,hfs)
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-hfs/description
|
||||
Kernel module for HFS filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-hfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-hfsplus
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=HFS+ filesystem support
|
||||
DEPENDS:=+kmod-cdrom
|
||||
KCONFIG:=CONFIG_HFSPLUS_FS
|
||||
FILES:=$(LINUX_DIR)/fs/hfsplus/hfsplus.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,hfsplus)
|
||||
$(call AddDepends/nls,utf8)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-hfsplus/description
|
||||
Kernel module for HFS+ filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-hfsplus))
|
||||
|
||||
|
||||
define KernelPackage/fs-isofs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=ISO9660 filesystem support
|
||||
DEPENDS:=+kmod-lib-zlib-inflate +kmod-cdrom
|
||||
KCONFIG:=CONFIG_ISO9660_FS CONFIG_JOLIET=y CONFIG_ZISOFS=n
|
||||
FILES:=$(LINUX_DIR)/fs/isofs/isofs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,isofs)
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-isofs/description
|
||||
Kernel module for ISO9660 filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-isofs))
|
||||
|
||||
|
||||
define KernelPackage/fs-jfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=JFS filesystem support
|
||||
KCONFIG:=CONFIG_JFS_FS
|
||||
FILES:=$(LINUX_DIR)/fs/jfs/jfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,jfs,1)
|
||||
DEPENDS:=+LINUX_6_6:kmod-nls-ucs2-utils
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-jfs/description
|
||||
Kernel module for JFS support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-jfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-ksmbd
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=SMB kernel server support
|
||||
DEPENDS:= \
|
||||
+kmod-nls-base \
|
||||
+kmod-nls-utf8 \
|
||||
+kmod-crypto-md5 \
|
||||
+kmod-crypto-hmac \
|
||||
+kmod-crypto-ecb \
|
||||
+kmod-crypto-des \
|
||||
+kmod-crypto-sha256 \
|
||||
+kmod-crypto-cmac \
|
||||
+kmod-crypto-sha512 \
|
||||
+kmod-crypto-aead \
|
||||
+kmod-crypto-ccm \
|
||||
+kmod-crypto-gcm \
|
||||
+kmod-asn1-decoder \
|
||||
+kmod-oid-registry \
|
||||
+kmod-fs-smbfs-common
|
||||
KCONFIG:= \
|
||||
CONFIG_SMB_SERVER \
|
||||
CONFIG_SMB_SERVER_SMBDIRECT=n \
|
||||
CONFIG_SMB_SERVER_CHECK_CAP_NET_ADMIN=n \
|
||||
CONFIG_SMB_SERVER_KERBEROS5=n
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/ksmbd/ksmbd.ko@lt6.1 \
|
||||
$(LINUX_DIR)/fs/smb/server/ksmbd.ko@ge6.1
|
||||
AUTOLOAD:=$(call AutoLoad,41,ksmbd)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-ksmbd/description
|
||||
Kernel module for SMB kernel server support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-ksmbd))
|
||||
|
||||
|
||||
define KernelPackage/fs-minix
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=Minix filesystem support
|
||||
KCONFIG:=CONFIG_MINIX_FS
|
||||
FILES:=$(LINUX_DIR)/fs/minix/minix.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,minix)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-minix/description
|
||||
Kernel module for Minix filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-minix))
|
||||
|
||||
|
||||
define KernelPackage/fs-msdos
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=MSDOS filesystem support
|
||||
DEPENDS:=+kmod-fs-vfat
|
||||
KCONFIG:=CONFIG_MSDOS_FS
|
||||
FILES:=$(LINUX_DIR)/fs/fat/msdos.ko
|
||||
AUTOLOAD:=$(call AutoLoad,40,msdos)
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-msdos/description
|
||||
Kernel module for MSDOS filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-msdos))
|
||||
|
||||
|
||||
define KernelPackage/fs-netfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=Network Filesystems support
|
||||
KCONFIG:= CONFIG_NETFS_SUPPORT
|
||||
FILES:=$(LINUX_DIR)/fs/netfs/netfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,28,netfs)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-netfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-nfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=NFS filesystem client support
|
||||
DEPENDS:=+kmod-fs-nfs-common +kmod-dnsresolver
|
||||
KCONFIG:= \
|
||||
CONFIG_NFS_FS \
|
||||
CONFIG_NFS_USE_LEGACY_DNS=n \
|
||||
CONFIG_NFS_USE_NEW_IDMAPPER=n
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/nfs/nfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,40,nfs)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-nfs/description
|
||||
Kernel module for NFS client support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-nfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-nfs-common
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=Common NFS filesystem modules
|
||||
DEPENDS:=+kmod-oid-registry
|
||||
KCONFIG:= \
|
||||
CONFIG_LOCKD \
|
||||
CONFIG_SUNRPC \
|
||||
CONFIG_GRACE_PERIOD \
|
||||
CONFIG_NFS_V4=y \
|
||||
CONFIG_NFS_V4_1=y \
|
||||
CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org" \
|
||||
CONFIG_NFS_V4_1_MIGRATION=n \
|
||||
CONFIG_NFS_V4_2=y \
|
||||
CONFIG_NFS_V4_2_READ_PLUS=n
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/lockd/lockd.ko \
|
||||
$(LINUX_DIR)/net/sunrpc/sunrpc.ko \
|
||||
$(LINUX_DIR)/fs/nfs_common/grace.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,grace sunrpc lockd)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-nfs-common))
|
||||
|
||||
|
||||
define KernelPackage/fs-nfs-common-rpcsec
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=NFS Secure RPC
|
||||
DEPENDS:= \
|
||||
+kmod-fs-nfs-common \
|
||||
+kmod-crypto-des \
|
||||
+kmod-crypto-cbc \
|
||||
+kmod-crypto-cts \
|
||||
+kmod-crypto-md5 \
|
||||
+kmod-crypto-sha1 \
|
||||
+kmod-crypto-hmac \
|
||||
+kmod-crypto-ecb \
|
||||
+kmod-crypto-arc4
|
||||
KCONFIG:= \
|
||||
CONFIG_SUNRPC_GSS \
|
||||
CONFIG_RPCSEC_GSS_KRB5
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/net/sunrpc/auth_gss/auth_rpcgss.ko \
|
||||
$(LINUX_DIR)/net/sunrpc/auth_gss/rpcsec_gss_krb5.ko
|
||||
AUTOLOAD:=$(call AutoLoad,31,auth_rpcgss rpcsec_gss_krb5)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-nfs-common-rpcsec/description
|
||||
Kernel modules for NFS Secure RPC
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-nfs-common-rpcsec))
|
||||
|
||||
|
||||
define KernelPackage/fs-nfs-v3
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=NFS3 filesystem client support
|
||||
DEPENDS:=+kmod-fs-nfs
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/nfs/nfsv3.ko
|
||||
AUTOLOAD:=$(call AutoLoad,41,nfsv3)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-nfs-v3/description
|
||||
Kernel module for NFS v3 client support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-nfs-v3))
|
||||
|
||||
|
||||
define KernelPackage/fs-nfs-v4
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=NFS4 filesystem client support
|
||||
DEPENDS:=+kmod-fs-nfs
|
||||
KCONFIG:= \
|
||||
CONFIG_NFS_V4=y
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/nfs/nfsv4.ko
|
||||
AUTOLOAD:=$(call AutoLoad,41,nfsv4)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-nfs-v4/description
|
||||
Kernel module for NFS v4 client support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-nfs-v4))
|
||||
|
||||
|
||||
define KernelPackage/fs-nfsd
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=NFS kernel server support
|
||||
DEPENDS:=+kmod-fs-nfs-common +kmod-fs-exportfs +kmod-fs-nfs-common-rpcsec
|
||||
KCONFIG:= \
|
||||
CONFIG_NFSD \
|
||||
CONFIG_NFSD_V4=y \
|
||||
CONFIG_NFSD_V4_SECURITY_LABEL=n \
|
||||
CONFIG_NFSD_BLOCKLAYOUT=n \
|
||||
CONFIG_NFSD_SCSILAYOUT=n \
|
||||
CONFIG_NFSD_FLEXFILELAYOUT=n \
|
||||
CONFIG_NFSD_FAULT_INJECTION=n \
|
||||
CONFIG_NFSD_V4_2_INTER_SSC=n
|
||||
FILES:=$(LINUX_DIR)/fs/nfsd/nfsd.ko
|
||||
AUTOLOAD:=$(call AutoLoad,40,nfsd)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-nfsd/description
|
||||
Kernel module for NFS kernel server support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-nfsd))
|
||||
|
||||
|
||||
#define KernelPackage/fs-ntfs
|
||||
# SUBMENU:=$(FS_MENU)
|
||||
# TITLE:=NTFS filesystem read-only (old driver) support
|
||||
# KCONFIG:=CONFIG_NTFS_FS
|
||||
# FILES:=$(LINUX_DIR)/fs/ntfs/ntfs.ko
|
||||
# AUTOLOAD:=$(call AutoLoad,30,ntfs)
|
||||
# $(call AddDepends/nls)
|
||||
#endef
|
||||
|
||||
#define KernelPackage/fs-ntfs/description
|
||||
# Kernel module for limited NTFS filesystem support. Support for writing
|
||||
# is extremely limited and disabled as a result.
|
||||
#endef
|
||||
|
||||
#$(eval $(call KernelPackage,fs-ntfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-ntfs3
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=NTFS filesystem read & write (new driver) support
|
||||
KCONFIG:= CONFIG_NTFS3_FS CONFIG_NTFS3_FS_POSIX_ACL=y
|
||||
FILES:=$(LINUX_DIR)/fs/ntfs3/ntfs3.ko
|
||||
$(call AddDepends/nls)
|
||||
AUTOLOAD:=$(call AutoLoad,80,ntfs3)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-ntfs3/description
|
||||
Kernel module for fully functional NTFS filesystem support. It allows
|
||||
reading as well as writing.
|
||||
|
||||
It supports NTFS versions up to 3.1.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-ntfs3))
|
||||
|
||||
|
||||
define KernelPackage/fs-reiserfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=ReiserFS filesystem support
|
||||
KCONFIG:=CONFIG_REISERFS_FS
|
||||
FILES:=$(LINUX_DIR)/fs/reiserfs/reiserfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,reiserfs,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-reiserfs/description
|
||||
Kernel module for ReiserFS support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-reiserfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-squashfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=SquashFS 4.0 filesystem support
|
||||
KCONFIG:=CONFIG_SQUASHFS \
|
||||
CONFIG_SQUASHFS_XZ=y
|
||||
FILES:=$(LINUX_DIR)/fs/squashfs/squashfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,squashfs,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-squashfs/description
|
||||
Kernel module for SquashFS 4.0 support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-squashfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-udf
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=UDF filesystem support
|
||||
KCONFIG:=CONFIG_UDF_FS
|
||||
FILES:=$(LINUX_DIR)/fs/udf/udf.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,udf)
|
||||
DEPENDS:=+kmod-lib-crc-itu-t +kmod-cdrom
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-udf/description
|
||||
Kernel module for UDF filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-udf))
|
||||
|
||||
|
||||
define KernelPackage/fs-vfat
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=VFAT filesystem support
|
||||
KCONFIG:= \
|
||||
CONFIG_FAT_FS \
|
||||
CONFIG_VFAT_FS
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/fat/fat.ko \
|
||||
$(LINUX_DIR)/fs/fat/vfat.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,fat vfat,1)
|
||||
$(call AddDepends/nls,cp437 iso8859-1 utf8)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-vfat/description
|
||||
Kernel module for VFAT filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-vfat))
|
||||
|
||||
|
||||
define KernelPackage/fs-xfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=XFS filesystem support
|
||||
KCONFIG:=CONFIG_XFS_FS
|
||||
DEPENDS:= +kmod-fs-exportfs +kmod-lib-crc32c
|
||||
FILES:=$(LINUX_DIR)/fs/xfs/xfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,xfs,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-xfs/description
|
||||
Kernel module for XFS support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-xfs))
|
||||
|
||||
|
||||
define KernelPackage/fuse
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=FUSE (Filesystem in Userspace) support
|
||||
KCONFIG:= CONFIG_FUSE_FS
|
||||
FILES:=$(LINUX_DIR)/fs/fuse/fuse.ko
|
||||
AUTOLOAD:=$(call AutoLoad,80,fuse)
|
||||
endef
|
||||
|
||||
define KernelPackage/fuse/description
|
||||
Kernel module for userspace filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fuse))
|
||||
|
||||
|
||||
define KernelPackage/pstore
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=Pstore file system
|
||||
DEFAULT:=m if ALL_KMODS
|
||||
KCONFIG:= \
|
||||
CONFIG_PSTORE \
|
||||
CONFIG_PSTORE_COMPRESS=y \
|
||||
CONFIG_PSTORE_COMPRESS_DEFAULT="deflate" \
|
||||
CONFIG_PSTORE_DEFLATE_COMPRESS=y \
|
||||
CONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT=y
|
||||
FILES:= $(LINUX_DIR)/fs/pstore/pstore.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,pstore,1)
|
||||
DEPENDS:=+LINUX_6_6:kmod-lib-zlib-deflate +LINUX_6_6:kmod-lib-zlib-inflate
|
||||
endef
|
||||
|
||||
define KernelPackage/pstore/description
|
||||
Kernel module for pstore filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,pstore))
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,403 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/channel.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/channel.c
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
#include "ath9k.h"
|
||||
+#include "hsr.h"
|
||||
|
||||
/* Set/change channels. If the channel is really being changed, it's done
|
||||
* by reseting the chip. To accomplish this we must first cleanup any pending
|
||||
@@ -22,6 +23,7 @@
|
||||
*/
|
||||
static int ath_set_channel(struct ath_softc *sc)
|
||||
{
|
||||
+ struct device_node *np = sc->dev->of_node;
|
||||
struct ath_hw *ah = sc->sc_ah;
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
struct ieee80211_hw *hw = sc->hw;
|
||||
@@ -42,6 +44,11 @@ static int ath_set_channel(struct ath_so
|
||||
ath_dbg(common, CONFIG, "Set channel: %d MHz width: %d\n",
|
||||
chan->center_freq, chandef->width);
|
||||
|
||||
+ if (of_property_read_bool(np, "ubnt,hsr")) {
|
||||
+ ath9k_hsr_enable(ah, chandef->width, chan->center_freq);
|
||||
+ ath9k_hsr_status(ah);
|
||||
+ }
|
||||
+
|
||||
/* update survey stats for the old channel before switching */
|
||||
spin_lock_irqsave(&common->cc_lock, flags);
|
||||
ath_update_survey_stats(sc);
|
||||
--- /dev/null
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hsr.c
|
||||
@@ -0,0 +1,247 @@
|
||||
+/*
|
||||
+ *
|
||||
+ * The MIT License (MIT)
|
||||
+ *
|
||||
+ * Copyright (c) 2015 Kirill Berezin
|
||||
+ *
|
||||
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
+ * of this software and associated documentation files (the "Software"), to deal
|
||||
+ * in the Software without restriction, including without limitation the rights
|
||||
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
+ * copies of the Software, and to permit persons to whom the Software is
|
||||
+ * furnished to do so, subject to the following conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be included in
|
||||
+ * all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
+ * SOFTWARE.
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#include <linux/io.h>
|
||||
+#include <linux/slab.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/time.h>
|
||||
+#include <linux/bitops.h>
|
||||
+#include <linux/etherdevice.h>
|
||||
+#include <linux/rtnetlink.h>
|
||||
+#include <linux/unaligned.h>
|
||||
+
|
||||
+#include "hw.h"
|
||||
+#include "ath9k.h"
|
||||
+
|
||||
+#define HSR_GPIO_CSN 8
|
||||
+#define HSR_GPIO_CLK 6
|
||||
+#define HSR_GPIO_DOUT 7
|
||||
+#define HSR_GPIO_DIN 5
|
||||
+
|
||||
+/* delays are in useconds */
|
||||
+#define HSR_DELAY_HALF_TICK 100
|
||||
+#define HSR_DELAY_PRE_WRITE 75
|
||||
+#define HSR_DELAY_FINAL 20000
|
||||
+#define HSR_DELAY_TRAILING 200
|
||||
+
|
||||
+void ath9k_hsr_init(struct ath_hw *ah)
|
||||
+{
|
||||
+ ath9k_hw_gpio_request_in(ah, HSR_GPIO_DIN, NULL);
|
||||
+ ath9k_hw_gpio_request_out(ah, HSR_GPIO_CSN, NULL,
|
||||
+ AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
|
||||
+ ath9k_hw_gpio_request_out(ah, HSR_GPIO_CLK, NULL,
|
||||
+ AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
|
||||
+ ath9k_hw_gpio_request_out(ah, HSR_GPIO_DOUT, NULL,
|
||||
+ AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
|
||||
+
|
||||
+ ath9k_hw_set_gpio(ah, HSR_GPIO_CSN, 1);
|
||||
+ ath9k_hw_set_gpio(ah, HSR_GPIO_CLK, 0);
|
||||
+ ath9k_hw_set_gpio(ah, HSR_GPIO_DOUT, 0);
|
||||
+
|
||||
+ udelay(HSR_DELAY_TRAILING);
|
||||
+}
|
||||
+
|
||||
+static u32 ath9k_hsr_write_byte(struct ath_hw *ah, int delay, u32 value)
|
||||
+{
|
||||
+ struct ath_common *common = ath9k_hw_common(ah);
|
||||
+ int i;
|
||||
+ u32 rval = 0;
|
||||
+
|
||||
+ udelay(delay);
|
||||
+
|
||||
+ ath9k_hw_set_gpio(ah, HSR_GPIO_CLK, 0);
|
||||
+ udelay(HSR_DELAY_HALF_TICK);
|
||||
+
|
||||
+ ath9k_hw_set_gpio(ah, HSR_GPIO_CSN, 0);
|
||||
+ udelay(HSR_DELAY_HALF_TICK);
|
||||
+
|
||||
+ for (i = 0; i < 8; ++i) {
|
||||
+ rval = rval << 1;
|
||||
+
|
||||
+ /* pattern is left to right, that is 7-th bit runs first */
|
||||
+ ath9k_hw_set_gpio(ah, HSR_GPIO_DOUT, (value >> (7 - i)) & 0x1);
|
||||
+ udelay(HSR_DELAY_HALF_TICK);
|
||||
+
|
||||
+ ath9k_hw_set_gpio(ah, HSR_GPIO_CLK, 1);
|
||||
+ udelay(HSR_DELAY_HALF_TICK);
|
||||
+
|
||||
+ rval |= ath9k_hw_gpio_get(ah, HSR_GPIO_DIN);
|
||||
+
|
||||
+ ath9k_hw_set_gpio(ah, HSR_GPIO_CLK, 0);
|
||||
+ udelay(HSR_DELAY_HALF_TICK);
|
||||
+ }
|
||||
+
|
||||
+ ath9k_hw_set_gpio(ah, HSR_GPIO_CSN, 1);
|
||||
+ udelay(HSR_DELAY_HALF_TICK);
|
||||
+
|
||||
+ ath_dbg(common, CONFIG, "ath9k_hsr_write_byte: write byte %d return value is %d %c\n",
|
||||
+ value, rval, rval > 32 ? rval : '-');
|
||||
+
|
||||
+ return rval & 0xff;
|
||||
+}
|
||||
+
|
||||
+static int ath9k_hsr_write_a_chain(struct ath_hw *ah, char *chain, int items)
|
||||
+{
|
||||
+ int status = 0;
|
||||
+ int i = 0;
|
||||
+ int err;
|
||||
+
|
||||
+ /* a preamble */
|
||||
+ ath9k_hsr_write_byte(ah, HSR_DELAY_PRE_WRITE, 0);
|
||||
+ status = ath9k_hsr_write_byte(ah, HSR_DELAY_PRE_WRITE, 0);
|
||||
+
|
||||
+ /* clear HSR's reply buffer */
|
||||
+ if (status) {
|
||||
+ int loop = 0;
|
||||
+
|
||||
+ for (loop = 0; (loop < 42) && status; ++loop)
|
||||
+ status = ath9k_hsr_write_byte(ah, HSR_DELAY_PRE_WRITE,
|
||||
+ 0);
|
||||
+
|
||||
+ if (loop >= 42) {
|
||||
+ ATH_DBG_WARN(1,
|
||||
+ "ath9k_hsr_write_a_chain: can't clear an output buffer after a 42 cycles.\n");
|
||||
+ return -1;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; (i < items) && (chain[i] != 0); ++i)
|
||||
+ ath9k_hsr_write_byte(ah, HSR_DELAY_PRE_WRITE, (u32)chain[i]);
|
||||
+
|
||||
+ ath9k_hsr_write_byte(ah, HSR_DELAY_PRE_WRITE, 0);
|
||||
+ mdelay(HSR_DELAY_FINAL / 1000);
|
||||
+
|
||||
+ /* reply */
|
||||
+ memset(chain, 0, items);
|
||||
+
|
||||
+ ath9k_hsr_write_byte(ah, HSR_DELAY_PRE_WRITE, 0);
|
||||
+ udelay(HSR_DELAY_TRAILING);
|
||||
+
|
||||
+ for (i = 0; i < (items - 1); ++i) {
|
||||
+ u32 ret;
|
||||
+
|
||||
+ ret = ath9k_hsr_write_byte(ah, HSR_DELAY_PRE_WRITE, 0);
|
||||
+ if (ret != 0)
|
||||
+ chain[i] = (char)ret;
|
||||
+ else
|
||||
+ break;
|
||||
+
|
||||
+ udelay(HSR_DELAY_TRAILING);
|
||||
+ }
|
||||
+
|
||||
+ if (i <= 1)
|
||||
+ return 0;
|
||||
+
|
||||
+ err = kstrtoint(chain + 1, 10, &i);
|
||||
+ if (err)
|
||||
+ return err;
|
||||
+
|
||||
+ return i;
|
||||
+}
|
||||
+
|
||||
+int ath9k_hsr_disable(struct ath_hw *ah)
|
||||
+{
|
||||
+ char cmd[10] = {'b', '4', '0', 0, 0, 0, 0, 0, 0, 0};
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = ath9k_hsr_write_a_chain(ah, cmd, sizeof(cmd));
|
||||
+ if ((ret > 0) && (*cmd == 'B'))
|
||||
+ return 0;
|
||||
+
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
+int ath9k_hsr_enable(struct ath_hw *ah, int bw, int fq)
|
||||
+{
|
||||
+ char cmd[10];
|
||||
+ int ret;
|
||||
+
|
||||
+ /* Bandwidth argument is 0 sometimes. Assume default 802.11bgn
|
||||
+ * 20MHz on invalid values
|
||||
+ */
|
||||
+ if ((bw != 5) && (bw != 10) && (bw != 20) && (bw != 40))
|
||||
+ bw = 20;
|
||||
+
|
||||
+ memset(cmd, 0, sizeof(cmd));
|
||||
+ *cmd = 'b';
|
||||
+ snprintf(cmd + 1, 3, "%02d", bw);
|
||||
+
|
||||
+ ret = ath9k_hsr_write_a_chain(ah, cmd, sizeof(cmd));
|
||||
+ if ((*cmd != 'B') || (ret != bw)) {
|
||||
+ ATH_DBG_WARN(1,
|
||||
+ "ath9k_hsr_enable: failed changing bandwidth -> set (%d,%d) reply (%d, %d)\n",
|
||||
+ 'b', bw, *cmd, ret);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ memset(cmd, 0, sizeof(cmd));
|
||||
+ *cmd = 'x';
|
||||
+ ret = ath9k_hsr_write_a_chain(ah, cmd, sizeof(cmd));
|
||||
+ if (*cmd != 'X') {
|
||||
+ ATH_DBG_WARN(1,
|
||||
+ "ath9k_hsr_enable: failed 'x' command -> reply (%d, %d)\n",
|
||||
+ *cmd, ret);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ memset(cmd, 0, sizeof(cmd));
|
||||
+ *cmd = 'm';
|
||||
+ ret = ath9k_hsr_write_a_chain(ah, cmd, sizeof(cmd));
|
||||
+ if (*cmd != 'M') {
|
||||
+ ATH_DBG_WARN(1,
|
||||
+ "ath9k_hsr_enable: failed 'm' command -> reply (%d, %d)\n",
|
||||
+ *cmd, ret);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ memset(cmd, 0, sizeof(cmd));
|
||||
+ *cmd = 'f';
|
||||
+ snprintf(cmd + 1, 6, "%05d", fq);
|
||||
+ ret = ath9k_hsr_write_a_chain(ah, cmd, sizeof(cmd));
|
||||
+ if ((*cmd != 'F') && (ret != fq)) {
|
||||
+ ATH_DBG_WARN(1,
|
||||
+ "ath9k_hsr_enable: failed set frequency -> reply (%d, %d)\n",
|
||||
+ *cmd, ret);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int ath9k_hsr_status(struct ath_hw *ah)
|
||||
+{
|
||||
+ char cmd[10] = {'s', 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = ath9k_hsr_write_a_chain(ah, cmd, sizeof(cmd));
|
||||
+ if (*cmd != 'S') {
|
||||
+ ATH_DBG_WARN(1, "ath9k_hsr_status: returned %d,%d\n", *cmd,
|
||||
+ ret);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
--- /dev/null
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hsr.h
|
||||
@@ -0,0 +1,48 @@
|
||||
+/*
|
||||
+ * The MIT License (MIT)
|
||||
+ *
|
||||
+ * Copyright (c) 2015 Kirill Berezin
|
||||
+ *
|
||||
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
+ * of this software and associated documentation files (the "Software"), to deal
|
||||
+ * in the Software without restriction, including without limitation the rights
|
||||
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
+ * copies of the Software, and to permit persons to whom the Software is
|
||||
+ * furnished to do so, subject to the following conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be included in
|
||||
+ * all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
+ * SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+#ifndef HSR_H
|
||||
+#define HSR_H
|
||||
+
|
||||
+#ifdef CPTCFG_ATH9K_UBNTHSR
|
||||
+
|
||||
+void ath9k_hsr_init(struct ath_hw *ah);
|
||||
+int ath9k_hsr_disable(struct ath_hw *ah);
|
||||
+int ath9k_hsr_enable(struct ath_hw *ah, int bw, int fq);
|
||||
+int ath9k_hsr_status(struct ath_hw *ah);
|
||||
+
|
||||
+#else
|
||||
+static inline void ath9k_hsr_init(struct ath_hw *ah) {}
|
||||
+
|
||||
+static inline int ath9k_hsr_enable(struct ath_hw *ah, int bw, int fq)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static inline int ath9k_hsr_disable(struct ath_hw *ah) { return 0; }
|
||||
+static inline int ath9k_hsr_status(struct ath_hw *ah) { return 0; }
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
+#endif /* HSR_H */
|
||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <linux/delay.h>
|
||||
#include "ath9k.h"
|
||||
#include "btcoex.h"
|
||||
+#include "hsr.h"
|
||||
|
||||
static void ath9k_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
u32 queues, bool drop);
|
||||
@@ -658,6 +659,7 @@ void ath_reset_work(struct work_struct *
|
||||
static int ath9k_start(struct ieee80211_hw *hw)
|
||||
{
|
||||
struct ath_softc *sc = hw->priv;
|
||||
+ struct device_node *np = sc->dev->of_node;
|
||||
struct ath_hw *ah = sc->sc_ah;
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
struct ieee80211_channel *curchan = sc->cur_chan->chandef.chan;
|
||||
@@ -736,6 +738,11 @@ static int ath9k_start(struct ieee80211_
|
||||
AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
|
||||
}
|
||||
|
||||
+ if (of_property_read_bool(np, "ubnt,hsr")) {
|
||||
+ ath9k_hsr_init(ah);
|
||||
+ ath9k_hsr_disable(ah);
|
||||
+ }
|
||||
+
|
||||
/*
|
||||
* Reset key cache to sane defaults (all entries cleared) instead of
|
||||
* semi-random values after suspend/resume.
|
||||
--- a/drivers/net/wireless/ath/ath9k/Makefile
|
||||
+++ b/drivers/net/wireless/ath/ath9k/Makefile
|
||||
@@ -17,6 +17,7 @@ ath9k-$(CPTCFG_ATH9K_DFS_CERTIFIED) += d
|
||||
ath9k-$(CPTCFG_ATH9K_TX99) += tx99.o
|
||||
ath9k-$(CPTCFG_ATH9K_WOW) += wow.o
|
||||
ath9k-$(CPTCFG_ATH9K_HWRNG) += rng.o
|
||||
+ath9k-$(CPTCFG_ATH9K_UBNTHSR) += hsr.o
|
||||
|
||||
ath9k-$(CPTCFG_ATH9K_DEBUGFS) += debug.o
|
||||
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -121,6 +121,7 @@ ATH9K_WOW=
|
||||
ATH9K_RFKILL=
|
||||
ATH9K_CHANNEL_CONTEXT=
|
||||
ATH9K_PCOEM=
|
||||
+ATH9K_UBNTHSR=
|
||||
ATH9K_PCI_NO_EEPROM=
|
||||
ATH9K_HTC=
|
||||
ATH9K_HTC_DEBUGFS=
|
||||
--- a/drivers/net/wireless/ath/ath9k/Kconfig
|
||||
+++ b/drivers/net/wireless/ath/ath9k/Kconfig
|
||||
@@ -58,6 +58,19 @@ config ATH9K_AHB
|
||||
Say Y, if you have a SoC with a compatible built-in
|
||||
wireless MAC. Say N if unsure.
|
||||
|
||||
+config ATH9K_UBNTHSR
|
||||
+ bool "Ubiquiti UniFi Outdoor Plus HSR support"
|
||||
+ depends on ATH9K
|
||||
+ ---help---
|
||||
+ This options enables code to control the HSR RF
|
||||
+ filter in the receive path of the Ubiquiti UniFi
|
||||
+ Outdoor Plus access point.
|
||||
+
|
||||
+ Say Y if you want to use the access point. The
|
||||
+ code will only be used if the device is detected,
|
||||
+ so it does not harm other setup other than occupying
|
||||
+ a bit of memory.
|
||||
+
|
||||
config ATH9K_DEBUGFS
|
||||
bool "Atheros ath9k debugging"
|
||||
depends on ATH9K && DEBUG_FS && MAC80211_DEBUGFS
|
|
@ -1,11 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/gpio.c 2024-09-16 14:38:11.938379419 +0200
|
||||
+++ b/drivers/net/wireless/ath/ath9k/gpio.c 2024-09-16 14:38:30.390115635 +0200
|
||||
@@ -111,7 +111,7 @@
|
||||
gc->gchip.get = ath9k_gpio_pin_get;
|
||||
gc->gchip.set = ath9k_gpio_pin_set;
|
||||
|
||||
- if (gpiochip_add(&gc->gchip)) {
|
||||
+ if (gpiochip_add_data(&gc->gchip, NULL)) {
|
||||
kfree(gc);
|
||||
return;
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.h 2024-07-03 20:09:49.622279338 +0200
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.h 2024-07-03 20:10:26.157677785 +0200
|
||||
@@ -294,4 +294,5 @@
|
||||
unsigned short *rxwi_size);
|
||||
void rt2800_pre_reset_hw(struct rt2x00_dev *rt2x00dev);
|
||||
|
||||
+void rt6352_enable_pa_pin(struct rt2x00_dev *rt2x00dev, int enable);
|
||||
#endif /* RT2800LIB_H */
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h 2024-11-05 16:54:09.625006944 +0100
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h 2024-11-05 16:54:26.280764117 +0100
|
||||
@@ -1504,6 +1504,8 @@
|
||||
u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max);
|
||||
bool rt2x00mac_tx_frames_pending(struct ieee80211_hw *hw);
|
||||
|
||||
+int rt2x00lib_read_eeprom(struct rt2x00_dev *rt2x00dev);
|
||||
+
|
||||
/*
|
||||
* Driver allocation handlers.
|
||||
*/
|
|
@ -1,38 +0,0 @@
|
|||
--- a/debugfs.c 2024-09-06 11:08:19.656939190 +0200
|
||||
+++ b/debugfs.c 2024-09-06 11:09:04.772324072 +0200
|
||||
@@ -331,15 +331,19 @@
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
struct mwl_priv *priv = (struct mwl_priv *)file->private_data;
|
||||
+#if defined AARCH64
|
||||
struct pcie_priv *pcie_priv = priv->hif.priv;
|
||||
unsigned long flags;
|
||||
+#endif
|
||||
unsigned long page = get_zeroed_page(GFP_KERNEL);
|
||||
int tx_num = 4, rx_num = 4;
|
||||
char *p = (char *)page;
|
||||
int len = 0, size = PAGE_SIZE;
|
||||
ssize_t ret;
|
||||
const struct hostcmd_get_hw_spec *get_hw_spec;
|
||||
+#if defined AARCH64
|
||||
int i;
|
||||
+#endif
|
||||
|
||||
if (!p)
|
||||
return -ENOMEM;
|
||||
@@ -359,6 +359,7 @@
|
||||
len += scnprintf(p + len, size - len,
|
||||
"num_wcb: %d\n", le32_to_cpu(get_hw_spec->num_wcb));
|
||||
|
||||
+#if defined AARCH64
|
||||
if (priv->chip_type == MWL8864) {
|
||||
len += scnprintf(p + len, size - len,
|
||||
"-----------------------=> address| address|qlen|fw_desc_cnt\n");
|
||||
@@ -370,6 +371,7 @@
|
||||
"wcb_base[%2d]: %x => %8x|%8p|%4d|%d\n", i, get_hw_spec->wcb_base[i], *((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base[i])),(void *)*((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base[i])),skb_queue_len(&pcie_priv->txq[i + 1]),pcie_priv->fw_desc_cnt[i + 1]);
|
||||
spin_unlock_irqrestore(&pcie_priv->tx_desc_lock, flags);
|
||||
}
|
||||
+#endif
|
||||
|
||||
len += scnprintf(p + len, size - len,
|
||||
"num_mcast_addr: %X\n", le16_to_cpu(get_hw_spec->num_mcast_addr));
|
|
@ -1,34 +0,0 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=nat46
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/ayourtch/nat46.git
|
||||
PKG_SOURCE_DATE:=2024-07-02
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=f367088db99c9235e16dea8164eb82cbd0d299ba
|
||||
|
||||
PKG_MAINTAINER:=Hans Dedecker <dedeckeh@gmail.com>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/nat46
|
||||
DEPENDS:=@IPV6 +kmod-nf-conntrack6
|
||||
TITLE:=Stateless NAT46 translation kernel module
|
||||
SECTION:=kernel
|
||||
SUBMENU:=Network Support
|
||||
FILES:=$(PKG_BUILD_DIR)/nat46/modules/nat46.ko
|
||||
AUTOLOAD:=$(call AutoLoad,33,nat46)
|
||||
endef
|
||||
|
||||
include $(INCLUDE_DIR)/kernel-defaults.mk
|
||||
|
||||
define Build/Compile
|
||||
$(KERNEL_MAKE) M="$(PKG_BUILD_DIR)/nat46/modules" \
|
||||
MODFLAGS="-DMODULE -mlong-calls" \
|
||||
EXTRA_CFLAGS="-DNAT46_VERSION=\\\"$(PKG_SOURCE_VERSION)\\\"" \
|
||||
modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,nat46))
|
|
@ -1,99 +0,0 @@
|
|||
--- a/nat46/modules/nat46-netdev.c 2024-08-14 16:36:59.249437588 +0200
|
||||
+++ b/nat46/modules/nat46-netdev.c 2024-08-14 16:39:28.523016026 +0200
|
||||
@@ -193,7 +193,6 @@
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- read_lock(&dev_base_lock);
|
||||
dev = first_net_device(net);
|
||||
while (dev) {
|
||||
if((0 == strcmp(dev->name, name)) && is_nat46(dev)) {
|
||||
@@ -205,7 +204,6 @@
|
||||
}
|
||||
dev = next_net_device(dev);
|
||||
}
|
||||
- read_unlock(&dev_base_lock);
|
||||
return out;
|
||||
}
|
||||
|
||||
@@ -300,7 +298,6 @@
|
||||
|
||||
void nat64_show_all_configs(struct net *net, struct seq_file *m) {
|
||||
struct net_device *dev;
|
||||
- read_lock(&dev_base_lock);
|
||||
dev = first_net_device(net);
|
||||
while (dev) {
|
||||
if(is_nat46(dev)) {
|
||||
@@ -323,7 +320,6 @@
|
||||
}
|
||||
dev = next_net_device(dev);
|
||||
}
|
||||
- read_unlock(&dev_base_lock);
|
||||
|
||||
}
|
||||
|
||||
@@ -331,7 +327,6 @@
|
||||
struct net_device *dev;
|
||||
struct net_device *nat46dev;
|
||||
do {
|
||||
- read_lock(&dev_base_lock);
|
||||
nat46dev = NULL;
|
||||
dev = first_net_device(net);
|
||||
while (dev) {
|
||||
@@ -340,7 +335,6 @@
|
||||
}
|
||||
dev = next_net_device(dev);
|
||||
}
|
||||
- read_unlock(&dev_base_lock);
|
||||
if(nat46dev) {
|
||||
nat46_netdev_destroy(nat46dev);
|
||||
}
|
||||
--- a/nat46/modules/nat46-netdev.h 2024-08-14 16:39:50.726655831 +0200
|
||||
+++ b/nat46/modules/nat46-netdev.h 2024-08-14 16:40:25.954084361 +0200
|
||||
@@ -25,4 +25,5 @@
|
||||
void nat64_show_all_configs(struct net *net, struct seq_file *m);
|
||||
void nat46_netdev_count_xmit(struct sk_buff *skb, struct net_device *dev);
|
||||
void *netdev_nat46_instance(struct net_device *dev);
|
||||
-
|
||||
+int nat46_netdev_create(struct net *net, char *basename, struct net_device **dev);
|
||||
+void nat46_netdev_destroy(struct net_device *dev);
|
||||
--- a/nat46/modules/nat46-core.h 2024-08-14 16:44:24.686211571 +0200
|
||||
+++ b/nat46/modules/nat46-core.h 2024-08-14 16:50:42.464086457 +0200
|
||||
@@ -82,4 +82,37 @@
|
||||
nat46_instance_t *alloc_nat46_instance(int npairs, nat46_instance_t *old, int from_ipair, int to_ipair, int remove_ipair);
|
||||
void release_nat46_instance(nat46_instance_t *nat46);
|
||||
|
||||
+void nat46debug_dump(nat46_instance_t *nat46, int level, void *addr, int len);
|
||||
+int try_parse_ipv6_prefix(struct in6_addr *pref, int *pref_len, char *arg);
|
||||
+int try_parse_ipv4_prefix(u32 *v4addr, int *pref_len, char *arg);
|
||||
+int try_parse_rule_arg(nat46_xlate_rule_t *rule, char *arg_name, char **ptail);
|
||||
+char *xlate_style_to_string(nat46_xlate_style_t style);
|
||||
+void xlate_v4_to_nat64(nat46_instance_t *nat46, nat46_xlate_rule_t *rule, void *pipv4, void *pipv6);
|
||||
+int xlate_nat64_to_v4(nat46_instance_t *nat46, nat46_xlate_rule_t *rule, void *pipv6, void *pipv4);
|
||||
+int xlate_map_v4_to_v6(nat46_instance_t *nat46, nat46_xlate_rule_t *rule, void *pipv4, void *pipv6, uint16_t *pl4id, int map_version);
|
||||
+int xlate_map_v6_to_v4(nat46_instance_t *nat46, nat46_xlate_rule_t *rule, void *pipv6, void *pipv4, int version);
|
||||
+int xlate_v4_to_v6(nat46_instance_t *nat46, nat46_xlate_rule_t *rule, void *pipv4, void *pipv6, uint16_t *pl4id);
|
||||
+int xlate_v6_to_v4(nat46_instance_t *nat46, nat46_xlate_rule_t *rule, void *pipv6, void *pipv4);
|
||||
+__sum16 csum16_upd(__sum16 csum, u16 old, u16 new);
|
||||
+__sum16 csum_tcpudp_remagic(__be32 saddr, __be32 daddr, u32 len, unsigned char proto, u16 csum);
|
||||
+__sum16 csum_ipv6_unmagic(nat46_instance_t *nat46, const struct in6_addr *saddr, const struct in6_addr *daddr, __u32 len, unsigned short proto, __sum16 csum);
|
||||
+void update_icmp6_type_code(nat46_instance_t *nat46, struct icmp6hdr *icmp6h, u8 type, u8 code);
|
||||
+u16 get_next_ip_id(void);
|
||||
+u16 fold_ipv6_frag_id(u32 v6id);
|
||||
+void *add_offset(void *ptr, u16 offset);
|
||||
+void *get_next_header_ptr6(void *pv6, int v6_len);
|
||||
+void fill_v4hdr_from_v6hdr(struct iphdr * iph, struct ipv6hdr *ip6h, __u32 v4saddr, __u32 v4daddr, __u16 id, __u16 frag_off, __u16 proto, int l3_payload_len);
|
||||
+u16 unchecksum16(void *p, int count, u16 csum);
|
||||
+u16 rechecksum16(void *p, int count, u16 csum);
|
||||
+int is_last_pair_in_group(nat46_xlate_rulepair_t *apair);
|
||||
+void pairs_xlate_v6_to_v4_inner(nat46_instance_t *nat46, struct ipv6hdr *ip6h, __u32 *pv4saddr, __u32 *pv4daddr);
|
||||
+int xlate_payload6_to4(nat46_instance_t *nat46, void *pv6, void *ptrans_hdr, int v6_len, u16 *ul_sum, int *ptailTruncSize);
|
||||
+u8 *icmp_parameter_ptr(struct icmphdr *icmph);
|
||||
+u32 *icmp6_parameter_ptr(struct icmp6hdr *icmp6h);
|
||||
+int ip6_input_not_interested(nat46_instance_t *nat46, struct ipv6hdr *ip6h, struct sk_buff *old_skb);
|
||||
+int pairs_xlate_v6_to_v4_outer(nat46_instance_t *nat46, struct ipv6hdr *ip6h, uint16_t proto, __u32 *pv4saddr, __u32 *pv4daddr);
|
||||
+void ip6_update_csum(struct sk_buff * skb, struct ipv6hdr * ip6hdr, int do_atomic_frag);
|
||||
+int ip4_input_not_interested(nat46_instance_t *nat46, struct iphdr *iph, struct sk_buff *old_skb);
|
||||
+int pairs_xlate_v4_to_v6_outer(nat46_instance_t *nat46, struct iphdr *hdr4, uint16_t *sport, uint16_t *dport, void *v6saddr, void *v6daddr);
|
||||
+int is_valid_nat46(nat46_instance_t *nat46);
|
||||
#endif
|
|
@ -1,10 +0,0 @@
|
|||
--- a/nat46/modules/nat46-netdev.c 2024-09-13 09:39:48.960815094 +0200
|
||||
+++ b/nat46/modules/nat46-netdev.c 2024-09-13 09:40:11.128500472 +0200
|
||||
@@ -110,7 +110,6 @@
|
||||
dev->hard_header_len = 0;
|
||||
dev->addr_len = 0;
|
||||
dev->mtu = 16384; /* iptables does reassembly. Rather than using ETH_DATA_LEN, let's try to get as much mileage as we can with the Linux stack */
|
||||
- dev->features = NETIF_F_NETNS_LOCAL;
|
||||
dev->flags = IFF_NOARP | IFF_POINTOPOINT;
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
From 078b67683613d8f066a2955802b46a4b27eb642e Mon Sep 17 00:00:00 2001
|
||||
From: Mantas Pucka <mantas@8devices.com>
|
||||
Date: Tue, 10 Dec 2024 13:24:39 +0200
|
||||
Subject: [PATCH 16/17] nss-dp: disable warnings to support linux-6.12
|
||||
|
||||
Linux 6.12 adds these new warnings which become build errors
|
||||
|
||||
Signed-off-by: Mantas Pucka <mantas@8devices.com>
|
||||
---
|
||||
Makefile | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -90,4 +90,5 @@ endif
|
||||
|
||||
ccflags-y += $(NSS_DP_INCLUDE)
|
||||
ccflags-y += -Wall -Werror
|
||||
+ccflags-y += -Wno-missing-prototypes -Wno-missing-declarations
|
||||
ccflags-y += -DEDMA_DEBUG_LEVEL=2
|
|
@ -1,74 +0,0 @@
|
|||
From cdfdb0fd6407bb3a3a3c7bf9602d40928d950641 Mon Sep 17 00:00:00 2001
|
||||
From: Mantas Pucka <mantas@8devices.com>
|
||||
Date: Tue, 10 Dec 2024 13:32:04 +0200
|
||||
Subject: [PATCH 17/18] nss-dp: adapt to linux 6.12 API
|
||||
|
||||
Add compatibility with 6.12
|
||||
|
||||
Signed-off-by: Mantas Pucka <mantas@8devices.com>
|
||||
---
|
||||
nss_dp_main.c | 10 ++++------
|
||||
2 files changed, 10 insertions(+), 8 deletions(-)
|
||||
|
||||
--- a/nss_dp_main.c
|
||||
+++ b/nss_dp_main.c
|
||||
@@ -34,6 +34,10 @@
|
||||
#if (LINUX_VERSION_CODE > KERNEL_VERSION(6, 6, 0))
|
||||
#include <net/netdev_rx_queue.h>
|
||||
#endif
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0))
|
||||
+#include <net/rps.h>
|
||||
+#include <net/hotdata.h>
|
||||
+#endif
|
||||
#if defined(NSS_DP_MAC_POLL_SUPPORT)
|
||||
#include <init/ssdk_init.h>
|
||||
#endif
|
||||
@@ -496,14 +500,22 @@ static int nss_dp_rx_flow_steer(struct n
|
||||
rxflow = &flow_table->flows[hash & flow_table->mask];
|
||||
rxcpu = (uint32_t)rxflow->cpu;
|
||||
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0))
|
||||
+ sock_flow_table = rcu_dereference(net_hotdata.rps_sock_flow_table);
|
||||
+#else
|
||||
sock_flow_table = rcu_dereference(rps_sock_flow_table);
|
||||
+#endif
|
||||
if (!sock_flow_table) {
|
||||
netdev_dbg(netdev, "Global RPS flow table not found\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
rfscpu = sock_flow_table->ents[hash & sock_flow_table->mask];
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0))
|
||||
+ rfscpu &= net_hotdata.rps_cpu_mask;
|
||||
+#else
|
||||
rfscpu &= rps_cpu_mask;
|
||||
+#endif
|
||||
|
||||
if (rxcpu == rfscpu)
|
||||
return 0;
|
||||
@@ -998,6 +1010,13 @@ static int nss_dp_remove(struct platform
|
||||
return 0;
|
||||
}
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,12,0)
|
||||
+static void nss_dp_remove_new(struct platform_device *pdev)
|
||||
+{
|
||||
+ nss_dp_remove(pdev);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
static struct of_device_id nss_dp_dt_ids[] = {
|
||||
{ .compatible = "qcom,nss-dp" },
|
||||
{},
|
||||
@@ -1006,7 +1025,11 @@ MODULE_DEVICE_TABLE(of, nss_dp_dt_ids);
|
||||
|
||||
static struct platform_driver nss_dp_drv = {
|
||||
.probe = nss_dp_probe,
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,12,0)
|
||||
.remove = nss_dp_remove,
|
||||
+#else
|
||||
+ .remove_new = nss_dp_remove_new,
|
||||
+#endif
|
||||
.driver = {
|
||||
.name = "nss-dp",
|
||||
.owner = THIS_MODULE,
|
|
@ -1,155 +0,0 @@
|
|||
From cdfdb0fd6407bb3a3a3c7bf9602d40928d950641 Mon Sep 17 00:00:00 2001
|
||||
From: Mantas Pucka <mantas@8devices.com>
|
||||
Date: Tue, 10 Dec 2024 13:32:04 +0200
|
||||
Subject: [PATCH 18/18] nss-dp: update EEE support for 6.12
|
||||
|
||||
Linux 6.12 changed API for EEE link modes
|
||||
|
||||
Signed-off-by: Mantas Pucka <mantas@8devices.com>
|
||||
---
|
||||
nss_dp_ethtools.c | 8 ++++++--
|
||||
2 files changed, 10 insertions(+), 8 deletions(-)
|
||||
|
||||
--- a/nss_dp_ethtools.c
|
||||
+++ b/nss_dp_ethtools.c
|
||||
@@ -206,6 +206,7 @@ static int32_t nss_dp_set_pauseparam(str
|
||||
* nss_dp_fal_to_ethtool_linkmode_xlate()
|
||||
* Translate linkmode from FAL type to ethtool type.
|
||||
*/
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0))
|
||||
static inline void nss_dp_fal_to_ethtool_linkmode_xlate(uint32_t *xlate_to, uint32_t *xlate_from)
|
||||
{
|
||||
uint32_t pos;
|
||||
@@ -243,12 +244,26 @@ static inline void nss_dp_fal_to_ethtool
|
||||
*xlate_from &= (~(1 << (pos - 1)));
|
||||
}
|
||||
}
|
||||
+#else
|
||||
+static inline void nss_dp_fal_to_ethtool_linkmode_xlate(unsigned long *to, uint32_t from)
|
||||
+{
|
||||
+ linkmode_mod_bit(ETHTOOL_LINK_MODE_10baseT_Full_BIT, to, from & FAL_PHY_EEE_10BASE_T);
|
||||
+ linkmode_mod_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT, to, from & FAL_PHY_EEE_100BASE_T);
|
||||
+ linkmode_mod_bit(ETHTOOL_LINK_MODE_1000baseT_Full_BIT, to, from & FAL_PHY_EEE_1000BASE_T);
|
||||
+ linkmode_mod_bit(ETHTOOL_LINK_MODE_2500baseX_Full_BIT, to, from & FAL_PHY_EEE_2500BASE_T);
|
||||
+ linkmode_mod_bit(ETHTOOL_LINK_MODE_10000baseT_Full_BIT, to, from & FAL_PHY_EEE_10000BASE_T);
|
||||
+}
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* nss_dp_get_eee()
|
||||
* Get EEE settings.
|
||||
*/
|
||||
-static int32_t nss_dp_get_eee(struct net_device *netdev, struct ethtool_eee *eee)
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0))
|
||||
+static int nss_dp_get_eee(struct net_device *netdev, struct ethtool_eee *eee)
|
||||
+#else
|
||||
+static int nss_dp_get_eee(struct net_device *netdev, struct ethtool_keee *eee)
|
||||
+#endif
|
||||
{
|
||||
struct nss_dp_dev *dp_priv = (struct nss_dp_dev *)netdev_priv(netdev);
|
||||
fal_port_eee_cfg_t port_eee_cfg;
|
||||
@@ -266,9 +281,15 @@ static int32_t nss_dp_get_eee(struct net
|
||||
/*
|
||||
* Translate the FAL linkmode types to ethtool linkmode types.
|
||||
*/
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0))
|
||||
nss_dp_fal_to_ethtool_linkmode_xlate(&eee->supported, &port_eee_cfg.capability);
|
||||
nss_dp_fal_to_ethtool_linkmode_xlate(&eee->advertised, &port_eee_cfg.advertisement);
|
||||
nss_dp_fal_to_ethtool_linkmode_xlate(&eee->lp_advertised, &port_eee_cfg.link_partner_advertisement);
|
||||
+#else
|
||||
+ nss_dp_fal_to_ethtool_linkmode_xlate(eee->supported, port_eee_cfg.capability);
|
||||
+ nss_dp_fal_to_ethtool_linkmode_xlate(eee->advertised, port_eee_cfg.advertisement);
|
||||
+ nss_dp_fal_to_ethtool_linkmode_xlate(eee->lp_advertised, port_eee_cfg.link_partner_advertisement);
|
||||
+#endif
|
||||
eee->eee_enabled = port_eee_cfg.enable;
|
||||
eee->eee_active = port_eee_cfg.eee_status;
|
||||
eee->tx_lpi_enabled = port_eee_cfg.lpi_tx_enable;
|
||||
@@ -281,11 +302,15 @@ static int32_t nss_dp_get_eee(struct net
|
||||
* nss_dp_set_eee()
|
||||
* Set EEE settings.
|
||||
*/
|
||||
-static int32_t nss_dp_set_eee(struct net_device *netdev, struct ethtool_eee *eee)
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0))
|
||||
+static int nss_dp_set_eee(struct net_device *netdev, struct ethtool_eee *eee)
|
||||
+#else
|
||||
+static int nss_dp_set_eee(struct net_device *netdev, struct ethtool_keee *eee)
|
||||
+#endif
|
||||
{
|
||||
struct nss_dp_dev *dp_priv = (struct nss_dp_dev *)netdev_priv(netdev);
|
||||
fal_port_eee_cfg_t port_eee_cfg, port_eee_cur_cfg;
|
||||
- uint32_t port_id, pos;
|
||||
+ uint32_t port_id;
|
||||
sw_error_t ret;
|
||||
|
||||
memset(&port_eee_cfg, 0, sizeof(fal_port_eee_cfg_t));
|
||||
@@ -306,8 +331,9 @@ static int32_t nss_dp_set_eee(struct net
|
||||
/*
|
||||
* Translate the ethtool speed types to FAL speed types.
|
||||
*/
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0))
|
||||
while (eee->advertised) {
|
||||
- pos = ffs(eee->advertised);
|
||||
+ uint32_t pos = ffs(eee->advertised);
|
||||
switch (1 << (pos - 1)) {
|
||||
case ADVERTISED_10baseT_Full:
|
||||
if (port_eee_cur_cfg.capability & FAL_PHY_EEE_10BASE_T) {
|
||||
@@ -361,6 +387,48 @@ static int32_t nss_dp_set_eee(struct net
|
||||
|
||||
eee->advertised &= (~(1 << (pos - 1)));
|
||||
}
|
||||
+#else
|
||||
+ if (linkmode_test_bit(ETHTOOL_LINK_MODE_10baseT_Full_BIT, eee->advertised)) {
|
||||
+ if (port_eee_cur_cfg.capability & FAL_PHY_EEE_10BASE_T) {
|
||||
+ port_eee_cfg.advertisement |= FAL_PHY_EEE_10BASE_T;
|
||||
+ } else {
|
||||
+ netdev_dbg(netdev, "Advertised value 10baseT_Full is not supported\n");
|
||||
+ return -EIO;
|
||||
+ }
|
||||
+ }
|
||||
+ if (linkmode_test_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT, eee->advertised)) {
|
||||
+ if (port_eee_cur_cfg.capability & FAL_PHY_EEE_100BASE_T) {
|
||||
+ port_eee_cfg.advertisement |= FAL_PHY_EEE_100BASE_T;
|
||||
+ } else {
|
||||
+ netdev_dbg(netdev, "Advertised value 100baseT_Full is not supported\n");
|
||||
+ return -EIO;
|
||||
+ }
|
||||
+ }
|
||||
+ if (linkmode_test_bit(ETHTOOL_LINK_MODE_1000baseT_Full_BIT, eee->advertised)) {
|
||||
+ if (port_eee_cur_cfg.capability & FAL_PHY_EEE_1000BASE_T) {
|
||||
+ port_eee_cfg.advertisement |= FAL_PHY_EEE_1000BASE_T;
|
||||
+ } else {
|
||||
+ netdev_dbg(netdev, "Advertised value 1000baseT_Full is not supported\n");
|
||||
+ return -EIO;
|
||||
+ }
|
||||
+ }
|
||||
+ if (linkmode_test_bit(ETHTOOL_LINK_MODE_2500baseX_Full_BIT, eee->advertised)) {
|
||||
+ if (port_eee_cur_cfg.capability & FAL_PHY_EEE_2500BASE_T) {
|
||||
+ port_eee_cfg.advertisement |= FAL_PHY_EEE_2500BASE_T;
|
||||
+ } else {
|
||||
+ netdev_dbg(netdev, "Advertised value 2500baseX_Full is not supported\n");
|
||||
+ return -EIO;
|
||||
+ }
|
||||
+ }
|
||||
+ if (linkmode_test_bit(ETHTOOL_LINK_MODE_10000baseT_Full_BIT, eee->advertised)) {
|
||||
+ if (port_eee_cur_cfg.capability & FAL_PHY_EEE_10000BASE_T) {
|
||||
+ port_eee_cfg.advertisement |= FAL_PHY_EEE_10000BASE_T;
|
||||
+ } else {
|
||||
+ netdev_dbg(netdev, "Advertised value 1000baseT_Full is not supported\n");
|
||||
+ return -EIO;
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
port_eee_cfg.lpi_tx_enable = eee->tx_lpi_enabled;
|
||||
port_eee_cfg.lpi_sleep_timer = eee->tx_lpi_timer;
|
||||
@@ -482,8 +550,10 @@ struct ethtool_ops nss_dp_ethtool_ops =
|
||||
#endif
|
||||
.get_pauseparam = &nss_dp_get_pauseparam,
|
||||
.set_pauseparam = &nss_dp_set_pauseparam,
|
||||
+
|
||||
.get_eee = &nss_dp_get_eee,
|
||||
.set_eee = &nss_dp_set_eee,
|
||||
+
|
||||
.get_priv_flags = nss_dp_get_priv_flags,
|
||||
.set_priv_flags = nss_dp_set_priv_flags,
|
||||
};
|
|
@ -1,72 +0,0 @@
|
|||
From ef91390278b98b48adf65e6d3b772ddecfc4f6b0 Mon Sep 17 00:00:00 2001
|
||||
From: Mantas Pucka <mantas@8devices.com>
|
||||
Date: Tue, 10 Dec 2024 13:05:30 +0200
|
||||
Subject: [PATCH 7/9] ssdk: replace deprecated strlcpy() with strscpy()
|
||||
|
||||
Since linux-6.12 strlcpy() is no longer available
|
||||
|
||||
Signed-off-by: Mantas Pucka <mantas@8devices.com>
|
||||
---
|
||||
src/shell_lib/shell_io.c | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
--- a/src/shell_lib/shell_io.c
|
||||
+++ b/src/shell_lib/shell_io.c
|
||||
@@ -951,16 +951,16 @@ cmd_sscanf(const char *buf, const char *
|
||||
if(buf[0] == '0' && (buf[1] == 'x' || buf[1] == 'X'))
|
||||
{
|
||||
if(!fmt)
|
||||
- strlcpy(fmt_tmp, "%x", sizeof(fmt_tmp));
|
||||
+ strscpy(fmt_tmp, "%x", sizeof(fmt_tmp));
|
||||
else
|
||||
{
|
||||
if(strspn(fmt, "%lLxXhH") != strlen(fmt))
|
||||
return SW_BAD_VALUE;
|
||||
if(fmt[0] == '%' && ((fmt[1] == 'l' || fmt[1] == 'L') &&
|
||||
(fmt[2] == 'l' || fmt[2] == 'L')))
|
||||
- strlcpy(fmt_tmp, "%llx", sizeof(fmt_tmp));
|
||||
+ strscpy(fmt_tmp, "%llx", sizeof(fmt_tmp));
|
||||
else
|
||||
- strlcpy(fmt_tmp, fmt, sizeof(fmt_tmp));
|
||||
+ strscpy(fmt_tmp, fmt, sizeof(fmt_tmp));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -968,16 +968,16 @@ cmd_sscanf(const char *buf, const char *
|
||||
if(strspn(buf, "1234567890") != strlen(buf))
|
||||
return SW_BAD_VALUE;
|
||||
if(!fmt)
|
||||
- strlcpy(fmt_tmp, "%d", sizeof(fmt_tmp));
|
||||
+ strscpy(fmt_tmp, "%d", sizeof(fmt_tmp));
|
||||
else
|
||||
{
|
||||
if(strspn(fmt, "%lLdD") != strlen(fmt))
|
||||
return SW_BAD_VALUE;
|
||||
if(fmt[0] == '%' && ((fmt[1] == 'l' || fmt[1] == 'L') &&
|
||||
(fmt[2] == 'l' || fmt[2] == 'L')))
|
||||
- strlcpy(fmt_tmp, "%lld", sizeof(fmt_tmp));
|
||||
+ strscpy(fmt_tmp, "%lld", sizeof(fmt_tmp));
|
||||
else
|
||||
- strlcpy(fmt_tmp, fmt, sizeof(fmt_tmp));
|
||||
+ strscpy(fmt_tmp, fmt, sizeof(fmt_tmp));
|
||||
}
|
||||
}
|
||||
if(sscanf(buf, fmt_tmp, arg_val) != 1)
|
||||
@@ -2736,7 +2736,7 @@ cmd_data_check_portmap(char *cmdstr, fal
|
||||
return SW_OK;
|
||||
}
|
||||
|
||||
- strlcpy(tmp_str, cmdstr, sizeof(tmp_str));
|
||||
+ strscpy(tmp_str, cmdstr, sizeof(tmp_str));
|
||||
tmp = (void *) strsep(&cmdstr, ",");
|
||||
while (tmp)
|
||||
{
|
||||
@@ -12818,7 +12818,7 @@ cmd_data_check_tunnel_encap_entry(char *
|
||||
break;
|
||||
}
|
||||
/* copy 2 chars from cmd */
|
||||
- strlcpy(cmd_byte, cmd, sizeof(cmd_byte));
|
||||
+ strscpy(cmd_byte, cmd, sizeof(cmd_byte));
|
||||
sscanf(cmd_byte, "%hhx",
|
||||
&(entry.pkt_header.pkt_header_data[bytes]));
|
||||
cmd += 2;
|
|
@ -1,25 +0,0 @@
|
|||
From 85c328ef31f3da7b2dab82c5a1c8559295620f76 Mon Sep 17 00:00:00 2001
|
||||
From: Mantas Pucka <mantas@8devices.com>
|
||||
Date: Tue, 10 Dec 2024 13:10:07 +0200
|
||||
Subject: [PATCH 8/9] ssdk: disable warnings to support linux-6.12
|
||||
|
||||
Linux 6.12 adds these new warnings which become build errors with
|
||||
default -Werror.
|
||||
|
||||
Signed-off-by: Mantas Pucka <mantas@8devices.com>
|
||||
---
|
||||
make/linux_opt.mk | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
--- a/make/linux_opt.mk
|
||||
+++ b/make/linux_opt.mk
|
||||
@@ -314,6 +314,9 @@ endif
|
||||
|
||||
MODULE_CFLAG += $(OPT_FLAG) -Wall -DVERSION=\"$(VERSION)\" -DBUILD_DATE=\"$(BUILD_DATE)\" -DOS=\"$(OS)\" -D"KBUILD_STR(s)=\#s"
|
||||
|
||||
+# Linux 6.12 compatibility
|
||||
+MODULE_CFLAG += -Wno-missing-prototypes -Wno-missing-declarations -Wno-discarded-qualifiers
|
||||
+
|
||||
MODULE_INC += -I$(PRJ_PATH)/include \
|
||||
-I$(PRJ_PATH)/include/common \
|
||||
-I$(PRJ_PATH)/include/api \
|
|
@ -1,22 +0,0 @@
|
|||
From 01e7ad1b785b0662e9a2f41cb7dffbcea35ed0c1 Mon Sep 17 00:00:00 2001
|
||||
From: Mantas Pucka <mantas@8devices.com>
|
||||
Date: Tue, 10 Dec 2024 13:13:16 +0200
|
||||
Subject: [PATCH 9/9] ssdk: add missing include
|
||||
|
||||
Fixes build with linux 6.12
|
||||
|
||||
Signed-off-by: Mantas Pucka <mantas@8devices.com>
|
||||
---
|
||||
src/init/ssdk_dts.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/src/init/ssdk_dts.c
|
||||
+++ b/src/init/ssdk_dts.c
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_mdio.h>
|
||||
#include <linux/of_platform.h>
|
||||
+#include <linux/platform_device.h>
|
||||
|
||||
static ssdk_dt_global_t ssdk_dt_global = {0};
|
||||
#ifdef HPPE
|
|
@ -1,50 +0,0 @@
|
|||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,17 +1,19 @@
|
||||
-include ./config
|
||||
-
|
||||
ifndef PRJ_PATH
|
||||
PRJ_PATH=$(shell pwd)
|
||||
endif
|
||||
export PRJ_PATH
|
||||
|
||||
-include ./make/config.mk
|
||||
-include ./make/tools.mk
|
||||
-include ./make/$(OS)_opt.mk
|
||||
+include $(PRJ_PATH)/config
|
||||
+
|
||||
+include $(PRJ_PATH)/make/config.mk
|
||||
+include $(PRJ_PATH)/make/tools.mk
|
||||
+include $(PRJ_PATH)/make/$(OS)_opt.mk
|
||||
|
||||
SUB_DIR=$(patsubst %/, %, $(dir $(wildcard src/*/Makefile)))
|
||||
SUB_LIB=$(subst src/, , $(SUB_DIR))
|
||||
|
||||
+include $(PRJ_PATH)/Makefile.modules
|
||||
+
|
||||
####################################################################
|
||||
# SSDK-Style Makefile
|
||||
####################################################################
|
||||
@@ -27,11 +29,7 @@ all: $(BIN_DIR) kslib
|
||||
# LNX Modules-Style Makefile
|
||||
####################################################################
|
||||
modules: $(BIN_DIR) kslib_c
|
||||
- mkdir -p ./temp/;cp * ./temp -a;cd ./temp;cp ../Makefile.modules ./Makefile;
|
||||
- make -C $(SYS_PATH) M=$(PRJ_PATH)/temp $(LNX_MAKEOPTS) modules
|
||||
- cp $(PRJ_PATH)/temp/Module.symvers $(PRJ_PATH)/Module.symvers;
|
||||
- cp temp/*.ko build/bin;
|
||||
- rm -Rf ./temp/*.o ./temp/*.ko ./temp/*.a
|
||||
+ @$(MAKE) -C $(SYS_PATH) M=$(PRJ_PATH) $(LNX_MAKEOPTS) modules
|
||||
@echo "---Build [SSDK-$(VERSION)] at $(BUILD_DATE) finished."
|
||||
|
||||
kslib_c:
|
||||
--- a/make/linux_opt.mk
|
||||
+++ b/make/linux_opt.mk
|
||||
@@ -785,6 +785,6 @@ LOCAL_CFLAGS += $(CPU_CFLAG) -D"KBUILD_M
|
||||
####################################################################
|
||||
# cflags for LNX Modules-Style Makefile
|
||||
####################################################################
|
||||
-LNX_LOCAL_CFLAGS += $(MODULE_INC) $(MODULE_CFLAG) ${EXTRA_INC} -DFALLTHROUGH
|
||||
+LNX_LOCAL_CFLAGS = $(MODULE_INC) $(MODULE_CFLAG) ${EXTRA_INC} -DFALLTHROUGH
|
||||
export LNX_LOCAL_CFLAGS
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
--- a/ubootenv-nvram.c
|
||||
+++ b/ubootenv-nvram.c
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_reserved_mem.h>
|
||||
#include <linux/platform_device.h>
|
||||
+#include <linux/version.h>
|
||||
|
||||
#define NAME "ubootenv"
|
||||
|
||||
@@ -132,18 +133,30 @@ static int ubootenv_probe(struct platfor
|
||||
return misc_register(&data->misc);
|
||||
}
|
||||
|
||||
-static int ubootenv_remove(struct platform_device *pdev)
|
||||
+static
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)
|
||||
+int
|
||||
+#else
|
||||
+void
|
||||
+#endif
|
||||
+ubootenv_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct ubootenv_drvdata *data = platform_get_drvdata(pdev);
|
||||
|
||||
data->env = NULL;
|
||||
misc_deregister(&data->misc);
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)
|
||||
return 0;
|
||||
+#endif
|
||||
}
|
||||
|
||||
static struct platform_driver ubootenv_driver = {
|
||||
.probe = ubootenv_probe,
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)
|
||||
.remove = ubootenv_remove,
|
||||
+#else
|
||||
+ .remove_new = ubootenv_remove,
|
||||
+#endif
|
||||
.driver = {
|
||||
.name = NAME,
|
||||
.owner = THIS_MODULE,
|
|
@ -1,76 +0,0 @@
|
|||
#
|
||||
# Copyright (C) 2014 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libnftnl
|
||||
PKG_CPE_ID:=cpe:/a:netfilter:libnftnl
|
||||
PKG_VERSION:=1.2.6
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files
|
||||
PKG_HASH:=ceeaea2cd92147da19f13a35a7f1a4bc2767ff897e838e4b479cf54b59c777f4
|
||||
|
||||
PKG_MAINTAINER:=Steven Barth <steven@midlink.org>
|
||||
PKG_LICENSE:=GPL-2.0-or-later
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_INSTALL:=1
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_BUILD_FLAGS:=lto
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
DISABLE_NLS:=
|
||||
|
||||
define Package/libnftnl
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
DEPENDS:=+libmnl
|
||||
TITLE:=Low-level netlink library for the nf_tables subsystem
|
||||
URL:=http://www.netfilter.org/projects/libnftnl
|
||||
ABI_VERSION:=11
|
||||
endef
|
||||
|
||||
define Package/libnftnl/description
|
||||
libnftnl is a userspace library providing a low-level netlink
|
||||
programming interface (API) to the in-kernel nf_tables subsystem.
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += $(FPIC)
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-static \
|
||||
--enable-shared
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include/libnftnl
|
||||
$(CP) \
|
||||
$(PKG_INSTALL_DIR)/usr/include/libnftnl/*.h \
|
||||
$(1)/usr/include/libnftnl/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) \
|
||||
$(PKG_INSTALL_DIR)/usr/lib/libnftnl.{so*,a,la} \
|
||||
$(1)/usr/lib/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(CP) \
|
||||
$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnftnl.pc \
|
||||
$(1)/usr/lib/pkgconfig/
|
||||
endef
|
||||
|
||||
define Package/libnftnl/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) \
|
||||
$(PKG_INSTALL_DIR)/usr/lib/libnftnl.so.* \
|
||||
$(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libnftnl))
|
|
@ -1,254 +0,0 @@
|
|||
From 6c39f04febd7cfdbd474233379416babcd0fc341 Mon Sep 17 00:00:00 2001
|
||||
From: Syrone Wong <wong.syrone@gmail.com>
|
||||
Date: Fri, 8 Apr 2022 23:52:11 +0800
|
||||
Subject: [PATCH] libnftnl: add fullcone expression support
|
||||
|
||||
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
|
||||
---
|
||||
include/libnftnl/expr.h | 6 +
|
||||
include/linux/netfilter/nf_tables.h | 16 +++
|
||||
src/Makefile.am | 1 +
|
||||
src/expr/fullcone.c | 167 ++++++++++++++++++++++++++++
|
||||
src/expr_ops.c | 2 +
|
||||
5 files changed, 192 insertions(+)
|
||||
create mode 100644 src/expr/fullcone.c
|
||||
|
||||
--- a/include/libnftnl/expr.h
|
||||
+++ b/include/libnftnl/expr.h
|
||||
@@ -245,6 +245,12 @@ enum {
|
||||
};
|
||||
|
||||
enum {
|
||||
+ NFTNL_EXPR_FULLCONE_FLAGS = NFTNL_EXPR_BASE,
|
||||
+ NFTNL_EXPR_FULLCONE_REG_PROTO_MIN,
|
||||
+ NFTNL_EXPR_FULLCONE_REG_PROTO_MAX,
|
||||
+};
|
||||
+
|
||||
+enum {
|
||||
NFTNL_EXPR_REDIR_REG_PROTO_MIN = NFTNL_EXPR_BASE,
|
||||
NFTNL_EXPR_REDIR_REG_PROTO_MAX,
|
||||
NFTNL_EXPR_REDIR_FLAGS,
|
||||
--- a/include/linux/netfilter/nf_tables.h
|
||||
+++ b/include/linux/netfilter/nf_tables.h
|
||||
@@ -1434,6 +1434,22 @@ enum nft_masq_attributes {
|
||||
#define NFTA_MASQ_MAX (__NFTA_MASQ_MAX - 1)
|
||||
|
||||
/**
|
||||
+ * enum nft_fullcone_attributes - nf_tables fullcone expression attributes
|
||||
+ *
|
||||
+ * @NFTA_FULLCONE_FLAGS: NAT flags (see NF_NAT_RANGE_* in linux/netfilter/nf_nat.h) (NLA_U32)
|
||||
+ * @NFTA_FULLCONE_REG_PROTO_MIN: source register of proto range start (NLA_U32: nft_registers)
|
||||
+ * @NFTA_FULLCONE_REG_PROTO_MAX: source register of proto range end (NLA_U32: nft_registers)
|
||||
+ */
|
||||
+enum nft_fullcone_attributes {
|
||||
+ NFTA_FULLCONE_UNSPEC,
|
||||
+ NFTA_FULLCONE_FLAGS,
|
||||
+ NFTA_FULLCONE_REG_PROTO_MIN,
|
||||
+ NFTA_FULLCONE_REG_PROTO_MAX,
|
||||
+ __NFTA_FULLCONE_MAX
|
||||
+};
|
||||
+#define NFTA_FULLCONE_MAX (__NFTA_FULLCONE_MAX - 1)
|
||||
+
|
||||
+/**
|
||||
* enum nft_redir_attributes - nf_tables redirect expression netlink attributes
|
||||
*
|
||||
* @NFTA_REDIR_REG_PROTO_MIN: source register of proto range start (NLA_U32: nft_registers)
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -54,6 +54,7 @@ libnftnl_la_SOURCES = utils.c \
|
||||
expr/target.c \
|
||||
expr/tunnel.c \
|
||||
expr/masq.c \
|
||||
+ expr/fullcone.c \
|
||||
expr/redir.c \
|
||||
expr/hash.c \
|
||||
expr/socket.c \
|
||||
--- /dev/null
|
||||
+++ b/src/expr/fullcone.c
|
||||
@@ -0,0 +1,168 @@
|
||||
+/*
|
||||
+ * (C) 2022 wongsyrone
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published
|
||||
+ * by the Free Software Foundation; either version 2 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ */
|
||||
+
|
||||
+#include <stdio.h>
|
||||
+#include <stdint.h>
|
||||
+#include <arpa/inet.h>
|
||||
+#include <errno.h>
|
||||
+#include <inttypes.h>
|
||||
+
|
||||
+#include <linux/netfilter/nf_tables.h>
|
||||
+
|
||||
+#include "internal.h"
|
||||
+#include <libmnl/libmnl.h>
|
||||
+#include <libnftnl/expr.h>
|
||||
+#include <libnftnl/rule.h>
|
||||
+
|
||||
+struct nftnl_expr_fullcone {
|
||||
+ uint32_t flags;
|
||||
+ enum nft_registers sreg_proto_min;
|
||||
+ enum nft_registers sreg_proto_max;
|
||||
+};
|
||||
+
|
||||
+static int
|
||||
+nftnl_expr_fullcone_set(struct nftnl_expr *e, uint16_t type,
|
||||
+ const void *data, uint32_t data_len)
|
||||
+{
|
||||
+ struct nftnl_expr_fullcone *fullcone = nftnl_expr_data(e);
|
||||
+
|
||||
+ switch (type) {
|
||||
+ case NFTNL_EXPR_FULLCONE_FLAGS:
|
||||
+ memcpy(&fullcone->flags, data, sizeof(fullcone->flags));
|
||||
+ break;
|
||||
+ case NFTNL_EXPR_FULLCONE_REG_PROTO_MIN:
|
||||
+ memcpy(&fullcone->sreg_proto_min, data, sizeof(fullcone->sreg_proto_min));
|
||||
+ break;
|
||||
+ case NFTNL_EXPR_FULLCONE_REG_PROTO_MAX:
|
||||
+ memcpy(&fullcone->sreg_proto_max, data, sizeof(fullcone->sreg_proto_max));
|
||||
+ break;
|
||||
+ default:
|
||||
+ return -1;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const void *
|
||||
+nftnl_expr_fullcone_get(const struct nftnl_expr *e, uint16_t type,
|
||||
+ uint32_t *data_len)
|
||||
+{
|
||||
+ struct nftnl_expr_fullcone *fullcone = nftnl_expr_data(e);
|
||||
+
|
||||
+ switch (type) {
|
||||
+ case NFTNL_EXPR_FULLCONE_FLAGS:
|
||||
+ *data_len = sizeof(fullcone->flags);
|
||||
+ return &fullcone->flags;
|
||||
+ case NFTNL_EXPR_FULLCONE_REG_PROTO_MIN:
|
||||
+ *data_len = sizeof(fullcone->sreg_proto_min);
|
||||
+ return &fullcone->sreg_proto_min;
|
||||
+ case NFTNL_EXPR_FULLCONE_REG_PROTO_MAX:
|
||||
+ *data_len = sizeof(fullcone->sreg_proto_max);
|
||||
+ return &fullcone->sreg_proto_max;
|
||||
+ }
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+static int nftnl_expr_fullcone_cb(const struct nlattr *attr, void *data)
|
||||
+{
|
||||
+ const struct nlattr **tb = data;
|
||||
+ int type = mnl_attr_get_type(attr);
|
||||
+
|
||||
+ if (mnl_attr_type_valid(attr, NFTA_FULLCONE_MAX) < 0)
|
||||
+ return MNL_CB_OK;
|
||||
+
|
||||
+ switch (type) {
|
||||
+ case NFTA_FULLCONE_REG_PROTO_MIN:
|
||||
+ case NFTA_FULLCONE_REG_PROTO_MAX:
|
||||
+ case NFTA_FULLCONE_FLAGS:
|
||||
+ if (mnl_attr_validate(attr, MNL_TYPE_U32) < 0)
|
||||
+ abi_breakage();
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ tb[type] = attr;
|
||||
+ return MNL_CB_OK;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+nftnl_expr_fullcone_build(struct nlmsghdr *nlh, const struct nftnl_expr *e)
|
||||
+{
|
||||
+ struct nftnl_expr_fullcone *fullcone = nftnl_expr_data(e);
|
||||
+
|
||||
+ if (e->flags & (1 << NFTNL_EXPR_FULLCONE_FLAGS))
|
||||
+ mnl_attr_put_u32(nlh, NFTA_FULLCONE_FLAGS, htobe32(fullcone->flags));
|
||||
+ if (e->flags & (1 << NFTNL_EXPR_FULLCONE_REG_PROTO_MIN))
|
||||
+ mnl_attr_put_u32(nlh, NFTA_FULLCONE_REG_PROTO_MIN,
|
||||
+ htobe32(fullcone->sreg_proto_min));
|
||||
+ if (e->flags & (1 << NFTNL_EXPR_FULLCONE_REG_PROTO_MAX))
|
||||
+ mnl_attr_put_u32(nlh, NFTA_FULLCONE_REG_PROTO_MAX,
|
||||
+ htobe32(fullcone->sreg_proto_max));
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+nftnl_expr_fullcone_parse(struct nftnl_expr *e, struct nlattr *attr)
|
||||
+{
|
||||
+ struct nftnl_expr_fullcone *fullcone = nftnl_expr_data(e);
|
||||
+ struct nlattr *tb[NFTA_FULLCONE_MAX+1] = {};
|
||||
+
|
||||
+ if (mnl_attr_parse_nested(attr, nftnl_expr_fullcone_cb, tb) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ if (tb[NFTA_FULLCONE_FLAGS]) {
|
||||
+ fullcone->flags = be32toh(mnl_attr_get_u32(tb[NFTA_FULLCONE_FLAGS]));
|
||||
+ e->flags |= (1 << NFTNL_EXPR_FULLCONE_FLAGS);
|
||||
+ }
|
||||
+ if (tb[NFTA_FULLCONE_REG_PROTO_MIN]) {
|
||||
+ fullcone->sreg_proto_min =
|
||||
+ be32toh(mnl_attr_get_u32(tb[NFTA_FULLCONE_REG_PROTO_MIN]));
|
||||
+ e->flags |= (1 << NFTNL_EXPR_FULLCONE_REG_PROTO_MIN);
|
||||
+ }
|
||||
+ if (tb[NFTA_FULLCONE_REG_PROTO_MAX]) {
|
||||
+ fullcone->sreg_proto_max =
|
||||
+ be32toh(mnl_attr_get_u32(tb[NFTA_FULLCONE_REG_PROTO_MAX]));
|
||||
+ e->flags |= (1 << NFTNL_EXPR_FULLCONE_REG_PROTO_MAX);
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int nftnl_expr_fullcone_snprintf(char *buf, size_t remain,
|
||||
+ uint32_t flags, const struct nftnl_expr *e)
|
||||
+{
|
||||
+ struct nftnl_expr_fullcone *fullcone = nftnl_expr_data(e);
|
||||
+ int offset = 0, ret = 0;
|
||||
+
|
||||
+ if (e->flags & (1 << NFTNL_EXPR_FULLCONE_REG_PROTO_MIN)) {
|
||||
+ ret = snprintf(buf + offset, remain, "proto_min reg %u ",
|
||||
+ fullcone->sreg_proto_min);
|
||||
+ SNPRINTF_BUFFER_SIZE(ret, remain, offset);
|
||||
+ }
|
||||
+ if (e->flags & (1 << NFTNL_EXPR_FULLCONE_REG_PROTO_MAX)) {
|
||||
+ ret = snprintf(buf + offset, remain, "proto_max reg %u ",
|
||||
+ fullcone->sreg_proto_max);
|
||||
+ SNPRINTF_BUFFER_SIZE(ret, remain, offset);
|
||||
+ }
|
||||
+ if (e->flags & (1 << NFTNL_EXPR_FULLCONE_FLAGS)) {
|
||||
+ ret = snprintf(buf + offset, remain, "flags 0x%x ", fullcone->flags);
|
||||
+ SNPRINTF_BUFFER_SIZE(ret, remain, offset);
|
||||
+ }
|
||||
+
|
||||
+ return offset;
|
||||
+}
|
||||
+
|
||||
+struct expr_ops expr_ops_fullcone = {
|
||||
+ .name = "fullcone",
|
||||
+ .alloc_len = sizeof(struct nftnl_expr_fullcone),
|
||||
+ .max_attr = NFTA_FULLCONE_MAX,
|
||||
+ .set = nftnl_expr_fullcone_set,
|
||||
+ .get = nftnl_expr_fullcone_get,
|
||||
+ .parse = nftnl_expr_fullcone_parse,
|
||||
+ .build = nftnl_expr_fullcone_build,
|
||||
+ .output = nftnl_expr_fullcone_snprintf,
|
||||
+};
|
||||
+
|
||||
--- a/src/expr_ops.c
|
||||
+++ b/src/expr_ops.c
|
||||
@@ -19,6 +19,7 @@ extern struct expr_ops expr_ops_limit;
|
||||
extern struct expr_ops expr_ops_log;
|
||||
extern struct expr_ops expr_ops_lookup;
|
||||
extern struct expr_ops expr_ops_masq;
|
||||
+extern struct expr_ops expr_ops_fullcone;
|
||||
extern struct expr_ops expr_ops_match;
|
||||
extern struct expr_ops expr_ops_meta;
|
||||
extern struct expr_ops expr_ops_ng;
|
||||
@@ -63,6 +64,7 @@ static struct expr_ops *expr_ops[] = {
|
||||
&expr_ops_log,
|
||||
&expr_ops_lookup,
|
||||
&expr_ops_masq,
|
||||
+ &expr_ops_fullcone,
|
||||
&expr_ops_match,
|
||||
&expr_ops_meta,
|
||||
&expr_ops_ng,
|
|
@ -1,11 +0,0 @@
|
|||
--- a/CMakeLists.txt 2024-10-08 08:04:55.220966217 +0200
|
||||
+++ b/CMakeLists.txt 2024-10-08 08:09:03.593429433 +0200
|
||||
@@ -350,7 +350,7 @@
|
||||
if(NOT ${CMAKE_C_COMPILER} MATCHES "clang*")
|
||||
set(C_ADDITIONAL_FLAGS "${C_ADDITIONAL_FLAGS} /utf-8")
|
||||
endif(NOT ${CMAKE_C_COMPILER} MATCHES "clang*")
|
||||
-else(MSVC)
|
||||
+elseif(FALSE)
|
||||
#
|
||||
# For checking if a compiler flag works, failing if it doesn't,
|
||||
# and adding it otherwise.
|
|
@ -1,34 +0,0 @@
|
|||
From e10fccfeb45e49cbad3a1d05f3029504b742f514 Mon Sep 17 00:00:00 2001
|
||||
From: Mieczyslaw Nalewaj <namiltd@yahoo.com>
|
||||
Date: Wed, 20 Nov 2024 18:16:08 +0100
|
||||
Subject: [PATCH] firewall4: fix reading kernel version
|
||||
|
||||
Fix reading kernel version for kernels with revision 0 e.g. 6.12
|
||||
Repair incorrect shift of the revision number causing incorrect value for > 256.
|
||||
|
||||
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
|
||||
---
|
||||
.../firewall4/patches/000-kernel-version.patch | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
create mode 100644 package/network/config/firewall4/patches/000-kernel-version.patch
|
||||
|
||||
diff --git a/package/network/config/firewall4/patches/000-kernel-version.patch b/package/network/config/firewall4/patches/000-kernel-version.patch
|
||||
new file mode 100644
|
||||
index 00000000000000..e997f693f0bc2e
|
||||
--- /dev/null
|
||||
+++ b/package/network/config/firewall4/patches/000-kernel-version.patch
|
||||
@@ -0,0 +1,14 @@
|
||||
+--- a/root/usr/share/ucode/fw4.uc
|
||||
++++ b/root/usr/share/ucode/fw4.uc
|
||||
+@@ -496,9 +496,9 @@ return {
|
||||
+ v = 0;
|
||||
+
|
||||
+ if (fd) {
|
||||
+- let m = match(fd.read("line"), /^Linux version ([0-9]+)\.([0-9]+)\.([0-9]+)/);
|
||||
++ let m = match(fd.read("line"), /^Linux version ([0-9]+)\.([0-9]+)(\.([0-9]+))?/);
|
||||
+
|
||||
+- v = m ? (+m[1] << 24) | (+m[2] << 16) | (+m[3] << 8) : 0;
|
||||
++ v = m ? (+m[1] << 24) | (+m[2] << 16) | (+m[4]) : 0;
|
||||
+ fd.close();
|
||||
+ }
|
||||
+
|
|
@ -1,22 +0,0 @@
|
|||
--- a/root/usr/share/firewall4/templates/ruleset.uc 2023-07-28 18:55:05.492297782 +0200
|
||||
+++ b/root/usr/share/firewall4/templates/ruleset.uc 2023-07-28 18:58:52.300598623 +0200
|
||||
@@ -218,9 +218,7 @@
|
||||
{% for (let rule in fw4.rules(`input_${zone.name}`)): %}
|
||||
{%+ include("rule.uc", { fw4, rule }) %}
|
||||
{% endfor %}
|
||||
-{% if (zone.dflags.dnat): %}
|
||||
ct status dnat accept comment "!fw4: Accept port redirections"
|
||||
-{% endif %}
|
||||
{% fw4.includes('chain-append', `input_${zone.name}`) %}
|
||||
jump {{ zone.input }}_from_{{ zone.name }}
|
||||
}
|
||||
@@ -239,9 +237,7 @@
|
||||
{% for (let rule in fw4.rules(`forward_${zone.name}`)): %}
|
||||
{%+ include("rule.uc", { fw4, rule }) %}
|
||||
{% endfor %}
|
||||
-{% if (zone.dflags.dnat): %}
|
||||
ct status dnat accept comment "!fw4: Accept port forwards"
|
||||
-{% endif %}
|
||||
{% fw4.includes('chain-append', `forward_${zone.name}`) %}
|
||||
jump {{ zone.forward }}_to_{{ zone.name }}
|
||||
{% if (fw4.forward_policy() != "accept" && (zone.log & 1)): %}
|
|
@ -1,248 +0,0 @@
|
|||
From d4081c498ddca184578903fe5199d390bbc0707b Mon Sep 17 00:00:00 2001
|
||||
From: Syrone Wong <wong.syrone@gmail.com>
|
||||
Date: Sat, 9 Apr 2022 13:24:19 +0800
|
||||
Subject: [PATCH] firewall4: add fullcone support
|
||||
|
||||
fullcone is drop-in replacement of masq for non-udp traffic
|
||||
|
||||
add runtime fullcone rule check, disable it globally if fullcone expr is
|
||||
invalid
|
||||
|
||||
defaults.fullcone is the global switch, while zone.fullcone4 and
|
||||
zone.fullcone6 are switches for IPv4 and IPv6 respectively, most
|
||||
IPv6 traffic do NOT need this FullCone NAT functionality.
|
||||
---
|
||||
root/etc/config/firewall | 3 +
|
||||
root/usr/share/firewall4/templates/ruleset.uc | 16 +++-
|
||||
.../firewall4/templates/zone-fullcone.uc | 4 +
|
||||
root/usr/share/ucode/fw4.uc | 76 ++++++++++++++++++-
|
||||
4 files changed, 96 insertions(+), 3 deletions(-)
|
||||
create mode 100644 root/usr/share/firewall4/templates/zone-fullcone.uc
|
||||
|
||||
diff --git a/root/etc/config/firewall b/root/etc/config/firewall
|
||||
index b9a4647..7187723 100644
|
||||
--- a/root/etc/config/firewall
|
||||
+++ b/root/etc/config/firewall
|
||||
@@ -5,6 +5,7 @@ config defaults
|
||||
option forward REJECT
|
||||
# Uncomment this line to disable ipv6 rules
|
||||
# option disable_ipv6 1
|
||||
+ option fullcone '0'
|
||||
|
||||
config zone
|
||||
option name lan
|
||||
@@ -20,6 +21,8 @@ config zone
|
||||
option input REJECT
|
||||
option output ACCEPT
|
||||
option forward REJECT
|
||||
+ option fullcone4 '0'
|
||||
+ option fullcone6 '0'
|
||||
option masq 1
|
||||
option mtu_fix 1
|
||||
|
||||
diff --git a/root/usr/share/firewall4/templates/ruleset.uc b/root/usr/share/firewall4/templates/ruleset.uc
|
||||
index eaa1f04..e29eae6 100644
|
||||
--- a/root/usr/share/firewall4/templates/ruleset.uc
|
||||
+++ b/root/usr/share/firewall4/templates/ruleset.uc
|
||||
@@ -310,6 +310,12 @@ table inet fw4 {
|
||||
{% for (let redirect in fw4.redirects(`dstnat_${zone.name}`)): %}
|
||||
{%+ include("redirect.uc", { fw4, redirect }) %}
|
||||
{% endfor %}
|
||||
+{% if (zone.fullcone4): %}
|
||||
+ {%+ include("zone-fullcone.uc", { fw4, zone, family: 4, direction: "dstnat" }) %}
|
||||
+{% endif %}
|
||||
+{% if (zone.fullcone6): %}
|
||||
+ {%+ include("zone-fullcone.uc", { fw4, zone, family: 6, direction: "dstnat" }) %}
|
||||
+{% endif %}
|
||||
{% fw4.includes('chain-append', `dstnat_${zone.name}`) %}
|
||||
}
|
||||
|
||||
@@ -320,20 +326,26 @@ table inet fw4 {
|
||||
{% for (let redirect in fw4.redirects(`srcnat_${zone.name}`)): %}
|
||||
{%+ include("redirect.uc", { fw4, redirect }) %}
|
||||
{% endfor %}
|
||||
-{% if (zone.masq): %}
|
||||
+{% if (zone.masq && !zone.fullcone4): %}
|
||||
{% for (let saddrs in zone.masq4_src_subnets): %}
|
||||
{% for (let daddrs in zone.masq4_dest_subnets): %}
|
||||
{%+ include("zone-masq.uc", { fw4, zone, family: 4, saddrs, daddrs }) %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
-{% if (zone.masq6): %}
|
||||
+{% if (zone.masq6 && !zone.fullcone6): %}
|
||||
{% for (let saddrs in zone.masq6_src_subnets): %}
|
||||
{% for (let daddrs in zone.masq6_dest_subnets): %}
|
||||
{%+ include("zone-masq.uc", { fw4, zone, family: 6, saddrs, daddrs }) %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
+{% if (zone.fullcone4): %}
|
||||
+ {%+ include("zone-fullcone.uc", { fw4, zone, family: 4, direction: "srcnat" }) %}
|
||||
+{% endif %}
|
||||
+{% if (zone.fullcone6): %}
|
||||
+ {%+ include("zone-fullcone.uc", { fw4, zone, family: 6, direction: "srcnat" }) %}
|
||||
+{% endif %}
|
||||
{% fw4.includes('chain-append', `srcnat_${zone.name}`) %}
|
||||
}
|
||||
|
||||
diff --git a/root/usr/share/firewall4/templates/zone-fullcone.uc b/root/usr/share/firewall4/templates/zone-fullcone.uc
|
||||
new file mode 100644
|
||||
index 0000000..77d9806
|
||||
--- /dev/null
|
||||
+++ b/root/usr/share/firewall4/templates/zone-fullcone.uc
|
||||
@@ -0,0 +1,4 @@
|
||||
+{# /usr/share/firewall4/templates/zone-fullcone.uc #}
|
||||
+ meta nfproto {{ fw4.nfproto(family) }} fullcone comment "!fw4: Handle {{
|
||||
+ zone.name
|
||||
+}} {{ fw4.nfproto(family, true) }} fullcone NAT {{ direction }} traffic"
|
||||
diff --git a/root/usr/share/ucode/fw4.uc b/root/usr/share/ucode/fw4.uc
|
||||
index 1b4764c..c5716da 100644
|
||||
--- a/root/usr/share/ucode/fw4.uc
|
||||
+++ b/root/usr/share/ucode/fw4.uc
|
||||
@@ -1,3 +1,5 @@
|
||||
+// /usr/share/ucode/fw4.uc
|
||||
+
|
||||
const fs = require("fs");
|
||||
const uci = require("uci");
|
||||
const ubus = require("ubus");
|
||||
@@ -428,6 +430,25 @@ function nft_try_hw_offload(devices) {
|
||||
return (rc == 0);
|
||||
}
|
||||
|
||||
+function nft_try_fullcone() {
|
||||
+ let nft_test =
|
||||
+ 'add table inet fw4-fullcone-test; ' +
|
||||
+ 'add chain inet fw4-fullcone-test dstnat { ' +
|
||||
+ 'type nat hook prerouting priority -100; policy accept; ' +
|
||||
+ 'fullcone; ' +
|
||||
+ '}; ' +
|
||||
+ 'add chain inet fw4-fullcone-test srcnat { ' +
|
||||
+ 'type nat hook postrouting priority -100; policy accept; ' +
|
||||
+ 'fullcone; ' +
|
||||
+ '}; ';
|
||||
+ let cmd = sprintf("/usr/sbin/nft -c '%s' 2>/dev/null", replace(nft_test, "'", "'\\''"));
|
||||
+ let ok = system(cmd) == 0;
|
||||
+ //if (!ok) {
|
||||
+ // warn("nft_try_fullcone: cmd "+ cmd + "\n");
|
||||
+ //}
|
||||
+ return ok;
|
||||
+}
|
||||
+
|
||||
|
||||
return {
|
||||
read_kernel_version: function() {
|
||||
@@ -765,6 +786,18 @@ return {
|
||||
warn(`[!] ${msg}\n`);
|
||||
},
|
||||
|
||||
+ myinfo: function(fmt, ...args) {
|
||||
+ if (getenv("QUIET"))
|
||||
+ return;
|
||||
+
|
||||
+ let msg = sprintf(fmt, ...args);
|
||||
+
|
||||
+ if (getenv("TTY"))
|
||||
+ warn(`\033[32m${msg}\033[m\n`);
|
||||
+ else
|
||||
+ warn(`[I] ${msg}\n`);
|
||||
+ },
|
||||
+
|
||||
get: function(sid, opt) {
|
||||
return this.cursor.get("firewall", sid, opt);
|
||||
},
|
||||
@@ -946,6 +979,21 @@ return {
|
||||
}
|
||||
},
|
||||
|
||||
+ myinfo_section: function(s, msg) {
|
||||
+ if (s[".name"]) {
|
||||
+ if (s.name)
|
||||
+ this.myinfo("Section %s (%s) %s", this.section_id(s[".name"]), s.name, msg);
|
||||
+ else
|
||||
+ this.myinfo("Section %s %s", this.section_id(s[".name"]), msg);
|
||||
+ }
|
||||
+ else {
|
||||
+ if (s.name)
|
||||
+ this.myinfo("ubus %s (%s) %s", s.type || "rule", s.name, msg);
|
||||
+ else
|
||||
+ this.myinfo("ubus %s %s", s.type || "rule", msg);
|
||||
+ }
|
||||
+ },
|
||||
+
|
||||
parse_policy: function(val) {
|
||||
return this.parse_enum(val, [
|
||||
"accept",
|
||||
@@ -1385,6 +1433,7 @@ return {
|
||||
"dnat",
|
||||
"snat",
|
||||
"masquerade",
|
||||
+ "fullcone",
|
||||
"accept",
|
||||
"reject",
|
||||
"drop"
|
||||
@@ -1852,6 +1901,7 @@ return {
|
||||
}
|
||||
|
||||
let defs = this.parse_options(data, {
|
||||
+ fullcone: [ "bool", "0" ],
|
||||
input: [ "policy", "drop" ],
|
||||
output: [ "policy", "drop" ],
|
||||
forward: [ "policy", "drop" ],
|
||||
@@ -1884,6 +1934,11 @@ return {
|
||||
|
||||
delete defs.syn_flood;
|
||||
|
||||
+ if (!nft_try_fullcone()) {
|
||||
+ delete defs.fullcone;
|
||||
+ //warn("nft_try_fullcone failed, disable fullcone globally\n");
|
||||
+ }
|
||||
+
|
||||
this.state.defaults = defs;
|
||||
},
|
||||
|
||||
@@ -1908,6 +1963,8 @@ return {
|
||||
masq_dest: [ "network", null, PARSE_LIST ],
|
||||
|
||||
masq6: [ "bool" ],
|
||||
+ fullcone4: [ "bool", "0" ],
|
||||
+ fullcone6: [ "bool", "0" ],
|
||||
|
||||
extra: [ "string", null, UNSUPPORTED ],
|
||||
extra_src: [ "string", null, UNSUPPORTED ],
|
||||
@@ -1940,6 +1997,18 @@ return {
|
||||
}
|
||||
}
|
||||
|
||||
+ if (this.state.defaults && !this.state.defaults.fullcone) {
|
||||
+ //this.warn_section(data, "fullcone in defaults not enabled, ignore zone fullcone settings");
|
||||
+ zone.fullcone4 = false;
|
||||
+ zone.fullcone6 = false;
|
||||
+ }
|
||||
+ if (zone.fullcone4) {
|
||||
+ this.myinfo_section(data, "IPv4 fullcone enabled for zone '" + zone.name + "'");
|
||||
+ }
|
||||
+ if (zone.fullcone6) {
|
||||
+ this.myinfo_section(data, "IPv6 fullcone enabled for zone '" + zone.name + "'");
|
||||
+ }
|
||||
+
|
||||
if (zone.mtu_fix && this.kernel < 0x040a0000) {
|
||||
this.warn_section(data, "option 'mtu_fix' requires kernel 4.10 or later");
|
||||
return;
|
||||
@@ -2110,10 +2179,15 @@ return {
|
||||
zone.related_subnets = related_subnets;
|
||||
zone.related_physdevs = related_physdevs;
|
||||
|
||||
+ if (zone.fullcone4 || zone.fullcone6) {
|
||||
+ zone.dflags.snat = true;
|
||||
+ zone.dflags.dnat = true;
|
||||
+ }
|
||||
+
|
||||
if (zone.masq || zone.masq6)
|
||||
zone.dflags.snat = true;
|
||||
|
||||
- if ((zone.auto_helper && !(zone.masq || zone.masq6)) || length(zone.helper)) {
|
||||
+ if ((zone.auto_helper && !(zone.masq || zone.masq6 || zone.fullcone4 || zone.fullcone6)) || length(zone.helper)) {
|
||||
zone.dflags.helper = true;
|
||||
|
||||
for (let helper in (length(zone.helper) ? zone.helper : this.state.helpers)) {
|
|
@ -1,17 +0,0 @@
|
|||
--- a/root/usr/share/firewall4/templates/ruleset.uc.old
|
||||
+++ b/root/usr/share/firewall4/templates/ruleset.uc
|
||||
@@ -181,7 +181,14 @@
|
||||
|
||||
chain prerouting {
|
||||
type filter hook prerouting priority filter; policy accept;
|
||||
+{% for (let rule in fw4.rules("forward")): %}
|
||||
+ {%+ include("rule.uc", { fw4, zone: (rule.src?.zone?.log_limit ? rule.src.zone : rule.dest?.zone), rule }) %}
|
||||
+{% endfor %}
|
||||
+
|
||||
{% for (let zone in fw4.zones()): %}
|
||||
+{% for (let rule in fw4.rules(`forward_${zone.name}`)): %}
|
||||
+ {%+ include("rule.uc", { fw4, zone, rule }) %}
|
||||
+{% endfor %}
|
||||
{% if (zone.dflags.helper): %}
|
||||
{% for (let rule in zone.match_rules): %}
|
||||
{% let devices_pos = fw4.filter_loopback_devs(rule.devices_pos, false); %}
|
File diff suppressed because it is too large
Load diff
|
@ -1,85 +0,0 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2015 OpenWrt.org
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=nftables
|
||||
PKG_VERSION:=1.0.7
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files
|
||||
PKG_HASH:=c12ac941fff9adaedf17367d5ce213789b98a0d314277bc22b3d71e10891f412
|
||||
|
||||
PKG_MAINTAINER:=
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_INSTALL:=1
|
||||
|
||||
PKG_BUILD_FLAGS:=lto
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
DISABLE_NLS:=
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--disable-debug \
|
||||
--disable-man-doc \
|
||||
--with-mini-gmp \
|
||||
--without-cli \
|
||||
--disable-python
|
||||
|
||||
define Package/nftables/Default
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Firewall
|
||||
TITLE:=nftables userspace utility
|
||||
DEPENDS:=+kmod-nft-core +libnftnl
|
||||
URL:=http://netfilter.org/projects/nftables/
|
||||
PROVIDES:=nftables
|
||||
endef
|
||||
|
||||
define Package/nftables-nojson
|
||||
$(Package/nftables/Default)
|
||||
TITLE+= no JSON support
|
||||
VARIANT:=nojson
|
||||
DEFAULT_VARIANT:=1
|
||||
CONFLICTS:=nftables-json
|
||||
endef
|
||||
|
||||
define Package/nftables-json
|
||||
$(Package/nftables/Default)
|
||||
TITLE+= with JSON support
|
||||
VARIANT:=json
|
||||
DEPENDS+=+jansson
|
||||
endef
|
||||
|
||||
ifeq ($(BUILD_VARIANT),json)
|
||||
CONFIGURE_ARGS += --with-json
|
||||
endif
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/lib $(1)/usr/include
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/nftables $(1)/usr/include/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnftables.pc \
|
||||
$(1)/usr/lib/pkgconfig/
|
||||
endef
|
||||
|
||||
define Package/nftables/install/Default
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/nft $(1)/usr/sbin/
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
Package/nftables-nojson/install = $(Package/nftables/install/Default)
|
||||
Package/nftables-json/install = $(Package/nftables/install/Default)
|
||||
|
||||
$(eval $(call BuildPackage,nftables-nojson))
|
||||
$(eval $(call BuildPackage,nftables-json))
|
|
@ -1,223 +0,0 @@
|
|||
From 58c89e8768711a959fdc6e953df3ea2254ff93c1 Mon Sep 17 00:00:00 2001
|
||||
From: Syrone Wong <wong.syrone@gmail.com>
|
||||
Date: Sat, 9 Apr 2022 00:38:51 +0800
|
||||
Subject: [PATCH] nftables: add fullcone expression support
|
||||
|
||||
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
|
||||
---
|
||||
include/linux/netfilter/nf_tables.h | 16 ++++++++++
|
||||
include/statement.h | 1 +
|
||||
src/netlink_delinearize.c | 48 +++++++++++++++++++++++++++++
|
||||
src/netlink_linearize.c | 7 +++++
|
||||
src/parser_bison.y | 28 +++++++++++++++--
|
||||
src/scanner.l | 1 +
|
||||
src/statement.c | 1 +
|
||||
7 files changed, 100 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/include/linux/netfilter/nf_tables.h b/include/linux/netfilter/nf_tables.h
|
||||
index 75df968..beab9d8 100644
|
||||
--- a/include/linux/netfilter/nf_tables.h
|
||||
+++ b/include/linux/netfilter/nf_tables.h
|
||||
@@ -1409,6 +1409,22 @@ enum nft_masq_attributes {
|
||||
};
|
||||
#define NFTA_MASQ_MAX (__NFTA_MASQ_MAX - 1)
|
||||
|
||||
+/**
|
||||
+ * enum nft_fullcone_attributes - nf_tables fullcone expression attributes
|
||||
+ *
|
||||
+ * @NFTA_FULLCONE_FLAGS: NAT flags (see NF_NAT_RANGE_* in linux/netfilter/nf_nat.h) (NLA_U32)
|
||||
+ * @NFTA_FULLCONE_REG_PROTO_MIN: source register of proto range start (NLA_U32: nft_registers)
|
||||
+ * @NFTA_FULLCONE_REG_PROTO_MAX: source register of proto range end (NLA_U32: nft_registers)
|
||||
+ */
|
||||
+enum nft_fullcone_attributes {
|
||||
+ NFTA_FULLCONE_UNSPEC,
|
||||
+ NFTA_FULLCONE_FLAGS,
|
||||
+ NFTA_FULLCONE_REG_PROTO_MIN,
|
||||
+ NFTA_FULLCONE_REG_PROTO_MAX,
|
||||
+ __NFTA_FULLCONE_MAX
|
||||
+};
|
||||
+#define NFTA_FULLCONE_MAX (__NFTA_FULLCONE_MAX - 1)
|
||||
+
|
||||
/**
|
||||
* enum nft_redir_attributes - nf_tables redirect expression netlink attributes
|
||||
*
|
||||
diff --git a/include/statement.h b/include/statement.h
|
||||
index 2a2d300..cbd48dd 100644
|
||||
--- a/include/statement.h
|
||||
+++ b/include/statement.h
|
||||
@@ -122,6 +122,7 @@ enum nft_nat_etypes {
|
||||
__NFT_NAT_SNAT = NFT_NAT_SNAT,
|
||||
__NFT_NAT_DNAT = NFT_NAT_DNAT,
|
||||
NFT_NAT_MASQ,
|
||||
+ NFT_NAT_FULLCONE,
|
||||
NFT_NAT_REDIR,
|
||||
};
|
||||
|
||||
diff --git a/src/netlink_delinearize.c b/src/netlink_delinearize.c
|
||||
index 068c3bb..8513113 100644
|
||||
--- a/src/netlink_delinearize.c
|
||||
+++ b/src/netlink_delinearize.c
|
||||
@@ -1369,6 +1369,53 @@ static void netlink_parse_masq(struct netlink_parse_ctx *ctx,
|
||||
stmt_free(stmt);
|
||||
}
|
||||
|
||||
+static void netlink_parse_fullcone(struct netlink_parse_ctx *ctx,
|
||||
+ const struct location *loc,
|
||||
+ const struct nftnl_expr *nle)
|
||||
+{
|
||||
+ enum nft_registers reg1, reg2;
|
||||
+ struct expr *proto;
|
||||
+ struct stmt *stmt;
|
||||
+ uint32_t flags = 0;
|
||||
+
|
||||
+ if (nftnl_expr_is_set(nle, NFTNL_EXPR_FULLCONE_FLAGS))
|
||||
+ flags = nftnl_expr_get_u32(nle, NFTNL_EXPR_FULLCONE_FLAGS);
|
||||
+
|
||||
+ stmt = nat_stmt_alloc(loc, NFT_NAT_FULLCONE);
|
||||
+ stmt->nat.flags = flags;
|
||||
+
|
||||
+ reg1 = netlink_parse_register(nle, NFTNL_EXPR_FULLCONE_REG_PROTO_MIN);
|
||||
+ if (reg1) {
|
||||
+ proto = netlink_get_register(ctx, loc, reg1);
|
||||
+ if (proto == NULL) {
|
||||
+ netlink_error(ctx, loc,
|
||||
+ "fullcone statement has no proto expression");
|
||||
+ goto out_err;
|
||||
+ }
|
||||
+ expr_set_type(proto, &inet_service_type, BYTEORDER_BIG_ENDIAN);
|
||||
+ stmt->nat.proto = proto;
|
||||
+ }
|
||||
+
|
||||
+ reg2 = netlink_parse_register(nle, NFTNL_EXPR_FULLCONE_REG_PROTO_MAX);
|
||||
+ if (reg2 && reg2 != reg1) {
|
||||
+ proto = netlink_get_register(ctx, loc, reg2);
|
||||
+ if (proto == NULL) {
|
||||
+ netlink_error(ctx, loc,
|
||||
+ "fullcone statement has no proto expression");
|
||||
+ goto out_err;
|
||||
+ }
|
||||
+ expr_set_type(proto, &inet_service_type, BYTEORDER_BIG_ENDIAN);
|
||||
+ if (stmt->nat.proto != NULL)
|
||||
+ proto = range_expr_alloc(loc, stmt->nat.proto, proto);
|
||||
+ stmt->nat.proto = proto;
|
||||
+ }
|
||||
+
|
||||
+ ctx->stmt = stmt;
|
||||
+ return;
|
||||
+out_err:
|
||||
+ stmt_free(stmt);
|
||||
+}
|
||||
+
|
||||
static void netlink_parse_redir(struct netlink_parse_ctx *ctx,
|
||||
const struct location *loc,
|
||||
const struct nftnl_expr *nle)
|
||||
@@ -1787,6 +1834,7 @@ static const struct expr_handler netlink_parsers[] = {
|
||||
{ .name = "tproxy", .parse = netlink_parse_tproxy },
|
||||
{ .name = "notrack", .parse = netlink_parse_notrack },
|
||||
{ .name = "masq", .parse = netlink_parse_masq },
|
||||
+ { .name = "fullcone", .parse = netlink_parse_fullcone },
|
||||
{ .name = "redir", .parse = netlink_parse_redir },
|
||||
{ .name = "dup", .parse = netlink_parse_dup },
|
||||
{ .name = "queue", .parse = netlink_parse_queue },
|
||||
diff --git a/src/netlink_linearize.c b/src/netlink_linearize.c
|
||||
index c8bbcb7..505eafa 100644
|
||||
--- a/src/netlink_linearize.c
|
||||
+++ b/src/netlink_linearize.c
|
||||
@@ -1140,6 +1140,13 @@ static void netlink_gen_nat_stmt(struct netlink_linearize_ctx *ctx,
|
||||
nftnl_reg_pmin = NFTNL_EXPR_MASQ_REG_PROTO_MIN;
|
||||
nftnl_reg_pmax = NFTNL_EXPR_MASQ_REG_PROTO_MAX;
|
||||
break;
|
||||
+ case NFT_NAT_FULLCONE:
|
||||
+ nle = alloc_nft_expr("fullcone");
|
||||
+
|
||||
+ nftnl_flag_attr = NFTNL_EXPR_FULLCONE_FLAGS;
|
||||
+ nftnl_reg_pmin = NFTNL_EXPR_FULLCONE_REG_PROTO_MIN;
|
||||
+ nftnl_reg_pmax = NFTNL_EXPR_FULLCONE_REG_PROTO_MAX;
|
||||
+ break;
|
||||
case NFT_NAT_REDIR:
|
||||
nle = alloc_nft_expr("redir");
|
||||
|
||||
diff --git a/src/parser_bison.y b/src/parser_bison.y
|
||||
index ca5c488..ec9fc9b 100644
|
||||
--- a/src/parser_bison.y
|
||||
+++ b/src/parser_bison.y
|
||||
@@ -571,6 +571,7 @@ int nft_lex(void *, void *, void *);
|
||||
%token SNAT "snat"
|
||||
%token DNAT "dnat"
|
||||
%token MASQUERADE "masquerade"
|
||||
+%token FULLCONE "fullcone"
|
||||
%token REDIRECT "redirect"
|
||||
%token RANDOM "random"
|
||||
%token FULLY_RANDOM "fully-random"
|
||||
@@ -703,8 +704,8 @@ int nft_lex(void *, void *, void *);
|
||||
%type <val> limit_burst_pkts limit_burst_bytes limit_mode limit_bytes time_unit quota_mode
|
||||
%type <stmt> reject_stmt reject_stmt_alloc
|
||||
%destructor { stmt_free($$); } reject_stmt reject_stmt_alloc
|
||||
-%type <stmt> nat_stmt nat_stmt_alloc masq_stmt masq_stmt_alloc redir_stmt redir_stmt_alloc
|
||||
-%destructor { stmt_free($$); } nat_stmt nat_stmt_alloc masq_stmt masq_stmt_alloc redir_stmt redir_stmt_alloc
|
||||
+%type <stmt> nat_stmt nat_stmt_alloc masq_stmt masq_stmt_alloc fullcone_stmt fullcone_stmt_alloc redir_stmt redir_stmt_alloc
|
||||
+%destructor { stmt_free($$); } nat_stmt nat_stmt_alloc masq_stmt masq_stmt_alloc fullcone_stmt fullcone_stmt_alloc redir_stmt redir_stmt_alloc
|
||||
%type <val> nf_nat_flags nf_nat_flag offset_opt
|
||||
%type <stmt> tproxy_stmt
|
||||
%destructor { stmt_free($$); } tproxy_stmt
|
||||
@@ -2853,6 +2854,7 @@ stmt : verdict_stmt
|
||||
| queue_stmt
|
||||
| ct_stmt
|
||||
| masq_stmt close_scope_nat
|
||||
+ | fullcone_stmt close_scope_nat
|
||||
| redir_stmt close_scope_nat
|
||||
| dup_stmt close_scope_dup
|
||||
| fwd_stmt close_scope_fwd
|
||||
@@ -3753,6 +3755,28 @@ masq_stmt_args : TO COLON stmt_expr
|
||||
}
|
||||
;
|
||||
|
||||
+fullcone_stmt : fullcone_stmt_alloc fullcone_stmt_args
|
||||
+ | fullcone_stmt_alloc
|
||||
+ ;
|
||||
+
|
||||
+fullcone_stmt_alloc : FULLCONE { $$ = nat_stmt_alloc(&@$, NFT_NAT_FULLCONE); }
|
||||
+ ;
|
||||
+
|
||||
+fullcone_stmt_args : TO COLON stmt_expr
|
||||
+ {
|
||||
+ $<stmt>0->nat.proto = $3;
|
||||
+ }
|
||||
+ | TO COLON stmt_expr nf_nat_flags
|
||||
+ {
|
||||
+ $<stmt>0->nat.proto = $3;
|
||||
+ $<stmt>0->nat.flags = $4;
|
||||
+ }
|
||||
+ | nf_nat_flags
|
||||
+ {
|
||||
+ $<stmt>0->nat.flags = $1;
|
||||
+ }
|
||||
+ ;
|
||||
+
|
||||
redir_stmt : redir_stmt_alloc redir_stmt_arg
|
||||
| redir_stmt_alloc
|
||||
;
|
||||
diff --git a/src/scanner.l b/src/scanner.l
|
||||
index 2154281..c389860 100644
|
||||
--- a/src/scanner.l
|
||||
+++ b/src/scanner.l
|
||||
@@ -453,6 +453,7 @@ addrstring ({macaddr}|{ip4addr}|{ip6addr})
|
||||
"snat" { scanner_push_start_cond(yyscanner, SCANSTATE_STMT_NAT); return SNAT; }
|
||||
"dnat" { scanner_push_start_cond(yyscanner, SCANSTATE_STMT_NAT); return DNAT; }
|
||||
"masquerade" { scanner_push_start_cond(yyscanner, SCANSTATE_STMT_NAT); return MASQUERADE; }
|
||||
+"fullcone" { scanner_push_start_cond(yyscanner, SCANSTATE_STMT_NAT); return FULLCONE; }
|
||||
"redirect" { scanner_push_start_cond(yyscanner, SCANSTATE_STMT_NAT); return REDIRECT; }
|
||||
"random" { return RANDOM; }
|
||||
<SCANSTATE_STMT_NAT>{
|
||||
diff --git a/src/statement.c b/src/statement.c
|
||||
index 30caf9c..f4866c2 100644
|
||||
--- a/src/statement.c
|
||||
+++ b/src/statement.c
|
||||
@@ -650,6 +650,7 @@ const char *nat_etype2str(enum nft_nat_etypes type)
|
||||
[NFT_NAT_SNAT] = "snat",
|
||||
[NFT_NAT_DNAT] = "dnat",
|
||||
[NFT_NAT_MASQ] = "masquerade",
|
||||
+ [NFT_NAT_FULLCONE] = "fullcone",
|
||||
[NFT_NAT_REDIR] = "redirect",
|
||||
};
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
--- a/meson.build 2024-12-06 09:22:04.231554103 +0100
|
||||
+++ b/meson.build 2024-12-06 09:22:10.239461416 +0100
|
||||
@@ -45,4 +45,3 @@
|
||||
if(lua_dep.found())
|
||||
subdir('lua')
|
||||
endif
|
||||
-subdir('test')
|
|
@ -1,379 +0,0 @@
|
|||
# CONFIG_AIO is not set
|
||||
CONFIG_ALIGNMENT_TRAP=y
|
||||
# CONFIG_AMD_QDMA is not set
|
||||
CONFIG_APERTURE_HELPERS=y
|
||||
CONFIG_ARCH_32BIT_OFF_T=y
|
||||
CONFIG_ARCH_BCM=y
|
||||
CONFIG_ARCH_BCM2835=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
|
||||
CONFIG_ARCH_MMAP_RND_BITS=16
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MAX=16
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MIN=8
|
||||
CONFIG_ARCH_MULTIPLATFORM=y
|
||||
CONFIG_ARCH_MULTI_V6=y
|
||||
CONFIG_ARCH_MULTI_V6_V7=y
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
|
||||
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARM_CPU_SUSPEND=y
|
||||
# CONFIG_ARM_DEBUG_WX is not set
|
||||
CONFIG_ARM_ERRATA_411920=y
|
||||
CONFIG_ARM_HAS_GROUP_RELOCS=y
|
||||
CONFIG_ARM_L1_CACHE_SHIFT=5
|
||||
# CONFIG_ARM_MHU_V2 is not set
|
||||
CONFIG_ARM_PAN=y
|
||||
CONFIG_ARM_PATCH_PHYS_VIRT=y
|
||||
CONFIG_ARM_RASPBERRYPI_CPUFREQ=y
|
||||
CONFIG_ARM_THUMB=y
|
||||
CONFIG_ARM_TIMER_SP804=y
|
||||
CONFIG_ARM_UNWIND=y
|
||||
CONFIG_AUTO_ZRELADDR=y
|
||||
# CONFIG_BATTERY_MAX1720X is not set
|
||||
CONFIG_BCM2708_VCMEM=y
|
||||
# CONFIG_BCM2711_THERMAL is not set
|
||||
CONFIG_BCM2835_FAST_MEMCPY=y
|
||||
CONFIG_BCM2835_MBOX=y
|
||||
CONFIG_BCM2835_POWER=y
|
||||
# CONFIG_BCM2835_SMI is not set
|
||||
CONFIG_BCM2835_THERMAL=y
|
||||
CONFIG_BCM2835_TIMER=y
|
||||
CONFIG_BCM2835_VCHIQ=y
|
||||
# CONFIG_BCM2835_VCHIQ_MMAL is not set
|
||||
CONFIG_BCM2835_WDT=y
|
||||
CONFIG_BCM_VCIO=y
|
||||
# CONFIG_BCM_VC_SM_CMA is not set
|
||||
CONFIG_BCM_VIDEOCORE=y
|
||||
CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
|
||||
# CONFIG_BLK_DEV_INITRD is not set
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_BLK_DEV_RAM_COUNT=16
|
||||
CONFIG_BLK_DEV_RAM_SIZE=4096
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_BLK_PM=y
|
||||
CONFIG_BRCMSTB_L2_IRQ=y
|
||||
CONFIG_BRCM_CHAR_DRIVERS=y
|
||||
CONFIG_BUFFER_HEAD=y
|
||||
# CONFIG_CACHE_L2X0 is not set
|
||||
CONFIG_CC_HAVE_STACKPROTECTOR_TLS=y
|
||||
CONFIG_CLKSRC_MMIO=y
|
||||
CONFIG_CLK_BCM2711_DVP=y
|
||||
CONFIG_CLK_BCM2835=y
|
||||
CONFIG_CLK_RASPBERRYPI=y
|
||||
CONFIG_CMA=y
|
||||
CONFIG_CMA_ALIGNMENT=8
|
||||
CONFIG_CMA_AREAS=7
|
||||
# CONFIG_CMA_DEBUGFS is not set
|
||||
CONFIG_CMA_SIZE_MBYTES=5
|
||||
# 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_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_32v6=y
|
||||
CONFIG_CPU_32v6K=y
|
||||
CONFIG_CPU_ABRT_EV6=y
|
||||
# CONFIG_CPU_BIG_ENDIAN is not set
|
||||
CONFIG_CPU_CACHE_V6=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_ONDEMAND=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_IDLE=y
|
||||
CONFIG_CPU_IDLE_GOV_LADDER=y
|
||||
CONFIG_CPU_IDLE_GOV_MENU=y
|
||||
CONFIG_CPU_LITTLE_ENDIAN=y
|
||||
CONFIG_CPU_PABRT_V6=y
|
||||
CONFIG_CPU_PM=y
|
||||
CONFIG_CPU_THUMB_CAPABLE=y
|
||||
CONFIG_CPU_TLB_V6=y
|
||||
CONFIG_CPU_V6K=y
|
||||
CONFIG_CRC16=y
|
||||
CONFIG_CRYPTO_CRC32=y
|
||||
CONFIG_CRYPTO_CRC32C=y
|
||||
CONFIG_CURRENT_POINTER_IN_TPIDRURO=y
|
||||
CONFIG_DEBUG_BUGVERBOSE=y
|
||||
CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
|
||||
CONFIG_DMABUF_HEAPS=y
|
||||
CONFIG_DMABUF_HEAPS_CMA=y
|
||||
CONFIG_DMABUF_HEAPS_SYSTEM=y
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_DMA_BCM2708=y
|
||||
CONFIG_DMA_BCM2835=y
|
||||
CONFIG_DMA_CMA=y
|
||||
CONFIG_DMA_ENGINE=y
|
||||
CONFIG_DMA_OF=y
|
||||
CONFIG_DMA_OPS_HELPERS=y
|
||||
CONFIG_DMA_SHARED_BUFFER=y
|
||||
CONFIG_DMA_VIRTUAL_CHANNELS=y
|
||||
CONFIG_DNOTIFY=y
|
||||
# CONFIG_DP83TG720_PHY is not set
|
||||
CONFIG_DUMMY_CONSOLE=y
|
||||
CONFIG_EDAC_ATOMIC_SCRUB=y
|
||||
CONFIG_EXT4_FS=y
|
||||
CONFIG_EXTCON=y
|
||||
CONFIG_F2FS_FS=y
|
||||
CONFIG_FB=y
|
||||
CONFIG_FB_BCM2708=y
|
||||
CONFIG_FB_CFB_COPYAREA=y
|
||||
CONFIG_FB_CFB_FILLRECT=y
|
||||
CONFIG_FB_CFB_IMAGEBLIT=y
|
||||
CONFIG_FB_CORE=y
|
||||
CONFIG_FB_DEVICE=y
|
||||
CONFIG_FB_IOMEM_FOPS=y
|
||||
CONFIG_FB_IOMEM_HELPERS=y
|
||||
# CONFIG_FB_RPISENSE is not set
|
||||
CONFIG_FB_SIMPLE=y
|
||||
CONFIG_FIQ=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FONT_8x16=y
|
||||
CONFIG_FONT_8x8=y
|
||||
CONFIG_FONT_SUPPORT=y
|
||||
CONFIG_FORCE_NR_CPUS=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
|
||||
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
|
||||
CONFIG_FREEZER=y
|
||||
CONFIG_FS_MBCACHE=y
|
||||
# CONFIG_FUEL_GAUGE_MM8013 is not set
|
||||
CONFIG_FUNCTION_ALIGNMENT=0
|
||||
CONFIG_FWNODE_MDIO=y
|
||||
CONFIG_FW_CACHE=y
|
||||
CONFIG_GENERIC_IRQ_CHIP=y
|
||||
CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
|
||||
CONFIG_GENERIC_PINCONF=y
|
||||
CONFIG_GENERIC_PINCTRL_GROUPS=y
|
||||
CONFIG_GENERIC_PINMUX_FUNCTIONS=y
|
||||
CONFIG_GPIOLIB_IRQCHIP=y
|
||||
# CONFIG_GPIO_BCM_VIRT is not set
|
||||
# CONFIG_GPIO_PWM is not set
|
||||
CONFIG_GPIO_RASPBERRYPI_EXP=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_BCM2835=y
|
||||
CONFIG_HZ_FIXED=0
|
||||
# CONFIG_HZ_PERIODIC is not set
|
||||
CONFIG_I2C=y
|
||||
# CONFIG_I2C_BCM2708 is not set
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
# CONFIG_I2C_DESIGNWARE_CORE is not set
|
||||
CONFIG_INPUT=y
|
||||
CONFIG_INPUT_MOUSEDEV=y
|
||||
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
|
||||
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
|
||||
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
|
||||
CONFIG_IRQSTACKS=y
|
||||
CONFIG_JBD2=y
|
||||
CONFIG_KERNEL_GZIP=y
|
||||
# CONFIG_KERNEL_XZ is not set
|
||||
CONFIG_LEDS_GPIO=y
|
||||
# CONFIG_LEDS_KTD202X is not set
|
||||
# CONFIG_LEDS_NCP5623 is not set
|
||||
CONFIG_LEDS_PWM=y
|
||||
CONFIG_LEDS_TRIGGER_ACTPWR=y
|
||||
CONFIG_LEDS_TRIGGER_INPUT=y
|
||||
# CONFIG_LEDS_TRIGGER_INPUT_EVENTS is not set
|
||||
CONFIG_LOGO=y
|
||||
CONFIG_LOGO_LINUX_CLUT224=y
|
||||
# CONFIG_LOGO_LINUX_MONO is not set
|
||||
# CONFIG_LOGO_LINUX_VGA16 is not set
|
||||
CONFIG_MAC_PARTITION=y
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1f6
|
||||
CONFIG_MAILBOX=y
|
||||
# CONFIG_MAILBOX_TEST is not set
|
||||
CONFIG_MDIO_BUS=y
|
||||
CONFIG_MDIO_DEVICE=y
|
||||
CONFIG_MDIO_DEVRES=y
|
||||
CONFIG_MEDIA_CAMERA_SUPPORT=y
|
||||
CONFIG_MEDIA_CONTROLLER=y
|
||||
CONFIG_MEDIA_PLATFORM_DRIVERS=y
|
||||
CONFIG_MEDIA_PLATFORM_SUPPORT=y
|
||||
CONFIG_MEDIA_SUPPORT=y
|
||||
CONFIG_MEDIA_SUPPORT_FILTER=y
|
||||
CONFIG_MEMORY_ISOLATION=y
|
||||
# CONFIG_MFD_88PM886_PMIC is not set
|
||||
# CONFIG_MFD_ADP5585 is not set
|
||||
CONFIG_MFD_CORE=y
|
||||
# CONFIG_MFD_CS40L50_I2C is not set
|
||||
# CONFIG_MFD_CS40L50_SPI is not set
|
||||
# CONFIG_MFD_RASPBERRYPI_POE_HAT is not set
|
||||
# CONFIG_MFD_ROHM_BD96801 is not set
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_MIGHT_HAVE_CACHE_L2X0=y
|
||||
CONFIG_MMC=y
|
||||
# CONFIG_MMC_BCM2835 is not set
|
||||
CONFIG_MMC_BCM2835_DMA=y
|
||||
CONFIG_MMC_BCM2835_MMC=y
|
||||
CONFIG_MMC_BCM2835_PIO_DMA_BARRIER=2
|
||||
CONFIG_MMC_BCM2835_SDHOST=y
|
||||
CONFIG_MMC_BLOCK=y
|
||||
CONFIG_MMC_BLOCK_MINORS=32
|
||||
CONFIG_MMC_HSQ=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
CONFIG_MODULES_USE_ELF_REL=y
|
||||
# CONFIG_MTD is not set
|
||||
CONFIG_NEED_PER_CPU_KM=y
|
||||
CONFIG_NET_DEVMEM=y
|
||||
CONFIG_NET_SELFTESTS=y
|
||||
CONFIG_NLS=y
|
||||
CONFIG_NLS_ASCII=y
|
||||
CONFIG_NOP_USB_XCEIV=y
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_NO_HZ_COMMON=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_NVMEM_LAYOUTS=y
|
||||
CONFIG_NVMEM_RASPBERRYPI_OTP=y
|
||||
CONFIG_OF_CONFIGFS=y
|
||||
CONFIG_OF_DYNAMIC=y
|
||||
CONFIG_OF_MDIO=y
|
||||
CONFIG_OF_OVERLAY=y
|
||||
CONFIG_OF_RESOLVE=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_PHYLIB_LEDS=y
|
||||
CONFIG_PINCTRL=y
|
||||
# CONFIG_PINCTRL_AW9523 is not set
|
||||
# CONFIG_PINCTRL_BCM2712 is not set
|
||||
CONFIG_PINCTRL_BCM2835=y
|
||||
# CONFIG_PINCTRL_RP1 is not set
|
||||
CONFIG_PM=y
|
||||
CONFIG_PM_CLK=y
|
||||
CONFIG_PM_GENERIC_DOMAINS=y
|
||||
CONFIG_PM_GENERIC_DOMAINS_OF=y
|
||||
CONFIG_PM_GENERIC_DOMAINS_SLEEP=y
|
||||
CONFIG_PM_OPP=y
|
||||
CONFIG_PM_SLEEP=y
|
||||
CONFIG_PRINTK_TIME=y
|
||||
# CONFIG_PTP_1588_CLOCK_FC3W is not set
|
||||
# CONFIG_PTP_1588_CLOCK_IDT82P33 is not set
|
||||
# CONFIG_PTP_1588_CLOCK_IDTCM is not set
|
||||
CONFIG_PWM=y
|
||||
CONFIG_PWM_BCM2835=y
|
||||
# CONFIG_PWM_GPIO is not set
|
||||
# CONFIG_PWM_RP1 is not set
|
||||
CONFIG_RASPBERRYPI_FIRMWARE=y
|
||||
CONFIG_RASPBERRYPI_GPIOMEM=y
|
||||
CONFIG_RASPBERRYPI_POWER=y
|
||||
# CONFIG_RAVE_SP_CORE is not set
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_REGULATOR=y
|
||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||
# CONFIG_REGULATOR_MAX77503 is not set
|
||||
# CONFIG_REGULATOR_NETLINK_EVENTS is not set
|
||||
# CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_V2 is not set
|
||||
CONFIG_RESET_CONTROLLER=y
|
||||
# CONFIG_RESET_GPIO is not set
|
||||
# CONFIG_RESET_RASPBERRYPI is not set
|
||||
CONFIG_RESET_SIMPLE=y
|
||||
# CONFIG_RPI_POE_POWER is not set
|
||||
# CONFIG_RPMB is not set
|
||||
# CONFIG_RTC_DRV_MAX31335 is not set
|
||||
# CONFIG_RTC_DRV_RX8111 is not set
|
||||
# CONFIG_RTC_DRV_SD2405AL is not set
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_SCSI_COMMON=y
|
||||
# CONFIG_SCSI_LOWLEVEL is not set
|
||||
# CONFIG_SCSI_PROC_FS is not set
|
||||
# CONFIG_SENSORS_CHIPCAP2 is not set
|
||||
# CONFIG_SENSORS_LTC2991 is not set
|
||||
# CONFIG_SENSORS_LTC4282 is not set
|
||||
# CONFIG_SENSORS_POWERZ is not set
|
||||
# CONFIG_SENSORS_PT5161L is not set
|
||||
# CONFIG_SENSORS_SPD5118 is not set
|
||||
CONFIG_SERIAL_8250_BCM2835AUX=y
|
||||
# CONFIG_SERIAL_8250_DMA is not set
|
||||
CONFIG_SERIAL_8250_EXTENDED=y
|
||||
CONFIG_SERIAL_8250_NR_UARTS=1
|
||||
CONFIG_SERIAL_8250_RUNTIME_UARTS=0
|
||||
CONFIG_SERIAL_8250_SHARE_IRQ=y
|
||||
CONFIG_SERIAL_AMBA_PL011=y
|
||||
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
|
||||
CONFIG_SERIAL_DEV_BUS=y
|
||||
# CONFIG_SERIAL_DEV_CTRL_TTYPORT is not set
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SG_POOL=y
|
||||
CONFIG_SMSC_PHY=y
|
||||
# CONFIG_STRIP_ASM_SYMS is not set
|
||||
CONFIG_SUSPEND=y
|
||||
CONFIG_SUSPEND_FREEZER=y
|
||||
CONFIG_SWPHY=y
|
||||
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
|
||||
# CONFIG_TEXTSEARCH is not set
|
||||
CONFIG_THERMAL=y
|
||||
# CONFIG_THERMAL_CORE_TESTING is not set
|
||||
# CONFIG_THERMAL_DEBUGFS is not set
|
||||
CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
|
||||
CONFIG_THERMAL_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_OF=y
|
||||
CONFIG_TINY_SRCU=y
|
||||
CONFIG_UEVENT_HELPER_PATH=""
|
||||
# CONFIG_UID16 is not set
|
||||
CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
|
||||
CONFIG_UNWINDER_ARM=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
|
||||
CONFIG_USB_COMMON=y
|
||||
CONFIG_USB_DEFAULT_AUTHORIZATION_MODE=1
|
||||
CONFIG_USB_DWCOTG=y
|
||||
CONFIG_USB_NET_DRIVERS=y
|
||||
CONFIG_USB_NET_SMSC95XX=y
|
||||
# CONFIG_USB_ONBOARD_DEV is not set
|
||||
CONFIG_USB_PHY=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USB_UAS=y
|
||||
CONFIG_USB_USBNET=y
|
||||
CONFIG_USE_OF=y
|
||||
CONFIG_VCHIQ_CDEV=y
|
||||
CONFIG_VFP=y
|
||||
CONFIG_VIDEO=y
|
||||
# CONFIG_VIDEO_AD5398 is not set
|
||||
# CONFIG_VIDEO_BCM2835_UNICAM is not set
|
||||
# CONFIG_VIDEO_BCM2835_UNICAM_LEGACY is not set
|
||||
# CONFIG_VIDEO_BU64754 is not set
|
||||
# CONFIG_VIDEO_CODEC_BCM2835 is not set
|
||||
CONFIG_VIDEO_DEV=y
|
||||
# CONFIG_VIDEO_IRS1125 is not set
|
||||
# CONFIG_VIDEO_ISP_BCM2835 is not set
|
||||
# CONFIG_VIDEO_MAX96714 is not set
|
||||
# CONFIG_VIDEO_MAX96717 is not set
|
||||
# CONFIG_VIDEO_RASPBERRYPI_PISP_BE is not set
|
||||
# CONFIG_VIDEO_RP1_CFE is not set
|
||||
# CONFIG_VIDEO_THP7312 is not set
|
||||
CONFIG_VIDEO_V4L2_I2C=y
|
||||
CONFIG_VT=y
|
||||
CONFIG_VT_CONSOLE=y
|
||||
CONFIG_VT_CONSOLE_SLEEP=y
|
||||
CONFIG_VT_HW_CONSOLE_BINDING=y
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_XZ_DEC_ARM=y
|
||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
|
@ -1,457 +0,0 @@
|
|||
# CONFIG_AIO is not set
|
||||
CONFIG_ALIGNMENT_TRAP=y
|
||||
# CONFIG_AMD_QDMA is not set
|
||||
CONFIG_APERTURE_HELPERS=y
|
||||
CONFIG_ARCH_32BIT_OFF_T=y
|
||||
CONFIG_ARCH_BCM=y
|
||||
CONFIG_ARCH_BCM2835=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
|
||||
CONFIG_ARCH_MMAP_RND_BITS=16
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MAX=16
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MIN=8
|
||||
CONFIG_ARCH_MULTIPLATFORM=y
|
||||
CONFIG_ARCH_MULTI_V6_V7=y
|
||||
CONFIG_ARCH_MULTI_V7=y
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
|
||||
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARM_CPU_SUSPEND=y
|
||||
# CONFIG_ARM_DEBUG_WX is not set
|
||||
CONFIG_ARM_HAS_GROUP_RELOCS=y
|
||||
CONFIG_ARM_L1_CACHE_SHIFT=6
|
||||
CONFIG_ARM_L1_CACHE_SHIFT_6=y
|
||||
CONFIG_ARM_LPAE=y
|
||||
# CONFIG_ARM_MHU_V2 is not set
|
||||
CONFIG_ARM_PAN=y
|
||||
CONFIG_ARM_PATCH_IDIV=y
|
||||
CONFIG_ARM_PATCH_PHYS_VIRT=y
|
||||
CONFIG_ARM_RASPBERRYPI_CPUFREQ=y
|
||||
CONFIG_ARM_THUMB=y
|
||||
CONFIG_ARM_TIMER_SP804=y
|
||||
CONFIG_ARM_UNWIND=y
|
||||
CONFIG_ARM_VIRT_EXT=y
|
||||
CONFIG_ASSOCIATIVE_ARRAY=y
|
||||
CONFIG_AUTO_ZRELADDR=y
|
||||
# CONFIG_BATTERY_MAX1720X is not set
|
||||
CONFIG_BCM2708_VCMEM=y
|
||||
CONFIG_BCM2711_THERMAL=y
|
||||
CONFIG_BCM2835_MBOX=y
|
||||
CONFIG_BCM2835_POWER=y
|
||||
# CONFIG_BCM2835_SMI is not set
|
||||
CONFIG_BCM2835_THERMAL=y
|
||||
CONFIG_BCM2835_TIMER=y
|
||||
CONFIG_BCM2835_VCHIQ=y
|
||||
# CONFIG_BCM2835_VCHIQ_MMAL is not set
|
||||
CONFIG_BCM2835_WDT=y
|
||||
CONFIG_BCM7XXX_PHY=y
|
||||
CONFIG_BCMGENET=y
|
||||
CONFIG_BCM_NET_PHYLIB=y
|
||||
CONFIG_BCM_VCIO=y
|
||||
# CONFIG_BCM_VC_SM_CMA is not set
|
||||
CONFIG_BCM_VIDEOCORE=y
|
||||
CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
|
||||
# CONFIG_BLK_DEV_INITRD is not set
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_BLK_DEV_RAM_COUNT=16
|
||||
CONFIG_BLK_DEV_RAM_SIZE=4096
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
CONFIG_BLK_PM=y
|
||||
CONFIG_BOUNCE=y
|
||||
CONFIG_BRCMSTB_L2_IRQ=y
|
||||
CONFIG_BRCM_CHAR_DRIVERS=y
|
||||
CONFIG_BROADCOM_PHY=y
|
||||
CONFIG_BUFFER_HEAD=y
|
||||
# CONFIG_CACHE_L2X0 is not set
|
||||
CONFIG_CC_HAVE_STACKPROTECTOR_TLS=y
|
||||
CONFIG_CLKSRC_MMIO=y
|
||||
CONFIG_CLK_BCM2711_DVP=y
|
||||
CONFIG_CLK_BCM2835=y
|
||||
CONFIG_CLK_RASPBERRYPI=y
|
||||
CONFIG_CMA=y
|
||||
CONFIG_CMA_ALIGNMENT=8
|
||||
CONFIG_CMA_AREAS=7
|
||||
# CONFIG_CMA_DEBUGFS is not set
|
||||
CONFIG_CMA_SIZE_MBYTES=5
|
||||
# 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_COMMON_CLK_RP1 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_BIG_ENDIAN is not set
|
||||
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_ONDEMAND=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_SCHEDUTIL=y
|
||||
CONFIG_CPU_FREQ_GOV_USERSPACE=y
|
||||
CONFIG_CPU_FREQ_STAT=y
|
||||
CONFIG_CPU_HAS_ASID=y
|
||||
CONFIG_CPU_IDLE=y
|
||||
CONFIG_CPU_IDLE_GOV_LADDER=y
|
||||
CONFIG_CPU_IDLE_GOV_MENU=y
|
||||
CONFIG_CPU_LITTLE_ENDIAN=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_TTBR0_PAN=y
|
||||
CONFIG_CPU_V7=y
|
||||
CONFIG_CRC16=y
|
||||
CONFIG_CRYPTO_CBC=y
|
||||
CONFIG_CRYPTO_CRC32=y
|
||||
CONFIG_CRYPTO_CRC32C=y
|
||||
CONFIG_CRYPTO_CTS=y
|
||||
CONFIG_CRYPTO_DRBG=y
|
||||
CONFIG_CRYPTO_DRBG_HMAC=y
|
||||
CONFIG_CRYPTO_DRBG_MENU=y
|
||||
CONFIG_CRYPTO_GENIV=y
|
||||
CONFIG_CRYPTO_HMAC=y
|
||||
CONFIG_CRYPTO_JITTERENTROPY=y
|
||||
CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKS=64
|
||||
CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKSIZE=32
|
||||
CONFIG_CRYPTO_JITTERENTROPY_OSR=1
|
||||
CONFIG_CRYPTO_LIB_SHA256=y
|
||||
CONFIG_CRYPTO_RNG=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_RNG_DEFAULT=y
|
||||
CONFIG_CRYPTO_SEQIV=y
|
||||
CONFIG_CRYPTO_SHA256=y
|
||||
CONFIG_CRYPTO_SHA3=y
|
||||
CONFIG_CRYPTO_SHA512=y
|
||||
CONFIG_CRYPTO_XTS=y
|
||||
CONFIG_CURRENT_POINTER_IN_TPIDRURO=y
|
||||
CONFIG_DEBUG_BUGVERBOSE=y
|
||||
CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
|
||||
CONFIG_DMABUF_HEAPS=y
|
||||
CONFIG_DMABUF_HEAPS_CMA=y
|
||||
CONFIG_DMABUF_HEAPS_SYSTEM=y
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_DMA_BCM2708=y
|
||||
CONFIG_DMA_BCM2835=y
|
||||
CONFIG_DMA_CMA=y
|
||||
CONFIG_DMA_ENGINE=y
|
||||
CONFIG_DMA_OF=y
|
||||
CONFIG_DMA_OPS_HELPERS=y
|
||||
CONFIG_DMA_SHARED_BUFFER=y
|
||||
CONFIG_DMA_VIRTUAL_CHANNELS=y
|
||||
CONFIG_DNOTIFY=y
|
||||
# CONFIG_DP83TG720_PHY is not set
|
||||
CONFIG_DUMMY_CONSOLE=y
|
||||
CONFIG_EDAC_ATOMIC_SCRUB=y
|
||||
CONFIG_EXT4_FS=y
|
||||
CONFIG_EXTCON=y
|
||||
CONFIG_F2FS_FS=y
|
||||
CONFIG_FB=y
|
||||
CONFIG_FB_BCM2708=y
|
||||
CONFIG_FB_CFB_COPYAREA=y
|
||||
CONFIG_FB_CFB_FILLRECT=y
|
||||
CONFIG_FB_CFB_IMAGEBLIT=y
|
||||
CONFIG_FB_CORE=y
|
||||
CONFIG_FB_DEVICE=y
|
||||
CONFIG_FB_IOMEM_FOPS=y
|
||||
CONFIG_FB_IOMEM_HELPERS=y
|
||||
# CONFIG_FB_RPISENSE is not set
|
||||
CONFIG_FB_SIMPLE=y
|
||||
CONFIG_FIQ=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FONT_8x16=y
|
||||
CONFIG_FONT_8x8=y
|
||||
CONFIG_FONT_SUPPORT=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
|
||||
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
|
||||
CONFIG_FREEZER=y
|
||||
CONFIG_FS_ENCRYPTION=y
|
||||
CONFIG_FS_ENCRYPTION_ALGS=y
|
||||
CONFIG_FS_MBCACHE=y
|
||||
# CONFIG_FUEL_GAUGE_MM8013 is not set
|
||||
CONFIG_FUNCTION_ALIGNMENT=0
|
||||
CONFIG_FWNODE_MDIO=y
|
||||
CONFIG_FW_CACHE=y
|
||||
CONFIG_GENERIC_IRQ_CHIP=y
|
||||
CONFIG_GENERIC_IRQ_MIGRATION=y
|
||||
CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
|
||||
CONFIG_GENERIC_PHY=y
|
||||
CONFIG_GENERIC_PINCONF=y
|
||||
CONFIG_GENERIC_PINCTRL_GROUPS=y
|
||||
CONFIG_GENERIC_PINMUX_FUNCTIONS=y
|
||||
CONFIG_GENERIC_VDSO_32=y
|
||||
CONFIG_GPIOLIB_IRQCHIP=y
|
||||
CONFIG_GPIO_BCM_VIRT=y
|
||||
# CONFIG_GPIO_PWM is not set
|
||||
CONFIG_GPIO_RASPBERRYPI_EXP=y
|
||||
# CONFIG_HARDEN_BRANCH_HISTORY is not set
|
||||
# CONFIG_HARDEN_BRANCH_PREDICTOR is not set
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HAVE_SMP=y
|
||||
CONFIG_HIGHMEM=y
|
||||
CONFIG_HIGHPTE=y
|
||||
CONFIG_HOTPLUG_CORE_SYNC=y
|
||||
CONFIG_HOTPLUG_CORE_SYNC_DEAD=y
|
||||
CONFIG_HOTPLUG_CPU=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_BCM2835=y
|
||||
CONFIG_HW_RANDOM_IPROC_RNG200=y
|
||||
CONFIG_HZ_FIXED=0
|
||||
# CONFIG_HZ_PERIODIC is not set
|
||||
CONFIG_I2C=y
|
||||
# CONFIG_I2C_BCM2708 is not set
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
# CONFIG_I2C_DESIGNWARE_CORE is not set
|
||||
# CONFIG_IDPF is not set
|
||||
CONFIG_INPUT=y
|
||||
CONFIG_INPUT_MOUSEDEV=y
|
||||
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
|
||||
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
|
||||
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
|
||||
CONFIG_IRQSTACKS=y
|
||||
CONFIG_JBD2=y
|
||||
# CONFIG_KEBA_CP500 is not set
|
||||
CONFIG_KEYS=y
|
||||
CONFIG_KMAP_LOCAL=y
|
||||
CONFIG_KMAP_LOCAL_NON_LINEAR_PTE_ARRAY=y
|
||||
CONFIG_LEDS_GPIO=y
|
||||
# CONFIG_LEDS_KTD202X is not set
|
||||
# CONFIG_LEDS_NCP5623 is not set
|
||||
CONFIG_LEDS_PWM=y
|
||||
CONFIG_LEDS_TRIGGER_ACTPWR=y
|
||||
CONFIG_LEDS_TRIGGER_INPUT=y
|
||||
# CONFIG_LEDS_TRIGGER_INPUT_EVENTS is not set
|
||||
CONFIG_LOGO=y
|
||||
CONFIG_LOGO_LINUX_CLUT224=y
|
||||
# CONFIG_LOGO_LINUX_MONO is not set
|
||||
# CONFIG_LOGO_LINUX_VGA16 is not set
|
||||
CONFIG_MAC_PARTITION=y
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1f6
|
||||
CONFIG_MAILBOX=y
|
||||
# CONFIG_MAILBOX_TEST is not set
|
||||
CONFIG_MDIO_BCM_UNIMAC=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_DRIVERS=y
|
||||
CONFIG_MEDIA_PLATFORM_SUPPORT=y
|
||||
CONFIG_MEDIA_SUPPORT=y
|
||||
CONFIG_MEDIA_SUPPORT_FILTER=y
|
||||
CONFIG_MEMORY_ISOLATION=y
|
||||
# CONFIG_MFD_88PM886_PMIC is not set
|
||||
# CONFIG_MFD_ADP5585 is not set
|
||||
CONFIG_MFD_CORE=y
|
||||
# CONFIG_MFD_CS40L50_I2C is not set
|
||||
# CONFIG_MFD_RASPBERRYPI_POE_HAT is not set
|
||||
# CONFIG_MFD_ROHM_BD96801 is not set
|
||||
# CONFIG_MFD_RP1 is not set
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_MICROCHIP_PHY=y
|
||||
CONFIG_MIGHT_HAVE_CACHE_L2X0=y
|
||||
CONFIG_MMC=y
|
||||
# CONFIG_MMC_BCM2835 is not set
|
||||
CONFIG_MMC_BCM2835_DMA=y
|
||||
CONFIG_MMC_BCM2835_MMC=y
|
||||
CONFIG_MMC_BCM2835_PIO_DMA_BARRIER=2
|
||||
CONFIG_MMC_BCM2835_SDHOST=y
|
||||
CONFIG_MMC_BLOCK=y
|
||||
CONFIG_MMC_BLOCK_MINORS=32
|
||||
CONFIG_MMC_HSQ=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_IO_ACCESSORS=y
|
||||
CONFIG_MMC_SDHCI_IPROC=y
|
||||
# CONFIG_MMC_SDHCI_PCI is not set
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
CONFIG_MODULES_USE_ELF_REL=y
|
||||
# CONFIG_MTD is not set
|
||||
CONFIG_NEED_SRCU_NMI_SAFE=y
|
||||
CONFIG_NEON=y
|
||||
CONFIG_NET_DEVMEM=y
|
||||
CONFIG_NET_PTP_CLASSIFY=y
|
||||
CONFIG_NET_SELFTESTS=y
|
||||
CONFIG_NLS=y
|
||||
CONFIG_NLS_ASCII=y
|
||||
CONFIG_NOP_USB_XCEIV=y
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_NO_HZ_COMMON=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_NR_CPUS=4
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_NVMEM_LAYOUTS=y
|
||||
CONFIG_NVMEM_RASPBERRYPI_OTP=y
|
||||
CONFIG_OF_CONFIGFS=y
|
||||
CONFIG_OF_DYNAMIC=y
|
||||
CONFIG_OF_MDIO=y
|
||||
CONFIG_OF_OVERLAY=y
|
||||
CONFIG_OF_RESOLVE=y
|
||||
CONFIG_OLD_SIGACTION=y
|
||||
CONFIG_OLD_SIGSUSPEND3=y
|
||||
CONFIG_PAGE_OFFSET=0xC0000000
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCIEAER=y
|
||||
CONFIG_PCIEPORTBUS=y
|
||||
CONFIG_PCIE_BRCMSTB=y
|
||||
CONFIG_PCIE_PME=y
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
CONFIG_PCI_DOMAINS_GENERIC=y
|
||||
CONFIG_PCI_MSI=y
|
||||
# CONFIG_PCI_NPEM is not set
|
||||
CONFIG_PERF_USE_VMALLOC=y
|
||||
CONFIG_PGTABLE_LEVELS=3
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHYLIB_LEDS=y
|
||||
CONFIG_PINCTRL=y
|
||||
# CONFIG_PINCTRL_AW9523 is not set
|
||||
# CONFIG_PINCTRL_BCM2712 is not set
|
||||
CONFIG_PINCTRL_BCM2835=y
|
||||
# CONFIG_PINCTRL_RP1 is not set
|
||||
CONFIG_PM=y
|
||||
CONFIG_PM_CLK=y
|
||||
CONFIG_PM_GENERIC_DOMAINS=y
|
||||
CONFIG_PM_GENERIC_DOMAINS_OF=y
|
||||
CONFIG_PM_GENERIC_DOMAINS_SLEEP=y
|
||||
CONFIG_PM_OPP=y
|
||||
CONFIG_PM_SLEEP=y
|
||||
CONFIG_PM_SLEEP_SMP=y
|
||||
CONFIG_PPS=y
|
||||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_PTP_1588_CLOCK=y
|
||||
# CONFIG_PTP_1588_CLOCK_FC3W is not set
|
||||
CONFIG_PWM=y
|
||||
CONFIG_PWM_BCM2835=y
|
||||
# CONFIG_PWM_GPIO is not set
|
||||
# CONFIG_PWM_RP1 is not set
|
||||
CONFIG_RAS=y
|
||||
CONFIG_RASPBERRYPI_FIRMWARE=y
|
||||
CONFIG_RASPBERRYPI_GPIOMEM=y
|
||||
CONFIG_RASPBERRYPI_POWER=y
|
||||
# CONFIG_RAVE_SP_CORE is not set
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_REGULATOR=y
|
||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||
CONFIG_REGULATOR_GPIO=y
|
||||
# CONFIG_REGULATOR_MAX77503 is not set
|
||||
# CONFIG_REGULATOR_NETLINK_EVENTS is not set
|
||||
CONFIG_RESET_CONTROLLER=y
|
||||
# CONFIG_RESET_GPIO is not set
|
||||
CONFIG_RESET_RASPBERRYPI=y
|
||||
CONFIG_RESET_SIMPLE=y
|
||||
# CONFIG_RPI_POE_POWER is not set
|
||||
# CONFIG_RPMB is not set
|
||||
# CONFIG_RTASE is not set
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_SCSI_COMMON=y
|
||||
# CONFIG_SCSI_LOWLEVEL is not set
|
||||
# CONFIG_SCSI_PROC_FS is not set
|
||||
# CONFIG_SENSORS_CHIPCAP2 is not set
|
||||
# CONFIG_SENSORS_LTC2991 is not set
|
||||
# CONFIG_SENSORS_LTC4282 is not set
|
||||
# CONFIG_SENSORS_POWERZ is not set
|
||||
# CONFIG_SENSORS_PT5161L is not set
|
||||
# CONFIG_SENSORS_SPD5118 is not set
|
||||
CONFIG_SERIAL_8250_BCM2835AUX=y
|
||||
# CONFIG_SERIAL_8250_DMA is not set
|
||||
CONFIG_SERIAL_8250_EXTENDED=y
|
||||
CONFIG_SERIAL_8250_NR_UARTS=1
|
||||
CONFIG_SERIAL_8250_RUNTIME_UARTS=0
|
||||
CONFIG_SERIAL_8250_SHARE_IRQ=y
|
||||
CONFIG_SERIAL_AMBA_PL011=y
|
||||
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
|
||||
CONFIG_SERIAL_DEV_BUS=y
|
||||
# CONFIG_SERIAL_DEV_CTRL_TTYPORT is not set
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SG_POOL=y
|
||||
CONFIG_SMP_ON_UP=y
|
||||
CONFIG_SMSC_PHY=y
|
||||
# CONFIG_STRIP_ASM_SYMS is not set
|
||||
CONFIG_SUSPEND=y
|
||||
CONFIG_SUSPEND_FREEZER=y
|
||||
CONFIG_SWPHY=y
|
||||
CONFIG_SWP_EMULATE=y
|
||||
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
|
||||
# CONFIG_TEHUTI_TN40 is not set
|
||||
# CONFIG_TEXTSEARCH is not set
|
||||
CONFIG_THERMAL=y
|
||||
# CONFIG_THERMAL_CORE_TESTING is not set
|
||||
# CONFIG_THERMAL_DEBUGFS is not set
|
||||
CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
|
||||
CONFIG_THERMAL_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_OF=y
|
||||
# CONFIG_UCLAMP_TASK is not set
|
||||
CONFIG_UEVENT_HELPER_PATH=""
|
||||
# CONFIG_UID16 is not set
|
||||
CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
|
||||
CONFIG_UNWINDER_ARM=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
|
||||
CONFIG_USB_COMMON=y
|
||||
CONFIG_USB_DEFAULT_AUTHORIZATION_MODE=1
|
||||
CONFIG_USB_DWCOTG=y
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_LAN78XX=y
|
||||
CONFIG_USB_NET_DRIVERS=y
|
||||
CONFIG_USB_NET_SMSC95XX=y
|
||||
# CONFIG_USB_ONBOARD_DEV is not set
|
||||
CONFIG_USB_PCI=y
|
||||
# CONFIG_USB_PCI_AMD is not set
|
||||
CONFIG_USB_PHY=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USB_UAS=y
|
||||
# CONFIG_USB_UHCI_HCD is not set
|
||||
CONFIG_USB_USBNET=y
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
CONFIG_USB_XHCI_PCI=y
|
||||
CONFIG_USB_XHCI_PLATFORM=y
|
||||
CONFIG_USE_OF=y
|
||||
CONFIG_VCHIQ_CDEV=y
|
||||
CONFIG_VFP=y
|
||||
CONFIG_VFPv3=y
|
||||
CONFIG_VIDEO=y
|
||||
# CONFIG_VIDEO_AD5398 is not set
|
||||
# CONFIG_VIDEO_BCM2835_UNICAM is not set
|
||||
# CONFIG_VIDEO_BCM2835_UNICAM_LEGACY is not set
|
||||
# CONFIG_VIDEO_BU64754 is not set
|
||||
# CONFIG_VIDEO_CODEC_BCM2835 is not set
|
||||
CONFIG_VIDEO_DEV=y
|
||||
# CONFIG_VIDEO_IRS1125 is not set
|
||||
# CONFIG_VIDEO_ISP_BCM2835 is not set
|
||||
# CONFIG_VIDEO_MAX96714 is not set
|
||||
# CONFIG_VIDEO_MAX96717 is not set
|
||||
# CONFIG_VIDEO_RP1_CFE is not set
|
||||
# CONFIG_VIDEO_THP7312 is not set
|
||||
CONFIG_VIDEO_V4L2_I2C=y
|
||||
CONFIG_VT=y
|
||||
CONFIG_VT_CONSOLE=y
|
||||
CONFIG_VT_CONSOLE_SLEEP=y
|
||||
CONFIG_VT_HW_CONSOLE_BINDING=y
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_XZ_DEC_ARM=y
|
||||
CONFIG_ZBOOT_ROM_BSS=0
|
||||
CONFIG_ZBOOT_ROM_TEXT=0
|
|
@ -1,380 +0,0 @@
|
|||
# CONFIG_AIO is not set
|
||||
# CONFIG_AMD_QDMA is not set
|
||||
CONFIG_APERTURE_HELPERS=y
|
||||
CONFIG_ARCH_BCM=y
|
||||
CONFIG_ARCH_BCM2835=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARM64_ERRATUM_819472=y
|
||||
CONFIG_ARM64_ERRATUM_824069=y
|
||||
CONFIG_ARM64_ERRATUM_826319=y
|
||||
CONFIG_ARM64_ERRATUM_827319=y
|
||||
CONFIG_ARM64_ERRATUM_832075=y
|
||||
CONFIG_ARM64_ERRATUM_843419=y
|
||||
CONFIG_ARM64_HW_AFDBM=y
|
||||
CONFIG_ARM64_PTR_AUTH=y
|
||||
CONFIG_ARM64_PTR_AUTH_KERNEL=y
|
||||
CONFIG_ARM64_SVE=y
|
||||
CONFIG_ARM64_WORKAROUND_CLEAN_CACHE=y
|
||||
CONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y
|
||||
CONFIG_ARM_GIC_V2M=y
|
||||
# CONFIG_ARM_MHU_V2 is not set
|
||||
# CONFIG_ARM_MHU_V3 is not set
|
||||
CONFIG_ARM_RASPBERRYPI_CPUFREQ=y
|
||||
CONFIG_ARM_TIMER_SP804=y
|
||||
CONFIG_ASSOCIATIVE_ARRAY=y
|
||||
# CONFIG_BATTERY_MAX1720X is not set
|
||||
CONFIG_BCM2708_VCMEM=y
|
||||
# CONFIG_BCM2711_THERMAL is not set
|
||||
CONFIG_BCM2835_MBOX=y
|
||||
CONFIG_BCM2835_POWER=y
|
||||
# CONFIG_BCM2835_SMI is not set
|
||||
CONFIG_BCM2835_THERMAL=y
|
||||
CONFIG_BCM2835_VCHIQ=y
|
||||
# CONFIG_BCM2835_VCHIQ_MMAL is not set
|
||||
CONFIG_BCM2835_WDT=y
|
||||
CONFIG_BCM_VCIO=y
|
||||
# CONFIG_BCM_VC_SM_CMA is not set
|
||||
CONFIG_BCM_VIDEOCORE=y
|
||||
# CONFIG_BLK_DEV_INITRD is not set
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_BLK_DEV_RAM_COUNT=16
|
||||
CONFIG_BLK_DEV_RAM_SIZE=4096
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
CONFIG_BLK_PM=y
|
||||
CONFIG_BRCMSTB_L2_IRQ=y
|
||||
CONFIG_BRCM_CHAR_DRIVERS=y
|
||||
CONFIG_BUFFER_HEAD=y
|
||||
CONFIG_CAVIUM_ERRATUM_22375=y
|
||||
CONFIG_CAVIUM_ERRATUM_23154=y
|
||||
CONFIG_CAVIUM_ERRATUM_27456=y
|
||||
CONFIG_CLKSRC_MMIO=y
|
||||
CONFIG_CLK_BCM2711_DVP=y
|
||||
CONFIG_CLK_BCM2835=y
|
||||
CONFIG_CLK_RASPBERRYPI=y
|
||||
CONFIG_CMA=y
|
||||
CONFIG_CMA_ALIGNMENT=8
|
||||
CONFIG_CMA_AREAS=7
|
||||
# CONFIG_CMA_DEBUGFS is not set
|
||||
CONFIG_CMA_SIZE_MBYTES=5
|
||||
# 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_COMMON_CLK_RP1 is not set
|
||||
CONFIG_COMMON_CLK_XGENE=y
|
||||
CONFIG_CONFIGFS_FS=y
|
||||
CONFIG_CONSOLE_TRANSLATIONS=y
|
||||
CONFIG_CONTIG_ALLOC=y
|
||||
CONFIG_CPUFREQ_DT=y
|
||||
CONFIG_CPUFREQ_DT_PLATDEV=y
|
||||
# CONFIG_CPU_BIG_ENDIAN is not set
|
||||
CONFIG_CPU_FREQ=y
|
||||
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=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_SCHEDUTIL=y
|
||||
CONFIG_CPU_FREQ_GOV_USERSPACE=y
|
||||
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_CRC16=y
|
||||
CONFIG_CRYPTO_AES_ARM64=y
|
||||
CONFIG_CRYPTO_AES_ARM64_BS=y
|
||||
CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y
|
||||
CONFIG_CRYPTO_CBC=y
|
||||
CONFIG_CRYPTO_CRC32=y
|
||||
CONFIG_CRYPTO_CRC32C=y
|
||||
CONFIG_CRYPTO_CRYPTD=y
|
||||
CONFIG_CRYPTO_CTS=y
|
||||
CONFIG_CRYPTO_DRBG=y
|
||||
CONFIG_CRYPTO_DRBG_HMAC=y
|
||||
CONFIG_CRYPTO_DRBG_MENU=y
|
||||
CONFIG_CRYPTO_GENIV=y
|
||||
CONFIG_CRYPTO_HMAC=y
|
||||
CONFIG_CRYPTO_JITTERENTROPY=y
|
||||
CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKS=64
|
||||
CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKSIZE=32
|
||||
CONFIG_CRYPTO_JITTERENTROPY_OSR=1
|
||||
CONFIG_CRYPTO_LIB_SHA256=y
|
||||
CONFIG_CRYPTO_RNG=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_RNG_DEFAULT=y
|
||||
CONFIG_CRYPTO_SEQIV=y
|
||||
CONFIG_CRYPTO_SHA256=y
|
||||
CONFIG_CRYPTO_SHA256_ARM64=y
|
||||
CONFIG_CRYPTO_SHA3=y
|
||||
CONFIG_CRYPTO_SHA512=y
|
||||
CONFIG_CRYPTO_SHA512_ARM64=y
|
||||
CONFIG_CRYPTO_XTS=y
|
||||
CONFIG_DEBUG_BUGVERBOSE=y
|
||||
CONFIG_DMABUF_HEAPS=y
|
||||
CONFIG_DMABUF_HEAPS_CMA=y
|
||||
CONFIG_DMABUF_HEAPS_SYSTEM=y
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_DMA_BCM2708=y
|
||||
CONFIG_DMA_BCM2835=y
|
||||
CONFIG_DMA_CMA=y
|
||||
CONFIG_DMA_ENGINE=y
|
||||
CONFIG_DMA_OF=y
|
||||
CONFIG_DMA_SHARED_BUFFER=y
|
||||
CONFIG_DMA_VIRTUAL_CHANNELS=y
|
||||
CONFIG_DNOTIFY=y
|
||||
# CONFIG_DP83TG720_PHY is not set
|
||||
CONFIG_DUMMY_CONSOLE=y
|
||||
CONFIG_EXT4_FS=y
|
||||
CONFIG_EXTCON=y
|
||||
CONFIG_F2FS_FS=y
|
||||
CONFIG_FB=y
|
||||
CONFIG_FB_BCM2708=y
|
||||
CONFIG_FB_CFB_COPYAREA=y
|
||||
CONFIG_FB_CFB_FILLRECT=y
|
||||
CONFIG_FB_CFB_IMAGEBLIT=y
|
||||
CONFIG_FB_CORE=y
|
||||
CONFIG_FB_DEVICE=y
|
||||
CONFIG_FB_IOMEM_FOPS=y
|
||||
CONFIG_FB_IOMEM_HELPERS=y
|
||||
# CONFIG_FB_RPISENSE is not set
|
||||
CONFIG_FB_SIMPLE=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FONT_8x16=y
|
||||
CONFIG_FONT_8x8=y
|
||||
CONFIG_FONT_SUPPORT=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
|
||||
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
|
||||
CONFIG_FREEZER=y
|
||||
CONFIG_FSL_ERRATUM_A008585=y
|
||||
CONFIG_FS_ENCRYPTION=y
|
||||
CONFIG_FS_ENCRYPTION_ALGS=y
|
||||
CONFIG_FS_MBCACHE=y
|
||||
# CONFIG_FUEL_GAUGE_MM8013 is not set
|
||||
CONFIG_FWNODE_MDIO=y
|
||||
CONFIG_FW_CACHE=y
|
||||
CONFIG_GENERIC_IRQ_CHIP=y
|
||||
CONFIG_GENERIC_IRQ_MIGRATION=y
|
||||
CONFIG_GENERIC_PINCONF=y
|
||||
CONFIG_GENERIC_PINCTRL_GROUPS=y
|
||||
CONFIG_GENERIC_PINMUX_FUNCTIONS=y
|
||||
CONFIG_GPIOLIB_IRQCHIP=y
|
||||
CONFIG_GPIO_BCM_VIRT=y
|
||||
# CONFIG_GPIO_PWM is not set
|
||||
CONFIG_GPIO_RASPBERRYPI_EXP=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HOTPLUG_CORE_SYNC=y
|
||||
CONFIG_HOTPLUG_CORE_SYNC_DEAD=y
|
||||
CONFIG_HOTPLUG_CPU=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_BCM2835=y
|
||||
# CONFIG_HZ_PERIODIC is not set
|
||||
CONFIG_I2C=y
|
||||
# CONFIG_I2C_BCM2708 is not set
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
# CONFIG_I2C_DESIGNWARE_CORE is not set
|
||||
# CONFIG_IDPF is not set
|
||||
CONFIG_INPUT=y
|
||||
CONFIG_INPUT_MOUSEDEV=y
|
||||
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
|
||||
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
|
||||
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
|
||||
CONFIG_JBD2=y
|
||||
# CONFIG_KEBA_CP500 is not set
|
||||
CONFIG_KEYS=y
|
||||
CONFIG_LEDS_GPIO=y
|
||||
# CONFIG_LEDS_KTD202X is not set
|
||||
# CONFIG_LEDS_NCP5623 is not set
|
||||
CONFIG_LEDS_PWM=y
|
||||
CONFIG_LEDS_TRIGGER_ACTPWR=y
|
||||
CONFIG_LEDS_TRIGGER_INPUT=y
|
||||
# CONFIG_LEDS_TRIGGER_INPUT_EVENTS is not set
|
||||
CONFIG_LOGO=y
|
||||
CONFIG_LOGO_LINUX_CLUT224=y
|
||||
# CONFIG_LOGO_LINUX_MONO is not set
|
||||
# CONFIG_LOGO_LINUX_VGA16 is not set
|
||||
CONFIG_MAC_PARTITION=y
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1f6
|
||||
CONFIG_MAILBOX=y
|
||||
# CONFIG_MAILBOX_TEST is not set
|
||||
CONFIG_MDIO_BUS=y
|
||||
CONFIG_MDIO_DEVICE=y
|
||||
CONFIG_MDIO_DEVRES=y
|
||||
CONFIG_MEDIA_CAMERA_SUPPORT=y
|
||||
CONFIG_MEDIA_CONTROLLER=y
|
||||
CONFIG_MEDIA_PLATFORM_DRIVERS=y
|
||||
CONFIG_MEDIA_PLATFORM_SUPPORT=y
|
||||
CONFIG_MEDIA_SUPPORT=y
|
||||
CONFIG_MEDIA_SUPPORT_FILTER=y
|
||||
CONFIG_MEMORY_ISOLATION=y
|
||||
# CONFIG_MFD_88PM886_PMIC is not set
|
||||
# CONFIG_MFD_ADP5585 is not set
|
||||
CONFIG_MFD_CORE=y
|
||||
# CONFIG_MFD_CS40L50_I2C is not set
|
||||
# CONFIG_MFD_RASPBERRYPI_POE_HAT is not set
|
||||
# CONFIG_MFD_ROHM_BD96801 is not set
|
||||
# CONFIG_MFD_RP1 is not set
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_MICROCHIP_PHY=y
|
||||
# CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY is not set
|
||||
CONFIG_MMC=y
|
||||
# CONFIG_MMC_BCM2835 is not set
|
||||
CONFIG_MMC_BCM2835_DMA=y
|
||||
CONFIG_MMC_BCM2835_MMC=y
|
||||
CONFIG_MMC_BCM2835_PIO_DMA_BARRIER=2
|
||||
CONFIG_MMC_BCM2835_SDHOST=y
|
||||
CONFIG_MMC_BLOCK=y
|
||||
CONFIG_MMC_BLOCK_MINORS=32
|
||||
CONFIG_MMC_HSQ=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_IO_ACCESSORS=y
|
||||
CONFIG_MMC_SDHCI_IPROC=y
|
||||
# CONFIG_MMC_SDHCI_PCI is not set
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
# CONFIG_MTD is not set
|
||||
CONFIG_NET_DEVMEM=y
|
||||
CONFIG_NET_SELFTESTS=y
|
||||
CONFIG_NLS=y
|
||||
CONFIG_NLS_ASCII=y
|
||||
CONFIG_NOP_USB_XCEIV=y
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_NO_HZ_COMMON=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_NR_CPUS=4
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_NVMEM_LAYOUTS=y
|
||||
CONFIG_NVMEM_RASPBERRYPI_OTP=y
|
||||
# CONFIG_OCTEON_EP_VF is not set
|
||||
CONFIG_OF_CONFIGFS=y
|
||||
CONFIG_OF_DYNAMIC=y
|
||||
CONFIG_OF_MDIO=y
|
||||
CONFIG_OF_OVERLAY=y
|
||||
CONFIG_OF_RESOLVE=y
|
||||
CONFIG_PCI=y
|
||||
# CONFIG_PCIE_BRCMSTB is not set
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
CONFIG_PCI_DOMAINS_GENERIC=y
|
||||
CONFIG_PCI_MSI=y
|
||||
# CONFIG_PCI_NPEM is not set
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHYLIB_LEDS=y
|
||||
CONFIG_PINCTRL=y
|
||||
# CONFIG_PINCTRL_AW9523 is not set
|
||||
# CONFIG_PINCTRL_BCM2712 is not set
|
||||
CONFIG_PINCTRL_BCM2835=y
|
||||
# CONFIG_PINCTRL_RP1 is not set
|
||||
CONFIG_PM=y
|
||||
CONFIG_PM_CLK=y
|
||||
CONFIG_PM_GENERIC_DOMAINS=y
|
||||
CONFIG_PM_GENERIC_DOMAINS_OF=y
|
||||
CONFIG_PM_GENERIC_DOMAINS_SLEEP=y
|
||||
CONFIG_PM_OPP=y
|
||||
CONFIG_PM_SLEEP=y
|
||||
CONFIG_PM_SLEEP_SMP=y
|
||||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_PWM=y
|
||||
CONFIG_PWM_BCM2835=y
|
||||
# CONFIG_PWM_GPIO is not set
|
||||
# CONFIG_PWM_RP1 is not set
|
||||
CONFIG_RASPBERRYPI_FIRMWARE=y
|
||||
CONFIG_RASPBERRYPI_GPIOMEM=y
|
||||
CONFIG_RASPBERRYPI_POWER=y
|
||||
# CONFIG_RAVE_SP_CORE is not set
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_REGULATOR=y
|
||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||
CONFIG_REGULATOR_GPIO=y
|
||||
# CONFIG_REGULATOR_MAX77503 is not set
|
||||
# CONFIG_REGULATOR_NETLINK_EVENTS is not set
|
||||
CONFIG_RESET_CONTROLLER=y
|
||||
# CONFIG_RESET_GPIO is not set
|
||||
# CONFIG_RESET_RASPBERRYPI is not set
|
||||
CONFIG_RESET_SIMPLE=y
|
||||
# CONFIG_RPI_POE_POWER is not set
|
||||
# CONFIG_RPMB is not set
|
||||
# CONFIG_RTASE is not set
|
||||
CONFIG_RUSTC_SUPPORTS_ARM64=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_SCSI_COMMON=y
|
||||
# CONFIG_SCSI_LOWLEVEL is not set
|
||||
# CONFIG_SCSI_PROC_FS is not set
|
||||
# CONFIG_SENSORS_CHIPCAP2 is not set
|
||||
# CONFIG_SENSORS_LTC2991 is not set
|
||||
# CONFIG_SENSORS_LTC4282 is not set
|
||||
# CONFIG_SENSORS_POWERZ is not set
|
||||
# CONFIG_SENSORS_PT5161L is not set
|
||||
# CONFIG_SENSORS_SPD5118 is not set
|
||||
CONFIG_SERIAL_8250_BCM2835AUX=y
|
||||
# CONFIG_SERIAL_8250_DMA is not set
|
||||
CONFIG_SERIAL_8250_EXTENDED=y
|
||||
CONFIG_SERIAL_8250_NR_UARTS=1
|
||||
CONFIG_SERIAL_8250_RUNTIME_UARTS=0
|
||||
CONFIG_SERIAL_8250_SHARE_IRQ=y
|
||||
CONFIG_SERIAL_AMBA_PL011=y
|
||||
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
|
||||
CONFIG_SERIAL_DEV_BUS=y
|
||||
# CONFIG_SERIAL_DEV_CTRL_TTYPORT is not set
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SG_POOL=y
|
||||
CONFIG_SMSC_PHY=y
|
||||
# CONFIG_STRIP_ASM_SYMS is not set
|
||||
CONFIG_SUSPEND=y
|
||||
CONFIG_SUSPEND_FREEZER=y
|
||||
CONFIG_SWPHY=y
|
||||
# CONFIG_TEHUTI_TN40 is not set
|
||||
# CONFIG_TEXTSEARCH is not set
|
||||
CONFIG_THERMAL=y
|
||||
# CONFIG_THERMAL_CORE_TESTING is not set
|
||||
# CONFIG_THERMAL_DEBUGFS is not set
|
||||
CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
|
||||
CONFIG_THERMAL_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_OF=y
|
||||
# CONFIG_UCLAMP_TASK is not set
|
||||
CONFIG_UEVENT_HELPER_PATH=""
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
|
||||
CONFIG_USB_COMMON=y
|
||||
CONFIG_USB_DEFAULT_AUTHORIZATION_MODE=1
|
||||
CONFIG_USB_DWCOTG=y
|
||||
CONFIG_USB_LAN78XX=y
|
||||
CONFIG_USB_NET_DRIVERS=y
|
||||
CONFIG_USB_NET_SMSC95XX=y
|
||||
# CONFIG_USB_ONBOARD_DEV is not set
|
||||
CONFIG_USB_PHY=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USB_UAS=y
|
||||
CONFIG_USB_USBNET=y
|
||||
CONFIG_VCHIQ_CDEV=y
|
||||
CONFIG_VIDEO=y
|
||||
# CONFIG_VIDEO_AD5398 is not set
|
||||
# CONFIG_VIDEO_BCM2835_UNICAM is not set
|
||||
# CONFIG_VIDEO_BCM2835_UNICAM_LEGACY is not set
|
||||
# CONFIG_VIDEO_BU64754 is not set
|
||||
# CONFIG_VIDEO_CODEC_BCM2835 is not set
|
||||
CONFIG_VIDEO_DEV=y
|
||||
# CONFIG_VIDEO_IRS1125 is not set
|
||||
# CONFIG_VIDEO_ISP_BCM2835 is not set
|
||||
# CONFIG_VIDEO_MAX96714 is not set
|
||||
# CONFIG_VIDEO_MAX96717 is not set
|
||||
# CONFIG_VIDEO_RP1_CFE is not set
|
||||
# CONFIG_VIDEO_THP7312 is not set
|
||||
CONFIG_VIDEO_V4L2_I2C=y
|
||||
CONFIG_VMAP_STACK=y
|
||||
CONFIG_VT=y
|
||||
CONFIG_VT_CONSOLE=y
|
||||
CONFIG_VT_CONSOLE_SLEEP=y
|
||||
CONFIG_VT_HW_CONSOLE_BINDING=y
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_XZ_DEC_ARM=y
|
|
@ -1,400 +0,0 @@
|
|||
# CONFIG_AIO is not set
|
||||
# CONFIG_AMD_QDMA is not set
|
||||
CONFIG_APERTURE_HELPERS=y
|
||||
CONFIG_ARCH_BCM=y
|
||||
CONFIG_ARCH_BCM2835=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARM64_ERRATUM_1319367=y
|
||||
CONFIG_ARM64_HW_AFDBM=y
|
||||
CONFIG_ARM64_PTR_AUTH=y
|
||||
CONFIG_ARM64_PTR_AUTH_KERNEL=y
|
||||
CONFIG_ARM64_SVE=y
|
||||
CONFIG_ARM64_WORKAROUND_SPECULATIVE_AT=y
|
||||
CONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y
|
||||
CONFIG_ARM_GIC_V2M=y
|
||||
# CONFIG_ARM_MHU_V2 is not set
|
||||
# CONFIG_ARM_MHU_V3 is not set
|
||||
CONFIG_ARM_RASPBERRYPI_CPUFREQ=y
|
||||
CONFIG_ARM_TIMER_SP804=y
|
||||
CONFIG_ASSOCIATIVE_ARRAY=y
|
||||
# CONFIG_BATTERY_MAX1720X is not set
|
||||
CONFIG_BCM2708_VCMEM=y
|
||||
CONFIG_BCM2711_THERMAL=y
|
||||
CONFIG_BCM2835_MBOX=y
|
||||
CONFIG_BCM2835_POWER=y
|
||||
# CONFIG_BCM2835_SMI is not set
|
||||
# CONFIG_BCM2835_THERMAL is not set
|
||||
CONFIG_BCM2835_VCHIQ=y
|
||||
# CONFIG_BCM2835_VCHIQ_MMAL is not set
|
||||
CONFIG_BCM2835_WDT=y
|
||||
CONFIG_BCM7XXX_PHY=y
|
||||
CONFIG_BCMGENET=y
|
||||
CONFIG_BCM_NET_PHYLIB=y
|
||||
CONFIG_BCM_VCIO=y
|
||||
# CONFIG_BCM_VC_SM_CMA is not set
|
||||
CONFIG_BCM_VIDEOCORE=y
|
||||
# CONFIG_BLK_DEV_INITRD is not set
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_BLK_DEV_RAM_COUNT=16
|
||||
CONFIG_BLK_DEV_RAM_SIZE=4096
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
CONFIG_BLK_PM=y
|
||||
CONFIG_BRCMSTB_L2_IRQ=y
|
||||
CONFIG_BRCM_CHAR_DRIVERS=y
|
||||
CONFIG_BROADCOM_PHY=y
|
||||
CONFIG_BUFFER_HEAD=y
|
||||
CONFIG_CAVIUM_ERRATUM_22375=y
|
||||
CONFIG_CAVIUM_ERRATUM_23154=y
|
||||
CONFIG_CAVIUM_ERRATUM_27456=y
|
||||
CONFIG_CLKSRC_MMIO=y
|
||||
CONFIG_CLK_BCM2711_DVP=y
|
||||
CONFIG_CLK_BCM2835=y
|
||||
CONFIG_CLK_RASPBERRYPI=y
|
||||
CONFIG_CMA=y
|
||||
CONFIG_CMA_ALIGNMENT=8
|
||||
CONFIG_CMA_AREAS=7
|
||||
# CONFIG_CMA_DEBUGFS is not set
|
||||
CONFIG_CMA_SIZE_MBYTES=5
|
||||
# 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_COMMON_CLK_RP1 is not set
|
||||
CONFIG_COMMON_CLK_XGENE=y
|
||||
CONFIG_CONFIGFS_FS=y
|
||||
CONFIG_CONSOLE_TRANSLATIONS=y
|
||||
CONFIG_CONTIG_ALLOC=y
|
||||
CONFIG_CPUFREQ_DT=y
|
||||
CONFIG_CPUFREQ_DT_PLATDEV=y
|
||||
# CONFIG_CPU_BIG_ENDIAN is not set
|
||||
CONFIG_CPU_FREQ=y
|
||||
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=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_SCHEDUTIL=y
|
||||
CONFIG_CPU_FREQ_GOV_USERSPACE=y
|
||||
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_CRC16=y
|
||||
CONFIG_CRYPTO_AES_ARM64=y
|
||||
CONFIG_CRYPTO_AES_ARM64_BS=y
|
||||
CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y
|
||||
CONFIG_CRYPTO_CBC=y
|
||||
CONFIG_CRYPTO_CRC32=y
|
||||
CONFIG_CRYPTO_CRC32C=y
|
||||
CONFIG_CRYPTO_CRYPTD=y
|
||||
CONFIG_CRYPTO_CTS=y
|
||||
CONFIG_CRYPTO_DRBG=y
|
||||
CONFIG_CRYPTO_DRBG_HMAC=y
|
||||
CONFIG_CRYPTO_DRBG_MENU=y
|
||||
CONFIG_CRYPTO_GENIV=y
|
||||
CONFIG_CRYPTO_HMAC=y
|
||||
CONFIG_CRYPTO_JITTERENTROPY=y
|
||||
CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKS=64
|
||||
CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKSIZE=32
|
||||
CONFIG_CRYPTO_JITTERENTROPY_OSR=1
|
||||
CONFIG_CRYPTO_LIB_SHA256=y
|
||||
CONFIG_CRYPTO_RNG=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_RNG_DEFAULT=y
|
||||
CONFIG_CRYPTO_SEQIV=y
|
||||
CONFIG_CRYPTO_SHA256=y
|
||||
CONFIG_CRYPTO_SHA256_ARM64=y
|
||||
CONFIG_CRYPTO_SHA3=y
|
||||
CONFIG_CRYPTO_SHA512=y
|
||||
CONFIG_CRYPTO_SHA512_ARM64=y
|
||||
CONFIG_CRYPTO_XTS=y
|
||||
CONFIG_DEBUG_BUGVERBOSE=y
|
||||
CONFIG_DMABUF_HEAPS=y
|
||||
CONFIG_DMABUF_HEAPS_CMA=y
|
||||
CONFIG_DMABUF_HEAPS_SYSTEM=y
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_DMA_BCM2708=y
|
||||
CONFIG_DMA_BCM2835=y
|
||||
CONFIG_DMA_CMA=y
|
||||
CONFIG_DMA_ENGINE=y
|
||||
# CONFIG_DMA_NUMA_CMA is not set
|
||||
CONFIG_DMA_OF=y
|
||||
CONFIG_DMA_SHARED_BUFFER=y
|
||||
CONFIG_DMA_VIRTUAL_CHANNELS=y
|
||||
CONFIG_DNOTIFY=y
|
||||
# CONFIG_DP83TG720_PHY is not set
|
||||
CONFIG_DUMMY_CONSOLE=y
|
||||
CONFIG_EXT4_FS=y
|
||||
CONFIG_EXTCON=y
|
||||
CONFIG_F2FS_FS=y
|
||||
CONFIG_FB=y
|
||||
CONFIG_FB_BCM2708=y
|
||||
CONFIG_FB_CFB_COPYAREA=y
|
||||
CONFIG_FB_CFB_FILLRECT=y
|
||||
CONFIG_FB_CFB_IMAGEBLIT=y
|
||||
CONFIG_FB_CORE=y
|
||||
CONFIG_FB_DEVICE=y
|
||||
CONFIG_FB_IOMEM_FOPS=y
|
||||
CONFIG_FB_IOMEM_HELPERS=y
|
||||
# CONFIG_FB_RPISENSE is not set
|
||||
CONFIG_FB_SIMPLE=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FONT_8x16=y
|
||||
CONFIG_FONT_8x8=y
|
||||
CONFIG_FONT_SUPPORT=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
|
||||
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
|
||||
CONFIG_FREEZER=y
|
||||
CONFIG_FSL_ERRATUM_A008585=y
|
||||
CONFIG_FS_ENCRYPTION=y
|
||||
CONFIG_FS_ENCRYPTION_ALGS=y
|
||||
CONFIG_FS_MBCACHE=y
|
||||
# CONFIG_FUEL_GAUGE_MM8013 is not set
|
||||
CONFIG_FWNODE_MDIO=y
|
||||
CONFIG_FW_CACHE=y
|
||||
CONFIG_GENERIC_ARCH_NUMA=y
|
||||
CONFIG_GENERIC_IRQ_CHIP=y
|
||||
CONFIG_GENERIC_IRQ_MIGRATION=y
|
||||
CONFIG_GENERIC_PHY=y
|
||||
CONFIG_GENERIC_PINCONF=y
|
||||
CONFIG_GENERIC_PINCTRL_GROUPS=y
|
||||
CONFIG_GENERIC_PINMUX_FUNCTIONS=y
|
||||
CONFIG_GPIOLIB_IRQCHIP=y
|
||||
CONFIG_GPIO_BCM_VIRT=y
|
||||
# CONFIG_GPIO_PWM is not set
|
||||
CONFIG_GPIO_RASPBERRYPI_EXP=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HOTPLUG_CORE_SYNC=y
|
||||
CONFIG_HOTPLUG_CORE_SYNC_DEAD=y
|
||||
CONFIG_HOTPLUG_CPU=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_IPROC_RNG200=y
|
||||
# CONFIG_HZ_PERIODIC is not set
|
||||
CONFIG_I2C=y
|
||||
# CONFIG_I2C_BCM2708 is not set
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
# CONFIG_I2C_DESIGNWARE_CORE is not set
|
||||
# CONFIG_IDPF is not set
|
||||
CONFIG_INPUT=y
|
||||
CONFIG_INPUT_MOUSEDEV=y
|
||||
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
|
||||
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
|
||||
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
|
||||
CONFIG_JBD2=y
|
||||
# CONFIG_KEBA_CP500 is not set
|
||||
CONFIG_KEYS=y
|
||||
CONFIG_LEDS_GPIO=y
|
||||
# CONFIG_LEDS_KTD202X is not set
|
||||
# CONFIG_LEDS_NCP5623 is not set
|
||||
CONFIG_LEDS_PWM=y
|
||||
CONFIG_LEDS_TRIGGER_ACTPWR=y
|
||||
CONFIG_LEDS_TRIGGER_INPUT=y
|
||||
# CONFIG_LEDS_TRIGGER_INPUT_EVENTS is not set
|
||||
CONFIG_LOGO=y
|
||||
CONFIG_LOGO_LINUX_CLUT224=y
|
||||
# CONFIG_LOGO_LINUX_MONO is not set
|
||||
# CONFIG_LOGO_LINUX_VGA16 is not set
|
||||
CONFIG_MAC_PARTITION=y
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1f6
|
||||
CONFIG_MAILBOX=y
|
||||
# CONFIG_MAILBOX_TEST is not set
|
||||
CONFIG_MDIO_BCM_UNIMAC=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_DRIVERS=y
|
||||
CONFIG_MEDIA_PLATFORM_SUPPORT=y
|
||||
CONFIG_MEDIA_SUPPORT=y
|
||||
CONFIG_MEDIA_SUPPORT_FILTER=y
|
||||
CONFIG_MEMORY_ISOLATION=y
|
||||
# CONFIG_MFD_88PM886_PMIC is not set
|
||||
# CONFIG_MFD_ADP5585 is not set
|
||||
CONFIG_MFD_CORE=y
|
||||
# CONFIG_MFD_CS40L50_I2C is not set
|
||||
# CONFIG_MFD_RASPBERRYPI_POE_HAT is not set
|
||||
# CONFIG_MFD_ROHM_BD96801 is not set
|
||||
# CONFIG_MFD_RP1 is not set
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_MMC=y
|
||||
# CONFIG_MMC_BCM2835 is not set
|
||||
CONFIG_MMC_BCM2835_DMA=y
|
||||
CONFIG_MMC_BCM2835_MMC=y
|
||||
CONFIG_MMC_BCM2835_PIO_DMA_BARRIER=2
|
||||
CONFIG_MMC_BCM2835_SDHOST=y
|
||||
CONFIG_MMC_BLOCK=y
|
||||
CONFIG_MMC_BLOCK_MINORS=32
|
||||
CONFIG_MMC_HSQ=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_IO_ACCESSORS=y
|
||||
CONFIG_MMC_SDHCI_IPROC=y
|
||||
# CONFIG_MMC_SDHCI_PCI is not set
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
# CONFIG_MTD is not set
|
||||
CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y
|
||||
CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
|
||||
CONFIG_NET_DEVMEM=y
|
||||
CONFIG_NET_PTP_CLASSIFY=y
|
||||
CONFIG_NET_SELFTESTS=y
|
||||
CONFIG_NLS=y
|
||||
CONFIG_NLS_ASCII=y
|
||||
CONFIG_NODES_SHIFT=4
|
||||
CONFIG_NOP_USB_XCEIV=y
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_NO_HZ_COMMON=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_NR_CPUS=4
|
||||
CONFIG_NUMA=y
|
||||
# CONFIG_NUMA_BALANCING is not set
|
||||
# CONFIG_NUMA_EMU is not set
|
||||
CONFIG_NUMA_MEMBLKS=y
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_NVMEM_LAYOUTS=y
|
||||
CONFIG_NVMEM_RASPBERRYPI_OTP=y
|
||||
# CONFIG_OCTEON_EP_VF is not set
|
||||
CONFIG_OF_CONFIGFS=y
|
||||
CONFIG_OF_DYNAMIC=y
|
||||
CONFIG_OF_MDIO=y
|
||||
CONFIG_OF_NUMA=y
|
||||
CONFIG_OF_OVERLAY=y
|
||||
CONFIG_OF_RESOLVE=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCIEAER=y
|
||||
CONFIG_PCIEPORTBUS=y
|
||||
CONFIG_PCIE_BRCMSTB=y
|
||||
CONFIG_PCIE_PME=y
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
CONFIG_PCI_DOMAINS_GENERIC=y
|
||||
CONFIG_PCI_MSI=y
|
||||
# CONFIG_PCI_NPEM is not set
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHYLIB_LEDS=y
|
||||
CONFIG_PINCTRL=y
|
||||
# CONFIG_PINCTRL_AW9523 is not set
|
||||
# CONFIG_PINCTRL_BCM2712 is not set
|
||||
CONFIG_PINCTRL_BCM2835=y
|
||||
# CONFIG_PINCTRL_RP1 is not set
|
||||
CONFIG_PM=y
|
||||
CONFIG_PM_CLK=y
|
||||
CONFIG_PM_GENERIC_DOMAINS=y
|
||||
CONFIG_PM_GENERIC_DOMAINS_OF=y
|
||||
CONFIG_PM_GENERIC_DOMAINS_SLEEP=y
|
||||
CONFIG_PM_OPP=y
|
||||
CONFIG_PM_SLEEP=y
|
||||
CONFIG_PM_SLEEP_SMP=y
|
||||
CONFIG_PPS=y
|
||||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_PTP_1588_CLOCK=y
|
||||
# CONFIG_PTP_1588_CLOCK_FC3W is not set
|
||||
CONFIG_PWM=y
|
||||
CONFIG_PWM_BCM2835=y
|
||||
# CONFIG_PWM_GPIO is not set
|
||||
# CONFIG_PWM_RP1 is not set
|
||||
CONFIG_RAS=y
|
||||
CONFIG_RASPBERRYPI_FIRMWARE=y
|
||||
CONFIG_RASPBERRYPI_GPIOMEM=y
|
||||
CONFIG_RASPBERRYPI_POWER=y
|
||||
# CONFIG_RAVE_SP_CORE is not set
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_REGULATOR=y
|
||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||
CONFIG_REGULATOR_GPIO=y
|
||||
# CONFIG_REGULATOR_MAX77503 is not set
|
||||
# CONFIG_REGULATOR_NETLINK_EVENTS is not set
|
||||
CONFIG_RESET_CONTROLLER=y
|
||||
# CONFIG_RESET_GPIO is not set
|
||||
CONFIG_RESET_RASPBERRYPI=y
|
||||
CONFIG_RESET_SIMPLE=y
|
||||
# CONFIG_RPI_POE_POWER is not set
|
||||
# CONFIG_RPMB is not set
|
||||
# CONFIG_RTASE is not set
|
||||
CONFIG_RUSTC_SUPPORTS_ARM64=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_SCSI_COMMON=y
|
||||
# CONFIG_SCSI_LOWLEVEL is not set
|
||||
# CONFIG_SCSI_PROC_FS is not set
|
||||
# CONFIG_SENSORS_CHIPCAP2 is not set
|
||||
# CONFIG_SENSORS_LTC2991 is not set
|
||||
# CONFIG_SENSORS_LTC4282 is not set
|
||||
# CONFIG_SENSORS_POWERZ is not set
|
||||
# CONFIG_SENSORS_PT5161L is not set
|
||||
# CONFIG_SENSORS_SPD5118 is not set
|
||||
CONFIG_SERIAL_8250_BCM2835AUX=y
|
||||
# CONFIG_SERIAL_8250_DMA is not set
|
||||
CONFIG_SERIAL_8250_EXTENDED=y
|
||||
CONFIG_SERIAL_8250_NR_UARTS=1
|
||||
CONFIG_SERIAL_8250_RUNTIME_UARTS=0
|
||||
CONFIG_SERIAL_8250_SHARE_IRQ=y
|
||||
CONFIG_SERIAL_AMBA_PL011=y
|
||||
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
|
||||
CONFIG_SERIAL_DEV_BUS=y
|
||||
# CONFIG_SERIAL_DEV_CTRL_TTYPORT is not set
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SG_POOL=y
|
||||
# CONFIG_STRIP_ASM_SYMS is not set
|
||||
CONFIG_SUSPEND=y
|
||||
CONFIG_SUSPEND_FREEZER=y
|
||||
CONFIG_SWPHY=y
|
||||
# CONFIG_TEHUTI_TN40 is not set
|
||||
# CONFIG_TEXTSEARCH is not set
|
||||
CONFIG_THERMAL=y
|
||||
# CONFIG_THERMAL_CORE_TESTING is not set
|
||||
# CONFIG_THERMAL_DEBUGFS is not set
|
||||
CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
|
||||
CONFIG_THERMAL_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_OF=y
|
||||
# CONFIG_UCLAMP_TASK is not set
|
||||
CONFIG_UEVENT_HELPER_PATH=""
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
|
||||
CONFIG_USB_COMMON=y
|
||||
CONFIG_USB_DEFAULT_AUTHORIZATION_MODE=1
|
||||
CONFIG_USB_DWCOTG=y
|
||||
CONFIG_USB_GADGET=y
|
||||
# CONFIG_USB_ONBOARD_DEV is not set
|
||||
CONFIG_USB_PCI=y
|
||||
# CONFIG_USB_PCI_AMD is not set
|
||||
CONFIG_USB_PHY=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USB_UAS=y
|
||||
# CONFIG_USB_UHCI_HCD is not set
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
CONFIG_USB_XHCI_PCI=y
|
||||
CONFIG_USB_XHCI_PLATFORM=y
|
||||
CONFIG_USE_PERCPU_NUMA_NODE_ID=y
|
||||
CONFIG_VCHIQ_CDEV=y
|
||||
CONFIG_VIDEO=y
|
||||
# CONFIG_VIDEO_AD5398 is not set
|
||||
# CONFIG_VIDEO_BCM2835_UNICAM is not set
|
||||
# CONFIG_VIDEO_BCM2835_UNICAM_LEGACY is not set
|
||||
# CONFIG_VIDEO_BU64754 is not set
|
||||
# CONFIG_VIDEO_CODEC_BCM2835 is not set
|
||||
CONFIG_VIDEO_DEV=y
|
||||
# CONFIG_VIDEO_IRS1125 is not set
|
||||
# CONFIG_VIDEO_ISP_BCM2835 is not set
|
||||
# CONFIG_VIDEO_MAX96714 is not set
|
||||
# CONFIG_VIDEO_MAX96717 is not set
|
||||
# CONFIG_VIDEO_RP1_CFE is not set
|
||||
# CONFIG_VIDEO_THP7312 is not set
|
||||
CONFIG_VIDEO_V4L2_I2C=y
|
||||
CONFIG_VMAP_STACK=y
|
||||
CONFIG_VT=y
|
||||
CONFIG_VT_CONSOLE=y
|
||||
CONFIG_VT_CONSOLE_SLEEP=y
|
||||
CONFIG_VT_HW_CONSOLE_BINDING=y
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_XZ_DEC_ARM=y
|
|
@ -1,529 +0,0 @@
|
|||
# CONFIG_AIO is not set
|
||||
# CONFIG_AMD_QDMA is not set
|
||||
CONFIG_APERTURE_HELPERS=y
|
||||
CONFIG_ARCH_BCM=y
|
||||
CONFIG_ARCH_BCM2835=y
|
||||
CONFIG_ARCH_BRCMSTB=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARM64_ERRATUM_1165522=y
|
||||
CONFIG_ARM64_ERRATUM_1286807=y
|
||||
CONFIG_ARM64_ERRATUM_1463225=y
|
||||
CONFIG_ARM64_ERRATUM_3194386=y
|
||||
CONFIG_ARM64_HW_AFDBM=y
|
||||
CONFIG_ARM64_PTR_AUTH=y
|
||||
CONFIG_ARM64_PTR_AUTH_KERNEL=y
|
||||
CONFIG_ARM64_SVE=y
|
||||
CONFIG_ARM64_WORKAROUND_REPEAT_TLBI=y
|
||||
CONFIG_ARM64_WORKAROUND_SPECULATIVE_AT=y
|
||||
CONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y
|
||||
CONFIG_ARM_BRCMSTB_AVS_CPUFREQ=y
|
||||
CONFIG_ARM_GIC_V2M=y
|
||||
# CONFIG_ARM_MHU_V2 is not set
|
||||
# CONFIG_ARM_MHU_V3 is not set
|
||||
# CONFIG_ARM_PL172_MPMC is not set
|
||||
CONFIG_ARM_RASPBERRYPI_CPUFREQ=y
|
||||
# CONFIG_ARM_SMMU is not set
|
||||
# CONFIG_ARM_SMMU_V3 is not set
|
||||
CONFIG_ARM_TIMER_SP804=y
|
||||
CONFIG_ASSOCIATIVE_ARRAY=y
|
||||
# CONFIG_BATTERY_MAX1720X is not set
|
||||
CONFIG_BCM2708_VCMEM=y
|
||||
CONFIG_BCM2711_THERMAL=y
|
||||
CONFIG_BCM2712_IOMMU=y
|
||||
CONFIG_BCM2712_MIP=y
|
||||
CONFIG_BCM2835_MBOX=y
|
||||
CONFIG_BCM2835_POWER=y
|
||||
CONFIG_BCM2835_SMI=y
|
||||
CONFIG_BCM2835_SMI_DEV=m
|
||||
CONFIG_BCM2835_THERMAL=y
|
||||
CONFIG_BCM2835_VCHIQ=y
|
||||
# CONFIG_BCM2835_VCHIQ_MMAL is not set
|
||||
CONFIG_BCM2835_WDT=y
|
||||
CONFIG_BCM7038_L1_IRQ=y
|
||||
CONFIG_BCM7120_L2_IRQ=y
|
||||
CONFIG_BCM7XXX_PHY=y
|
||||
CONFIG_BCMA=y
|
||||
CONFIG_BCMASP=y
|
||||
CONFIG_BCMA_BLOCKIO=y
|
||||
# CONFIG_BCMA_DEBUG is not set
|
||||
# CONFIG_BCMA_DRIVER_GMAC_CMN is not set
|
||||
CONFIG_BCMA_DRIVER_PCI=y
|
||||
CONFIG_BCMA_FALLBACK_SPROM=y
|
||||
CONFIG_BCMA_HOST_PCI=y
|
||||
CONFIG_BCMA_HOST_PCI_POSSIBLE=y
|
||||
# CONFIG_BCMA_HOST_SOC is not set
|
||||
CONFIG_BCMGENET=y
|
||||
CONFIG_BCM_NET_PHYLIB=y
|
||||
CONFIG_BCM_VCIO=y
|
||||
# CONFIG_BCM_VC_SM_CMA is not set
|
||||
CONFIG_BCM_VIDEOCORE=y
|
||||
# CONFIG_BLK_DEV_INITRD is not set
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_BLK_DEV_NVME=y
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_BLK_DEV_RAM_COUNT=16
|
||||
CONFIG_BLK_DEV_RAM_SIZE=4096
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
CONFIG_BLK_PM=y
|
||||
CONFIG_BRCMSTB_DPFE=y
|
||||
CONFIG_BRCMSTB_L2_IRQ=y
|
||||
CONFIG_BRCMSTB_MEMC=y
|
||||
# CONFIG_BRCMSTB_THERMAL is not set
|
||||
CONFIG_BRCM_CHAR_DRIVERS=y
|
||||
CONFIG_BRCM_USB_PINMAP=y
|
||||
CONFIG_BROADCOM_PHY=y
|
||||
CONFIG_BUFFER_HEAD=y
|
||||
CONFIG_CLKSRC_MMIO=y
|
||||
CONFIG_CLK_BCM2711_DVP=y
|
||||
CONFIG_CLK_BCM2835=y
|
||||
CONFIG_CLK_RASPBERRYPI=y
|
||||
CONFIG_CMA=y
|
||||
CONFIG_CMA_ALIGNMENT=8
|
||||
CONFIG_CMA_AREAS=7
|
||||
# CONFIG_CMA_DEBUGFS is not set
|
||||
CONFIG_CMA_SIZE_MBYTES=5
|
||||
# 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_COMMON_CLK_RP1=y
|
||||
# CONFIG_COMMON_CLK_RP1_SDIO is not set
|
||||
CONFIG_COMMON_CLK_XGENE=y
|
||||
CONFIG_CONFIGFS_FS=y
|
||||
CONFIG_CONSOLE_TRANSLATIONS=y
|
||||
CONFIG_CONTIG_ALLOC=y
|
||||
CONFIG_CPUFREQ_DT=y
|
||||
CONFIG_CPUFREQ_DT_PLATDEV=y
|
||||
# CONFIG_CPU_BIG_ENDIAN is not set
|
||||
CONFIG_CPU_FREQ=y
|
||||
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=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_SCHEDUTIL=y
|
||||
CONFIG_CPU_FREQ_GOV_USERSPACE=y
|
||||
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_CRC16=y
|
||||
CONFIG_CRYPTO_AES_ARM64=y
|
||||
CONFIG_CRYPTO_AES_ARM64_BS=y
|
||||
CONFIG_CRYPTO_AES_ARM64_CE=y
|
||||
CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
|
||||
CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
|
||||
CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y
|
||||
CONFIG_CRYPTO_CBC=y
|
||||
CONFIG_CRYPTO_CRC32=y
|
||||
CONFIG_CRYPTO_CRC32C=y
|
||||
CONFIG_CRYPTO_CRYPTD=y
|
||||
CONFIG_CRYPTO_CTS=y
|
||||
CONFIG_CRYPTO_DRBG=y
|
||||
CONFIG_CRYPTO_DRBG_HMAC=y
|
||||
CONFIG_CRYPTO_DRBG_MENU=y
|
||||
CONFIG_CRYPTO_GENIV=y
|
||||
CONFIG_CRYPTO_GHASH_ARM64_CE=y
|
||||
CONFIG_CRYPTO_HMAC=y
|
||||
CONFIG_CRYPTO_JITTERENTROPY=y
|
||||
CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKS=64
|
||||
CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKSIZE=32
|
||||
CONFIG_CRYPTO_JITTERENTROPY_OSR=1
|
||||
CONFIG_CRYPTO_LIB_SHA256=y
|
||||
CONFIG_CRYPTO_RNG=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_RNG_DEFAULT=y
|
||||
CONFIG_CRYPTO_SEQIV=y
|
||||
CONFIG_CRYPTO_SHA1=y
|
||||
CONFIG_CRYPTO_SHA1_ARM64_CE=y
|
||||
CONFIG_CRYPTO_SHA256=y
|
||||
CONFIG_CRYPTO_SHA256_ARM64=y
|
||||
CONFIG_CRYPTO_SHA2_ARM64_CE=y
|
||||
CONFIG_CRYPTO_SHA3=y
|
||||
CONFIG_CRYPTO_SHA3_ARM64=y
|
||||
CONFIG_CRYPTO_SHA512=y
|
||||
CONFIG_CRYPTO_SHA512_ARM64=y
|
||||
CONFIG_CRYPTO_SHA512_ARM64_CE=y
|
||||
CONFIG_CRYPTO_SM3=y
|
||||
CONFIG_CRYPTO_SM3_ARM64_CE=y
|
||||
CONFIG_CRYPTO_SM4=y
|
||||
CONFIG_CRYPTO_SM4_ARM64_CE=y
|
||||
CONFIG_CRYPTO_SM4_ARM64_CE_BLK=y
|
||||
CONFIG_CRYPTO_XTS=y
|
||||
CONFIG_DEBUG_BUGVERBOSE=y
|
||||
CONFIG_DMABUF_HEAPS=y
|
||||
CONFIG_DMABUF_HEAPS_CMA=y
|
||||
CONFIG_DMABUF_HEAPS_SYSTEM=y
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_DMA_BCM2708=y
|
||||
CONFIG_DMA_BCM2835=y
|
||||
CONFIG_DMA_CMA=y
|
||||
CONFIG_DMA_ENGINE=y
|
||||
# CONFIG_DMA_NUMA_CMA is not set
|
||||
CONFIG_DMA_OF=y
|
||||
CONFIG_DMA_OPS_HELPERS=y
|
||||
CONFIG_DMA_SHARED_BUFFER=y
|
||||
CONFIG_DMA_VIRTUAL_CHANNELS=y
|
||||
CONFIG_DNOTIFY=y
|
||||
# CONFIG_DP83TG720_PHY is not set
|
||||
CONFIG_DUMMY_CONSOLE=y
|
||||
CONFIG_EXT4_FS=y
|
||||
CONFIG_EXTCON=y
|
||||
CONFIG_F2FS_FS=y
|
||||
CONFIG_FB=y
|
||||
CONFIG_FB_BCM2708=y
|
||||
CONFIG_FB_CFB_COPYAREA=y
|
||||
CONFIG_FB_CFB_FILLRECT=y
|
||||
CONFIG_FB_CFB_IMAGEBLIT=y
|
||||
CONFIG_FB_CORE=y
|
||||
CONFIG_FB_DEVICE=y
|
||||
CONFIG_FB_IOMEM_FOPS=y
|
||||
CONFIG_FB_IOMEM_HELPERS=y
|
||||
# CONFIG_FB_RPISENSE is not set
|
||||
CONFIG_FB_SIMPLE=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FONT_8x16=y
|
||||
CONFIG_FONT_8x8=y
|
||||
CONFIG_FONT_SUPPORT=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
|
||||
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
|
||||
CONFIG_FREEZER=y
|
||||
CONFIG_FSL_ERRATUM_A008585=y
|
||||
CONFIG_FS_ENCRYPTION=y
|
||||
CONFIG_FS_ENCRYPTION_ALGS=y
|
||||
CONFIG_FS_MBCACHE=y
|
||||
# CONFIG_FUEL_GAUGE_MM8013 is not set
|
||||
CONFIG_FWNODE_MDIO=y
|
||||
CONFIG_FW_CACHE=y
|
||||
CONFIG_GENERIC_ARCH_NUMA=y
|
||||
CONFIG_GENERIC_IRQ_CHIP=y
|
||||
CONFIG_GENERIC_IRQ_INJECTION=y
|
||||
CONFIG_GENERIC_IRQ_MIGRATION=y
|
||||
CONFIG_GENERIC_PHY=y
|
||||
CONFIG_GENERIC_PINCONF=y
|
||||
CONFIG_GENERIC_PINCTRL_GROUPS=y
|
||||
CONFIG_GENERIC_PINMUX_FUNCTIONS=y
|
||||
CONFIG_GLOB=y
|
||||
CONFIG_GPIOLIB_IRQCHIP=y
|
||||
CONFIG_GPIO_BCM_VIRT=y
|
||||
CONFIG_GPIO_BRCMSTB=y
|
||||
CONFIG_GPIO_GENERIC=y
|
||||
# CONFIG_GPIO_PWM is not set
|
||||
CONFIG_GPIO_RASPBERRYPI_EXP=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HOTPLUG_CORE_SYNC=y
|
||||
CONFIG_HOTPLUG_CORE_SYNC_DEAD=y
|
||||
CONFIG_HOTPLUG_CPU=y
|
||||
CONFIG_HOTPLUG_PCI=y
|
||||
# CONFIG_HOTPLUG_PCI_CPCI is not set
|
||||
# CONFIG_HOTPLUG_PCI_PCIE is not set
|
||||
CONFIG_HOTPLUG_PCI_SHPC=y
|
||||
CONFIG_HWMON=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_IPROC_RNG200=y
|
||||
# CONFIG_HZ_PERIODIC is not set
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_ALGOBIT=y
|
||||
# CONFIG_I2C_BCM2708 is not set
|
||||
CONFIG_I2C_BCM2835=y
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
CONFIG_I2C_BRCMSTB=y
|
||||
CONFIG_I2C_DESIGNWARE_CORE=y
|
||||
CONFIG_I2C_DESIGNWARE_PLATFORM=y
|
||||
# CONFIG_IDPF is not set
|
||||
CONFIG_INPUT=y
|
||||
CONFIG_INPUT_MOUSEDEV=y
|
||||
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
|
||||
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
|
||||
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
|
||||
# CONFIG_IOMMUFD is not set
|
||||
CONFIG_IOMMU_API=y
|
||||
# CONFIG_IOMMU_DEBUGFS is not set
|
||||
# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set
|
||||
CONFIG_IOMMU_DEFAULT_DMA_STRICT=y
|
||||
# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set
|
||||
CONFIG_IOMMU_DMA=y
|
||||
CONFIG_IOMMU_IOVA=y
|
||||
# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set
|
||||
# CONFIG_IOMMU_IO_PGTABLE_DART is not set
|
||||
# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set
|
||||
CONFIG_IOMMU_SUPPORT=y
|
||||
CONFIG_IRQ_MSI_IOMMU=y
|
||||
CONFIG_JBD2=y
|
||||
# CONFIG_KEBA_CP500 is not set
|
||||
CONFIG_KEYS=y
|
||||
CONFIG_LEDS_GPIO=y
|
||||
# CONFIG_LEDS_KTD202X is not set
|
||||
# CONFIG_LEDS_NCP5623 is not set
|
||||
CONFIG_LEDS_PWM=y
|
||||
CONFIG_LEDS_TRIGGER_ACTPWR=y
|
||||
CONFIG_LEDS_TRIGGER_INPUT=y
|
||||
# CONFIG_LEDS_TRIGGER_INPUT_EVENTS is not set
|
||||
CONFIG_LOGO=y
|
||||
CONFIG_LOGO_LINUX_CLUT224=y
|
||||
# CONFIG_LOGO_LINUX_MONO is not set
|
||||
# CONFIG_LOGO_LINUX_VGA16 is not set
|
||||
CONFIG_MACB=y
|
||||
CONFIG_MACB_PCI=y
|
||||
CONFIG_MACB_USE_HWSTAMP=y
|
||||
CONFIG_MAC_PARTITION=y
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1f6
|
||||
CONFIG_MAILBOX=y
|
||||
# CONFIG_MAILBOX_TEST is not set
|
||||
# CONFIG_MBOX_RP1 is not set
|
||||
CONFIG_MDIO_BCM_UNIMAC=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_DRIVERS=y
|
||||
CONFIG_MEDIA_PLATFORM_SUPPORT=y
|
||||
CONFIG_MEDIA_SUPPORT=y
|
||||
CONFIG_MEDIA_SUPPORT_FILTER=y
|
||||
CONFIG_MEMORY=y
|
||||
CONFIG_MEMORY_ISOLATION=y
|
||||
# CONFIG_MFD_88PM886_PMIC is not set
|
||||
# CONFIG_MFD_ADP5585 is not set
|
||||
CONFIG_MFD_CORE=y
|
||||
# CONFIG_MFD_CS40L50_I2C is not set
|
||||
# CONFIG_MFD_CS40L50_SPI is not set
|
||||
# CONFIG_MFD_RASPBERRYPI_POE_HAT is not set
|
||||
# CONFIG_MFD_ROHM_BD96801 is not set
|
||||
CONFIG_MFD_RP1=y
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_MICROCHIP_PHY=y
|
||||
CONFIG_MMC=y
|
||||
# CONFIG_MMC_BCM2835 is not set
|
||||
CONFIG_MMC_BCM2835_DMA=y
|
||||
CONFIG_MMC_BCM2835_MMC=y
|
||||
CONFIG_MMC_BCM2835_PIO_DMA_BARRIER=2
|
||||
CONFIG_MMC_BCM2835_SDHOST=y
|
||||
CONFIG_MMC_BLOCK=y
|
||||
CONFIG_MMC_BLOCK_MINORS=32
|
||||
CONFIG_MMC_CQHCI=y
|
||||
CONFIG_MMC_HSQ=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_BRCMSTB=y
|
||||
CONFIG_MMC_SDHCI_IO_ACCESSORS=y
|
||||
CONFIG_MMC_SDHCI_IPROC=y
|
||||
CONFIG_MMC_SDHCI_OF_DWCMSHC=y
|
||||
# CONFIG_MMC_SDHCI_PCI is not set
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y
|
||||
CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
|
||||
CONFIG_NEED_SG_DMA_FLAGS=y
|
||||
CONFIG_NET_DEVMEM=y
|
||||
CONFIG_NET_PTP_CLASSIFY=y
|
||||
CONFIG_NET_SELFTESTS=y
|
||||
CONFIG_NLS=y
|
||||
CONFIG_NLS_ASCII=y
|
||||
CONFIG_NODES_SHIFT=4
|
||||
CONFIG_NOP_USB_XCEIV=y
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_NO_HZ_COMMON=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_NR_CPUS=4
|
||||
CONFIG_NUMA=y
|
||||
# CONFIG_NUMA_BALANCING is not set
|
||||
# CONFIG_NUMA_EMU is not set
|
||||
CONFIG_NUMA_MEMBLKS=y
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_NVMEM_LAYOUTS=y
|
||||
CONFIG_NVMEM_RASPBERRYPI_OTP=y
|
||||
CONFIG_NVME_CORE=y
|
||||
# CONFIG_NVME_HWMON is not set
|
||||
# CONFIG_NVME_MULTIPATH is not set
|
||||
# CONFIG_OCTEON_EP_VF is not set
|
||||
CONFIG_OF_CONFIGFS=y
|
||||
CONFIG_OF_DYNAMIC=y
|
||||
CONFIG_OF_IOMMU=y
|
||||
CONFIG_OF_MDIO=y
|
||||
CONFIG_OF_NUMA=y
|
||||
CONFIG_OF_OVERLAY=y
|
||||
CONFIG_OF_RESOLVE=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCIEAER=y
|
||||
CONFIG_PCIEAER_INJECT=y
|
||||
CONFIG_PCIEASPM=y
|
||||
# CONFIG_PCIEASPM_DEFAULT is not set
|
||||
# CONFIG_PCIEASPM_PERFORMANCE is not set
|
||||
CONFIG_PCIEASPM_POWERSAVE=y
|
||||
# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set
|
||||
CONFIG_PCIEPORTBUS=y
|
||||
CONFIG_PCIE_BRCMSTB=y
|
||||
CONFIG_PCIE_DPC=y
|
||||
CONFIG_PCIE_DW=y
|
||||
CONFIG_PCIE_DW_HOST=y
|
||||
CONFIG_PCIE_DW_PLAT=y
|
||||
CONFIG_PCIE_DW_PLAT_HOST=y
|
||||
CONFIG_PCIE_MICROCHIP_HOST=y
|
||||
CONFIG_PCIE_PLDA_HOST=y
|
||||
CONFIG_PCIE_PME=y
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
CONFIG_PCI_DOMAINS_GENERIC=y
|
||||
CONFIG_PCI_ECAM=y
|
||||
CONFIG_PCI_HOST_COMMON=y
|
||||
CONFIG_PCI_HOST_GENERIC=y
|
||||
CONFIG_PCI_MSI=y
|
||||
# CONFIG_PCI_NPEM is not set
|
||||
CONFIG_PCI_STUB=y
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHYLIB_LEDS=y
|
||||
CONFIG_PHYLINK=y
|
||||
# CONFIG_PHY_BRCM_SATA is not set
|
||||
CONFIG_PHY_BRCM_USB=y
|
||||
CONFIG_PINCTRL=y
|
||||
# CONFIG_PINCTRL_AW9523 is not set
|
||||
CONFIG_PINCTRL_BCM2712=y
|
||||
CONFIG_PINCTRL_BCM2835=y
|
||||
CONFIG_PINCTRL_RP1=y
|
||||
CONFIG_PM=y
|
||||
CONFIG_PM_CLK=y
|
||||
CONFIG_PM_GENERIC_DOMAINS=y
|
||||
CONFIG_PM_GENERIC_DOMAINS_OF=y
|
||||
CONFIG_PM_GENERIC_DOMAINS_SLEEP=y
|
||||
CONFIG_PM_OPP=y
|
||||
CONFIG_PM_SLEEP=y
|
||||
CONFIG_PM_SLEEP_SMP=y
|
||||
CONFIG_POWER_RESET_GPIO=y
|
||||
CONFIG_PPS=y
|
||||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_PTP_1588_CLOCK=y
|
||||
# CONFIG_PTP_1588_CLOCK_FC3W is not set
|
||||
CONFIG_PWM=y
|
||||
CONFIG_PWM_BCM2835=y
|
||||
CONFIG_PWM_BRCMSTB=y
|
||||
# CONFIG_PWM_GPIO is not set
|
||||
CONFIG_PWM_RP1=y
|
||||
CONFIG_RAS=y
|
||||
CONFIG_RASPBERRYPI_FIRMWARE=y
|
||||
CONFIG_RASPBERRYPI_GPIOMEM=y
|
||||
CONFIG_RASPBERRYPI_POWER=y
|
||||
# CONFIG_RAVE_SP_CORE is not set
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_REGULATOR=y
|
||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||
CONFIG_REGULATOR_GPIO=y
|
||||
# CONFIG_REGULATOR_MAX77503 is not set
|
||||
# CONFIG_REGULATOR_NETLINK_EVENTS is not set
|
||||
# CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_V2 is not set
|
||||
CONFIG_RESET_BRCMSTB=y
|
||||
CONFIG_RESET_BRCMSTB_RESCAL=y
|
||||
CONFIG_RESET_CONTROLLER=y
|
||||
# CONFIG_RESET_GPIO is not set
|
||||
CONFIG_RESET_RASPBERRYPI=y
|
||||
CONFIG_RESET_SIMPLE=y
|
||||
# CONFIG_RPI_POE_POWER is not set
|
||||
# CONFIG_RPMB is not set
|
||||
# CONFIG_RTASE is not set
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_BRCMSTB=y
|
||||
# CONFIG_RTC_DRV_MAX31335 is not set
|
||||
CONFIG_RTC_DRV_RPI=y
|
||||
# CONFIG_RTC_DRV_RX8111 is not set
|
||||
# CONFIG_RTC_DRV_SD2405AL is not set
|
||||
CONFIG_RTC_I2C_AND_SPI=y
|
||||
CONFIG_RUSTC_SUPPORTS_ARM64=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_SCSI_COMMON=y
|
||||
# CONFIG_SCSI_LOWLEVEL is not set
|
||||
# CONFIG_SCSI_PROC_FS is not set
|
||||
# CONFIG_SENSORS_CHIPCAP2 is not set
|
||||
# CONFIG_SENSORS_LTC2991 is not set
|
||||
# CONFIG_SENSORS_LTC4282 is not set
|
||||
# CONFIG_SENSORS_POWERZ is not set
|
||||
# CONFIG_SENSORS_PT5161L is not set
|
||||
CONFIG_SENSORS_RASPBERRYPI_HWMON=y
|
||||
CONFIG_SENSORS_RP1_ADC=y
|
||||
# CONFIG_SENSORS_SPD5118 is not set
|
||||
CONFIG_SERIAL_8250_BCM2835AUX=y
|
||||
CONFIG_SERIAL_8250_BCM7271=y
|
||||
# CONFIG_SERIAL_8250_DMA is not set
|
||||
CONFIG_SERIAL_8250_EXTENDED=y
|
||||
CONFIG_SERIAL_8250_NR_UARTS=1
|
||||
CONFIG_SERIAL_8250_RUNTIME_UARTS=0
|
||||
CONFIG_SERIAL_8250_SHARE_IRQ=y
|
||||
CONFIG_SERIAL_AMBA_PL011=y
|
||||
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
|
||||
CONFIG_SERIAL_DEV_BUS=y
|
||||
# CONFIG_SERIAL_DEV_CTRL_TTYPORT is not set
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
# CONFIG_SERIAL_RPI_FW is not set
|
||||
CONFIG_SG_POOL=y
|
||||
CONFIG_SMSC_PHY=y
|
||||
CONFIG_SOC_BRCMSTB=y
|
||||
CONFIG_SOC_BUS=y
|
||||
# CONFIG_STRIP_ASM_SYMS is not set
|
||||
CONFIG_SUSPEND=y
|
||||
CONFIG_SUSPEND_FREEZER=y
|
||||
CONFIG_SWPHY=y
|
||||
# CONFIG_TEHUTI_TN40 is not set
|
||||
# CONFIG_TEXTSEARCH is not set
|
||||
CONFIG_THERMAL=y
|
||||
# CONFIG_THERMAL_CORE_TESTING is not set
|
||||
# CONFIG_THERMAL_DEBUGFS is not set
|
||||
CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
|
||||
CONFIG_THERMAL_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_OF=y
|
||||
# CONFIG_UCLAMP_TASK is not set
|
||||
CONFIG_UEVENT_HELPER_PATH=""
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
|
||||
# CONFIG_USB_BRCMSTB is not set
|
||||
CONFIG_USB_COMMON=y
|
||||
CONFIG_USB_DEFAULT_AUTHORIZATION_MODE=1
|
||||
CONFIG_USB_DWC3=y
|
||||
# CONFIG_USB_DWC3_DUAL_ROLE is not set
|
||||
# CONFIG_USB_DWC3_GADGET is not set
|
||||
CONFIG_USB_DWC3_HOST=y
|
||||
CONFIG_USB_DWCOTG=y
|
||||
CONFIG_USB_GADGET=y
|
||||
# CONFIG_USB_HCD_BCMA is not set
|
||||
# CONFIG_USB_ONBOARD_DEV is not set
|
||||
CONFIG_USB_PCI=y
|
||||
# CONFIG_USB_PCI_AMD is not set
|
||||
CONFIG_USB_PHY=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USB_UAS=y
|
||||
# CONFIG_USB_UHCI_HCD is not set
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
CONFIG_USB_XHCI_PCI=y
|
||||
CONFIG_USB_XHCI_PLATFORM=y
|
||||
CONFIG_USE_PERCPU_NUMA_NODE_ID=y
|
||||
CONFIG_VCHIQ_CDEV=y
|
||||
CONFIG_VIDEO=y
|
||||
# CONFIG_VIDEO_AD5398 is not set
|
||||
# CONFIG_VIDEO_BCM2835_UNICAM is not set
|
||||
# CONFIG_VIDEO_BCM2835_UNICAM_LEGACY is not set
|
||||
# CONFIG_VIDEO_BU64754 is not set
|
||||
# CONFIG_VIDEO_CODEC_BCM2835 is not set
|
||||
CONFIG_VIDEO_DEV=y
|
||||
# CONFIG_VIDEO_IRS1125 is not set
|
||||
# CONFIG_VIDEO_ISP_BCM2835 is not set
|
||||
# CONFIG_VIDEO_MAX96714 is not set
|
||||
# CONFIG_VIDEO_MAX96717 is not set
|
||||
# CONFIG_VIDEO_MGB4 is not set
|
||||
# CONFIG_VIDEO_RASPBERRYPI_PISP_BE is not set
|
||||
# CONFIG_VIDEO_RP1_CFE is not set
|
||||
# CONFIG_VIDEO_THP7312 is not set
|
||||
CONFIG_VIDEO_V4L2_I2C=y
|
||||
CONFIG_VMAP_STACK=y
|
||||
CONFIG_VT=y
|
||||
CONFIG_VT_CONSOLE=y
|
||||
CONFIG_VT_CONSOLE_SLEEP=y
|
||||
CONFIG_VT_HW_CONSOLE_BINDING=y
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_XZ_DEC_ARM=y
|
|
@ -1,259 +0,0 @@
|
|||
CONFIG_64BIT=y
|
||||
# CONFIG_AF8133J is not set
|
||||
CONFIG_ARCH_BINFMT_ELF_EXTRA_PHDRS=y
|
||||
CONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y
|
||||
CONFIG_ARCH_DEFAULT_KEXEC_IMAGE_VERIFY_SIG=y
|
||||
CONFIG_ARCH_DMA_ADDR_T_64BIT=y
|
||||
CONFIG_ARCH_FORCE_MAX_ORDER=10
|
||||
CONFIG_ARCH_KEEP_MEMBLOCK=y
|
||||
CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y
|
||||
CONFIG_ARCH_MMAP_RND_BITS=18
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MAX=18
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MIN=18
|
||||
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11
|
||||
# CONFIG_ARCH_PENSANDO is not set
|
||||
CONFIG_ARCH_PKEY_BITS=3
|
||||
CONFIG_ARCH_PROC_KCORE_TEXT=y
|
||||
CONFIG_ARCH_SPARSEMEM_ENABLE=y
|
||||
CONFIG_ARCH_STACKWALK=y
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_ARCH_USES_HIGH_VMA_FLAGS=y
|
||||
CONFIG_ARCH_WANTS_EXECMEM_LATE=y
|
||||
CONFIG_ARCH_WANTS_NO_INSTR=y
|
||||
CONFIG_ARCH_WANTS_THP_SWAP=y
|
||||
CONFIG_ARM64=y
|
||||
CONFIG_ARM64_4K_PAGES=y
|
||||
# CONFIG_ARM64_FORCE_52BIT is not set
|
||||
CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y
|
||||
CONFIG_ARM64_LPA2=y
|
||||
CONFIG_ARM64_PA_BITS=52
|
||||
CONFIG_ARM64_PA_BITS_52=y
|
||||
CONFIG_ARM64_PLATFORM_DEVICES=y
|
||||
CONFIG_ARM64_POE=y
|
||||
CONFIG_ARM64_TAGGED_ADDR_ABI=y
|
||||
CONFIG_ARM64_VA_BITS=52
|
||||
# CONFIG_ARM64_VA_BITS_39 is not set
|
||||
CONFIG_ARM64_VA_BITS_52=y
|
||||
CONFIG_ARM_AMBA=y
|
||||
CONFIG_ARM_ARCH_TIMER=y
|
||||
CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
|
||||
CONFIG_ARM_GIC=y
|
||||
CONFIG_ARM_GIC_V3=y
|
||||
CONFIG_ARM_GIC_V3_ITS=y
|
||||
# CONFIG_ARM_NI is not set
|
||||
CONFIG_ARM_PSCI_FW=y
|
||||
CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y
|
||||
# CONFIG_BACKLIGHT_KTD2801 is not set
|
||||
# CONFIG_BACKLIGHT_LM3509 is not set
|
||||
# CONFIG_BACKLIGHT_MP3309C is not set
|
||||
# CONFIG_BACKLIGHT_RPI is not set
|
||||
# CONFIG_BASE_SMALL is not set
|
||||
# CONFIG_BCACHEFS_FS is not set
|
||||
# CONFIG_BCM2712_MIP is not set
|
||||
# CONFIG_BRCM_CHAR_DRIVERS is not set
|
||||
# CONFIG_BT_HCIUART_AML is not set
|
||||
CONFIG_BUILTIN_RETURN_ADDRESS_STRIPS_PAC=y
|
||||
CONFIG_CC_HAVE_SHADOW_CALL_STACK=y
|
||||
CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
|
||||
# CONFIG_COMPAT_32BIT_TIME is not set
|
||||
# CONFIG_COMPRESSED_INSTALL is not set
|
||||
CONFIG_CONTEXT_TRACKING=y
|
||||
CONFIG_CONTEXT_TRACKING_IDLE=y
|
||||
CONFIG_CPUMASK_OFFSTACK=y
|
||||
# CONFIG_CPUSETS_V1 is not set
|
||||
CONFIG_CPU_BIG_ENDIAN=y
|
||||
CONFIG_CPU_MITIGATIONS=y
|
||||
CONFIG_CPU_RMAP=y
|
||||
CONFIG_CRYPTO_ECB=y
|
||||
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
||||
CONFIG_CRYPTO_LIB_GF128MUL=y
|
||||
CONFIG_CRYPTO_LIB_SHA1=y
|
||||
CONFIG_CRYPTO_LIB_UTILS=y
|
||||
CONFIG_DCACHE_WORD_ACCESS=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_DMA_DIRECT_REMAP=y
|
||||
CONFIG_DMA_NEED_SYNC=y
|
||||
# CONFIG_DRM_DISPLAY_DP_AUX_CEC is not set
|
||||
# CONFIG_DRM_DISPLAY_DP_AUX_CHARDEV is not set
|
||||
# CONFIG_DRM_PANEL_BOE_TH101MB31UIG002_28A is not set
|
||||
# CONFIG_DRM_PANEL_BOE_TV101WUM_LL2 is not set
|
||||
# CONFIG_DRM_PANEL_HIMAX_HX83102 is not set
|
||||
# CONFIG_DRM_PANEL_HIMAX_HX83112A is not set
|
||||
# CONFIG_DRM_PANEL_ILITEK_ILI9805 is not set
|
||||
# CONFIG_DRM_PANEL_ILITEK_ILI9806E is not set
|
||||
# CONFIG_DRM_PANEL_ILITEK_ILI9882T is not set
|
||||
# CONFIG_DRM_PANEL_JDI_LPM102A188A is not set
|
||||
# CONFIG_DRM_PANEL_LG_SW43408 is not set
|
||||
# CONFIG_DRM_PANEL_LINCOLNTECH_LCD197 is not set
|
||||
# CONFIG_DRM_PANEL_NOVATEK_NT36672E is not set
|
||||
# CONFIG_DRM_PANEL_RAYDIUM_RM692E5 is not set
|
||||
# CONFIG_DRM_PANEL_RAYDIUM_RM69380 is not set
|
||||
# CONFIG_DRM_PANEL_SAMSUNG_S6E3FA7 is not set
|
||||
# CONFIG_DRM_PANEL_SYNAPTICS_R63353 is not set
|
||||
# CONFIG_DRM_PANEL_TPO_Y17P is not set
|
||||
# CONFIG_DRM_PANEL_WAVESHARE_TOUCHSCREEN is not set
|
||||
# CONFIG_DRM_PANIC is not set
|
||||
# CONFIG_DRM_PANTHOR is not set
|
||||
# CONFIG_DRM_POWERVR is not set
|
||||
# CONFIG_DRM_RP1_DPI is not set
|
||||
# CONFIG_DRM_RP1_DSI is not set
|
||||
# CONFIG_DRM_RP1_VEC is not set
|
||||
# CONFIG_DRM_XE is not set
|
||||
CONFIG_DTC=y
|
||||
# CONFIG_DWC_PCIE_PMU is not set
|
||||
CONFIG_EDAC_SUPPORT=y
|
||||
CONFIG_EXCLUSIVE_SYSTEM_RAM=y
|
||||
CONFIG_FIX_EARLYCON_MEM=y
|
||||
CONFIG_FRAME_POINTER=y
|
||||
CONFIG_FS_IOMAP=y
|
||||
CONFIG_FUNCTION_ALIGNMENT=4
|
||||
CONFIG_FUNCTION_ALIGNMENT_4B=y
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
CONFIG_FW_LOADER_SYSFS=y
|
||||
CONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_ARGS=y
|
||||
CONFIG_GENERIC_ALLOCATOR=y
|
||||
CONFIG_GENERIC_ARCH_TOPOLOGY=y
|
||||
CONFIG_GENERIC_BUG=y
|
||||
CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_CPU_DEVICES=y
|
||||
CONFIG_GENERIC_CPU_VULNERABILITIES=y
|
||||
CONFIG_GENERIC_CSUM=y
|
||||
CONFIG_GENERIC_EARLY_IOREMAP=y
|
||||
CONFIG_GENERIC_GETTIMEOFDAY=y
|
||||
CONFIG_GENERIC_IDLE_POLL_SETUP=y
|
||||
CONFIG_GENERIC_IOREMAP=y
|
||||
CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
|
||||
CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
|
||||
CONFIG_GENERIC_MSI_IRQ=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=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_GPIO_CDEV=y
|
||||
# CONFIG_GPIO_FSM is not set
|
||||
# CONFIG_GPIO_SLOPPY_LOGIC_ANALYZER is not set
|
||||
# CONFIG_GPIO_VIRTUSER is not set
|
||||
CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT=y
|
||||
CONFIG_HISILICON_ERRATUM_162100801=y
|
||||
CONFIG_HZ_PERIODIC=y
|
||||
CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_IRQCHIP=y
|
||||
CONFIG_IRQ_DOMAIN=y
|
||||
CONFIG_IRQ_DOMAIN_HIERARCHY=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
CONFIG_IRQ_MSI_LIB=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
# CONFIG_LAN966X_OIC is not set
|
||||
# CONFIG_LEDS_LP5569 is not set
|
||||
# CONFIG_LEDS_TRIGGER_ACTPWR is not set
|
||||
# CONFIG_LEDS_TRIGGER_INPUT is not set
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
CONFIG_LOCK_SPIN_ON_OWNER=y
|
||||
CONFIG_LRU_GEN_WALKS_MMU=y
|
||||
# CONFIG_LWQ_TEST is not set
|
||||
# CONFIG_MEDIA_PCI_HAILO is not set
|
||||
# CONFIG_MEMCG_V1 is not set
|
||||
# CONFIG_MEM_ALLOC_PROFILING is not set
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MMU_LAZY_TLB_REFCOUNT=y
|
||||
CONFIG_MODULES_USE_ELF_RELA=y
|
||||
# CONFIG_MODULE_COMPRESS is not set
|
||||
CONFIG_MUTEX_SPIN_ON_OWNER=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NEED_SG_DMA_LENGTH=y
|
||||
# CONFIG_NETKIT is not set
|
||||
# CONFIG_NET_9P_USBG is not set
|
||||
CONFIG_NET_EGRESS=y
|
||||
CONFIG_NET_FLOW_LIMIT=y
|
||||
CONFIG_NET_INGRESS=y
|
||||
CONFIG_NET_XGRESS=y
|
||||
CONFIG_NO_IOPORT_MAP=y
|
||||
CONFIG_NR_CPUS=512
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
# CONFIG_OF_CONFIGFS is not set
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
CONFIG_OF_FLATTREE=y
|
||||
CONFIG_OF_GPIO=y
|
||||
CONFIG_OF_IRQ=y
|
||||
CONFIG_OF_KOBJ=y
|
||||
CONFIG_PADATA=y
|
||||
CONFIG_PAGE_POOL=y
|
||||
CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
|
||||
CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
|
||||
CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
|
||||
CONFIG_PARTITION_PERCPU=y
|
||||
CONFIG_PER_VMA_LOCK=y
|
||||
# CONFIG_PFCP is not set
|
||||
CONFIG_PGTABLE_LEVELS=5
|
||||
CONFIG_PHYS_ADDR_T_64BIT=y
|
||||
CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y
|
||||
CONFIG_POWER_RESET=y
|
||||
# CONFIG_POWER_SEQUENCING is not set
|
||||
CONFIG_POWER_SUPPLY=y
|
||||
CONFIG_PREEMPT_NONE_BUILD=y
|
||||
# CONFIG_PREEMPT_RT is not set
|
||||
CONFIG_PTP_1588_CLOCK_OPTIONAL=y
|
||||
CONFIG_QUEUED_RWLOCKS=y
|
||||
CONFIG_QUEUED_SPINLOCKS=y
|
||||
CONFIG_RANDSTRUCT_NONE=y
|
||||
# CONFIG_RASPBERRYPI_GPIOMEM is not set
|
||||
CONFIG_RATIONAL=y
|
||||
CONFIG_RFS_ACCEL=y
|
||||
CONFIG_RODATA_FULL_DEFAULT_ENABLED=y
|
||||
# CONFIG_RP1_PIO is not set
|
||||
CONFIG_RPS=y
|
||||
CONFIG_RWSEM_SPIN_ON_OWNER=y
|
||||
# CONFIG_SENSORS_ASUS_ROG_RYUJIN is not set
|
||||
CONFIG_SERIAL_8250_FSL=y
|
||||
CONFIG_SERIAL_MCTRL_GPIO=y
|
||||
# CONFIG_SERIAL_RPI_FW is not set
|
||||
CONFIG_SMP=y
|
||||
# CONFIG_SND_PIMIDI is not set
|
||||
CONFIG_SOCK_RX_QUEUE_MAPPING=y
|
||||
CONFIG_SOFTIRQ_ON_OWN_STACK=y
|
||||
CONFIG_SPARSEMEM=y
|
||||
CONFIG_SPARSEMEM_EXTREME=y
|
||||
CONFIG_SPARSEMEM_VMEMMAP=y
|
||||
CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
|
||||
CONFIG_SPARSE_IRQ=y
|
||||
# CONFIG_SPI_RP2040_GPIO_BRIDGE is not set
|
||||
CONFIG_SPLIT_PMD_PTLOCKS=y
|
||||
CONFIG_SPLIT_PTE_PTLOCKS=y
|
||||
CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
|
||||
CONFIG_SWIOTLB=y
|
||||
CONFIG_SYSCTL_EXCEPTION_TRACE=y
|
||||
# CONFIG_TCP_AO is not set
|
||||
# CONFIG_TEST_FPU is not set
|
||||
# CONFIG_TEST_MULDIV64 is not set
|
||||
# CONFIG_TEST_OBJPOOL is not set
|
||||
CONFIG_THREAD_INFO_IN_TASK=y
|
||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||
CONFIG_TIMER_OF=y
|
||||
CONFIG_TIMER_PROBE=y
|
||||
CONFIG_TOOLS_SUPPORT_RELR=y
|
||||
CONFIG_TRACE_IRQFLAGS_NMI_SUPPORT=y
|
||||
CONFIG_TREE_RCU=y
|
||||
CONFIG_TREE_SRCU=y
|
||||
CONFIG_UNMAP_KERNEL_AT_EL0=y
|
||||
CONFIG_USER_STACKTRACE_SUPPORT=y
|
||||
CONFIG_VDSO_GETRANDOM=y
|
||||
# CONFIG_W1_MASTER_UART is not set
|
||||
CONFIG_XPS=y
|
||||
CONFIG_XZ_DEC_BCJ=y
|
||||
CONFIG_ZONE_DMA32=y
|
|
@ -1,223 +0,0 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2012-2019 OpenWrt.org
|
||||
# Copyright (C) 2016-2017 LEDE project
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/image.mk
|
||||
|
||||
FAT32_BLOCK_SIZE=1024
|
||||
FAT32_BLOCKS=$(shell echo $$(($(CONFIG_TARGET_KERNEL_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE))))
|
||||
|
||||
define Build/Compile
|
||||
$(CP) $(LINUX_DIR)/COPYING $(KDIR)/COPYING.linux
|
||||
endef
|
||||
|
||||
### Image scripts ###
|
||||
define Build/boot-common
|
||||
echo $(IMG_PART_SIGNATURE) > $@-partuuid.txt
|
||||
sed \
|
||||
-e 's#@ROOT@#PARTUUID=$(IMG_PART_SIGNATURE)-02#g' \
|
||||
cmdline.txt > $@-cmdline.txt
|
||||
|
||||
rm -f $@.boot
|
||||
mkfs.fat -n boot -C $@.boot $(FAT32_BLOCKS)
|
||||
mcopy -i $@.boot $(KDIR)/COPYING.linux ::
|
||||
mcopy -i $@.boot $(KDIR)/LICENCE.broadcom ::
|
||||
mcopy -i $@.boot $@-cmdline.txt ::cmdline.txt
|
||||
mcopy -i $@.boot config.txt ::
|
||||
mcopy -i $@.boot distroconfig.txt ::
|
||||
mcopy -i $@.boot $@-partuuid.txt ::partuuid.txt
|
||||
mcopy -i $@.boot $(IMAGE_KERNEL) ::$(KERNEL_IMG)
|
||||
$(foreach dts,$(shell echo $(DEVICE_DTS)),mcopy -i $@.boot $(DTS_DIR)/$(dts).dtb ::;)
|
||||
mmd -i $@.boot ::/overlays
|
||||
mcopy -i $@.boot $(DTS_DIR)/overlays/*.dtbo ::/overlays/
|
||||
mcopy -i $@.boot $(DTS_DIR)/overlays/README ::/overlays/
|
||||
endef
|
||||
|
||||
define Build/boot-2708
|
||||
mcopy -i $@.boot $(KDIR)/bootcode.bin ::
|
||||
mcopy -i $@.boot $(KDIR)/start.elf ::
|
||||
mcopy -i $@.boot $(KDIR)/start_cd.elf ::
|
||||
mcopy -i $@.boot $(KDIR)/start_x.elf ::
|
||||
mcopy -i $@.boot $(KDIR)/fixup.dat ::
|
||||
mcopy -i $@.boot $(KDIR)/fixup_cd.dat ::
|
||||
mcopy -i $@.boot $(KDIR)/fixup_x.dat ::
|
||||
endef
|
||||
|
||||
define Build/boot-2711
|
||||
mcopy -i $@.boot $(KDIR)/start4.elf ::
|
||||
mcopy -i $@.boot $(KDIR)/start4cd.elf ::
|
||||
mcopy -i $@.boot $(KDIR)/start4x.elf ::
|
||||
mcopy -i $@.boot $(KDIR)/fixup4.dat ::
|
||||
mcopy -i $@.boot $(KDIR)/fixup4cd.dat ::
|
||||
mcopy -i $@.boot $(KDIR)/fixup4x.dat ::
|
||||
endef
|
||||
|
||||
define Build/sdcard-img
|
||||
SIGNATURE="$(IMG_PART_SIGNATURE)" \
|
||||
./gen_rpi_sdcard_img.sh $@ $@.boot $(IMAGE_ROOTFS) \
|
||||
$(CONFIG_TARGET_KERNEL_PARTSIZE) $(CONFIG_TARGET_ROOTFS_PARTSIZE)
|
||||
endef
|
||||
|
||||
### Devices ###
|
||||
define Device/Default
|
||||
DEVICE_VENDOR := Raspberry Pi
|
||||
KERNEL := kernel-bin
|
||||
KERNEL_IMG := kernel.img
|
||||
IMAGES := factory.img.gz sysupgrade.img.gz
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-2708 | sdcard-img | gzip | append-metadata
|
||||
IMAGE/factory.img.gz := boot-common | boot-2708 | sdcard-img | gzip
|
||||
endef
|
||||
|
||||
define Device/rpi
|
||||
DEVICE_MODEL := A/A+/B/B+/CM/Zero/ZeroW
|
||||
DEVICE_DTS := \
|
||||
broadcom/bcm2708-rpi-b broadcom/bcm2708-rpi-b-rev1 broadcom/bcm2708-rpi-b-plus \
|
||||
broadcom/bcm2708-rpi-cm \
|
||||
broadcom/bcm2708-rpi-zero broadcom/bcm2708-rpi-zero-w
|
||||
SUPPORTED_DEVICES := \
|
||||
rpi-a rpi-a-plus \
|
||||
rpi-b rpi-b-plus \
|
||||
rpi-cm \
|
||||
rpi-zero rpi-zero-w \
|
||||
raspberrypi,model-a raspberrypi,model-a-plus \
|
||||
raspberrypi,model-b raspberrypi,model-b-plus raspberrypi,model-b-rev2 \
|
||||
raspberrypi,compute-module raspberrypi,compute-module-1 \
|
||||
raspberrypi,model-zero raspberrypi,model-zero-w
|
||||
DEVICE_PACKAGES := \
|
||||
cypress-firmware-43430-sdio \
|
||||
brcmfmac-nvram-43430-sdio \
|
||||
kmod-brcmfmac wpad-basic-mbedtls
|
||||
endef
|
||||
ifeq ($(SUBTARGET),bcm2708)
|
||||
TARGET_DEVICES += rpi
|
||||
endif
|
||||
|
||||
define Device/rpi-2
|
||||
DEVICE_MODEL := 2B/2B 1.2
|
||||
DEVICE_VARIANT := (32bit)
|
||||
DEVICE_ALT0_VENDOR := Raspberry Pi
|
||||
DEVICE_ALT0_MODEL := 3A+/3B/3B+/CM3/Zero2/Zero2W
|
||||
DEVICE_ALT0_VARIANT := (32bit)
|
||||
DEVICE_ALT1_VENDOR := Raspberry Pi
|
||||
DEVICE_ALT1_MODEL := 4B/400/CM4
|
||||
DEVICE_ALT1_VARIANT := (32bit)
|
||||
DEVICE_DTS := \
|
||||
broadcom/bcm2709-rpi-2-b broadcom/bcm2710-rpi-2-b \
|
||||
broadcom/bcm2710-rpi-3-b broadcom/bcm2710-rpi-3-b-plus \
|
||||
broadcom/bcm2711-rpi-4-b broadcom/bcm2711-rpi-400 \
|
||||
broadcom/bcm2710-rpi-cm3 broadcom/bcm2711-rpi-cm4 \
|
||||
broadcom/bcm2710-rpi-zero-2 broadcom/bcm2710-rpi-zero-2-w
|
||||
SUPPORTED_DEVICES := \
|
||||
rpi-2-b \
|
||||
rpi-3-a-plus \
|
||||
rpi-3-b rpi-3-b-plus \
|
||||
rpi-4-b rpi-400 \
|
||||
rpi-cm \
|
||||
rpi-zero-2 rpi-zero-2-w \
|
||||
raspberrypi,2-model-b raspberrypi,2-model-b-rev2 \
|
||||
raspberrypi,3-model-a-plus \
|
||||
raspberrypi,3-model-b raspberrypi,3-model-b-plus \
|
||||
raspberrypi,3-compute-module raspberrypi,compute-module-3 \
|
||||
raspberrypi,400 raspberrypi,4-compute-module raspberrypi,4-model-b \
|
||||
raspberrypi,model-zero-2 raspberrypi,model-zero-2-w
|
||||
DEVICE_PACKAGES := \
|
||||
cypress-firmware-43430-sdio \
|
||||
brcmfmac-nvram-43430-sdio \
|
||||
cypress-firmware-43455-sdio \
|
||||
brcmfmac-nvram-43455-sdio \
|
||||
kmod-brcmfmac wpad-basic-mbedtls
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-2708 | boot-2711 | sdcard-img | gzip | append-metadata
|
||||
IMAGE/factory.img.gz := boot-common | boot-2708 | boot-2711 | sdcard-img | gzip
|
||||
endef
|
||||
ifeq ($(SUBTARGET),bcm2709)
|
||||
TARGET_DEVICES += rpi-2
|
||||
endif
|
||||
|
||||
define Device/rpi-3
|
||||
DEVICE_MODEL := 3A+/3B/3B+/CM3/Zero2/Zero2W
|
||||
DEVICE_VARIANT := (64bit)
|
||||
DEVICE_ALT0_VENDOR := Raspberry Pi
|
||||
DEVICE_ALT0_MODEL := 2B-1.2
|
||||
DEVICE_ALT0_VARIANT := (64bit)
|
||||
KERNEL_IMG := kernel8.img
|
||||
DEVICE_DTS := \
|
||||
broadcom/bcm2710-rpi-2-b \
|
||||
broadcom/bcm2710-rpi-3-b broadcom/bcm2710-rpi-3-b-plus \
|
||||
broadcom/bcm2710-rpi-cm3 \
|
||||
broadcom/bcm2710-rpi-zero-2 broadcom/bcm2710-rpi-zero-2-w
|
||||
SUPPORTED_DEVICES := \
|
||||
rpi-3-a-plus \
|
||||
rpi-3-b rpi-3-b-plus \
|
||||
rpi-zero-2 rpi-zero-2-w \
|
||||
raspberrypi,2-model-b-rev2 \
|
||||
raspberrypi,3-model-a-plus \
|
||||
raspberrypi,3-model-b raspberrypi,3-model-b-plus \
|
||||
raspberrypi,3-compute-module raspberrypi,compute-module-3 \
|
||||
raspberrypi,model-zero-2 raspberrypi,model-zero-2-w
|
||||
DEVICE_PACKAGES := \
|
||||
cypress-firmware-43430-sdio \
|
||||
brcmfmac-nvram-43430-sdio \
|
||||
cypress-firmware-43455-sdio \
|
||||
brcmfmac-nvram-43455-sdio \
|
||||
kmod-brcmfmac wpad-basic-mbedtls
|
||||
endef
|
||||
ifeq ($(SUBTARGET),bcm2710)
|
||||
TARGET_DEVICES += rpi-3
|
||||
endif
|
||||
|
||||
define Device/rpi-4
|
||||
DEVICE_MODEL := 4B/400/CM4
|
||||
DEVICE_VARIANT := (64bit)
|
||||
KERNEL_IMG := kernel8.img
|
||||
DEVICE_DTS := \
|
||||
broadcom/bcm2711-rpi-400 \
|
||||
broadcom/bcm2711-rpi-4-b \
|
||||
broadcom/bcm2711-rpi-cm4 \
|
||||
broadcom/bcm2711-rpi-cm4s \
|
||||
broadcom/bcm2711-rpi-cm4-io
|
||||
SUPPORTED_DEVICES := \
|
||||
raspberrypi,400 \
|
||||
raspberrypi,4-compute-module \
|
||||
raspberrypi,4-model-b
|
||||
DEVICE_PACKAGES := \
|
||||
cypress-firmware-43455-sdio \
|
||||
brcmfmac-nvram-43455-sdio \
|
||||
kmod-brcmfmac wpad-basic-mbedtls \
|
||||
kmod-usb-net-lan78xx \
|
||||
kmod-r8169
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-2711 | sdcard-img | gzip | append-metadata
|
||||
IMAGE/factory.img.gz := boot-common | boot-2711 | sdcard-img | gzip
|
||||
endef
|
||||
ifeq ($(SUBTARGET),bcm2711)
|
||||
TARGET_DEVICES += rpi-4
|
||||
endif
|
||||
|
||||
define Device/rpi-5
|
||||
DEVICE_MODEL := 5/CM5
|
||||
KERNEL_IMG := kernel_2712.img
|
||||
DEVICE_DTS := \
|
||||
broadcom/bcm2712-rpi-500 \
|
||||
broadcom/bcm2712-rpi-5-b \
|
||||
broadcom/bcm2712-rpi-cm5-cm4io \
|
||||
broadcom/bcm2712-rpi-cm5-cm5io \
|
||||
broadcom/bcm2712-rpi-cm5l-cm4io \
|
||||
broadcom/bcm2712-rpi-cm5l-cm5io
|
||||
SUPPORTED_DEVICES := \
|
||||
raspberrypi,500 \
|
||||
raspberrypi,5-compute-module \
|
||||
raspberrypi,5-model-b
|
||||
DEVICE_PACKAGES := \
|
||||
cypress-firmware-43455-sdio \
|
||||
brcmfmac-nvram-43455-sdio \
|
||||
kmod-brcmfmac wpad-basic-mbedtls \
|
||||
kmod-hwmon-pwmfan kmod-thermal
|
||||
IMAGE/sysupgrade.img.gz := boot-common | sdcard-img | gzip | append-metadata
|
||||
IMAGE/factory.img.gz := boot-common | sdcard-img | gzip
|
||||
endef
|
||||
ifeq ($(SUBTARGET),bcm2712)
|
||||
TARGET_DEVICES += rpi-5
|
||||
endif
|
||||
|
||||
$(eval $(call BuildImage))
|
|
@ -1,22 +0,0 @@
|
|||
From 99b87b80f2e12dfecaa0d63267769203ebb04d04 Mon Sep 17 00:00:00 2001
|
||||
From: Phil Elwell <phil@raspberrypi.com>
|
||||
Date: Mon, 20 Apr 2020 13:41:10 +0100
|
||||
Subject: [PATCH 004/697] Revert "spi: spidev: Fix CS polarity if GPIO
|
||||
descriptors are used"
|
||||
|
||||
This reverts commit 83b2a8fe43bda0c11981ad6afa5dd0104d78be28.
|
||||
---
|
||||
drivers/spi/spidev.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/spi/spidev.c
|
||||
+++ b/drivers/spi/spidev.c
|
||||
@@ -428,7 +428,7 @@ spidev_ioctl(struct file *filp, unsigned
|
||||
}
|
||||
|
||||
if (ctlr->use_gpio_descriptors && spi_get_csgpiod(spi, 0))
|
||||
- tmp |= SPI_CS_HIGH;
|
||||
+ { /*tmp |= SPI_CS_HIGH;*/ }
|
||||
|
||||
tmp |= spi->mode & ~SPI_MODE_MASK;
|
||||
spi->mode = tmp & SPI_MODE_USER_MASK;
|
|
@ -1,29 +0,0 @@
|
|||
From d1f6582242f7b5ee85a46b10c496957ee38e62b5 Mon Sep 17 00:00:00 2001
|
||||
From: Phil Elwell <phil@raspberrypi.com>
|
||||
Date: Mon, 7 Mar 2022 16:18:55 +0000
|
||||
Subject: [PATCH 005/697] Revert "net: bcmgenet: Request APD, DLL disable and
|
||||
IDDQ-SR"
|
||||
|
||||
This reverts commit c3a4c69360ab43560f212eed326c9d8bde35b14c, which
|
||||
broke rebooting when network booting.
|
||||
|
||||
See: https://github.com/raspberrypi/rpi-eeprom/issues/417
|
||||
|
||||
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
---
|
||||
drivers/net/ethernet/broadcom/genet/bcmmii.c | 4 +---
|
||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/broadcom/genet/bcmmii.c
|
||||
+++ b/drivers/net/ethernet/broadcom/genet/bcmmii.c
|
||||
@@ -304,9 +304,7 @@ int bcmgenet_mii_probe(struct net_device
|
||||
struct device_node *dn = kdev->of_node;
|
||||
phy_interface_t phy_iface = priv->phy_interface;
|
||||
struct phy_device *phydev;
|
||||
- u32 phy_flags = PHY_BRCM_AUTO_PWRDWN_ENABLE |
|
||||
- PHY_BRCM_DIS_TXCRXC_NOENRGY |
|
||||
- PHY_BRCM_IDDQ_SUSPEND;
|
||||
+ u32 phy_flags = 0;
|
||||
int ret;
|
||||
|
||||
/* Communicate the integrated PHY revision */
|
|
@ -1,69 +0,0 @@
|
|||
From f7aff06f3804aef99910922397bf196cfaa5479e Mon Sep 17 00:00:00 2001
|
||||
From: Dom Cobley <popcornmix@gmail.com>
|
||||
Date: Mon, 31 Jul 2023 13:47:10 +0100
|
||||
Subject: [PATCH 006/697] Revert "Revert "xhci: add quirk for host controllers
|
||||
that don't update endpoint DCS""
|
||||
|
||||
This reverts commit 5bef4b3cb95a5b883dfec8b3ffc0d671323d55bb.
|
||||
|
||||
We don't agree with upstream revert so undo it.
|
||||
---
|
||||
drivers/usb/host/xhci-pci.c | 4 +++-
|
||||
drivers/usb/host/xhci-ring.c | 23 ++++++++++++++++++++++-
|
||||
2 files changed, 25 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/usb/host/xhci-pci.c
|
||||
+++ b/drivers/usb/host/xhci-pci.c
|
||||
@@ -424,8 +424,10 @@ static void xhci_pci_quirks(struct devic
|
||||
pdev->device == 0x3432)
|
||||
xhci->quirks |= XHCI_BROKEN_STREAMS;
|
||||
|
||||
- if (pdev->vendor == PCI_VENDOR_ID_VIA && pdev->device == 0x3483)
|
||||
+ if (pdev->vendor == PCI_VENDOR_ID_VIA && pdev->device == 0x3483) {
|
||||
xhci->quirks |= XHCI_LPM_SUPPORT;
|
||||
+ xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS;
|
||||
+ }
|
||||
|
||||
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
|
||||
pdev->device == PCI_DEVICE_ID_ASMEDIA_1042_XHCI) {
|
||||
--- a/drivers/usb/host/xhci-ring.c
|
||||
+++ b/drivers/usb/host/xhci-ring.c
|
||||
@@ -637,8 +637,11 @@ static int xhci_move_dequeue_past_td(str
|
||||
struct xhci_ring *ep_ring;
|
||||
struct xhci_command *cmd;
|
||||
struct xhci_segment *new_seg;
|
||||
+ struct xhci_segment *halted_seg = NULL;
|
||||
union xhci_trb *new_deq;
|
||||
int new_cycle;
|
||||
+ union xhci_trb *halted_trb;
|
||||
+ int index = 0;
|
||||
dma_addr_t addr;
|
||||
u64 hw_dequeue;
|
||||
bool cycle_found = false;
|
||||
@@ -657,7 +660,25 @@ static int xhci_move_dequeue_past_td(str
|
||||
hw_dequeue = xhci_get_hw_deq(xhci, dev, ep_index, stream_id);
|
||||
new_seg = ep_ring->deq_seg;
|
||||
new_deq = ep_ring->dequeue;
|
||||
- new_cycle = hw_dequeue & 0x1;
|
||||
+
|
||||
+ /*
|
||||
+ * Quirk: xHC write-back of the DCS field in the hardware dequeue
|
||||
+ * pointer is wrong - use the cycle state of the TRB pointed to by
|
||||
+ * the dequeue pointer.
|
||||
+ */
|
||||
+ if (xhci->quirks & XHCI_EP_CTX_BROKEN_DCS &&
|
||||
+ !(ep->ep_state & EP_HAS_STREAMS))
|
||||
+ halted_seg = trb_in_td(xhci, td, hw_dequeue & ~0xf, false);
|
||||
+ if (halted_seg) {
|
||||
+ index = ((dma_addr_t)(hw_dequeue & ~0xf) - halted_seg->dma) /
|
||||
+ sizeof(*halted_trb);
|
||||
+ halted_trb = &halted_seg->trbs[index];
|
||||
+ new_cycle = halted_trb->generic.field[3] & 0x1;
|
||||
+ xhci_dbg(xhci, "Endpoint DCS = %d TRB index = %d cycle = %d\n",
|
||||
+ (u8)(hw_dequeue & 0x1), index, new_cycle);
|
||||
+ } else {
|
||||
+ new_cycle = hw_dequeue & 0x1;
|
||||
+ }
|
||||
|
||||
/*
|
||||
* We want to find the pointer, segment and cycle state of the new trb
|
|
@ -1,156 +0,0 @@
|
|||
From faa6f87df4d488431743607a8158f15bdcb2afdd Mon Sep 17 00:00:00 2001
|
||||
From: Dom Cobley <popcornmix@gmail.com>
|
||||
Date: Fri, 2 Feb 2024 13:04:00 +0000
|
||||
Subject: [PATCH 007/697] Revert "PCI: brcmstb: Configure HW CLKREQ# mode
|
||||
appropriate for downstream device"
|
||||
|
||||
This reverts commit e2596dcf1e9dfd5904d50f796c19b03c94a3b8b4.
|
||||
---
|
||||
drivers/pci/controller/pcie-brcmstb.c | 100 +++-----------------------
|
||||
1 file changed, 10 insertions(+), 90 deletions(-)
|
||||
|
||||
--- a/drivers/pci/controller/pcie-brcmstb.c
|
||||
+++ b/drivers/pci/controller/pcie-brcmstb.c
|
||||
@@ -48,9 +48,6 @@
|
||||
#define PCIE_RC_CFG_PRIV1_LINK_CAPABILITY 0x04dc
|
||||
#define PCIE_RC_CFG_PRIV1_LINK_CAPABILITY_ASPM_SUPPORT_MASK 0xc00
|
||||
|
||||
-#define PCIE_RC_CFG_PRIV1_ROOT_CAP 0x4f8
|
||||
-#define PCIE_RC_CFG_PRIV1_ROOT_CAP_L1SS_MODE_MASK 0xf8
|
||||
-
|
||||
#define PCIE_RC_DL_MDIO_ADDR 0x1100
|
||||
#define PCIE_RC_DL_MDIO_WR_DATA 0x1104
|
||||
#define PCIE_RC_DL_MDIO_RD_DATA 0x1108
|
||||
@@ -127,12 +124,9 @@
|
||||
PCIE_MISC_CPU_2_PCIE_MEM_WIN0_LIMIT_HI + ((win) * 8)
|
||||
|
||||
#define PCIE_MISC_HARD_PCIE_HARD_DEBUG_CLKREQ_DEBUG_ENABLE_MASK 0x2
|
||||
-#define PCIE_MISC_HARD_PCIE_HARD_DEBUG_L1SS_ENABLE_MASK 0x200000
|
||||
#define PCIE_MISC_HARD_PCIE_HARD_DEBUG_SERDES_IDDQ_MASK 0x08000000
|
||||
#define PCIE_BMIPS_MISC_HARD_PCIE_HARD_DEBUG_SERDES_IDDQ_MASK 0x00800000
|
||||
-#define PCIE_CLKREQ_MASK \
|
||||
- (PCIE_MISC_HARD_PCIE_HARD_DEBUG_CLKREQ_DEBUG_ENABLE_MASK | \
|
||||
- PCIE_MISC_HARD_PCIE_HARD_DEBUG_L1SS_ENABLE_MASK)
|
||||
+
|
||||
|
||||
#define PCIE_MISC_UBUS_BAR1_CONFIG_REMAP 0x40ac
|
||||
#define PCIE_MISC_UBUS_BAR1_CONFIG_REMAP_ACCESS_EN_MASK BIT(0)
|
||||
@@ -1187,93 +1181,13 @@ static int brcm_pcie_setup(struct brcm_p
|
||||
return 0;
|
||||
}
|
||||
|
||||
-/*
|
||||
- * This extends the timeout period for an access to an internal bus. This
|
||||
- * access timeout may occur during L1SS sleep periods, even without the
|
||||
- * presence of a PCIe access.
|
||||
- */
|
||||
-static void brcm_extend_rbus_timeout(struct brcm_pcie *pcie)
|
||||
-{
|
||||
- /* TIMEOUT register is two registers before RGR1_SW_INIT_1 */
|
||||
- const unsigned int REG_OFFSET = PCIE_RGR1_SW_INIT_1(pcie) - 8;
|
||||
- u32 timeout_us = 4000000; /* 4 seconds, our setting for L1SS */
|
||||
-
|
||||
- /* 7712 does not have this (RGR1) timer */
|
||||
- if (pcie->soc_base == BCM7712)
|
||||
- return;
|
||||
-
|
||||
- /* Each unit in timeout register is 1/216,000,000 seconds */
|
||||
- writel(216 * timeout_us, pcie->base + REG_OFFSET);
|
||||
-}
|
||||
-
|
||||
-static void brcm_config_clkreq(struct brcm_pcie *pcie)
|
||||
-{
|
||||
- static const char err_msg[] = "invalid 'brcm,clkreq-mode' DT string\n";
|
||||
- const char *mode = "default";
|
||||
- u32 clkreq_cntl;
|
||||
- int ret, tmp;
|
||||
-
|
||||
- ret = of_property_read_string(pcie->np, "brcm,clkreq-mode", &mode);
|
||||
- if (ret && ret != -EINVAL) {
|
||||
- dev_err(pcie->dev, err_msg);
|
||||
- mode = "safe";
|
||||
- }
|
||||
-
|
||||
- /* Start out assuming safe mode (both mode bits cleared) */
|
||||
- clkreq_cntl = readl(pcie->base + HARD_DEBUG(pcie));
|
||||
- clkreq_cntl &= ~PCIE_CLKREQ_MASK;
|
||||
-
|
||||
- if (strcmp(mode, "no-l1ss") == 0) {
|
||||
- /*
|
||||
- * "no-l1ss" -- Provides Clock Power Management, L0s, and
|
||||
- * L1, but cannot provide L1 substate (L1SS) power
|
||||
- * savings. If the downstream device connected to the RC is
|
||||
- * L1SS capable AND the OS enables L1SS, all PCIe traffic
|
||||
- * may abruptly halt, potentially hanging the system.
|
||||
- */
|
||||
- clkreq_cntl |= PCIE_MISC_HARD_PCIE_HARD_DEBUG_CLKREQ_DEBUG_ENABLE_MASK;
|
||||
- /*
|
||||
- * We want to un-advertise L1 substates because if the OS
|
||||
- * tries to configure the controller into using L1 substate
|
||||
- * power savings it may fail or hang when the RC HW is in
|
||||
- * "no-l1ss" mode.
|
||||
- */
|
||||
- tmp = readl(pcie->base + PCIE_RC_CFG_PRIV1_ROOT_CAP);
|
||||
- u32p_replace_bits(&tmp, 2, PCIE_RC_CFG_PRIV1_ROOT_CAP_L1SS_MODE_MASK);
|
||||
- writel(tmp, pcie->base + PCIE_RC_CFG_PRIV1_ROOT_CAP);
|
||||
-
|
||||
- } else if (strcmp(mode, "default") == 0) {
|
||||
- /*
|
||||
- * "default" -- Provides L0s, L1, and L1SS, but not
|
||||
- * compliant to provide Clock Power Management;
|
||||
- * specifically, may not be able to meet the Tclron max
|
||||
- * timing of 400ns as specified in "Dynamic Clock Control",
|
||||
- * section 3.2.5.2.2 of the PCIe spec. This situation is
|
||||
- * atypical and should happen only with older devices.
|
||||
- */
|
||||
- clkreq_cntl |= PCIE_MISC_HARD_PCIE_HARD_DEBUG_L1SS_ENABLE_MASK;
|
||||
- brcm_extend_rbus_timeout(pcie);
|
||||
-
|
||||
- } else {
|
||||
- /*
|
||||
- * "safe" -- No power savings; refclk is driven by RC
|
||||
- * unconditionally.
|
||||
- */
|
||||
- if (strcmp(mode, "safe") != 0)
|
||||
- dev_err(pcie->dev, err_msg);
|
||||
- mode = "safe";
|
||||
- }
|
||||
- writel(clkreq_cntl, pcie->base + HARD_DEBUG(pcie));
|
||||
-
|
||||
- dev_info(pcie->dev, "clkreq-mode set to %s\n", mode);
|
||||
-}
|
||||
-
|
||||
static int brcm_pcie_start_link(struct brcm_pcie *pcie)
|
||||
{
|
||||
struct device *dev = pcie->dev;
|
||||
void __iomem *base = pcie->base;
|
||||
u16 nlw, cls, lnksta;
|
||||
bool ssc_good = false;
|
||||
+ u32 tmp;
|
||||
int ret, i;
|
||||
|
||||
/* Unassert the fundamental reset */
|
||||
@@ -1300,8 +1214,6 @@ static int brcm_pcie_start_link(struct b
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
- brcm_config_clkreq(pcie);
|
||||
-
|
||||
if (pcie->gen)
|
||||
brcm_pcie_set_gen(pcie, pcie->gen);
|
||||
|
||||
@@ -1320,6 +1232,14 @@ static int brcm_pcie_start_link(struct b
|
||||
pci_speed_string(pcie_link_speed[cls]), nlw,
|
||||
ssc_good ? "(SSC)" : "(!SSC)");
|
||||
|
||||
+ /*
|
||||
+ * Refclk from RC should be gated with CLKREQ# input when ASPM L0s,L1
|
||||
+ * is enabled => setting the CLKREQ_DEBUG_ENABLE field to 1.
|
||||
+ */
|
||||
+ tmp = readl(base + PCIE_MISC_HARD_PCIE_HARD_DEBUG);
|
||||
+ tmp |= PCIE_MISC_HARD_PCIE_HARD_DEBUG_CLKREQ_DEBUG_ENABLE_MASK;
|
||||
+ writel(tmp, base + PCIE_MISC_HARD_PCIE_HARD_DEBUG);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
From fee8daf3147a30ddbfe2ac759ee5b7481bace2ca Mon Sep 17 00:00:00 2001
|
||||
From: Dom Cobley <popcornmix@gmail.com>
|
||||
Date: Wed, 31 Jan 2024 19:47:39 +0000
|
||||
Subject: [PATCH 008/697] Revert "ARM: dts: bcm2711: Add BCM2711 xHCI support"
|
||||
|
||||
This reverts commit 522c35e08b53f157ad3e51848caa861b258001e4.
|
||||
---
|
||||
arch/arm/boot/dts/broadcom/bcm2711-rpi.dtsi | 5 -----
|
||||
arch/arm/boot/dts/broadcom/bcm2711.dtsi | 14 --------------
|
||||
2 files changed, 19 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm2711-rpi.dtsi
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm2711-rpi.dtsi
|
||||
@@ -1,7 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include "bcm2835-rpi.dtsi"
|
||||
|
||||
-#include <dt-bindings/power/raspberrypi-power.h>
|
||||
#include <dt-bindings/reset/raspberrypi,firmware-reset.h>
|
||||
|
||||
/ {
|
||||
@@ -101,7 +100,3 @@
|
||||
&vchiq {
|
||||
interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
-
|
||||
-&xhci {
|
||||
- power-domains = <&power RPI_POWER_DOMAIN_USB>;
|
||||
-};
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm2711.dtsi
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm2711.dtsi
|
||||
@@ -604,20 +604,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
- xhci: usb@7e9c0000 {
|
||||
- compatible = "brcm,bcm2711-xhci", "brcm,xhci-brcm-v2";
|
||||
- reg = <0x0 0x7e9c0000 0x100000>;
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <0>;
|
||||
- interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
|
||||
- /* DWC2 and this IP block share the same USB PHY,
|
||||
- * enabling both at the same time results in lockups.
|
||||
- * So keep this node disabled and let the bootloader
|
||||
- * decide which interface should be enabled.
|
||||
- */
|
||||
- status = "disabled";
|
||||
- };
|
||||
-
|
||||
v3d: gpu@7ec00000 {
|
||||
compatible = "brcm,2711-v3d";
|
||||
reg = <0x0 0x7ec00000 0x4000>,
|
|
@ -1,26 +0,0 @@
|
|||
From 3063c20ced293f1f214fa77b71adac0ce3385d81 Mon Sep 17 00:00:00 2001
|
||||
From: Phil Elwell <phil@raspberrypi.com>
|
||||
Date: Thu, 28 Mar 2024 16:16:37 +0000
|
||||
Subject: [PATCH 009/697] Revert "usb: phy: generic: Get the vbus supply"
|
||||
|
||||
This reverts commit 03e607cbb2931374db1825f371e9c7f28526d3f4.
|
||||
---
|
||||
drivers/usb/phy/phy-generic.c | 7 -------
|
||||
1 file changed, 7 deletions(-)
|
||||
|
||||
--- a/drivers/usb/phy/phy-generic.c
|
||||
+++ b/drivers/usb/phy/phy-generic.c
|
||||
@@ -256,13 +256,6 @@ int usb_phy_gen_create_phy(struct device
|
||||
return dev_err_probe(dev, PTR_ERR(nop->vcc),
|
||||
"could not get vcc regulator\n");
|
||||
|
||||
- nop->vbus_draw = devm_regulator_get_exclusive(dev, "vbus");
|
||||
- if (PTR_ERR(nop->vbus_draw) == -ENODEV)
|
||||
- nop->vbus_draw = NULL;
|
||||
- if (IS_ERR(nop->vbus_draw))
|
||||
- return dev_err_probe(dev, PTR_ERR(nop->vbus_draw),
|
||||
- "could not get vbus regulator\n");
|
||||
-
|
||||
nop->dev = dev;
|
||||
nop->phy.dev = nop->dev;
|
||||
nop->phy.label = "nop-xceiv";
|
|
@ -1,102 +0,0 @@
|
|||
From c1d90b3d7f207b203d8f8b32e02dbd1d7636cb6a Mon Sep 17 00:00:00 2001
|
||||
From: Dom Cobley <popcornmix@gmail.com>
|
||||
Date: Thu, 7 Apr 2022 18:23:07 +0100
|
||||
Subject: [PATCH 010/697] raspberrypi-firmware: Update mailbox commands
|
||||
|
||||
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
|
||||
---
|
||||
include/soc/bcm2835/raspberrypi-firmware.h | 28 +++++++++++++++++++++-
|
||||
1 file changed, 27 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/include/soc/bcm2835/raspberrypi-firmware.h
|
||||
+++ b/include/soc/bcm2835/raspberrypi-firmware.h
|
||||
@@ -36,6 +36,8 @@ struct rpi_firmware_property_tag_header
|
||||
enum rpi_firmware_property_tag {
|
||||
RPI_FIRMWARE_PROPERTY_END = 0,
|
||||
RPI_FIRMWARE_GET_FIRMWARE_REVISION = 0x00000001,
|
||||
+ RPI_FIRMWARE_GET_FIRMWARE_VARIANT = 0x00000002,
|
||||
+ RPI_FIRMWARE_GET_FIRMWARE_HASH = 0x00000003,
|
||||
|
||||
RPI_FIRMWARE_SET_CURSOR_INFO = 0x00008010,
|
||||
RPI_FIRMWARE_SET_CURSOR_STATE = 0x00008011,
|
||||
@@ -71,6 +73,7 @@ enum rpi_firmware_property_tag {
|
||||
RPI_FIRMWARE_GET_DISPMANX_RESOURCE_MEM_HANDLE = 0x00030014,
|
||||
RPI_FIRMWARE_GET_EDID_BLOCK = 0x00030020,
|
||||
RPI_FIRMWARE_GET_CUSTOMER_OTP = 0x00030021,
|
||||
+ RPI_FIRMWARE_GET_EDID_BLOCK_DISPLAY = 0x00030023,
|
||||
RPI_FIRMWARE_GET_DOMAIN_STATE = 0x00030030,
|
||||
RPI_FIRMWARE_GET_THROTTLED = 0x00030046,
|
||||
RPI_FIRMWARE_GET_CLOCK_MEASURED = 0x00030047,
|
||||
@@ -89,8 +92,11 @@ enum rpi_firmware_property_tag {
|
||||
RPI_FIRMWARE_GET_PERIPH_REG = 0x00030045,
|
||||
RPI_FIRMWARE_SET_PERIPH_REG = 0x00038045,
|
||||
RPI_FIRMWARE_GET_POE_HAT_VAL = 0x00030049,
|
||||
- RPI_FIRMWARE_SET_POE_HAT_VAL = 0x00030050,
|
||||
+ RPI_FIRMWARE_SET_POE_HAT_VAL = 0x00038049,
|
||||
+ RPI_FIRMWARE_SET_POE_HAT_VAL_OLD = 0x00030050,
|
||||
RPI_FIRMWARE_NOTIFY_XHCI_RESET = 0x00030058,
|
||||
+ RPI_FIRMWARE_GET_REBOOT_FLAGS = 0x00030064,
|
||||
+ RPI_FIRMWARE_SET_REBOOT_FLAGS = 0x00038064,
|
||||
RPI_FIRMWARE_NOTIFY_DISPLAY_DONE = 0x00030066,
|
||||
|
||||
/* Dispmanx TAGS */
|
||||
@@ -105,9 +111,16 @@ enum rpi_firmware_property_tag {
|
||||
RPI_FIRMWARE_FRAMEBUFFER_GET_VIRTUAL_OFFSET = 0x00040009,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_GET_OVERSCAN = 0x0004000a,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_GET_PALETTE = 0x0004000b,
|
||||
+ RPI_FIRMWARE_FRAMEBUFFER_GET_LAYER = 0x0004000c,
|
||||
+ RPI_FIRMWARE_FRAMEBUFFER_GET_TRANSFORM = 0x0004000d,
|
||||
+ RPI_FIRMWARE_FRAMEBUFFER_GET_VSYNC = 0x0004000e,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_GET_TOUCHBUF = 0x0004000f,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_GET_GPIOVIRTBUF = 0x00040010,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_RELEASE = 0x00048001,
|
||||
+ RPI_FIRMWARE_FRAMEBUFFER_GET_DISPLAY_ID = 0x00040016,
|
||||
+ RPI_FIRMWARE_FRAMEBUFFER_SET_DISPLAY_NUM = 0x00048013,
|
||||
+ RPI_FIRMWARE_FRAMEBUFFER_GET_NUM_DISPLAYS = 0x00040013,
|
||||
+ RPI_FIRMWARE_FRAMEBUFFER_GET_DISPLAY_SETTINGS = 0x00040014,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_TEST_PHYSICAL_WIDTH_HEIGHT = 0x00044003,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_TEST_VIRTUAL_WIDTH_HEIGHT = 0x00044004,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_TEST_DEPTH = 0x00044005,
|
||||
@@ -116,22 +129,33 @@ enum rpi_firmware_property_tag {
|
||||
RPI_FIRMWARE_FRAMEBUFFER_TEST_VIRTUAL_OFFSET = 0x00044009,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_TEST_OVERSCAN = 0x0004400a,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_TEST_PALETTE = 0x0004400b,
|
||||
+ RPI_FIRMWARE_FRAMEBUFFER_TEST_LAYER = 0x0004400c,
|
||||
+ RPI_FIRMWARE_FRAMEBUFFER_TEST_TRANSFORM = 0x0004400d,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_TEST_VSYNC = 0x0004400e,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_SET_PHYSICAL_WIDTH_HEIGHT = 0x00048003,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_SET_VIRTUAL_WIDTH_HEIGHT = 0x00048004,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_SET_DEPTH = 0x00048005,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_SET_PIXEL_ORDER = 0x00048006,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_SET_ALPHA_MODE = 0x00048007,
|
||||
+ RPI_FIRMWARE_FRAMEBUFFER_SET_PITCH = 0x00048008,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_SET_VIRTUAL_OFFSET = 0x00048009,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_SET_OVERSCAN = 0x0004800a,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_SET_PALETTE = 0x0004800b,
|
||||
+
|
||||
RPI_FIRMWARE_FRAMEBUFFER_SET_TOUCHBUF = 0x0004801f,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_SET_GPIOVIRTBUF = 0x00048020,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_SET_VSYNC = 0x0004800e,
|
||||
+ RPI_FIRMWARE_FRAMEBUFFER_SET_LAYER = 0x0004800c,
|
||||
+ RPI_FIRMWARE_FRAMEBUFFER_SET_TRANSFORM = 0x0004800d,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_SET_BACKLIGHT = 0x0004800f,
|
||||
|
||||
RPI_FIRMWARE_VCHIQ_INIT = 0x00048010,
|
||||
|
||||
+ RPI_FIRMWARE_SET_PLANE = 0x00048015,
|
||||
+ RPI_FIRMWARE_GET_DISPLAY_TIMING = 0x00040017,
|
||||
+ RPI_FIRMWARE_SET_TIMING = 0x00048017,
|
||||
+ RPI_FIRMWARE_GET_DISPLAY_CFG = 0x00040018,
|
||||
+ RPI_FIRMWARE_SET_DISPLAY_POWER = 0x00048019,
|
||||
RPI_FIRMWARE_GET_COMMAND_LINE = 0x00050001,
|
||||
RPI_FIRMWARE_GET_DMA_CHANNELS = 0x00060001,
|
||||
};
|
||||
@@ -155,6 +179,8 @@ enum rpi_firmware_clk_id {
|
||||
RPI_FIRMWARE_NUM_CLK_ID,
|
||||
};
|
||||
|
||||
+#define GET_DISPLAY_SETTINGS_PAYLOAD_SIZE 64
|
||||
+
|
||||
/**
|
||||
* struct rpi_firmware_clk_rate_request - Firmware Request for a rate
|
||||
* @id: ID of the clock being queried
|
|
@ -1,24 +0,0 @@
|
|||
From fce77d9309edd4d813e45ea2868a6a3307787193 Mon Sep 17 00:00:00 2001
|
||||
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
Date: Thu, 7 Jan 2021 16:30:55 +0000
|
||||
Subject: [PATCH 011/697] drm/atomic: Don't fixup modes that haven't been reset
|
||||
|
||||
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
---
|
||||
drivers/gpu/drm/drm_atomic_helper.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
--- a/drivers/gpu/drm/drm_atomic_helper.c
|
||||
+++ b/drivers/gpu/drm/drm_atomic_helper.c
|
||||
@@ -444,6 +444,11 @@ mode_fixup(struct drm_atomic_state *stat
|
||||
new_crtc_state =
|
||||
drm_atomic_get_new_crtc_state(state, new_conn_state->crtc);
|
||||
|
||||
+ if (!new_crtc_state->mode_changed &&
|
||||
+ !new_crtc_state->connectors_changed) {
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
/*
|
||||
* Each encoder has at most one connector (since we always steal
|
||||
* it away), so we won't call ->mode_fixup twice.
|
|
@ -1,30 +0,0 @@
|
|||
From 6030529dd021bc882eb9ade9eec009c77c40316e Mon Sep 17 00:00:00 2001
|
||||
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
Date: Tue, 2 Nov 2021 16:01:36 +0000
|
||||
Subject: [PATCH 012/697] drm: Check whether the gamma lut has changed before
|
||||
updating
|
||||
|
||||
drm_crtc_legacy_gamma_set updates the gamma_lut blob unconditionally,
|
||||
which leads to unnecessary reprogramming of hardware.
|
||||
|
||||
Check whether the blob contents has actually changed before
|
||||
signalling that it has been updated.
|
||||
|
||||
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
---
|
||||
drivers/gpu/drm/drm_color_mgmt.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/gpu/drm/drm_color_mgmt.c
|
||||
+++ b/drivers/gpu/drm/drm_color_mgmt.c
|
||||
@@ -330,7 +330,9 @@ static int drm_crtc_legacy_gamma_set(str
|
||||
replaced = drm_property_replace_blob(&crtc_state->degamma_lut,
|
||||
use_gamma_lut ? NULL : blob);
|
||||
replaced |= drm_property_replace_blob(&crtc_state->ctm, NULL);
|
||||
- replaced |= drm_property_replace_blob(&crtc_state->gamma_lut,
|
||||
+ if (!crtc_state->gamma_lut || !crtc_state->gamma_lut->data ||
|
||||
+ memcmp(crtc_state->gamma_lut->data, blob_data, blob->length))
|
||||
+ replaced |= drm_property_replace_blob(&crtc_state->gamma_lut,
|
||||
use_gamma_lut ? blob : NULL);
|
||||
crtc_state->color_mgmt_changed |= replaced;
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
From 4d523d624f8ac39c56c431d411750c11492d5dbe Mon Sep 17 00:00:00 2001
|
||||
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
Date: Fri, 17 Dec 2021 13:36:52 +0000
|
||||
Subject: [PATCH 013/697] drm/dsi: Document the meaning and spec references for
|
||||
MIPI_DSI_MODE_*
|
||||
|
||||
The MIPI_DSI_MODE_* flags have fairly terse descriptions and no reference
|
||||
to the DSI specification as to their exact meaning. Usage has therefore
|
||||
been rather fluid.
|
||||
|
||||
Extend the descriptions and provide references to the part of the
|
||||
MIPI DSI specification regarding what they mean.
|
||||
|
||||
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
---
|
||||
include/drm/drm_mipi_dsi.h | 38 ++++++++++++++++++++++++++------------
|
||||
1 file changed, 26 insertions(+), 12 deletions(-)
|
||||
|
||||
--- a/include/drm/drm_mipi_dsi.h
|
||||
+++ b/include/drm/drm_mipi_dsi.h
|
||||
@@ -114,29 +114,43 @@ struct mipi_dsi_host *of_find_mipi_dsi_h
|
||||
|
||||
/* DSI mode flags */
|
||||
|
||||
-/* video mode */
|
||||
+/* Video mode display.
|
||||
+ * Not set denotes a command mode display.
|
||||
+ */
|
||||
#define MIPI_DSI_MODE_VIDEO BIT(0)
|
||||
-/* video burst mode */
|
||||
+/* Video burst mode.
|
||||
+ * Link frequency to be configured via platform configuration.
|
||||
+ * This should always be set in conjunction with MIPI_DSI_MODE_VIDEO.
|
||||
+ * (DSI spec V1.1 8.11.4)
|
||||
+ */
|
||||
#define MIPI_DSI_MODE_VIDEO_BURST BIT(1)
|
||||
-/* video pulse mode */
|
||||
+/* Video pulse mode.
|
||||
+ * Not set denotes sync event mode. (DSI spec V1.1 8.11.2)
|
||||
+ */
|
||||
#define MIPI_DSI_MODE_VIDEO_SYNC_PULSE BIT(2)
|
||||
-/* enable auto vertical count mode */
|
||||
+/* Enable auto vertical count mode */
|
||||
#define MIPI_DSI_MODE_VIDEO_AUTO_VERT BIT(3)
|
||||
-/* enable hsync-end packets in vsync-pulse and v-porch area */
|
||||
+/* Enable hsync-end packets in vsync-pulse and v-porch area */
|
||||
#define MIPI_DSI_MODE_VIDEO_HSE BIT(4)
|
||||
-/* disable hfront-porch area */
|
||||
+/* Transmit NULL packets or LP mode during hfront-porch area.
|
||||
+ * Not set denotes sending a blanking packet instead. (DSI spec V1.1 8.11.1)
|
||||
+ */
|
||||
#define MIPI_DSI_MODE_VIDEO_NO_HFP BIT(5)
|
||||
-/* disable hback-porch area */
|
||||
+/* Transmit NULL packets or LP mode during hback-porch area.
|
||||
+ * Not set denotes sending a blanking packet instead. (DSI spec V1.1 8.11.1)
|
||||
+ */
|
||||
#define MIPI_DSI_MODE_VIDEO_NO_HBP BIT(6)
|
||||
-/* disable hsync-active area */
|
||||
+/* Transmit NULL packets or LP mode during hsync-active area.
|
||||
+ * Not set denotes sending a blanking packet instead. (DSI spec V1.1 8.11.1)
|
||||
+ */
|
||||
#define MIPI_DSI_MODE_VIDEO_NO_HSA BIT(7)
|
||||
-/* flush display FIFO on vsync pulse */
|
||||
+/* Flush display FIFO on vsync pulse */
|
||||
#define MIPI_DSI_MODE_VSYNC_FLUSH BIT(8)
|
||||
-/* disable EoT packets in HS mode */
|
||||
+/* Disable EoT packets in HS mode. (DSI spec V1.1 8.1) */
|
||||
#define MIPI_DSI_MODE_NO_EOT_PACKET BIT(9)
|
||||
-/* device supports non-continuous clock behavior (DSI spec 5.6.1) */
|
||||
+/* Device supports non-continuous clock behavior (DSI spec V1.1 5.6.1) */
|
||||
#define MIPI_DSI_CLOCK_NON_CONTINUOUS BIT(10)
|
||||
-/* transmit data in low power */
|
||||
+/* Transmit data in low power */
|
||||
#define MIPI_DSI_MODE_LPM BIT(11)
|
||||
/* transmit data ending at the same time for all lanes within one hsync */
|
||||
#define MIPI_DSI_HS_PKT_END_ALIGNED BIT(12)
|
|
@ -1,25 +0,0 @@
|
|||
From 5be301d72c1923bf6fbcf43f6dea728f50702cee Mon Sep 17 00:00:00 2001
|
||||
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
Date: Thu, 20 Jan 2022 17:29:36 +0000
|
||||
Subject: [PATCH 014/697] drm/bridge: tc358762: Ignore EPROBE_DEFER when
|
||||
logging errors
|
||||
|
||||
mipi_dsi_attach can fail due to resources not being available
|
||||
yet, therefore do not log error messages should they occur.
|
||||
|
||||
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
---
|
||||
drivers/gpu/drm/bridge/tc358762.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/gpu/drm/bridge/tc358762.c
|
||||
+++ b/drivers/gpu/drm/bridge/tc358762.c
|
||||
@@ -294,7 +294,7 @@ static int tc358762_probe(struct mipi_ds
|
||||
ret = mipi_dsi_attach(dsi);
|
||||
if (ret < 0) {
|
||||
drm_bridge_remove(&ctx->bridge);
|
||||
- dev_err(dev, "failed to attach dsi\n");
|
||||
+ dev_err_probe(dev, ret, "failed to attach dsi\n");
|
||||
}
|
||||
|
||||
return ret;
|
|
@ -1,170 +0,0 @@
|
|||
From d234bb9caf5309340b7afdb7e8bf6f8ae346eab8 Mon Sep 17 00:00:00 2001
|
||||
From: Dom Cobley <popcornmix@gmail.com>
|
||||
Date: Wed, 26 Jan 2022 15:58:13 +0000
|
||||
Subject: [PATCH 015/697] drm: Add chroma siting properties
|
||||
|
||||
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
|
||||
---
|
||||
drivers/gpu/drm/drm_atomic_state_helper.c | 14 +++++++++
|
||||
drivers/gpu/drm/drm_atomic_uapi.c | 8 +++++
|
||||
drivers/gpu/drm/drm_color_mgmt.c | 36 +++++++++++++++++++++++
|
||||
include/drm/drm_color_mgmt.h | 3 ++
|
||||
include/drm/drm_plane.h | 35 ++++++++++++++++++++--
|
||||
5 files changed, 94 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/gpu/drm/drm_atomic_state_helper.c
|
||||
+++ b/drivers/gpu/drm/drm_atomic_state_helper.c
|
||||
@@ -267,6 +267,20 @@ void __drm_atomic_helper_plane_state_res
|
||||
plane_state->color_range = val;
|
||||
}
|
||||
|
||||
+ if (plane->chroma_siting_h_property) {
|
||||
+ if (!drm_object_property_get_default_value(&plane->base,
|
||||
+ plane->chroma_siting_h_property,
|
||||
+ &val))
|
||||
+ plane_state->chroma_siting_h = val;
|
||||
+ }
|
||||
+
|
||||
+ if (plane->chroma_siting_v_property) {
|
||||
+ if (!drm_object_property_get_default_value(&plane->base,
|
||||
+ plane->chroma_siting_v_property,
|
||||
+ &val))
|
||||
+ plane_state->chroma_siting_v = val;
|
||||
+ }
|
||||
+
|
||||
if (plane->zpos_property) {
|
||||
if (!drm_object_property_get_default_value(&plane->base,
|
||||
plane->zpos_property,
|
||||
--- a/drivers/gpu/drm/drm_atomic_uapi.c
|
||||
+++ b/drivers/gpu/drm/drm_atomic_uapi.c
|
||||
@@ -538,6 +538,10 @@ static int drm_atomic_plane_set_property
|
||||
state->color_encoding = val;
|
||||
} else if (property == plane->color_range_property) {
|
||||
state->color_range = val;
|
||||
+ } else if (property == plane->chroma_siting_h_property) {
|
||||
+ state->chroma_siting_h = val;
|
||||
+ } else if (property == plane->chroma_siting_v_property) {
|
||||
+ state->chroma_siting_v = val;
|
||||
} else if (property == config->prop_fb_damage_clips) {
|
||||
ret = drm_property_replace_blob_from_id(dev,
|
||||
&state->fb_damage_clips,
|
||||
@@ -620,6 +624,10 @@ drm_atomic_plane_get_property(struct drm
|
||||
*val = state->color_encoding;
|
||||
} else if (property == plane->color_range_property) {
|
||||
*val = state->color_range;
|
||||
+ } else if (property == plane->chroma_siting_h_property) {
|
||||
+ *val = state->chroma_siting_h;
|
||||
+ } else if (property == plane->chroma_siting_v_property) {
|
||||
+ *val = state->chroma_siting_v;
|
||||
} else if (property == config->prop_fb_damage_clips) {
|
||||
*val = (state->fb_damage_clips) ?
|
||||
state->fb_damage_clips->base.id : 0;
|
||||
--- a/drivers/gpu/drm/drm_color_mgmt.c
|
||||
+++ b/drivers/gpu/drm/drm_color_mgmt.c
|
||||
@@ -591,6 +591,42 @@ int drm_plane_create_color_properties(st
|
||||
EXPORT_SYMBOL(drm_plane_create_color_properties);
|
||||
|
||||
/**
|
||||
+ * drm_plane_create_chroma_siting_properties - chroma siting related plane properties
|
||||
+ * @plane: plane object
|
||||
+ *
|
||||
+ * Create and attach plane specific CHROMA_SITING
|
||||
+ * properties to @plane.
|
||||
+ */
|
||||
+int drm_plane_create_chroma_siting_properties(struct drm_plane *plane,
|
||||
+ int32_t default_chroma_siting_h,
|
||||
+ int32_t default_chroma_siting_v)
|
||||
+{
|
||||
+ struct drm_device *dev = plane->dev;
|
||||
+ struct drm_property *prop;
|
||||
+
|
||||
+ prop = drm_property_create_range(dev, 0, "CHROMA_SITING_H",
|
||||
+ 0, 1<<16);
|
||||
+ if (!prop)
|
||||
+ return -ENOMEM;
|
||||
+ plane->chroma_siting_h_property = prop;
|
||||
+ drm_object_attach_property(&plane->base, prop, default_chroma_siting_h);
|
||||
+
|
||||
+ prop = drm_property_create_range(dev, 0, "CHROMA_SITING_V",
|
||||
+ 0, 1<<16);
|
||||
+ if (!prop)
|
||||
+ return -ENOMEM;
|
||||
+ plane->chroma_siting_v_property = prop;
|
||||
+ drm_object_attach_property(&plane->base, prop, default_chroma_siting_v);
|
||||
+
|
||||
+ if (plane->state) {
|
||||
+ plane->state->chroma_siting_h = default_chroma_siting_h;
|
||||
+ plane->state->chroma_siting_v = default_chroma_siting_v;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+EXPORT_SYMBOL(drm_plane_create_chroma_siting_properties);
|
||||
+
|
||||
+/**
|
||||
* drm_color_lut_check - check validity of lookup table
|
||||
* @lut: property blob containing LUT to check
|
||||
* @tests: bitmask of tests to run
|
||||
--- a/include/drm/drm_color_mgmt.h
|
||||
+++ b/include/drm/drm_color_mgmt.h
|
||||
@@ -91,6 +91,9 @@ int drm_plane_create_color_properties(st
|
||||
enum drm_color_encoding default_encoding,
|
||||
enum drm_color_range default_range);
|
||||
|
||||
+int drm_plane_create_chroma_siting_properties(struct drm_plane *plane,
|
||||
+ int32_t default_chroma_siting_h, int32_t default_chroma_siting_v);
|
||||
+
|
||||
/**
|
||||
* enum drm_color_lut_tests - hw-specific LUT tests to perform
|
||||
*
|
||||
--- a/include/drm/drm_plane.h
|
||||
+++ b/include/drm/drm_plane.h
|
||||
@@ -184,6 +184,24 @@ struct drm_plane_state {
|
||||
enum drm_color_range color_range;
|
||||
|
||||
/**
|
||||
+ * @chroma_siting_h:
|
||||
+ *
|
||||
+ * Location of chroma samples horizontally compared to luma
|
||||
+ * 0 means chroma is sited with left luma
|
||||
+ * 0x8000 is interstitial. 0x10000 is sited with right luma
|
||||
+ */
|
||||
+ int32_t chroma_siting_h;
|
||||
+
|
||||
+ /**
|
||||
+ * @chroma_siting_v:
|
||||
+ *
|
||||
+ * Location of chroma samples vertically compared to luma
|
||||
+ * 0 means chroma is sited with top luma
|
||||
+ * 0x8000 is interstitial. 0x10000 is sited with bottom luma
|
||||
+ */
|
||||
+ int32_t chroma_siting_v;
|
||||
+
|
||||
+ /**
|
||||
* @fb_damage_clips:
|
||||
*
|
||||
* Blob representing damage (area in plane framebuffer that changed
|
||||
@@ -783,9 +801,22 @@ struct drm_plane {
|
||||
struct drm_property *hotspot_y_property;
|
||||
|
||||
/**
|
||||
- * @kmsg_panic: Used to register a panic notifier for this plane
|
||||
+ * @chroma_siting_h_property:
|
||||
+ *
|
||||
+ * Optional "CHROMA_SITING_H" property for specifying
|
||||
+ * chroma siting for YUV formats.
|
||||
+ * See drm_plane_create_chroma_siting_properties().
|
||||
+ */
|
||||
+ struct drm_property *chroma_siting_h_property;
|
||||
+
|
||||
+ /**
|
||||
+ * @chroma_siting_v_property:
|
||||
+ *
|
||||
+ * Optional "CHROMA_SITING_V" property for specifying
|
||||
+ * chroma siting for YUV formats.
|
||||
+ * See drm_plane_create_chroma_siting_properties().
|
||||
*/
|
||||
- struct kmsg_dumper kmsg_panic;
|
||||
+ struct drm_property *chroma_siting_v_property;
|
||||
};
|
||||
|
||||
#define obj_to_plane(x) container_of(x, struct drm_plane, base)
|
|
@ -1,121 +0,0 @@
|
|||
From fa34363447ef39ae5b02c350ae2650cd4c1308f6 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Vetter <daniel.vetter@ffwll.ch>
|
||||
Date: Fri, 23 Oct 2020 14:39:23 +0200
|
||||
Subject: [PATCH 016/697] drm/atomic-helpers: remove legacy_cursor_update hacks
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The stuff never really worked, and leads to lots of fun because it
|
||||
out-of-order frees atomic states. Which upsets KASAN, among other
|
||||
things.
|
||||
|
||||
For async updates we now have a more solid solution with the
|
||||
->atomic_async_check and ->atomic_async_commit hooks. Support for that
|
||||
for msm and vc4 landed. nouveau and i915 have their own commit
|
||||
routines, doing something similar.
|
||||
|
||||
For everyone else it's probably better to remove the use-after-free
|
||||
bug, and encourage folks to use the async support instead. The
|
||||
affected drivers which register a legacy cursor plane and don't either
|
||||
use the new async stuff or their own commit routine are: amdgpu,
|
||||
atmel, mediatek, qxl, rockchip, sti, sun4i, tegra, virtio, and vmwgfx.
|
||||
|
||||
Inspired by an amdgpu bug report.
|
||||
|
||||
v2: Drop RFC, I think with amdgpu converted over to use
|
||||
atomic_async_check/commit done in
|
||||
|
||||
commit 674e78acae0dfb4beb56132e41cbae5b60f7d662
|
||||
Author: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
|
||||
Date: Wed Dec 5 14:59:07 2018 -0500
|
||||
|
||||
drm/amd/display: Add fast path for cursor plane updates
|
||||
|
||||
we don't have any driver anymore where we have userspace expecting
|
||||
solid legacy cursor support _and_ they are using the atomic helpers in
|
||||
their fully glory. So we can retire this.
|
||||
|
||||
v3: Paper over msm and i915 regression. The complete_all is the only
|
||||
thing missing afaict.
|
||||
|
||||
v4: Rebased on recent kernel, added extra link for vc4 bug.
|
||||
|
||||
Link: https://bugzilla.kernel.org/show_bug.cgi?id=199425
|
||||
Link: https://lore.kernel.org/all/20220221134155.125447-9-maxime@cerno.tech/
|
||||
Cc: mikita.lipski@amd.com
|
||||
Cc: Michel Dänzer <michel@daenzer.net>
|
||||
Cc: harry.wentland@amd.com
|
||||
Cc: Rob Clark <robdclark@gmail.com>
|
||||
Cc: "Kazlauskas, Nicholas" <nicholas.kazlauskas@amd.com>
|
||||
Tested-by: Maxime Ripard <maxime@cerno.tech>
|
||||
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
||||
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
---
|
||||
drivers/gpu/drm/drm_atomic_helper.c | 13 -------------
|
||||
drivers/gpu/drm/i915/display/intel_display.c | 13 +++++++++++++
|
||||
drivers/gpu/drm/msm/msm_atomic.c | 2 ++
|
||||
3 files changed, 15 insertions(+), 13 deletions(-)
|
||||
|
||||
--- a/drivers/gpu/drm/drm_atomic_helper.c
|
||||
+++ b/drivers/gpu/drm/drm_atomic_helper.c
|
||||
@@ -1656,13 +1656,6 @@ drm_atomic_helper_wait_for_vblanks(struc
|
||||
int i, ret;
|
||||
unsigned int crtc_mask = 0;
|
||||
|
||||
- /*
|
||||
- * Legacy cursor ioctls are completely unsynced, and userspace
|
||||
- * relies on that (by doing tons of cursor updates).
|
||||
- */
|
||||
- if (old_state->legacy_cursor_update)
|
||||
- return;
|
||||
-
|
||||
for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) {
|
||||
if (!new_crtc_state->active)
|
||||
continue;
|
||||
@@ -2311,12 +2304,6 @@ int drm_atomic_helper_setup_commit(struc
|
||||
complete_all(&commit->flip_done);
|
||||
continue;
|
||||
}
|
||||
-
|
||||
- /* Legacy cursor updates are fully unsynced. */
|
||||
- if (state->legacy_cursor_update) {
|
||||
- complete_all(&commit->flip_done);
|
||||
- continue;
|
||||
- }
|
||||
|
||||
if (!new_crtc_state->event) {
|
||||
commit->event = kzalloc(sizeof(*commit->event),
|
||||
--- a/drivers/gpu/drm/i915/display/intel_display.c
|
||||
+++ b/drivers/gpu/drm/i915/display/intel_display.c
|
||||
@@ -7648,6 +7648,19 @@ int intel_atomic_commit(struct drm_devic
|
||||
state->base.legacy_cursor_update = false;
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * FIXME: Cut over to (async) commit helpers instead of hand-rolling
|
||||
+ * everything.
|
||||
+ */
|
||||
+ if (state->base.legacy_cursor_update) {
|
||||
+ struct intel_crtc_state *new_crtc_state;
|
||||
+ struct intel_crtc *crtc;
|
||||
+ int i;
|
||||
+
|
||||
+ for_each_new_intel_crtc_in_state(state, crtc, new_crtc_state, i)
|
||||
+ complete_all(&new_crtc_state->uapi.commit->flip_done);
|
||||
+ }
|
||||
+
|
||||
ret = intel_atomic_prepare_commit(state);
|
||||
if (ret) {
|
||||
drm_dbg_atomic(&dev_priv->drm,
|
||||
--- a/drivers/gpu/drm/msm/msm_atomic.c
|
||||
+++ b/drivers/gpu/drm/msm/msm_atomic.c
|
||||
@@ -242,6 +242,8 @@ void msm_atomic_commit_tail(struct drm_a
|
||||
/* async updates are limited to single-crtc updates: */
|
||||
WARN_ON(crtc_mask != drm_crtc_mask(async_crtc));
|
||||
|
||||
+ complete_all(&async_crtc->state->commit->flip_done);
|
||||
+
|
||||
/*
|
||||
* Start timer if we don't already have an update pending
|
||||
* on this crtc:
|
|
@ -1,60 +0,0 @@
|
|||
From 5350800c62c07a2f1e90332039a09d3be55b960b Mon Sep 17 00:00:00 2001
|
||||
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
Date: Fri, 1 Apr 2022 17:10:37 +0100
|
||||
Subject: [PATCH 017/697] drm/atomic: If margins are updated, update all
|
||||
planes.
|
||||
|
||||
Margins may be implemented by scaling the planes, but as there
|
||||
is no way of intercepting the set_property for a standard property,
|
||||
and all planes are checked in drm_atomic_check_only before the
|
||||
connectors, there's now way to add the planes into the state
|
||||
from the driver.
|
||||
|
||||
If the margin properties change, add all corresponding planes to
|
||||
the state.
|
||||
|
||||
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
---
|
||||
drivers/gpu/drm/drm_atomic_uapi.c | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
--- a/drivers/gpu/drm/drm_atomic_uapi.c
|
||||
+++ b/drivers/gpu/drm/drm_atomic_uapi.c
|
||||
@@ -679,6 +679,7 @@ static int drm_atomic_connector_set_prop
|
||||
{
|
||||
struct drm_device *dev = connector->dev;
|
||||
struct drm_mode_config *config = &dev->mode_config;
|
||||
+ bool margins_updated = false;
|
||||
bool replaced = false;
|
||||
int ret;
|
||||
|
||||
@@ -707,12 +708,16 @@ static int drm_atomic_connector_set_prop
|
||||
state->tv.subconnector = val;
|
||||
} else if (property == config->tv_left_margin_property) {
|
||||
state->tv.margins.left = val;
|
||||
+ margins_updated = true;
|
||||
} else if (property == config->tv_right_margin_property) {
|
||||
state->tv.margins.right = val;
|
||||
+ margins_updated = true;
|
||||
} else if (property == config->tv_top_margin_property) {
|
||||
state->tv.margins.top = val;
|
||||
+ margins_updated = true;
|
||||
} else if (property == config->tv_bottom_margin_property) {
|
||||
state->tv.margins.bottom = val;
|
||||
+ margins_updated = true;
|
||||
} else if (property == config->legacy_tv_mode_property) {
|
||||
state->tv.legacy_mode = val;
|
||||
} else if (property == config->tv_mode_property) {
|
||||
@@ -797,6 +802,12 @@ static int drm_atomic_connector_set_prop
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
+ if (margins_updated && state->crtc) {
|
||||
+ ret = drm_atomic_add_affected_planes(state->state, state->crtc);
|
||||
+
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
From 4cdcf8e2c3eb6acfce367b06f0e3a82529ad8a20 Mon Sep 17 00:00:00 2001
|
||||
From: Maxime Ripard <maxime@cerno.tech>
|
||||
Date: Mon, 6 Jun 2022 11:02:16 +0200
|
||||
Subject: [PATCH 018/697] arm64: setup: Fix build warning
|
||||
|
||||
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
---
|
||||
arch/arm64/kernel/setup.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/arch/arm64/kernel/setup.c
|
||||
+++ b/arch/arm64/kernel/setup.c
|
||||
@@ -214,9 +214,9 @@ static void __init request_standard_reso
|
||||
size_t res_size;
|
||||
|
||||
kernel_code.start = __pa_symbol(_stext);
|
||||
- kernel_code.end = __pa_symbol(__init_begin - 1);
|
||||
+ kernel_code.end = __pa_symbol(__init_begin) - 1;
|
||||
kernel_data.start = __pa_symbol(_sdata);
|
||||
- kernel_data.end = __pa_symbol(_end - 1);
|
||||
+ kernel_data.end = __pa_symbol(_end) - 1;
|
||||
insert_resource(&iomem_resource, &kernel_code);
|
||||
insert_resource(&iomem_resource, &kernel_data);
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -1,25 +0,0 @@
|
|||
From 0c982a65617ddab7a80b88d8293022f657857ae4 Mon Sep 17 00:00:00 2001
|
||||
From: popcornmix <popcornmix@gmail.com>
|
||||
Date: Mon, 9 Sep 2019 15:49:56 +0100
|
||||
Subject: [PATCH 021/697] clk-raspberrypi: Allow cpufreq driver to also adjust
|
||||
gpu clocks
|
||||
|
||||
For performance/power it is beneficial to adjust gpu clocks with arm clock.
|
||||
This is how the downstream cpufreq driver works
|
||||
|
||||
Signed-off-by: popcornmix <popcornmix@gmail.com>
|
||||
---
|
||||
drivers/clk/bcm/clk-raspberrypi.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/clk/bcm/clk-raspberrypi.c
|
||||
+++ b/drivers/clk/bcm/clk-raspberrypi.c
|
||||
@@ -153,7 +153,7 @@ static int raspberrypi_clock_property(st
|
||||
struct raspberrypi_firmware_prop msg = {
|
||||
.id = cpu_to_le32(data->id),
|
||||
.val = cpu_to_le32(*val),
|
||||
- .disable_turbo = cpu_to_le32(1),
|
||||
+ .disable_turbo = cpu_to_le32(0),
|
||||
};
|
||||
int ret;
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
From e0060fa6ffa45d46235ba9565b26619e8e0c2367 Mon Sep 17 00:00:00 2001
|
||||
From: Maxime Ripard <maxime@cerno.tech>
|
||||
Date: Mon, 11 Jul 2022 15:58:36 +0200
|
||||
Subject: [PATCH 022/697] clk: bcm: rpi: Create helper to retrieve private data
|
||||
|
||||
The RaspberryPi firmware clocks driver uses in several instances a
|
||||
container_of to retrieve the struct raspberrypi_clk_data from a pointer
|
||||
to struct clk_hw. Let's create a small function to avoid duplicating it
|
||||
all over the place.
|
||||
|
||||
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
---
|
||||
drivers/clk/bcm/clk-raspberrypi.c | 18 ++++++++++--------
|
||||
1 file changed, 10 insertions(+), 8 deletions(-)
|
||||
|
||||
--- a/drivers/clk/bcm/clk-raspberrypi.c
|
||||
+++ b/drivers/clk/bcm/clk-raspberrypi.c
|
||||
@@ -56,6 +56,12 @@ struct raspberrypi_clk_data {
|
||||
struct raspberrypi_clk *rpi;
|
||||
};
|
||||
|
||||
+static inline
|
||||
+const struct raspberrypi_clk_data *clk_hw_to_data(const struct clk_hw *hw)
|
||||
+{
|
||||
+ return container_of(hw, struct raspberrypi_clk_data, hw);
|
||||
+}
|
||||
+
|
||||
struct raspberrypi_clk_variant {
|
||||
bool export;
|
||||
char *clkdev;
|
||||
@@ -168,8 +174,7 @@ static int raspberrypi_clock_property(st
|
||||
|
||||
static int raspberrypi_fw_is_prepared(struct clk_hw *hw)
|
||||
{
|
||||
- struct raspberrypi_clk_data *data =
|
||||
- container_of(hw, struct raspberrypi_clk_data, hw);
|
||||
+ const struct raspberrypi_clk_data *data = clk_hw_to_data(hw);
|
||||
struct raspberrypi_clk *rpi = data->rpi;
|
||||
u32 val = 0;
|
||||
int ret;
|
||||
@@ -186,8 +191,7 @@ static int raspberrypi_fw_is_prepared(st
|
||||
static unsigned long raspberrypi_fw_get_rate(struct clk_hw *hw,
|
||||
unsigned long parent_rate)
|
||||
{
|
||||
- struct raspberrypi_clk_data *data =
|
||||
- container_of(hw, struct raspberrypi_clk_data, hw);
|
||||
+ const struct raspberrypi_clk_data *data = clk_hw_to_data(hw);
|
||||
struct raspberrypi_clk *rpi = data->rpi;
|
||||
u32 val = 0;
|
||||
int ret;
|
||||
@@ -203,8 +207,7 @@ static unsigned long raspberrypi_fw_get_
|
||||
static int raspberrypi_fw_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
unsigned long parent_rate)
|
||||
{
|
||||
- struct raspberrypi_clk_data *data =
|
||||
- container_of(hw, struct raspberrypi_clk_data, hw);
|
||||
+ const struct raspberrypi_clk_data *data = clk_hw_to_data(hw);
|
||||
struct raspberrypi_clk *rpi = data->rpi;
|
||||
u32 _rate = rate;
|
||||
int ret;
|
||||
@@ -221,8 +224,7 @@ static int raspberrypi_fw_set_rate(struc
|
||||
static int raspberrypi_fw_dumb_determine_rate(struct clk_hw *hw,
|
||||
struct clk_rate_request *req)
|
||||
{
|
||||
- struct raspberrypi_clk_data *data =
|
||||
- container_of(hw, struct raspberrypi_clk_data, hw);
|
||||
+ const struct raspberrypi_clk_data *data = clk_hw_to_data(hw);
|
||||
struct raspberrypi_clk_variant *variant = data->variant;
|
||||
|
||||
/*
|
|
@ -1,85 +0,0 @@
|
|||
From 23af1bc548742e8d20a57ae703c5646c7f70e20a Mon Sep 17 00:00:00 2001
|
||||
From: Dom Cobley <popcornmix@gmail.com>
|
||||
Date: Tue, 12 Apr 2022 20:07:20 +0100
|
||||
Subject: [PATCH 023/697] clk-raspberrypi: Add ISP to exported clocks
|
||||
|
||||
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
|
||||
|
||||
clk-raspberrypi: Enable minimize for all firmware clocks
|
||||
|
||||
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
|
||||
|
||||
clk: bcm: rpi: Add disp clock
|
||||
|
||||
BCM2712 has an extra clock exposed by the firmware called DISP, and used
|
||||
by (at least) the HVS. Let's add it to the list of clocks to register in
|
||||
Linux.
|
||||
|
||||
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
|
||||
clk: bcm: rpi: Add the BCM283x pixel clock.
|
||||
|
||||
The clk-bcm2835 handling of the pixel clock does not function
|
||||
correctly when the HDMI power domain is disabled.
|
||||
|
||||
The firmware supports it correctly, so add it to the
|
||||
firmware clock driver.
|
||||
|
||||
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
---
|
||||
drivers/clk/bcm/clk-raspberrypi.c | 14 ++++++++++++++
|
||||
include/soc/bcm2835/raspberrypi-firmware.h | 1 +
|
||||
2 files changed, 15 insertions(+)
|
||||
|
||||
--- a/drivers/clk/bcm/clk-raspberrypi.c
|
||||
+++ b/drivers/clk/bcm/clk-raspberrypi.c
|
||||
@@ -34,6 +34,7 @@ static char *rpi_firmware_clk_names[] =
|
||||
[RPI_FIRMWARE_M2MC_CLK_ID] = "m2mc",
|
||||
[RPI_FIRMWARE_PIXEL_BVB_CLK_ID] = "pixel-bvb",
|
||||
[RPI_FIRMWARE_VEC_CLK_ID] = "vec",
|
||||
+ [RPI_FIRMWARE_DISP_CLK_ID] = "disp",
|
||||
};
|
||||
|
||||
#define RPI_FIRMWARE_STATE_ENABLE_BIT BIT(0)
|
||||
@@ -117,18 +118,31 @@ raspberrypi_clk_variants[RPI_FIRMWARE_NU
|
||||
},
|
||||
[RPI_FIRMWARE_V3D_CLK_ID] = {
|
||||
.export = true,
|
||||
+ .minimize = true,
|
||||
},
|
||||
[RPI_FIRMWARE_PIXEL_CLK_ID] = {
|
||||
.export = true,
|
||||
+ .minimize = true,
|
||||
},
|
||||
[RPI_FIRMWARE_HEVC_CLK_ID] = {
|
||||
.export = true,
|
||||
+ .minimize = true,
|
||||
+ },
|
||||
+ [RPI_FIRMWARE_ISP_CLK_ID] = {
|
||||
+ .export = true,
|
||||
+ .minimize = true,
|
||||
},
|
||||
[RPI_FIRMWARE_PIXEL_BVB_CLK_ID] = {
|
||||
.export = true,
|
||||
+ .minimize = true,
|
||||
},
|
||||
[RPI_FIRMWARE_VEC_CLK_ID] = {
|
||||
.export = true,
|
||||
+ .minimize = true,
|
||||
+ },
|
||||
+ [RPI_FIRMWARE_DISP_CLK_ID] = {
|
||||
+ .export = true,
|
||||
+ .minimize = true,
|
||||
},
|
||||
};
|
||||
|
||||
--- a/include/soc/bcm2835/raspberrypi-firmware.h
|
||||
+++ b/include/soc/bcm2835/raspberrypi-firmware.h
|
||||
@@ -176,6 +176,7 @@ enum rpi_firmware_clk_id {
|
||||
RPI_FIRMWARE_M2MC_CLK_ID,
|
||||
RPI_FIRMWARE_PIXEL_BVB_CLK_ID,
|
||||
RPI_FIRMWARE_VEC_CLK_ID,
|
||||
+ RPI_FIRMWARE_DISP_CLK_ID,
|
||||
RPI_FIRMWARE_NUM_CLK_ID,
|
||||
};
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
From cee2529d24e48051fff96a9f2d4740f5c3661f7e Mon Sep 17 00:00:00 2001
|
||||
From: Martin Sperl <kernel@martin.sperl.org>
|
||||
Date: Fri, 2 Sep 2016 16:45:27 +0100
|
||||
Subject: [PATCH 024/697] clk: clk-bcm2835: Register the clocks early during
|
||||
the boot process
|
||||
|
||||
so that special/critical clocks can get enabled early on in the
|
||||
boot process avoiding the risk of disabling a clock, pll_divider
|
||||
or pll when a claiming driver fails to install propperly - maybe it needs to defer.
|
||||
|
||||
Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
|
||||
|
||||
clk: clk-bcm2835: Use %zd when printing size_t
|
||||
|
||||
The debug text for how many clocks have been registered
|
||||
uses "%d" with a size_t. Correct it to "%zd".
|
||||
|
||||
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
|
||||
Initialise rpi-firmware before clk-bcm2835
|
||||
|
||||
The IMA (Integrity Measurement Architecture) looks for a TPM (Trusted
|
||||
Platform Module) having been registered when it initialises; otherwise
|
||||
it assumes there is no TPM. It has been observed on BCM2835 that IMA
|
||||
is initialised before TPM, and that initialising the BCM2835 clock
|
||||
driver before the firmware driver has the effect of reversing this
|
||||
order.
|
||||
|
||||
Change the firmware driver to initialise at core_initcall, delaying the
|
||||
BCM2835 clock driver to postcore_initcall.
|
||||
|
||||
See: https://github.com/raspberrypi/linux/issues/3291
|
||||
https://github.com/raspberrypi/linux/pull/3297
|
||||
|
||||
Signed-off-by: Luke Hinds <lhinds@redhat.com>
|
||||
Co-authored-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
clk-bcm2835: use subsys_initcall for the clock driver when IMA is enabled
|
||||
|
||||
Co-authored-by: Davide Scovotto <scovottodavide@gmail.com>
|
||||
Co-developed-by: Davide Scovotto <scovottodavide@gmail.com>
|
||||
Signed-off-by: Davide Scovotto <scovottodavide@gmail.com>
|
||||
Signed-off-by: Alberto Solavagione <albertosolavagione30@gmail.com>
|
||||
---
|
||||
drivers/clk/bcm/clk-bcm2835.c | 19 +++++++++++++++++--
|
||||
1 file changed, 17 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/clk/bcm/clk-bcm2835.c
|
||||
+++ b/drivers/clk/bcm/clk-bcm2835.c
|
||||
@@ -2319,8 +2319,15 @@ static int bcm2835_clk_probe(struct plat
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
- return of_clk_add_hw_provider(dev->of_node, of_clk_hw_onecell_get,
|
||||
+ ret = of_clk_add_hw_provider(dev->of_node, of_clk_hw_onecell_get,
|
||||
&cprman->onecell);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ /* note that we have registered all the clocks */
|
||||
+ dev_dbg(dev, "registered %zd clocks\n", asize);
|
||||
+
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static const struct cprman_plat_data cprman_bcm2835_plat_data = {
|
||||
@@ -2346,7 +2353,15 @@ static struct platform_driver bcm2835_cl
|
||||
.probe = bcm2835_clk_probe,
|
||||
};
|
||||
|
||||
-builtin_platform_driver(bcm2835_clk_driver);
|
||||
+static int __init __bcm2835_clk_driver_init(void)
|
||||
+{
|
||||
+ return platform_driver_register(&bcm2835_clk_driver);
|
||||
+}
|
||||
+#ifdef CONFIG_IMA
|
||||
+subsys_initcall(__bcm2835_clk_driver_init);
|
||||
+#else
|
||||
+postcore_initcall(__bcm2835_clk_driver_init);
|
||||
+#endif
|
||||
|
||||
MODULE_AUTHOR("Eric Anholt <eric@anholt.net>");
|
||||
MODULE_DESCRIPTION("BCM2835 clock driver");
|
|
@ -1,28 +0,0 @@
|
|||
From 4333d849f06982afd3a6633e51afe448224305a5 Mon Sep 17 00:00:00 2001
|
||||
From: Phil Elwell <phil@raspberrypi.org>
|
||||
Date: Mon, 13 Feb 2017 17:20:08 +0000
|
||||
Subject: [PATCH 025/697] clk-bcm2835: Mark used PLLs and dividers CRITICAL
|
||||
|
||||
The VPU configures and relies on several PLLs and dividers. Mark all
|
||||
enabled dividers and their PLLs as CRITICAL to prevent the kernel from
|
||||
switching them off.
|
||||
|
||||
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
---
|
||||
drivers/clk/bcm/clk-bcm2835.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
--- a/drivers/clk/bcm/clk-bcm2835.c
|
||||
+++ b/drivers/clk/bcm/clk-bcm2835.c
|
||||
@@ -1407,6 +1407,11 @@ bcm2835_register_pll_divider(struct bcm2
|
||||
divider->div.hw.init = &init;
|
||||
divider->div.table = NULL;
|
||||
|
||||
+ if (!(cprman_read(cprman, divider_data->cm_reg) & divider_data->hold_mask)) {
|
||||
+ init.flags |= CLK_IS_CRITICAL;
|
||||
+ divider->div.flags |= CLK_IS_CRITICAL;
|
||||
+ }
|
||||
+
|
||||
divider->cprman = cprman;
|
||||
divider->data = divider_data;
|
||||
|
|
@ -1,118 +0,0 @@
|
|||
From f9d8149791e2cbe06cf656182c53ee29f5cd9972 Mon Sep 17 00:00:00 2001
|
||||
From: Phil Elwell <phil@raspberrypi.org>
|
||||
Date: Mon, 13 Feb 2017 17:20:08 +0000
|
||||
Subject: [PATCH 026/697] clk-bcm2835: Add claim-clocks property
|
||||
|
||||
The claim-clocks property can be used to prevent PLLs and dividers
|
||||
from being marked as critical. It contains a vector of clock IDs,
|
||||
as defined by dt-bindings/clock/bcm2835.h.
|
||||
|
||||
Use this mechanism to claim PLLD_DSI0, PLLD_DSI1, PLLH_AUX and
|
||||
PLLH_PIX for the vc4_kms_v3d driver.
|
||||
|
||||
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
---
|
||||
drivers/clk/bcm/clk-bcm2835.c | 43 +++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 41 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/clk/bcm/clk-bcm2835.c
|
||||
+++ b/drivers/clk/bcm/clk-bcm2835.c
|
||||
@@ -1335,6 +1335,8 @@ static const struct clk_ops bcm2835_vpu_
|
||||
.debug_init = bcm2835_clock_debug_init,
|
||||
};
|
||||
|
||||
+static bool bcm2835_clk_is_claimed(const char *name);
|
||||
+
|
||||
static struct clk_hw *bcm2835_register_pll(struct bcm2835_cprman *cprman,
|
||||
const void *data)
|
||||
{
|
||||
@@ -1352,6 +1354,9 @@ static struct clk_hw *bcm2835_register_p
|
||||
init.ops = &bcm2835_pll_clk_ops;
|
||||
init.flags = pll_data->flags | CLK_IGNORE_UNUSED;
|
||||
|
||||
+ if (!bcm2835_clk_is_claimed(pll_data->name))
|
||||
+ init.flags |= CLK_IS_CRITICAL;
|
||||
+
|
||||
pll = kzalloc(sizeof(*pll), GFP_KERNEL);
|
||||
if (!pll)
|
||||
return NULL;
|
||||
@@ -1408,8 +1413,10 @@ bcm2835_register_pll_divider(struct bcm2
|
||||
divider->div.table = NULL;
|
||||
|
||||
if (!(cprman_read(cprman, divider_data->cm_reg) & divider_data->hold_mask)) {
|
||||
- init.flags |= CLK_IS_CRITICAL;
|
||||
- divider->div.flags |= CLK_IS_CRITICAL;
|
||||
+ if (!bcm2835_clk_is_claimed(divider_data->source_pll))
|
||||
+ init.flags |= CLK_IS_CRITICAL;
|
||||
+ if (!bcm2835_clk_is_claimed(divider_data->name))
|
||||
+ divider->div.flags |= CLK_IS_CRITICAL;
|
||||
}
|
||||
|
||||
divider->cprman = cprman;
|
||||
@@ -1466,6 +1473,15 @@ static struct clk_hw *bcm2835_register_c
|
||||
init.flags = clock_data->flags | CLK_IGNORE_UNUSED;
|
||||
|
||||
/*
|
||||
+ * Some GPIO clocks for ethernet/wifi PLLs are marked as
|
||||
+ * critical (since some platforms use them), but if the
|
||||
+ * firmware didn't have them turned on then they clearly
|
||||
+ * aren't actually critical.
|
||||
+ */
|
||||
+ if ((cprman_read(cprman, clock_data->ctl_reg) & CM_ENABLE) == 0)
|
||||
+ init.flags &= ~CLK_IS_CRITICAL;
|
||||
+
|
||||
+ /*
|
||||
* Pass the CLK_SET_RATE_PARENT flag if we are allowed to propagate
|
||||
* rate changes on at least of the parents.
|
||||
*/
|
||||
@@ -2245,6 +2261,8 @@ static const struct bcm2835_clk_desc clk
|
||||
.ctl_reg = CM_PERIICTL),
|
||||
};
|
||||
|
||||
+static bool bcm2835_clk_claimed[ARRAY_SIZE(clk_desc_array)];
|
||||
+
|
||||
/*
|
||||
* Permanently take a reference on the parent of the SDRAM clock.
|
||||
*
|
||||
@@ -2264,6 +2282,19 @@ static int bcm2835_mark_sdc_parent_criti
|
||||
return clk_prepare_enable(parent);
|
||||
}
|
||||
|
||||
+static bool bcm2835_clk_is_claimed(const char *name)
|
||||
+{
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(clk_desc_array); i++) {
|
||||
+ const char *clk_name = *(const char **)(clk_desc_array[i].data);
|
||||
+ if (!strcmp(name, clk_name))
|
||||
+ return bcm2835_clk_claimed[i];
|
||||
+ }
|
||||
+
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
static int bcm2835_clk_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
@@ -2273,6 +2304,7 @@ static int bcm2835_clk_probe(struct plat
|
||||
const size_t asize = ARRAY_SIZE(clk_desc_array);
|
||||
const struct cprman_plat_data *pdata;
|
||||
size_t i;
|
||||
+ u32 clk_id;
|
||||
int ret;
|
||||
|
||||
pdata = of_device_get_match_data(&pdev->dev);
|
||||
@@ -2291,6 +2323,13 @@ static int bcm2835_clk_probe(struct plat
|
||||
if (IS_ERR(cprman->regs))
|
||||
return PTR_ERR(cprman->regs);
|
||||
|
||||
+ memset(bcm2835_clk_claimed, 0, sizeof(bcm2835_clk_claimed));
|
||||
+ for (i = 0;
|
||||
+ !of_property_read_u32_index(pdev->dev.of_node, "claim-clocks",
|
||||
+ i, &clk_id);
|
||||
+ i++)
|
||||
+ bcm2835_clk_claimed[clk_id]= true;
|
||||
+
|
||||
memcpy(cprman->real_parent_names, cprman_parent_names,
|
||||
sizeof(cprman_parent_names));
|
||||
of_clk_parent_fill(dev->of_node, cprman->real_parent_names,
|
|
@ -1,122 +0,0 @@
|
|||
From 1c0f5f04c143e5543d498fb05c1ec50c5aa7e3e8 Mon Sep 17 00:00:00 2001
|
||||
From: Phil Elwell <phil@raspberrypi.org>
|
||||
Date: Mon, 6 Mar 2017 09:06:18 +0000
|
||||
Subject: [PATCH 027/697] clk-bcm2835: Read max core clock from firmware
|
||||
|
||||
The VPU is responsible for managing the core clock, usually under
|
||||
direction from the bcm2835-cpufreq driver but not via the clk-bcm2835
|
||||
driver. Since the core frequency can change without warning, it is
|
||||
safer to report the maximum clock rate to users of the core clock -
|
||||
I2C, SPI and the mini UART - to err on the safe side when calculating
|
||||
clock divisors.
|
||||
|
||||
If the DT node for the clock driver includes a reference to the
|
||||
firmware node, use the firmware API to query the maximum core clock
|
||||
instead of reading the divider registers.
|
||||
|
||||
Prior to this patch, a "100KHz" I2C bus was sometimes clocked at about
|
||||
160KHz. In particular, switching to the 4.9 kernel was likely to break
|
||||
SenseHAT usage on a Pi3.
|
||||
|
||||
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
clk: bcm2835: Pass DT node to rpi_firmware_get
|
||||
|
||||
The fw_node pointer has already been retrieved, and using it allows
|
||||
us to remove a downstream patch to the firmware driver.
|
||||
|
||||
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
---
|
||||
drivers/clk/bcm/clk-bcm2835.c | 39 ++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 38 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/clk/bcm/clk-bcm2835.c
|
||||
+++ b/drivers/clk/bcm/clk-bcm2835.c
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/slab.h>
|
||||
#include <dt-bindings/clock/bcm2835.h>
|
||||
+#include <soc/bcm2835/raspberrypi-firmware.h>
|
||||
|
||||
#define CM_PASSWORD 0x5a000000
|
||||
|
||||
@@ -296,6 +297,8 @@
|
||||
#define SOC_BCM2711 BIT(1)
|
||||
#define SOC_ALL (SOC_BCM2835 | SOC_BCM2711)
|
||||
|
||||
+#define VCMSG_ID_CORE_CLOCK 4
|
||||
+
|
||||
/*
|
||||
* Names of clocks used within the driver that need to be replaced
|
||||
* with an external parent's name. This array is in the order that
|
||||
@@ -314,6 +317,7 @@ static const char *const cprman_parent_n
|
||||
struct bcm2835_cprman {
|
||||
struct device *dev;
|
||||
void __iomem *regs;
|
||||
+ struct rpi_firmware *fw;
|
||||
spinlock_t regs_lock; /* spinlock for all clocks */
|
||||
unsigned int soc;
|
||||
|
||||
@@ -1039,6 +1043,30 @@ static unsigned long bcm2835_clock_get_r
|
||||
return rate;
|
||||
}
|
||||
|
||||
+static unsigned long bcm2835_clock_get_rate_vpu(struct clk_hw *hw,
|
||||
+ unsigned long parent_rate)
|
||||
+{
|
||||
+ struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw);
|
||||
+ struct bcm2835_cprman *cprman = clock->cprman;
|
||||
+
|
||||
+ if (cprman->fw) {
|
||||
+ struct {
|
||||
+ u32 id;
|
||||
+ u32 val;
|
||||
+ } packet;
|
||||
+
|
||||
+ packet.id = VCMSG_ID_CORE_CLOCK;
|
||||
+ packet.val = 0;
|
||||
+
|
||||
+ if (!rpi_firmware_property(cprman->fw,
|
||||
+ RPI_FIRMWARE_GET_MAX_CLOCK_RATE,
|
||||
+ &packet, sizeof(packet)))
|
||||
+ return packet.val;
|
||||
+ }
|
||||
+
|
||||
+ return bcm2835_clock_get_rate(hw, parent_rate);
|
||||
+}
|
||||
+
|
||||
static void bcm2835_clock_wait_busy(struct bcm2835_clock *clock)
|
||||
{
|
||||
struct bcm2835_cprman *cprman = clock->cprman;
|
||||
@@ -1327,7 +1355,7 @@ static int bcm2835_vpu_clock_is_on(struc
|
||||
*/
|
||||
static const struct clk_ops bcm2835_vpu_clock_clk_ops = {
|
||||
.is_prepared = bcm2835_vpu_clock_is_on,
|
||||
- .recalc_rate = bcm2835_clock_get_rate,
|
||||
+ .recalc_rate = bcm2835_clock_get_rate_vpu,
|
||||
.set_rate = bcm2835_clock_set_rate,
|
||||
.determine_rate = bcm2835_clock_determine_rate,
|
||||
.set_parent = bcm2835_clock_set_parent,
|
||||
@@ -2303,6 +2331,7 @@ static int bcm2835_clk_probe(struct plat
|
||||
const struct bcm2835_clk_desc *desc;
|
||||
const size_t asize = ARRAY_SIZE(clk_desc_array);
|
||||
const struct cprman_plat_data *pdata;
|
||||
+ struct device_node *fw_node;
|
||||
size_t i;
|
||||
u32 clk_id;
|
||||
int ret;
|
||||
@@ -2323,6 +2352,14 @@ static int bcm2835_clk_probe(struct plat
|
||||
if (IS_ERR(cprman->regs))
|
||||
return PTR_ERR(cprman->regs);
|
||||
|
||||
+ fw_node = of_parse_phandle(dev->of_node, "firmware", 0);
|
||||
+ if (fw_node) {
|
||||
+ struct rpi_firmware *fw = rpi_firmware_get(fw_node);
|
||||
+ if (!fw)
|
||||
+ return -EPROBE_DEFER;
|
||||
+ cprman->fw = fw;
|
||||
+ }
|
||||
+
|
||||
memset(bcm2835_clk_claimed, 0, sizeof(bcm2835_clk_claimed));
|
||||
for (i = 0;
|
||||
!of_property_read_u32_index(pdev->dev.of_node, "claim-clocks",
|
|
@ -1,38 +0,0 @@
|
|||
From b8607274cb63f5367763bd0aa958c7341e295989 Mon Sep 17 00:00:00 2001
|
||||
From: Phil Elwell <phil@raspberrypi.org>
|
||||
Date: Wed, 23 Jan 2019 16:11:50 +0000
|
||||
Subject: [PATCH 028/697] clk-bcm2835: Don't wait for pllh lock
|
||||
|
||||
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
---
|
||||
drivers/clk/bcm/clk-bcm2835.c | 18 ++++++++++--------
|
||||
1 file changed, 10 insertions(+), 8 deletions(-)
|
||||
|
||||
--- a/drivers/clk/bcm/clk-bcm2835.c
|
||||
+++ b/drivers/clk/bcm/clk-bcm2835.c
|
||||
@@ -647,15 +647,17 @@ static int bcm2835_pll_on(struct clk_hw
|
||||
spin_unlock(&cprman->regs_lock);
|
||||
|
||||
/* Wait for the PLL to lock. */
|
||||
- timeout = ktime_add_ns(ktime_get(), LOCK_TIMEOUT_NS);
|
||||
- while (!(cprman_read(cprman, CM_LOCK) & data->lock_mask)) {
|
||||
- if (ktime_after(ktime_get(), timeout)) {
|
||||
- dev_err(cprman->dev, "%s: couldn't lock PLL\n",
|
||||
- clk_hw_get_name(hw));
|
||||
- return -ETIMEDOUT;
|
||||
- }
|
||||
+ if (strcmp(data->name, "pllh")) {
|
||||
+ timeout = ktime_add_ns(ktime_get(), LOCK_TIMEOUT_NS);
|
||||
+ while (!(cprman_read(cprman, CM_LOCK) & data->lock_mask)) {
|
||||
+ if (ktime_after(ktime_get(), timeout)) {
|
||||
+ dev_err(cprman->dev, "%s: couldn't lock PLL\n",
|
||||
+ clk_hw_get_name(hw));
|
||||
+ return -ETIMEDOUT;
|
||||
+ }
|
||||
|
||||
- cpu_relax();
|
||||
+ cpu_relax();
|
||||
+ }
|
||||
}
|
||||
|
||||
cprman_write(cprman, data->a2w_ctrl_reg,
|
|
@ -1,53 +0,0 @@
|
|||
From d47e5b29dc19e4a5b1984e109c0541a19ba28d3a Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Thu, 2 May 2019 15:11:05 -0700
|
||||
Subject: [PATCH 029/697] clk: bcm2835: Add support for setting leaf clock
|
||||
rates while running.
|
||||
|
||||
As long as you wait for !BUSY, you can do glitch-free updates of clock
|
||||
rate while the clock is running.
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
drivers/clk/bcm/clk-bcm2835.c | 22 +++++++++++++---------
|
||||
1 file changed, 13 insertions(+), 9 deletions(-)
|
||||
|
||||
--- a/drivers/clk/bcm/clk-bcm2835.c
|
||||
+++ b/drivers/clk/bcm/clk-bcm2835.c
|
||||
@@ -1138,15 +1138,19 @@ static int bcm2835_clock_set_rate(struct
|
||||
|
||||
spin_lock(&cprman->regs_lock);
|
||||
|
||||
- /*
|
||||
- * Setting up frac support
|
||||
- *
|
||||
- * In principle it is recommended to stop/start the clock first,
|
||||
- * but as we set CLK_SET_RATE_GATE during registration of the
|
||||
- * clock this requirement should be take care of by the
|
||||
- * clk-framework.
|
||||
+ ctl = cprman_read(cprman, data->ctl_reg);
|
||||
+
|
||||
+ /* If the clock is running, we have to pause clock generation while
|
||||
+ * updating the control and div regs. This is glitchless (no clock
|
||||
+ * signals generated faster than the rate) but each reg access is two
|
||||
+ * OSC cycles so the clock will slow down for a moment.
|
||||
*/
|
||||
- ctl = cprman_read(cprman, data->ctl_reg) & ~CM_FRAC;
|
||||
+ if (ctl & CM_ENABLE) {
|
||||
+ cprman_write(cprman, data->ctl_reg, ctl & ~CM_ENABLE);
|
||||
+ bcm2835_clock_wait_busy(clock);
|
||||
+ }
|
||||
+
|
||||
+ ctl &= ~CM_FRAC;
|
||||
ctl |= (div & CM_DIV_FRAC_MASK) ? CM_FRAC : 0;
|
||||
cprman_write(cprman, data->ctl_reg, ctl);
|
||||
|
||||
@@ -1522,7 +1526,7 @@ static struct clk_hw *bcm2835_register_c
|
||||
init.ops = &bcm2835_vpu_clock_clk_ops;
|
||||
} else {
|
||||
init.ops = &bcm2835_clock_clk_ops;
|
||||
- init.flags |= CLK_SET_RATE_GATE | CLK_SET_PARENT_GATE;
|
||||
+ init.flags |= CLK_SET_PARENT_GATE;
|
||||
|
||||
/* If the clock wasn't actually enabled at boot, it's not
|
||||
* critical.
|
|
@ -1,71 +0,0 @@
|
|||
From bf79500a8deff78a1b1c8ef906d3eda1b742b449 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Thu, 2 May 2019 15:24:04 -0700
|
||||
Subject: [PATCH 030/697] clk: bcm2835: Allow reparenting leaf clocks while
|
||||
they're running.
|
||||
|
||||
This falls under the same "we can reprogram glitch-free as long as we
|
||||
pause generation" rule as updating the div/frac fields. This can be
|
||||
used for runtime reclocking of V3D to manage power leakage.
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
drivers/clk/bcm/clk-bcm2835.c | 19 ++++++++++++++++---
|
||||
1 file changed, 16 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/clk/bcm/clk-bcm2835.c
|
||||
+++ b/drivers/clk/bcm/clk-bcm2835.c
|
||||
@@ -1127,8 +1127,10 @@ static int bcm2835_clock_on(struct clk_h
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int bcm2835_clock_set_rate(struct clk_hw *hw,
|
||||
- unsigned long rate, unsigned long parent_rate)
|
||||
+static int bcm2835_clock_set_rate_and_parent(struct clk_hw *hw,
|
||||
+ unsigned long rate,
|
||||
+ unsigned long parent_rate,
|
||||
+ u8 parent)
|
||||
{
|
||||
struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw);
|
||||
struct bcm2835_cprman *cprman = clock->cprman;
|
||||
@@ -1150,6 +1152,11 @@ static int bcm2835_clock_set_rate(struct
|
||||
bcm2835_clock_wait_busy(clock);
|
||||
}
|
||||
|
||||
+ if (parent != 0xff) {
|
||||
+ ctl &= ~(CM_SRC_MASK << CM_SRC_SHIFT);
|
||||
+ ctl |= parent << CM_SRC_SHIFT;
|
||||
+ }
|
||||
+
|
||||
ctl &= ~CM_FRAC;
|
||||
ctl |= (div & CM_DIV_FRAC_MASK) ? CM_FRAC : 0;
|
||||
cprman_write(cprman, data->ctl_reg, ctl);
|
||||
@@ -1161,6 +1168,12 @@ static int bcm2835_clock_set_rate(struct
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int bcm2835_clock_set_rate(struct clk_hw *hw,
|
||||
+ unsigned long rate, unsigned long parent_rate)
|
||||
+{
|
||||
+ return bcm2835_clock_set_rate_and_parent(hw, rate, parent_rate, 0xff);
|
||||
+}
|
||||
+
|
||||
static bool
|
||||
bcm2835_clk_is_pllc(struct clk_hw *hw)
|
||||
{
|
||||
@@ -1344,6 +1357,7 @@ static const struct clk_ops bcm2835_cloc
|
||||
.unprepare = bcm2835_clock_off,
|
||||
.recalc_rate = bcm2835_clock_get_rate,
|
||||
.set_rate = bcm2835_clock_set_rate,
|
||||
+ .set_rate_and_parent = bcm2835_clock_set_rate_and_parent,
|
||||
.determine_rate = bcm2835_clock_determine_rate,
|
||||
.set_parent = bcm2835_clock_set_parent,
|
||||
.get_parent = bcm2835_clock_get_parent,
|
||||
@@ -1526,7 +1540,6 @@ static struct clk_hw *bcm2835_register_c
|
||||
init.ops = &bcm2835_vpu_clock_clk_ops;
|
||||
} else {
|
||||
init.ops = &bcm2835_clock_clk_ops;
|
||||
- init.flags |= CLK_SET_PARENT_GATE;
|
||||
|
||||
/* If the clock wasn't actually enabled at boot, it's not
|
||||
* critical.
|
|
@ -1,29 +0,0 @@
|
|||
From 5be3ac68ad03a16a5039ebdbbc2361b7972c870e Mon Sep 17 00:00:00 2001
|
||||
From: popcornmix <popcornmix@gmail.com>
|
||||
Date: Tue, 6 Aug 2019 15:23:14 +0100
|
||||
Subject: [PATCH 031/697] clk-bcm2835: Avoid null pointer exception
|
||||
|
||||
clk_desc_array[BCM2835_PLLB] doesn't exist so we dereference null when iterating
|
||||
|
||||
Signed-off-by: popcornmix <popcornmix@gmail.com>
|
||||
---
|
||||
drivers/clk/bcm/clk-bcm2835.c | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/clk/bcm/clk-bcm2835.c
|
||||
+++ b/drivers/clk/bcm/clk-bcm2835.c
|
||||
@@ -2334,9 +2334,11 @@ static bool bcm2835_clk_is_claimed(const
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(clk_desc_array); i++) {
|
||||
- const char *clk_name = *(const char **)(clk_desc_array[i].data);
|
||||
- if (!strcmp(name, clk_name))
|
||||
- return bcm2835_clk_claimed[i];
|
||||
+ if (clk_desc_array[i].data) {
|
||||
+ const char *clk_name = *(const char **)(clk_desc_array[i].data);
|
||||
+ if (!strcmp(name, clk_name))
|
||||
+ return bcm2835_clk_claimed[i];
|
||||
+ }
|
||||
}
|
||||
|
||||
return false;
|
|
@ -1,84 +0,0 @@
|
|||
From 93d180421ece351c0f36d43106def3e82c8e3e2b Mon Sep 17 00:00:00 2001
|
||||
From: popcornmix <popcornmix@gmail.com>
|
||||
Date: Tue, 3 Sep 2019 20:28:00 +0100
|
||||
Subject: [PATCH 032/697] clk-bcm2835: Disable v3d clock
|
||||
|
||||
This is controlled by firmware, see clk-raspberrypi.c
|
||||
|
||||
Signed-off-by: popcornmix <popcornmix@gmail.com>
|
||||
|
||||
clk-bcm2835: Remove VEC clock support
|
||||
|
||||
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
|
||||
---
|
||||
drivers/clk/bcm/clk-bcm2835.c | 45 ++++++++++-------------------------
|
||||
1 file changed, 12 insertions(+), 33 deletions(-)
|
||||
|
||||
--- a/drivers/clk/bcm/clk-bcm2835.c
|
||||
+++ b/drivers/clk/bcm/clk-bcm2835.c
|
||||
@@ -1764,16 +1764,12 @@ static const struct bcm2835_clk_desc clk
|
||||
.hold_mask = CM_PLLA_HOLDCORE,
|
||||
.fixed_divider = 1,
|
||||
.flags = CLK_SET_RATE_PARENT),
|
||||
- [BCM2835_PLLA_PER] = REGISTER_PLL_DIV(
|
||||
- SOC_ALL,
|
||||
- .name = "plla_per",
|
||||
- .source_pll = "plla",
|
||||
- .cm_reg = CM_PLLA,
|
||||
- .a2w_reg = A2W_PLLA_PER,
|
||||
- .load_mask = CM_PLLA_LOADPER,
|
||||
- .hold_mask = CM_PLLA_HOLDPER,
|
||||
- .fixed_divider = 1,
|
||||
- .flags = CLK_SET_RATE_PARENT),
|
||||
+
|
||||
+ /*
|
||||
+ * PLLA_PER is used for gpu clocks. Controlled by firmware, see
|
||||
+ * clk-raspberrypi.c.
|
||||
+ */
|
||||
+
|
||||
[BCM2835_PLLA_DSI0] = REGISTER_PLL_DIV(
|
||||
SOC_ALL,
|
||||
.name = "plla_dsi0",
|
||||
@@ -2074,14 +2070,12 @@ static const struct bcm2835_clk_desc clk
|
||||
.int_bits = 6,
|
||||
.frac_bits = 0,
|
||||
.tcnt_mux = 3),
|
||||
- [BCM2835_CLOCK_V3D] = REGISTER_VPU_CLK(
|
||||
- SOC_ALL,
|
||||
- .name = "v3d",
|
||||
- .ctl_reg = CM_V3DCTL,
|
||||
- .div_reg = CM_V3DDIV,
|
||||
- .int_bits = 4,
|
||||
- .frac_bits = 8,
|
||||
- .tcnt_mux = 4),
|
||||
+
|
||||
+ /*
|
||||
+ * CLOCK_V3D is used for v3d clock. Controlled by firmware, see
|
||||
+ * clk-raspberrypi.c.
|
||||
+ */
|
||||
+
|
||||
/*
|
||||
* VPU clock. This doesn't have an enable bit, since it drives
|
||||
* the bus for everything else, and is special so it doesn't need
|
||||
@@ -2244,21 +2238,6 @@ static const struct bcm2835_clk_desc clk
|
||||
.tcnt_mux = 28,
|
||||
.round_up = true),
|
||||
|
||||
- /* TV encoder clock. Only operating frequency is 108Mhz. */
|
||||
- [BCM2835_CLOCK_VEC] = REGISTER_PER_CLK(
|
||||
- SOC_ALL,
|
||||
- .name = "vec",
|
||||
- .ctl_reg = CM_VECCTL,
|
||||
- .div_reg = CM_VECDIV,
|
||||
- .int_bits = 4,
|
||||
- .frac_bits = 0,
|
||||
- /*
|
||||
- * Allow rate change propagation only on PLLH_AUX which is
|
||||
- * assigned index 7 in the parent array.
|
||||
- */
|
||||
- .set_rate_parent = BIT(7),
|
||||
- .tcnt_mux = 29),
|
||||
-
|
||||
/* dsi clocks */
|
||||
[BCM2835_CLOCK_DSI0E] = REGISTER_PER_CLK(
|
||||
SOC_ALL,
|
|
@ -1,35 +0,0 @@
|
|||
From 5688f668827f7afed32950b89b8763f23810adf6 Mon Sep 17 00:00:00 2001
|
||||
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
Date: Fri, 26 Apr 2024 17:05:39 +0100
|
||||
Subject: [PATCH 033/697] clk-bcm2835: Use PLLD for DSI0 HS clock
|
||||
|
||||
DSI0 can take the clock from either PLLA or PLLD. PLLA is
|
||||
the default muxing, but PLLD is considered the more stable.
|
||||
|
||||
Switch to using PLLD.
|
||||
|
||||
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
---
|
||||
drivers/clk/bcm/clk-bcm2835.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/drivers/clk/bcm/clk-bcm2835.c
|
||||
+++ b/drivers/clk/bcm/clk-bcm2835.c
|
||||
@@ -107,6 +107,7 @@
|
||||
#define CM_UARTDIV 0x0f4
|
||||
#define CM_VECCTL 0x0f8
|
||||
#define CM_VECDIV 0x0fc
|
||||
+#define CM_DSI0HSCK 0x120
|
||||
#define CM_PULSECTL 0x190
|
||||
#define CM_PULSEDIV 0x194
|
||||
#define CM_SDCCTL 0x1a8
|
||||
@@ -2352,6 +2353,9 @@ static int bcm2835_clk_probe(struct plat
|
||||
if (IS_ERR(cprman->regs))
|
||||
return PTR_ERR(cprman->regs);
|
||||
|
||||
+ /* Mux DSI0 clock to PLLD */
|
||||
+ cprman_write(cprman, CM_DSI0HSCK, 1);
|
||||
+
|
||||
fw_node = of_parse_phandle(dev->of_node, "firmware", 0);
|
||||
if (fw_node) {
|
||||
struct rpi_firmware *fw = rpi_firmware_get(fw_node);
|
|
@ -1,53 +0,0 @@
|
|||
From a90210e2da00901e65ac5a3147338f3b2421fca4 Mon Sep 17 00:00:00 2001
|
||||
From: popcornmix <popcornmix@gmail.com>
|
||||
Date: Fri, 25 Aug 2017 19:18:13 +0100
|
||||
Subject: [PATCH 034/697] cache: export clean and invalidate
|
||||
|
||||
hack: cache: Fix linker error
|
||||
---
|
||||
arch/arm/mm/cache-v6.S | 4 ++--
|
||||
arch/arm/mm/cache-v7.S | 6 ++++--
|
||||
2 files changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/arch/arm/mm/cache-v6.S
|
||||
+++ b/arch/arm/mm/cache-v6.S
|
||||
@@ -206,7 +206,7 @@ SYM_FUNC_END(v6_flush_kern_dcache_area)
|
||||
* - start - virtual start address of region
|
||||
* - end - virtual end address of region
|
||||
*/
|
||||
-v6_dma_inv_range:
|
||||
+ENTRY(v6_dma_inv_range)
|
||||
tst r0, #D_CACHE_LINE_SIZE - 1
|
||||
bic r0, r0, #D_CACHE_LINE_SIZE - 1
|
||||
#ifdef HARVARD_CACHE
|
||||
@@ -239,7 +239,7 @@ v6_dma_inv_range:
|
||||
* - start - virtual start address of region
|
||||
* - end - virtual end address of region
|
||||
*/
|
||||
-v6_dma_clean_range:
|
||||
+ENTRY(v6_dma_clean_range)
|
||||
bic r0, r0, #D_CACHE_LINE_SIZE - 1
|
||||
1:
|
||||
#ifdef HARVARD_CACHE
|
||||
--- a/arch/arm/mm/cache-v7.S
|
||||
+++ b/arch/arm/mm/cache-v7.S
|
||||
@@ -364,7 +364,8 @@ SYM_FUNC_END(v7_flush_kern_dcache_area)
|
||||
* - start - virtual start address of region
|
||||
* - end - virtual end address of region
|
||||
*/
|
||||
-v7_dma_inv_range:
|
||||
+ENTRY(b15_dma_inv_range)
|
||||
+ENTRY(v7_dma_inv_range)
|
||||
dcache_line_size r2, r3
|
||||
sub r3, r2, #1
|
||||
tst r0, r3
|
||||
@@ -394,7 +395,8 @@ ENDPROC(v7_dma_inv_range)
|
||||
* - start - virtual start address of region
|
||||
* - end - virtual end address of region
|
||||
*/
|
||||
-v7_dma_clean_range:
|
||||
+ENTRY(b15_dma_clean_range)
|
||||
+ENTRY(v7_dma_clean_range)
|
||||
dcache_line_size r2, r3
|
||||
sub r3, r2, #1
|
||||
bic r0, r0, r3
|
|
@ -1,43 +0,0 @@
|
|||
From fab8fa9116af0c5fe24df66ab0adbb9900a25c80 Mon Sep 17 00:00:00 2001
|
||||
From: Sam Nazarko <email@samnazarko.co.uk>
|
||||
Date: Fri, 1 Apr 2016 17:27:21 +0100
|
||||
Subject: [PATCH 035/697] smsc95xx: Experimental: Enable turbo_mode and
|
||||
packetsize=2560 by default
|
||||
|
||||
See: http://forum.kodi.tv/showthread.php?tid=285288
|
||||
---
|
||||
drivers/net/usb/smsc95xx.c | 14 +++++++++-----
|
||||
1 file changed, 9 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/drivers/net/usb/smsc95xx.c
|
||||
+++ b/drivers/net/usb/smsc95xx.c
|
||||
@@ -79,6 +79,10 @@ static bool turbo_mode = true;
|
||||
module_param(turbo_mode, bool, 0644);
|
||||
MODULE_PARM_DESC(turbo_mode, "Enable multiple frames per Rx transaction");
|
||||
|
||||
+static int packetsize = 2560;
|
||||
+module_param(packetsize, int, 0644);
|
||||
+MODULE_PARM_DESC(packetsize, "Override the RX URB packet size");
|
||||
+
|
||||
static int __must_check smsc95xx_read_reg(struct usbnet *dev, u32 index,
|
||||
u32 *data)
|
||||
{
|
||||
@@ -932,13 +936,13 @@ static int smsc95xx_reset(struct usbnet
|
||||
|
||||
if (!turbo_mode) {
|
||||
burst_cap = 0;
|
||||
- dev->rx_urb_size = MAX_SINGLE_PACKET_SIZE;
|
||||
+ dev->rx_urb_size = packetsize ? packetsize : MAX_SINGLE_PACKET_SIZE;
|
||||
} else if (dev->udev->speed == USB_SPEED_HIGH) {
|
||||
- burst_cap = DEFAULT_HS_BURST_CAP_SIZE / HS_USB_PKT_SIZE;
|
||||
- dev->rx_urb_size = DEFAULT_HS_BURST_CAP_SIZE;
|
||||
+ dev->rx_urb_size = packetsize ? packetsize : DEFAULT_HS_BURST_CAP_SIZE;
|
||||
+ burst_cap = dev->rx_urb_size / HS_USB_PKT_SIZE;
|
||||
} else {
|
||||
- burst_cap = DEFAULT_FS_BURST_CAP_SIZE / FS_USB_PKT_SIZE;
|
||||
- dev->rx_urb_size = DEFAULT_FS_BURST_CAP_SIZE;
|
||||
+ dev->rx_urb_size = packetsize ? packetsize : DEFAULT_FS_BURST_CAP_SIZE;
|
||||
+ burst_cap = dev->rx_urb_size / FS_USB_PKT_SIZE;
|
||||
}
|
||||
|
||||
netif_dbg(dev, ifup, dev->net, "rx_urb_size=%ld\n",
|
|
@ -1,72 +0,0 @@
|
|||
From 263f694f2ea62ab6222689edcc1f3657892889e0 Mon Sep 17 00:00:00 2001
|
||||
From: popcornmix <popcornmix@gmail.com>
|
||||
Date: Tue, 26 Mar 2013 17:26:38 +0000
|
||||
Subject: [PATCH 036/697] Allow mac address to be set in smsc95xx
|
||||
|
||||
Signed-off-by: popcornmix <popcornmix@gmail.com>
|
||||
|
||||
SQUASH: smsc95xx: Use dev_mod_addr to set MAC addr
|
||||
|
||||
Since adeef3e32146 ("net: constify netdev->dev_addr") it has been
|
||||
illegal to write to the dev_addr MAC address field. Later commits
|
||||
have added explicit checks that it hasn't been modified by nefarious
|
||||
means. The dev_addr_mod helper function is the accepted way to change
|
||||
the dev_addr field, so use it.
|
||||
|
||||
Squash with 96c1def63ee1 ("Allow mac address to be set in smsc95xx").
|
||||
|
||||
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
---
|
||||
drivers/net/usb/smsc95xx.c | 27 +++++++++++++++++++++++++++
|
||||
1 file changed, 27 insertions(+)
|
||||
|
||||
--- a/drivers/net/usb/smsc95xx.c
|
||||
+++ b/drivers/net/usb/smsc95xx.c
|
||||
@@ -83,6 +83,10 @@ static int packetsize = 2560;
|
||||
module_param(packetsize, int, 0644);
|
||||
MODULE_PARM_DESC(packetsize, "Override the RX URB packet size");
|
||||
|
||||
+static char *macaddr = ":";
|
||||
+module_param(macaddr, charp, 0);
|
||||
+MODULE_PARM_DESC(macaddr, "MAC address");
|
||||
+
|
||||
static int __must_check smsc95xx_read_reg(struct usbnet *dev, u32 index,
|
||||
u32 *data)
|
||||
{
|
||||
@@ -805,6 +809,21 @@ static int smsc95xx_ioctl(struct net_dev
|
||||
return phy_mii_ioctl(netdev->phydev, rq, cmd);
|
||||
}
|
||||
|
||||
+/* Check the macaddr module parameter for a MAC address */
|
||||
+static int smsc95xx_macaddr_param(struct usbnet *dev, struct net_device *nd)
|
||||
+{
|
||||
+ u8 mtbl[ETH_ALEN];
|
||||
+
|
||||
+ if (mac_pton(macaddr, mtbl)) {
|
||||
+ netif_dbg(dev, ifup, dev->net,
|
||||
+ "Overriding MAC address with: %pM\n", mtbl);
|
||||
+ dev_addr_mod(nd, 0, mtbl, ETH_ALEN);
|
||||
+ return 0;
|
||||
+ } else {
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static void smsc95xx_init_mac_address(struct usbnet *dev)
|
||||
{
|
||||
u8 addr[ETH_ALEN];
|
||||
@@ -827,6 +846,14 @@ static void smsc95xx_init_mac_address(st
|
||||
return;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ /* Check module parameters */
|
||||
+ if (smsc95xx_macaddr_param(dev, dev->net) == 0) {
|
||||
+ if (is_valid_ether_addr(dev->net->dev_addr)) {
|
||||
+ netif_dbg(dev, ifup, dev->net, "MAC address read from module parameter\n");
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
/* no useful static MAC address found. generate a random one */
|
||||
eth_hw_addr_random(dev->net);
|
|
@ -1,28 +0,0 @@
|
|||
From 9b1bb38bb5a638b1d0c21e8b7828d9f71d326ece Mon Sep 17 00:00:00 2001
|
||||
From: Phil Elwell <phil@raspberrypi.org>
|
||||
Date: Fri, 13 Mar 2015 12:43:36 +0000
|
||||
Subject: [PATCH 037/697] Protect __release_resource against resources without
|
||||
parents
|
||||
|
||||
Without this patch, removing a device tree overlay can crash here.
|
||||
|
||||
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
---
|
||||
kernel/resource.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
--- a/kernel/resource.c
|
||||
+++ b/kernel/resource.c
|
||||
@@ -192,6 +192,12 @@ static int __release_resource(struct res
|
||||
{
|
||||
struct resource *tmp, **p, *chd;
|
||||
|
||||
+ if (!old->parent) {
|
||||
+ WARN(old->sibling, "sibling but no parent");
|
||||
+ if (old->sibling)
|
||||
+ return -EINVAL;
|
||||
+ return 0;
|
||||
+ }
|
||||
p = &old->parent->child;
|
||||
for (;;) {
|
||||
tmp = *p;
|
|
@ -1,24 +0,0 @@
|
|||
From ed8471410d1f18d25507b68f81333bb45ed45ccd Mon Sep 17 00:00:00 2001
|
||||
From: Phil Elwell <phil@raspberrypi.org>
|
||||
Date: Thu, 9 Feb 2017 14:33:30 +0000
|
||||
Subject: [PATCH 038/697] irq-bcm2836: Avoid "Invalid trigger warning"
|
||||
|
||||
Initialise the level for each IRQ to avoid a warning from the
|
||||
arm arch timer code.
|
||||
|
||||
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
---
|
||||
drivers/irqchip/irq-bcm2836.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/irqchip/irq-bcm2836.c
|
||||
+++ b/drivers/irqchip/irq-bcm2836.c
|
||||
@@ -128,7 +128,7 @@ static int bcm2836_map(struct irq_domain
|
||||
irq_set_percpu_devid(irq);
|
||||
irq_domain_set_info(d, irq, hw, chip, d->host_data,
|
||||
handle_percpu_devid_irq, NULL, NULL);
|
||||
- irq_set_status_flags(irq, IRQ_NOAUTOEN);
|
||||
+ irq_set_status_flags(irq, IRQ_NOAUTOEN | IRQ_TYPE_LEVEL_LOW);
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,127 +0,0 @@
|
|||
From 413429d8367d139cc4198cd69e8c66ad2c07aff3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= <noralf@tronnes.org>
|
||||
Date: Fri, 12 Jun 2015 19:01:05 +0200
|
||||
Subject: [PATCH 039/697] irqchip: bcm2835: Add FIQ support
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Add a duplicate irq range with an offset on the hwirq's so the
|
||||
driver can detect that enable_fiq() is used.
|
||||
Tested with downstream dwc_otg USB controller driver.
|
||||
|
||||
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
||||
Reviewed-by: Eric Anholt <eric@anholt.net>
|
||||
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
|
||||
---
|
||||
arch/arm/mach-bcm/Kconfig | 1 +
|
||||
drivers/irqchip/irq-bcm2835.c | 51 +++++++++++++++++++++++++++++++----
|
||||
2 files changed, 47 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/arch/arm/mach-bcm/Kconfig
|
||||
+++ b/arch/arm/mach-bcm/Kconfig
|
||||
@@ -158,6 +158,7 @@ config ARCH_BCM2835
|
||||
select ARM_TIMER_SP804
|
||||
select HAVE_ARM_ARCH_TIMER if ARCH_MULTI_V7
|
||||
select BCM2835_TIMER
|
||||
+ select FIQ
|
||||
select PINCTRL
|
||||
select PINCTRL_BCM2835
|
||||
select MFD_CORE
|
||||
--- a/drivers/irqchip/irq-bcm2835.c
|
||||
+++ b/drivers/irqchip/irq-bcm2835.c
|
||||
@@ -45,7 +45,7 @@
|
||||
#include <asm/exception.h>
|
||||
|
||||
/* Put the bank and irq (32 bits) into the hwirq */
|
||||
-#define MAKE_HWIRQ(b, n) ((b << 5) | (n))
|
||||
+#define MAKE_HWIRQ(b, n) (((b) << 5) | (n))
|
||||
#define HWIRQ_BANK(i) (i >> 5)
|
||||
#define HWIRQ_BIT(i) BIT(i & 0x1f)
|
||||
|
||||
@@ -62,9 +62,13 @@
|
||||
|
||||
#define REG_FIQ_CONTROL 0x0c
|
||||
#define FIQ_CONTROL_ENABLE BIT(7)
|
||||
+#define REG_FIQ_ENABLE FIQ_CONTROL_ENABLE
|
||||
+#define REG_FIQ_DISABLE 0
|
||||
|
||||
#define NR_BANKS 3
|
||||
#define IRQS_PER_BANK 32
|
||||
+#define NUMBER_IRQS MAKE_HWIRQ(NR_BANKS, 0)
|
||||
+#define FIQ_START (NR_IRQS_BANK0 + MAKE_HWIRQ(NR_BANKS - 1, 0))
|
||||
|
||||
static const int reg_pending[] __initconst = { 0x00, 0x04, 0x08 };
|
||||
static const int reg_enable[] __initconst = { 0x18, 0x10, 0x14 };
|
||||
@@ -89,14 +93,38 @@ static void __exception_irq_entry bcm283
|
||||
struct pt_regs *regs);
|
||||
static void bcm2836_chained_handle_irq(struct irq_desc *desc);
|
||||
|
||||
+static inline unsigned int hwirq_to_fiq(unsigned long hwirq)
|
||||
+{
|
||||
+ hwirq -= NUMBER_IRQS;
|
||||
+ /*
|
||||
+ * The hwirq numbering used in this driver is:
|
||||
+ * BASE (0-7) GPU1 (32-63) GPU2 (64-95).
|
||||
+ * This differ from the one used in the FIQ register:
|
||||
+ * GPU1 (0-31) GPU2 (32-63) BASE (64-71)
|
||||
+ */
|
||||
+ if (hwirq >= 32)
|
||||
+ return hwirq - 32;
|
||||
+
|
||||
+ return hwirq + 64;
|
||||
+}
|
||||
+
|
||||
static void armctrl_mask_irq(struct irq_data *d)
|
||||
{
|
||||
- writel_relaxed(HWIRQ_BIT(d->hwirq), intc.disable[HWIRQ_BANK(d->hwirq)]);
|
||||
+ if (d->hwirq >= NUMBER_IRQS)
|
||||
+ writel_relaxed(REG_FIQ_DISABLE, intc.base + REG_FIQ_CONTROL);
|
||||
+ else
|
||||
+ writel_relaxed(HWIRQ_BIT(d->hwirq),
|
||||
+ intc.disable[HWIRQ_BANK(d->hwirq)]);
|
||||
}
|
||||
|
||||
static void armctrl_unmask_irq(struct irq_data *d)
|
||||
{
|
||||
- writel_relaxed(HWIRQ_BIT(d->hwirq), intc.enable[HWIRQ_BANK(d->hwirq)]);
|
||||
+ if (d->hwirq >= NUMBER_IRQS)
|
||||
+ writel_relaxed(REG_FIQ_ENABLE | hwirq_to_fiq(d->hwirq),
|
||||
+ intc.base + REG_FIQ_CONTROL);
|
||||
+ else
|
||||
+ writel_relaxed(HWIRQ_BIT(d->hwirq),
|
||||
+ intc.enable[HWIRQ_BANK(d->hwirq)]);
|
||||
}
|
||||
|
||||
static struct irq_chip armctrl_chip = {
|
||||
@@ -144,8 +172,9 @@ static int __init armctrl_of_init(struct
|
||||
if (!base)
|
||||
panic("%pOF: unable to map IC registers\n", node);
|
||||
|
||||
- intc.domain = irq_domain_add_linear(node, MAKE_HWIRQ(NR_BANKS, 0),
|
||||
- &armctrl_ops, NULL);
|
||||
+ intc.base = base;
|
||||
+ intc.domain = irq_domain_add_linear(node, NUMBER_IRQS * 2,
|
||||
+ &armctrl_ops, NULL);
|
||||
if (!intc.domain)
|
||||
panic("%pOF: unable to create IRQ domain\n", node);
|
||||
|
||||
@@ -188,6 +217,18 @@ static int __init armctrl_of_init(struct
|
||||
set_handle_irq(bcm2835_handle_irq);
|
||||
}
|
||||
|
||||
+ /* Make a duplicate irq range which is used to enable FIQ */
|
||||
+ for (b = 0; b < NR_BANKS; b++) {
|
||||
+ for (i = 0; i < bank_irqs[b]; i++) {
|
||||
+ irq = irq_create_mapping(intc.domain,
|
||||
+ MAKE_HWIRQ(b, i) + NUMBER_IRQS);
|
||||
+ BUG_ON(irq <= 0);
|
||||
+ irq_set_chip(irq, &armctrl_chip);
|
||||
+ set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
|
||||
+ }
|
||||
+ }
|
||||
+ init_FIQ(FIQ_START);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,99 +0,0 @@
|
|||
From 37d40a56c903c47aef2d15c3d73e6a5d00dbffb3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= <noralf@tronnes.org>
|
||||
Date: Fri, 23 Oct 2015 16:26:55 +0200
|
||||
Subject: [PATCH 040/697] irqchip: irq-bcm2835: Add 2836 FIQ support
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
||||
---
|
||||
drivers/irqchip/irq-bcm2835.c | 43 +++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 41 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/irqchip/irq-bcm2835.c
|
||||
+++ b/drivers/irqchip/irq-bcm2835.c
|
||||
@@ -41,8 +41,11 @@
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/irqchip.h>
|
||||
#include <linux/irqdomain.h>
|
||||
+#include <linux/mfd/syscon.h>
|
||||
+#include <linux/regmap.h>
|
||||
|
||||
#include <asm/exception.h>
|
||||
+#include <asm/mach/irq.h>
|
||||
|
||||
/* Put the bank and irq (32 bits) into the hwirq */
|
||||
#define MAKE_HWIRQ(b, n) (((b) << 5) | (n))
|
||||
@@ -60,6 +63,9 @@
|
||||
#define BANK0_VALID_MASK (BANK0_HWIRQ_MASK | BANK1_HWIRQ | BANK2_HWIRQ \
|
||||
| SHORTCUT1_MASK | SHORTCUT2_MASK)
|
||||
|
||||
+#undef ARM_LOCAL_GPU_INT_ROUTING
|
||||
+#define ARM_LOCAL_GPU_INT_ROUTING 0x0c
|
||||
+
|
||||
#define REG_FIQ_CONTROL 0x0c
|
||||
#define FIQ_CONTROL_ENABLE BIT(7)
|
||||
#define REG_FIQ_ENABLE FIQ_CONTROL_ENABLE
|
||||
@@ -86,6 +92,7 @@ struct armctrl_ic {
|
||||
void __iomem *enable[NR_BANKS];
|
||||
void __iomem *disable[NR_BANKS];
|
||||
struct irq_domain *domain;
|
||||
+ struct regmap *local_regmap;
|
||||
};
|
||||
|
||||
static struct armctrl_ic intc __read_mostly;
|
||||
@@ -119,12 +126,35 @@ static void armctrl_mask_irq(struct irq_
|
||||
|
||||
static void armctrl_unmask_irq(struct irq_data *d)
|
||||
{
|
||||
- if (d->hwirq >= NUMBER_IRQS)
|
||||
+ if (d->hwirq >= NUMBER_IRQS) {
|
||||
+ if (num_online_cpus() > 1) {
|
||||
+ unsigned int data;
|
||||
+ int ret;
|
||||
+
|
||||
+ if (!intc.local_regmap) {
|
||||
+ pr_err("FIQ is disabled due to missing regmap\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ ret = regmap_read(intc.local_regmap,
|
||||
+ ARM_LOCAL_GPU_INT_ROUTING, &data);
|
||||
+ if (ret) {
|
||||
+ pr_err("Failed to read int routing %d\n", ret);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ data &= ~0xc;
|
||||
+ data |= (1 << 2);
|
||||
+ regmap_write(intc.local_regmap,
|
||||
+ ARM_LOCAL_GPU_INT_ROUTING, data);
|
||||
+ }
|
||||
+
|
||||
writel_relaxed(REG_FIQ_ENABLE | hwirq_to_fiq(d->hwirq),
|
||||
intc.base + REG_FIQ_CONTROL);
|
||||
- else
|
||||
+ } else {
|
||||
writel_relaxed(HWIRQ_BIT(d->hwirq),
|
||||
intc.enable[HWIRQ_BANK(d->hwirq)]);
|
||||
+ }
|
||||
}
|
||||
|
||||
static struct irq_chip armctrl_chip = {
|
||||
@@ -217,6 +247,15 @@ static int __init armctrl_of_init(struct
|
||||
set_handle_irq(bcm2835_handle_irq);
|
||||
}
|
||||
|
||||
+ if (is_2836) {
|
||||
+ intc.local_regmap =
|
||||
+ syscon_regmap_lookup_by_compatible("brcm,bcm2836-arm-local");
|
||||
+ if (IS_ERR(intc.local_regmap)) {
|
||||
+ pr_err("Failed to get local register map. FIQ is disabled for cpus > 1\n");
|
||||
+ intc.local_regmap = NULL;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/* Make a duplicate irq range which is used to enable FIQ */
|
||||
for (b = 0; b < NR_BANKS; b++) {
|
||||
for (i = 0; i < bank_irqs[b]; i++) {
|
|
@ -1,24 +0,0 @@
|
|||
From e7b3aedf8b24fcb4a0fc27965098f291f7d3c23b Mon Sep 17 00:00:00 2001
|
||||
From: Dom Cobley <popcornmix@gmail.com>
|
||||
Date: Mon, 24 Jan 2022 13:41:16 +0000
|
||||
Subject: [PATCH 041/697] spi: spidev: Completely disable the spidev warning
|
||||
|
||||
An alternative strategy would be to use "rpi,spidev" instead, but that
|
||||
would require many Raspberry Pi Device Tree changes.
|
||||
|
||||
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
---
|
||||
drivers/spi/spidev.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/spi/spidev.c
|
||||
+++ b/drivers/spi/spidev.c
|
||||
@@ -721,7 +721,7 @@ MODULE_DEVICE_TABLE(spi, spidev_spi_ids)
|
||||
*/
|
||||
static int spidev_of_check(struct device *dev)
|
||||
{
|
||||
- if (device_property_match_string(dev, "compatible", "spidev") < 0)
|
||||
+ if (1 || device_property_match_string(dev, "compatible", "spidev") < 0)
|
||||
return 0;
|
||||
|
||||
dev_err(dev, "spidev listed directly in DT is not supported\n");
|
File diff suppressed because it is too large
Load diff
|
@ -1,20 +0,0 @@
|
|||
From ee79ef68ef6caa1a2ec4d47819b09c24f17315fc Mon Sep 17 00:00:00 2001
|
||||
From: Phil Elwell <phil@raspberrypi.org>
|
||||
Date: Wed, 15 Jun 2016 16:48:41 +0100
|
||||
Subject: [PATCH 043/697] rtc: Add SPI alias for pcf2123 driver
|
||||
|
||||
Without this alias, Device Tree won't cause the driver
|
||||
to be loaded.
|
||||
|
||||
See: https://github.com/raspberrypi/linux/pull/1510
|
||||
---
|
||||
drivers/rtc/rtc-pcf2123.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/drivers/rtc/rtc-pcf2123.c
|
||||
+++ b/drivers/rtc/rtc-pcf2123.c
|
||||
@@ -479,3 +479,4 @@ module_spi_driver(pcf2123_driver);
|
||||
MODULE_AUTHOR("Chris Verges <chrisv@cyberswitching.com>");
|
||||
MODULE_DESCRIPTION("NXP PCF2123 RTC driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
+MODULE_ALIAS("spi:rtc-pcf2123");
|
|
@ -1,102 +0,0 @@
|
|||
From 23bd9095c0e8842e3b2d0fb377a5b16b22a53103 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= <noralf@tronnes.org>
|
||||
Date: Fri, 7 Oct 2016 16:50:59 +0200
|
||||
Subject: [PATCH 044/697] watchdog: bcm2835: Support setting reboot partition
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The Raspberry Pi firmware looks at the RSTS register to know which
|
||||
partition to boot from. The reboot syscall command
|
||||
LINUX_REBOOT_CMD_RESTART2 supports passing in a string argument.
|
||||
|
||||
Add support for passing in a partition number 0..63 to boot from.
|
||||
Partition 63 is a special partiton indicating halt.
|
||||
If the partition doesn't exist, the firmware falls back to partition 0.
|
||||
|
||||
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
||||
---
|
||||
drivers/watchdog/bcm2835_wdt.c | 49 +++++++++++++++++++---------------
|
||||
1 file changed, 27 insertions(+), 22 deletions(-)
|
||||
|
||||
--- a/drivers/watchdog/bcm2835_wdt.c
|
||||
+++ b/drivers/watchdog/bcm2835_wdt.c
|
||||
@@ -32,13 +32,7 @@
|
||||
#define PM_RSTC_WRCFG_SET 0x00000030
|
||||
#define PM_RSTC_WRCFG_FULL_RESET 0x00000020
|
||||
#define PM_RSTC_RESET 0x00000102
|
||||
-
|
||||
-/*
|
||||
- * The Raspberry Pi firmware uses the RSTS register to know which partition
|
||||
- * to boot from. The partition value is spread into bits 0, 2, 4, 6, 8, 10.
|
||||
- * Partition 63 is a special partition used by the firmware to indicate halt.
|
||||
- */
|
||||
-#define PM_RSTS_RASPBERRYPI_HALT 0x555
|
||||
+#define PM_RSTS_PARTITION_CLR 0xfffffaaa
|
||||
|
||||
#define SECS_TO_WDOG_TICKS(x) ((x) << 16)
|
||||
#define WDOG_TICKS_TO_SECS(x) ((x) >> 16)
|
||||
@@ -98,9 +92,24 @@ static unsigned int bcm2835_wdt_get_time
|
||||
return WDOG_TICKS_TO_SECS(ret & PM_WDOG_TIME_SET);
|
||||
}
|
||||
|
||||
-static void __bcm2835_restart(struct bcm2835_wdt *wdt)
|
||||
+/*
|
||||
+ * The Raspberry Pi firmware uses the RSTS register to know which partiton
|
||||
+ * to boot from. The partiton value is spread into bits 0, 2, 4, 6, 8, 10.
|
||||
+ * Partiton 63 is a special partition used by the firmware to indicate halt.
|
||||
+ */
|
||||
+
|
||||
+static void __bcm2835_restart(struct bcm2835_wdt *wdt, u8 partition)
|
||||
{
|
||||
- u32 val;
|
||||
+ u32 val, rsts;
|
||||
+
|
||||
+ rsts = (partition & BIT(0)) | ((partition & BIT(1)) << 1) |
|
||||
+ ((partition & BIT(2)) << 2) | ((partition & BIT(3)) << 3) |
|
||||
+ ((partition & BIT(4)) << 4) | ((partition & BIT(5)) << 5);
|
||||
+
|
||||
+ val = readl_relaxed(wdt->base + PM_RSTS);
|
||||
+ val &= PM_RSTS_PARTITION_CLR;
|
||||
+ val |= PM_PASSWORD | rsts;
|
||||
+ writel_relaxed(val, wdt->base + PM_RSTS);
|
||||
|
||||
/* use a timeout of 10 ticks (~150us) */
|
||||
writel_relaxed(10 | PM_PASSWORD, wdt->base + PM_WDOG);
|
||||
@@ -118,7 +127,13 @@ static int bcm2835_restart(struct watchd
|
||||
{
|
||||
struct bcm2835_wdt *wdt = watchdog_get_drvdata(wdog);
|
||||
|
||||
- __bcm2835_restart(wdt);
|
||||
+ unsigned long long val;
|
||||
+ u8 partition = 0;
|
||||
+
|
||||
+ if (data && !kstrtoull(data, 0, &val) && val <= 63)
|
||||
+ partition = val;
|
||||
+
|
||||
+ __bcm2835_restart(wdt, partition);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -153,19 +168,9 @@ static struct watchdog_device bcm2835_wd
|
||||
static void bcm2835_power_off(void)
|
||||
{
|
||||
struct bcm2835_wdt *wdt = bcm2835_power_off_wdt;
|
||||
- u32 val;
|
||||
-
|
||||
- /*
|
||||
- * We set the watchdog hard reset bit here to distinguish this reset
|
||||
- * from the normal (full) reset. bootcode.bin will not reboot after a
|
||||
- * hard reset.
|
||||
- */
|
||||
- val = readl_relaxed(wdt->base + PM_RSTS);
|
||||
- val |= PM_PASSWORD | PM_RSTS_RASPBERRYPI_HALT;
|
||||
- writel_relaxed(val, wdt->base + PM_RSTS);
|
||||
|
||||
- /* Continue with normal reset mechanism */
|
||||
- __bcm2835_restart(wdt);
|
||||
+ /* Partition 63 tells the firmware that this is a halt */
|
||||
+ __bcm2835_restart(wdt, 63);
|
||||
}
|
||||
|
||||
static int bcm2835_wdt_probe(struct platform_device *pdev)
|
|
@ -1,49 +0,0 @@
|
|||
From 76f6475c036de43457c980bb61560f4f0d2e8210 Mon Sep 17 00:00:00 2001
|
||||
From: popcornmix <popcornmix@gmail.com>
|
||||
Date: Tue, 5 Apr 2016 19:40:12 +0100
|
||||
Subject: [PATCH 045/697] reboot: Use power off rather than busy spinning when
|
||||
halt is requested
|
||||
|
||||
reboot: Use power off rather than busy spinning when halt is requested
|
||||
|
||||
Busy spinning after halt is dumb
|
||||
We've previously applied this patch to arch/arm
|
||||
but it is currenltly missing in arch/arm64
|
||||
|
||||
Pi4 after "sudo halt" uses 520mA
|
||||
Pi4 after "sudo shutdown now" uses 310mA
|
||||
|
||||
Make them both use the lower powered option
|
||||
|
||||
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
|
||||
---
|
||||
arch/arm/kernel/reboot.c | 4 +---
|
||||
arch/arm64/kernel/process.c | 4 +---
|
||||
2 files changed, 2 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/arch/arm/kernel/reboot.c
|
||||
+++ b/arch/arm/kernel/reboot.c
|
||||
@@ -102,9 +102,7 @@ void machine_shutdown(void)
|
||||
*/
|
||||
void machine_halt(void)
|
||||
{
|
||||
- local_irq_disable();
|
||||
- smp_send_stop();
|
||||
- while (1);
|
||||
+ machine_power_off();
|
||||
}
|
||||
|
||||
/*
|
||||
--- a/arch/arm64/kernel/process.c
|
||||
+++ b/arch/arm64/kernel/process.c
|
||||
@@ -97,9 +97,7 @@ void machine_shutdown(void)
|
||||
*/
|
||||
void machine_halt(void)
|
||||
{
|
||||
- local_irq_disable();
|
||||
- smp_send_stop();
|
||||
- while (1);
|
||||
+ machine_power_off();
|
||||
}
|
||||
|
||||
/*
|
|
@ -1,25 +0,0 @@
|
|||
From 66bea8024da1f06fc766b32f2be284040481d651 Mon Sep 17 00:00:00 2001
|
||||
From: popcornmix <popcornmix@gmail.com>
|
||||
Date: Tue, 6 Dec 2016 17:05:39 +0000
|
||||
Subject: [PATCH 046/697] bcm2835-rng: Avoid initialising if already enabled
|
||||
|
||||
Avoids the 0x40000 cycles of warmup again if firmware has already used it
|
||||
---
|
||||
drivers/char/hw_random/bcm2835-rng.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/char/hw_random/bcm2835-rng.c
|
||||
+++ b/drivers/char/hw_random/bcm2835-rng.c
|
||||
@@ -107,8 +107,10 @@ static int bcm2835_rng_init(struct hwrng
|
||||
}
|
||||
|
||||
/* set warm-up count & enable */
|
||||
- rng_writel(priv, RNG_WARMUP_COUNT, RNG_STATUS);
|
||||
- rng_writel(priv, RNG_RBGEN, RNG_CTRL);
|
||||
+ if (!(rng_readl(priv, RNG_CTRL) & RNG_RBGEN)) {
|
||||
+ rng_writel(priv, RNG_WARMUP_COUNT, RNG_STATUS);
|
||||
+ rng_writel(priv, RNG_RBGEN, RNG_CTRL);
|
||||
+ }
|
||||
|
||||
return ret;
|
||||
}
|
|
@ -1,137 +0,0 @@
|
|||
From 1f82489c12ee1f104649498bc6b67d9d217602e1 Mon Sep 17 00:00:00 2001
|
||||
From: Claggy3 <stephen.maclagan@hotmail.com>
|
||||
Date: Sat, 11 Feb 2017 14:00:30 +0000
|
||||
Subject: [PATCH 047/697] Update vfpmodule.c
|
||||
|
||||
Christopher Alexander Tobias Schulze - May 2, 2015, 11:57 a.m.
|
||||
This patch fixes a problem with VFP state save and restore related
|
||||
to exception handling (panic with message "BUG: unsupported FP
|
||||
instruction in kernel mode") present on VFP11 floating point units
|
||||
(as used with ARM1176JZF-S CPUs, e.g. on first generation Raspberry
|
||||
Pi boards). This patch was developed and discussed on
|
||||
|
||||
https://github.com/raspberrypi/linux/issues/859
|
||||
|
||||
A precondition to see the crashes is that floating point exception
|
||||
traps are enabled. In this case, the VFP11 might determine that a FPU
|
||||
operation needs to trap at a point in time when it is not possible to
|
||||
signal this to the ARM11 core any more. The VFP11 will then set the
|
||||
FPEXC.EX bit and store the trapped opcode in FPINST. (In some cases,
|
||||
a second opcode might have been accepted by the VFP11 before the
|
||||
exception was detected and could be reported to the ARM11 - in this
|
||||
case, the VFP11 also sets FPEXC.FP2V and stores the second opcode in
|
||||
FPINST2.)
|
||||
|
||||
If FPEXC.EX is set, the VFP11 will "bounce" the next FPU opcode issued
|
||||
by the ARM11 CPU, which will be seen by the ARM11 as an undefined opcode
|
||||
trap. The VFP support code examines the FPEXC.EX and FPEXC.FP2V bits
|
||||
to decide what actions to take, i.e., whether to emulate the opcodes
|
||||
found in FPINST and FPINST2, and whether to retry the bounced instruction.
|
||||
|
||||
If a user space application has left the VFP11 in this "pending trap"
|
||||
state, the next FPU opcode issued to the VFP11 might actually be the
|
||||
VSTMIA operation vfp_save_state() uses to store the FPU registers
|
||||
to memory (in our test cases, when building the signal stack frame).
|
||||
In this case, the kernel crashes as described above.
|
||||
|
||||
This patch fixes the problem by making sure that vfp_save_state() is
|
||||
always entered with FPEXC.EX cleared. (The current value of FPEXC has
|
||||
already been saved, so this does not corrupt the context. Clearing
|
||||
FPEXC.EX has no effects on FPINST or FPINST2. Also note that many
|
||||
callers already modify FPEXC by setting FPEXC.EN before invoking
|
||||
vfp_save_state().)
|
||||
|
||||
This patch also addresses a second problem related to FPEXC.EX: After
|
||||
returning from signal handling, the kernel reloads the VFP context
|
||||
from the user mode stack. However, the current code explicitly clears
|
||||
both FPEXC.EX and FPEXC.FP2V during reload. As VFP11 requires these
|
||||
bits to be preserved, this patch disables clearing them for VFP
|
||||
implementations belonging to architecture 1. There should be no
|
||||
negative side effects: the user can set both bits by executing FPU
|
||||
opcodes anyway, and while user code may now place arbitrary values
|
||||
into FPINST and FPINST2 (e.g., non-VFP ARM opcodes) the VFP support
|
||||
code knows which instructions can be emulated, and rejects other
|
||||
opcodes with "unhandled bounce" messages, so there should be no
|
||||
security impact from allowing reloading FPEXC.EX and FPEXC.FP2V.
|
||||
|
||||
Signed-off-by: Christopher Alexander Tobias Schulze <cat.schulze@alice-dsl.net>
|
||||
---
|
||||
arch/arm/vfp/vfpmodule.c | 25 +++++++++++++++++++------
|
||||
1 file changed, 19 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/arch/arm/vfp/vfpmodule.c
|
||||
+++ b/arch/arm/vfp/vfpmodule.c
|
||||
@@ -176,8 +176,11 @@ static int vfp_notifier(struct notifier_
|
||||
* case the thread migrates to a different CPU. The
|
||||
* restoring is done lazily.
|
||||
*/
|
||||
- if ((fpexc & FPEXC_EN) && vfp_current_hw_state[cpu])
|
||||
+ if ((fpexc & FPEXC_EN) && vfp_current_hw_state[cpu]) {
|
||||
+ /* vfp_save_state oopses on VFP11 if EX bit set */
|
||||
+ fmxr(FPEXC, fpexc & ~FPEXC_EX);
|
||||
vfp_save_state(vfp_current_hw_state[cpu], fpexc);
|
||||
+ }
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -451,13 +454,16 @@ static int vfp_pm_suspend(void)
|
||||
/* if vfp is on, then save state for resumption */
|
||||
if (fpexc & FPEXC_EN) {
|
||||
pr_debug("%s: saving vfp state\n", __func__);
|
||||
+ /* vfp_save_state oopses on VFP11 if EX bit set */
|
||||
+ fmxr(FPEXC, fpexc & ~FPEXC_EX);
|
||||
vfp_save_state(&ti->vfpstate, fpexc);
|
||||
|
||||
/* disable, just in case */
|
||||
fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_EN);
|
||||
} else if (vfp_current_hw_state[ti->cpu]) {
|
||||
#ifndef CONFIG_SMP
|
||||
- fmxr(FPEXC, fpexc | FPEXC_EN);
|
||||
+ /* vfp_save_state oopses on VFP11 if EX bit set */
|
||||
+ fmxr(FPEXC, (fpexc & ~FPEXC_EX) | FPEXC_EN);
|
||||
vfp_save_state(vfp_current_hw_state[ti->cpu], fpexc);
|
||||
fmxr(FPEXC, fpexc);
|
||||
#endif
|
||||
@@ -522,7 +528,8 @@ void vfp_sync_hwstate(struct thread_info
|
||||
/*
|
||||
* Save the last VFP state on this CPU.
|
||||
*/
|
||||
- fmxr(FPEXC, fpexc | FPEXC_EN);
|
||||
+ /* vfp_save_state oopses on VFP11 if EX bit set */
|
||||
+ fmxr(FPEXC, (fpexc & ~FPEXC_EX) | FPEXC_EN);
|
||||
vfp_save_state(&thread->vfpstate, fpexc | FPEXC_EN);
|
||||
fmxr(FPEXC, fpexc);
|
||||
}
|
||||
@@ -589,6 +596,7 @@ int vfp_restore_user_hwstate(struct user
|
||||
struct thread_info *thread = current_thread_info();
|
||||
struct vfp_hard_struct *hwstate = &thread->vfpstate.hard;
|
||||
unsigned long fpexc;
|
||||
+ u32 fpsid = fmrx(FPSID);
|
||||
|
||||
/* Disable VFP to avoid corrupting the new thread state. */
|
||||
vfp_flush_hwstate(thread);
|
||||
@@ -611,8 +619,12 @@ int vfp_restore_user_hwstate(struct user
|
||||
/* Ensure the VFP is enabled. */
|
||||
fpexc |= FPEXC_EN;
|
||||
|
||||
- /* Ensure FPINST2 is invalid and the exception flag is cleared. */
|
||||
- fpexc &= ~(FPEXC_EX | FPEXC_FP2V);
|
||||
+ /* Mask FPXEC_EX and FPEXC_FP2V if not required by VFP arch */
|
||||
+ if ((fpsid & FPSID_ARCH_MASK) != (1 << FPSID_ARCH_BIT)) {
|
||||
+ /* Ensure FPINST2 is invalid and the exception flag is cleared. */
|
||||
+ fpexc &= ~(FPEXC_EX | FPEXC_FP2V);
|
||||
+ }
|
||||
+
|
||||
hwstate->fpexc = fpexc;
|
||||
|
||||
hwstate->fpinst = ufp_exc->fpinst;
|
||||
@@ -848,7 +860,8 @@ void kernel_neon_begin(void)
|
||||
cpu = __smp_processor_id();
|
||||
|
||||
fpexc = fmrx(FPEXC) | FPEXC_EN;
|
||||
- fmxr(FPEXC, fpexc);
|
||||
+ /* vfp_save_state oopses on VFP11 if EX bit set */
|
||||
+ fmxr(FPEXC, fpexc & ~FPEXC_EX);
|
||||
|
||||
/*
|
||||
* Save the userland NEON/VFP state. Under UP,
|
|
@ -1,189 +0,0 @@
|
|||
From f85e49f1da2b674f63d9ac5ce9e2331e5e93ebd8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= <noralf@tronnes.org>
|
||||
Date: Tue, 1 Nov 2016 15:15:41 +0100
|
||||
Subject: [PATCH 048/697] i2c: bcm2835: Add debug support
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This adds a debug module parameter to aid in debugging transfer issues
|
||||
by printing info to the kernel log. When enabled, status values are
|
||||
collected in the interrupt routine and msg info in
|
||||
bcm2835_i2c_start_transfer(). This is done in a way that tries to avoid
|
||||
affecting timing. Having printk in the isr can mask issues.
|
||||
|
||||
debug values (additive):
|
||||
1: Print info on error
|
||||
2: Print info on all transfers
|
||||
3: Print messages before transfer is started
|
||||
|
||||
The value can be changed at runtime:
|
||||
/sys/module/i2c_bcm2835/parameters/debug
|
||||
|
||||
Example output, debug=3:
|
||||
[ 747.114448] bcm2835_i2c_xfer: msg(1/2) write addr=0x54, len=2 flags= [i2c1]
|
||||
[ 747.114463] bcm2835_i2c_xfer: msg(2/2) read addr=0x54, len=32 flags= [i2c1]
|
||||
[ 747.117809] start_transfer: msg(1/2) write addr=0x54, len=2 flags= [i2c1]
|
||||
[ 747.117825] isr: remain=2, status=0x30000055 : TA TXW TXD TXE [i2c1]
|
||||
[ 747.117839] start_transfer: msg(2/2) read addr=0x54, len=32 flags= [i2c1]
|
||||
[ 747.117849] isr: remain=32, status=0xd0000039 : TA RXR TXD RXD [i2c1]
|
||||
[ 747.117861] isr: remain=20, status=0xd0000039 : TA RXR TXD RXD [i2c1]
|
||||
[ 747.117870] isr: remain=8, status=0x32 : DONE TXD RXD [i2c1]
|
||||
|
||||
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
||||
---
|
||||
drivers/i2c/busses/i2c-bcm2835.c | 99 +++++++++++++++++++++++++++++++-
|
||||
1 file changed, 98 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/i2c/busses/i2c-bcm2835.c
|
||||
+++ b/drivers/i2c/busses/i2c-bcm2835.c
|
||||
@@ -56,6 +56,18 @@
|
||||
#define BCM2835_I2C_CDIV_MIN 0x0002
|
||||
#define BCM2835_I2C_CDIV_MAX 0xFFFE
|
||||
|
||||
+static unsigned int debug;
|
||||
+module_param(debug, uint, 0644);
|
||||
+MODULE_PARM_DESC(debug, "1=err, 2=isr, 3=xfer");
|
||||
+
|
||||
+#define BCM2835_DEBUG_MAX 512
|
||||
+struct bcm2835_debug {
|
||||
+ struct i2c_msg *msg;
|
||||
+ int msg_idx;
|
||||
+ size_t remain;
|
||||
+ u32 status;
|
||||
+};
|
||||
+
|
||||
struct bcm2835_i2c_dev {
|
||||
struct device *dev;
|
||||
void __iomem *regs;
|
||||
@@ -68,8 +80,78 @@ struct bcm2835_i2c_dev {
|
||||
u32 msg_err;
|
||||
u8 *msg_buf;
|
||||
size_t msg_buf_remaining;
|
||||
+ struct bcm2835_debug debug[BCM2835_DEBUG_MAX];
|
||||
+ unsigned int debug_num;
|
||||
+ unsigned int debug_num_msgs;
|
||||
};
|
||||
|
||||
+static inline void bcm2835_debug_add(struct bcm2835_i2c_dev *i2c_dev, u32 s)
|
||||
+{
|
||||
+ if (!i2c_dev->debug_num_msgs || i2c_dev->debug_num >= BCM2835_DEBUG_MAX)
|
||||
+ return;
|
||||
+
|
||||
+ i2c_dev->debug[i2c_dev->debug_num].msg = i2c_dev->curr_msg;
|
||||
+ i2c_dev->debug[i2c_dev->debug_num].msg_idx =
|
||||
+ i2c_dev->debug_num_msgs - i2c_dev->num_msgs;
|
||||
+ i2c_dev->debug[i2c_dev->debug_num].remain = i2c_dev->msg_buf_remaining;
|
||||
+ i2c_dev->debug[i2c_dev->debug_num].status = s;
|
||||
+ i2c_dev->debug_num++;
|
||||
+}
|
||||
+
|
||||
+static void bcm2835_debug_print_status(struct bcm2835_i2c_dev *i2c_dev,
|
||||
+ struct bcm2835_debug *d)
|
||||
+{
|
||||
+ u32 s = d->status;
|
||||
+
|
||||
+ pr_info("isr: remain=%zu, status=0x%x : %s%s%s%s%s%s%s%s%s%s [i2c%d]\n",
|
||||
+ d->remain, s,
|
||||
+ s & BCM2835_I2C_S_TA ? "TA " : "",
|
||||
+ s & BCM2835_I2C_S_DONE ? "DONE " : "",
|
||||
+ s & BCM2835_I2C_S_TXW ? "TXW " : "",
|
||||
+ s & BCM2835_I2C_S_RXR ? "RXR " : "",
|
||||
+ s & BCM2835_I2C_S_TXD ? "TXD " : "",
|
||||
+ s & BCM2835_I2C_S_RXD ? "RXD " : "",
|
||||
+ s & BCM2835_I2C_S_TXE ? "TXE " : "",
|
||||
+ s & BCM2835_I2C_S_RXF ? "RXF " : "",
|
||||
+ s & BCM2835_I2C_S_ERR ? "ERR " : "",
|
||||
+ s & BCM2835_I2C_S_CLKT ? "CLKT " : "",
|
||||
+ i2c_dev->adapter.nr);
|
||||
+}
|
||||
+
|
||||
+static void bcm2835_debug_print_msg(struct bcm2835_i2c_dev *i2c_dev,
|
||||
+ struct i2c_msg *msg, int i, int total,
|
||||
+ const char *fname)
|
||||
+{
|
||||
+ pr_info("%s: msg(%d/%d) %s addr=0x%02x, len=%u flags=%s%s%s%s%s%s%s [i2c%d]\n",
|
||||
+ fname, i, total,
|
||||
+ msg->flags & I2C_M_RD ? "read" : "write", msg->addr, msg->len,
|
||||
+ msg->flags & I2C_M_TEN ? "TEN" : "",
|
||||
+ msg->flags & I2C_M_RECV_LEN ? "RECV_LEN" : "",
|
||||
+ msg->flags & I2C_M_NO_RD_ACK ? "NO_RD_ACK" : "",
|
||||
+ msg->flags & I2C_M_IGNORE_NAK ? "IGNORE_NAK" : "",
|
||||
+ msg->flags & I2C_M_REV_DIR_ADDR ? "REV_DIR_ADDR" : "",
|
||||
+ msg->flags & I2C_M_NOSTART ? "NOSTART" : "",
|
||||
+ msg->flags & I2C_M_STOP ? "STOP" : "",
|
||||
+ i2c_dev->adapter.nr);
|
||||
+}
|
||||
+
|
||||
+static void bcm2835_debug_print(struct bcm2835_i2c_dev *i2c_dev)
|
||||
+{
|
||||
+ struct bcm2835_debug *d;
|
||||
+ unsigned int i;
|
||||
+
|
||||
+ for (i = 0; i < i2c_dev->debug_num; i++) {
|
||||
+ d = &i2c_dev->debug[i];
|
||||
+ if (d->status == ~0)
|
||||
+ bcm2835_debug_print_msg(i2c_dev, d->msg, d->msg_idx,
|
||||
+ i2c_dev->debug_num_msgs, "start_transfer");
|
||||
+ else
|
||||
+ bcm2835_debug_print_status(i2c_dev, d);
|
||||
+ }
|
||||
+ if (i2c_dev->debug_num >= BCM2835_DEBUG_MAX)
|
||||
+ pr_info("BCM2835_DEBUG_MAX reached\n");
|
||||
+}
|
||||
+
|
||||
static inline void bcm2835_i2c_writel(struct bcm2835_i2c_dev *i2c_dev,
|
||||
u32 reg, u32 val)
|
||||
{
|
||||
@@ -257,6 +339,7 @@ static void bcm2835_i2c_start_transfer(s
|
||||
bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_A, msg->addr);
|
||||
bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_DLEN, msg->len);
|
||||
bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, c);
|
||||
+ bcm2835_debug_add(i2c_dev, ~0);
|
||||
}
|
||||
|
||||
static void bcm2835_i2c_finish_transfer(struct bcm2835_i2c_dev *i2c_dev)
|
||||
@@ -283,6 +366,7 @@ static irqreturn_t bcm2835_i2c_isr(int t
|
||||
u32 val, err;
|
||||
|
||||
val = bcm2835_i2c_readl(i2c_dev, BCM2835_I2C_S);
|
||||
+ bcm2835_debug_add(i2c_dev, val);
|
||||
|
||||
err = val & (BCM2835_I2C_S_CLKT | BCM2835_I2C_S_ERR);
|
||||
if (err) {
|
||||
@@ -349,6 +433,13 @@ static int bcm2835_i2c_xfer(struct i2c_a
|
||||
unsigned long time_left;
|
||||
int i;
|
||||
|
||||
+ if (debug)
|
||||
+ i2c_dev->debug_num_msgs = num;
|
||||
+
|
||||
+ if (debug > 2)
|
||||
+ for (i = 0; i < num; i++)
|
||||
+ bcm2835_debug_print_msg(i2c_dev, &msgs[i], i + 1, num, __func__);
|
||||
+
|
||||
for (i = 0; i < (num - 1); i++)
|
||||
if (msgs[i].flags & I2C_M_RD) {
|
||||
dev_warn_once(i2c_dev->dev,
|
||||
@@ -367,6 +458,10 @@ static int bcm2835_i2c_xfer(struct i2c_a
|
||||
|
||||
bcm2835_i2c_finish_transfer(i2c_dev);
|
||||
|
||||
+ if (debug > 1 || (debug && (!time_left || i2c_dev->msg_err)))
|
||||
+ bcm2835_debug_print(i2c_dev);
|
||||
+ i2c_dev->debug_num_msgs = 0;
|
||||
+ i2c_dev->debug_num = 0;
|
||||
if (!time_left) {
|
||||
bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C,
|
||||
BCM2835_I2C_C_CLEAR);
|
||||
@@ -376,7 +471,9 @@ static int bcm2835_i2c_xfer(struct i2c_a
|
||||
if (!i2c_dev->msg_err)
|
||||
return num;
|
||||
|
||||
- dev_dbg(i2c_dev->dev, "i2c transfer failed: %x\n", i2c_dev->msg_err);
|
||||
+ if (debug)
|
||||
+ dev_err(i2c_dev->dev, "i2c transfer failed: %x\n",
|
||||
+ i2c_dev->msg_err);
|
||||
|
||||
if (i2c_dev->msg_err & BCM2835_I2C_S_ERR)
|
||||
return -EREMOTEIO;
|
|
@ -1,112 +0,0 @@
|
|||
From d60db5d76824afbb83f65ff24cfebba74f4ba4d6 Mon Sep 17 00:00:00 2001
|
||||
From: Phil Elwell <phil@raspberrypi.org>
|
||||
Date: Tue, 23 Jan 2018 16:52:45 +0000
|
||||
Subject: [PATCH 049/697] irqchip: irq-bcm2836: Remove regmap and syscon use
|
||||
|
||||
The syscon node defines a register range that duplicates that used by
|
||||
the local_intc node on bcm2836/7. Since irq-bcm2835 and irq-bcm2836 are
|
||||
built in and always present together (both drivers are enabled by
|
||||
CONFIG_ARCH_BCM2835), it is possible to replace the syscon usage with a
|
||||
global variable that simplifies the code. Doing so does lose the
|
||||
locking provided by regmap, but as only one side is using the regmap
|
||||
interface (irq-bcm2835 uses readl and write) there is no loss of
|
||||
atomicity.
|
||||
|
||||
See: https://github.com/raspberrypi/firmware/issues/926
|
||||
|
||||
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
---
|
||||
drivers/irqchip/irq-bcm2835.c | 32 ++++++++++++--------------------
|
||||
drivers/irqchip/irq-bcm2836.c | 5 +++++
|
||||
2 files changed, 17 insertions(+), 20 deletions(-)
|
||||
|
||||
--- a/drivers/irqchip/irq-bcm2835.c
|
||||
+++ b/drivers/irqchip/irq-bcm2835.c
|
||||
@@ -41,8 +41,6 @@
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/irqchip.h>
|
||||
#include <linux/irqdomain.h>
|
||||
-#include <linux/mfd/syscon.h>
|
||||
-#include <linux/regmap.h>
|
||||
|
||||
#include <asm/exception.h>
|
||||
#include <asm/mach/irq.h>
|
||||
@@ -92,7 +90,7 @@ struct armctrl_ic {
|
||||
void __iomem *enable[NR_BANKS];
|
||||
void __iomem *disable[NR_BANKS];
|
||||
struct irq_domain *domain;
|
||||
- struct regmap *local_regmap;
|
||||
+ void __iomem *local_base;
|
||||
};
|
||||
|
||||
static struct armctrl_ic intc __read_mostly;
|
||||
@@ -129,24 +127,20 @@ static void armctrl_unmask_irq(struct ir
|
||||
if (d->hwirq >= NUMBER_IRQS) {
|
||||
if (num_online_cpus() > 1) {
|
||||
unsigned int data;
|
||||
- int ret;
|
||||
|
||||
- if (!intc.local_regmap) {
|
||||
- pr_err("FIQ is disabled due to missing regmap\n");
|
||||
+ if (!intc.local_base) {
|
||||
+ pr_err("FIQ is disabled due to missing arm_local_intc\n");
|
||||
return;
|
||||
}
|
||||
|
||||
- ret = regmap_read(intc.local_regmap,
|
||||
- ARM_LOCAL_GPU_INT_ROUTING, &data);
|
||||
- if (ret) {
|
||||
- pr_err("Failed to read int routing %d\n", ret);
|
||||
- return;
|
||||
- }
|
||||
+ data = readl_relaxed(intc.local_base +
|
||||
+ ARM_LOCAL_GPU_INT_ROUTING);
|
||||
|
||||
data &= ~0xc;
|
||||
data |= (1 << 2);
|
||||
- regmap_write(intc.local_regmap,
|
||||
- ARM_LOCAL_GPU_INT_ROUTING, data);
|
||||
+ writel_relaxed(data,
|
||||
+ intc.local_base +
|
||||
+ ARM_LOCAL_GPU_INT_ROUTING);
|
||||
}
|
||||
|
||||
writel_relaxed(REG_FIQ_ENABLE | hwirq_to_fiq(d->hwirq),
|
||||
@@ -248,12 +242,10 @@ static int __init armctrl_of_init(struct
|
||||
}
|
||||
|
||||
if (is_2836) {
|
||||
- intc.local_regmap =
|
||||
- syscon_regmap_lookup_by_compatible("brcm,bcm2836-arm-local");
|
||||
- if (IS_ERR(intc.local_regmap)) {
|
||||
- pr_err("Failed to get local register map. FIQ is disabled for cpus > 1\n");
|
||||
- intc.local_regmap = NULL;
|
||||
- }
|
||||
+ extern void __iomem * __attribute__((weak)) arm_local_intc;
|
||||
+ intc.local_base = arm_local_intc;
|
||||
+ if (!intc.local_base)
|
||||
+ pr_err("Failed to get local intc base. FIQ is disabled for cpus > 1\n");
|
||||
}
|
||||
|
||||
/* Make a duplicate irq range which is used to enable FIQ */
|
||||
--- a/drivers/irqchip/irq-bcm2836.c
|
||||
+++ b/drivers/irqchip/irq-bcm2836.c
|
||||
@@ -22,6 +22,9 @@ struct bcm2836_arm_irqchip_intc {
|
||||
|
||||
static struct bcm2836_arm_irqchip_intc intc __read_mostly;
|
||||
|
||||
+void __iomem *arm_local_intc;
|
||||
+EXPORT_SYMBOL_GPL(arm_local_intc);
|
||||
+
|
||||
static void bcm2836_arm_irqchip_mask_per_cpu_irq(unsigned int reg_offset,
|
||||
unsigned int bit,
|
||||
int cpu)
|
||||
@@ -320,6 +323,8 @@ static int __init bcm2836_arm_irqchip_l1
|
||||
panic("%pOF: unable to map local interrupt registers\n", node);
|
||||
}
|
||||
|
||||
+ arm_local_intc = intc.base;
|
||||
+
|
||||
bcm2835_init_local_timer_frequency();
|
||||
|
||||
intc.domain = irq_domain_add_linear(node, LAST_IRQ + 1,
|
|
@ -1,27 +0,0 @@
|
|||
From 0f1e8b96198b74dcb95a10e139c66ee5ae36e6b2 Mon Sep 17 00:00:00 2001
|
||||
From: Phil Elwell <phil@raspberrypi.org>
|
||||
Date: Fri, 29 Sep 2017 10:32:19 +0100
|
||||
Subject: [PATCH 050/697] amba_pl011: Insert mb() for correct FIFO handling
|
||||
|
||||
The pl011 register accessor functions use the _relaxed versions of the
|
||||
standard readl() and writel() functions, meaning that there are no
|
||||
automatic memory barriers. When polling a FIFO status register to check
|
||||
for fullness, it is necessary to ensure that any outstanding writes have
|
||||
completed; otherwise the flags are effectively stale, making it possible
|
||||
that the next write is to a full FIFO.
|
||||
|
||||
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
---
|
||||
drivers/tty/serial/amba-pl011.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/drivers/tty/serial/amba-pl011.c
|
||||
+++ b/drivers/tty/serial/amba-pl011.c
|
||||
@@ -1433,6 +1433,7 @@ static bool pl011_tx_char(struct uart_am
|
||||
return false; /* unable to transmit character */
|
||||
|
||||
pl011_write(c, uap, REG_DR);
|
||||
+ mb();
|
||||
uap->port.icount.tx++;
|
||||
|
||||
return true;
|
|
@ -1,50 +0,0 @@
|
|||
From 2d203a775b47a3bc0f1aa50b6d67fb7d7a627218 Mon Sep 17 00:00:00 2001
|
||||
From: Phil Elwell <phil@raspberrypi.org>
|
||||
Date: Fri, 29 Sep 2017 10:32:19 +0100
|
||||
Subject: [PATCH 051/697] amba_pl011: Add cts-event-workaround DT property
|
||||
|
||||
The BCM2835 PL011 implementation seems to have a bug that can lead to a
|
||||
transmission lockup if CTS changes frequently. A workaround was added to
|
||||
the driver with a vendor-specific flag to enable it, but this flag is
|
||||
currently not set for ARM implementations.
|
||||
|
||||
Add a "cts-event-workaround" property to Pi DTBs and use the presence
|
||||
of that property to force the flag to be enabled in the driver.
|
||||
|
||||
See: https://github.com/raspberrypi/linux/issues/1280
|
||||
|
||||
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
---
|
||||
Documentation/devicetree/bindings/serial/pl011.yaml | 6 ++++++
|
||||
drivers/tty/serial/amba-pl011.c | 5 +++++
|
||||
2 files changed, 11 insertions(+)
|
||||
|
||||
--- a/Documentation/devicetree/bindings/serial/pl011.yaml
|
||||
+++ b/Documentation/devicetree/bindings/serial/pl011.yaml
|
||||
@@ -101,6 +101,12 @@ properties:
|
||||
on the device.
|
||||
enum: [1, 4]
|
||||
|
||||
+ cts-event-workaround:
|
||||
+ description:
|
||||
+ Enables the (otherwise vendor-specific) workaround for the
|
||||
+ CTS-induced TX lockup.
|
||||
+ type: boolean
|
||||
+
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
--- a/drivers/tty/serial/amba-pl011.c
|
||||
+++ b/drivers/tty/serial/amba-pl011.c
|
||||
@@ -2783,6 +2783,11 @@ static int pl011_probe(struct amba_devic
|
||||
if (IS_ERR(uap->clk))
|
||||
return PTR_ERR(uap->clk);
|
||||
|
||||
+ if (of_property_read_bool(dev->dev.of_node, "cts-event-workaround")) {
|
||||
+ vendor->cts_event_workaround = true;
|
||||
+ dev_info(&dev->dev, "cts_event_workaround enabled\n");
|
||||
+ }
|
||||
+
|
||||
uap->reg_offset = vendor->reg_offset;
|
||||
uap->vendor = vendor;
|
||||
uap->fifosize = vendor->get_fifosize(dev);
|
|
@ -1,42 +0,0 @@
|
|||
From 492c6b7b05bdb4daaa8889e5f80d6d651e4b131a Mon Sep 17 00:00:00 2001
|
||||
From: Phil Elwell <phil@raspberrypi.org>
|
||||
Date: Wed, 29 Jan 2020 09:35:19 +0000
|
||||
Subject: [PATCH 052/697] tty: amba-pl011: Avoid rare write-when-full error
|
||||
|
||||
Under some circumstances on BCM283x processors data loss can be
|
||||
observed - a single byte missing from the TX output stream. These bytes
|
||||
are always the last byte of a batch of 8 written from pl011_tx_chars
|
||||
when from_irq is true, meaning that the FIFO full flag is not checked
|
||||
before writing.
|
||||
|
||||
The transmit optimisation relies on the FIFO being half-empty when the
|
||||
TX interrupt is raised. Instrumenting the driver further showed that
|
||||
the failure case correlated with the TX FIFO full flag being set at the
|
||||
point where the last byte was written to the data register, which
|
||||
explains the data loss but not how the FIFO appeared to be prematurely
|
||||
full. A possible explanation is that a FIFO write was in flight at the
|
||||
time the interrupt was raised, but as yet there is no hypothesis as to
|
||||
how this might occur.
|
||||
|
||||
In the absence of a clear understanding of the failure mechanism, avoid
|
||||
the problem by checking the FIFO levels before writing the last byte of
|
||||
the group, which will have minimal performance impact.
|
||||
|
||||
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
---
|
||||
drivers/tty/serial/amba-pl011.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/drivers/tty/serial/amba-pl011.c
|
||||
+++ b/drivers/tty/serial/amba-pl011.c
|
||||
@@ -1466,6 +1466,10 @@ static bool pl011_tx_chars(struct uart_a
|
||||
if (likely(from_irq) && count-- == 0)
|
||||
break;
|
||||
|
||||
+ if (likely(from_irq) && count == 0 &&
|
||||
+ pl011_read(uap, REG_FR) & UART01x_FR_TXFF)
|
||||
+ break;
|
||||
+
|
||||
if (!kfifo_peek(&tport->xmit_fifo, &c))
|
||||
break;
|
||||
|
|
@ -1,150 +0,0 @@
|
|||
From bf3174d438a6244ac733e236f3ceb4726d427944 Mon Sep 17 00:00:00 2001
|
||||
From: popcornmix <popcornmix@gmail.com>
|
||||
Date: Sun, 12 May 2013 12:24:19 +0100
|
||||
Subject: [PATCH 053/697] Main bcm2708/bcm2709 linux port
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: popcornmix <popcornmix@gmail.com>
|
||||
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
||||
|
||||
bcm2709: Drop platform smp and timer init code
|
||||
|
||||
irq-bcm2836 handles this through these functions:
|
||||
bcm2835_init_local_timer_frequency()
|
||||
bcm2836_arm_irqchip_smp_init()
|
||||
|
||||
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
||||
|
||||
bcm270x: Use watchdog for reboot/poweroff
|
||||
|
||||
The watchdog driver already has support for reboot/poweroff.
|
||||
Make use of this and remove the code from the platform files.
|
||||
|
||||
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
||||
|
||||
board_bcm2835: Remove coherent dma pool increase - API has gone
|
||||
---
|
||||
arch/arm/mach-bcm/Kconfig | 1 +
|
||||
arch/arm/mm/proc-v6.S | 15 ++++++++++++---
|
||||
drivers/irqchip/irq-bcm2835.c | 7 ++++++-
|
||||
drivers/mailbox/bcm2835-mailbox.c | 18 ++++++++++++++++--
|
||||
4 files changed, 35 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/arch/arm/mach-bcm/Kconfig
|
||||
+++ b/arch/arm/mach-bcm/Kconfig
|
||||
@@ -162,6 +162,7 @@ config ARCH_BCM2835
|
||||
select PINCTRL
|
||||
select PINCTRL_BCM2835
|
||||
select MFD_CORE
|
||||
+ select MFD_SYSCON if ARCH_MULTI_V7
|
||||
help
|
||||
This enables support for the Broadcom BCM2711 and BCM283x SoCs.
|
||||
This SoC is used in the Raspberry Pi and Roku 2 devices.
|
||||
--- a/arch/arm/mm/proc-v6.S
|
||||
+++ b/arch/arm/mm/proc-v6.S
|
||||
@@ -75,10 +75,19 @@ SYM_FUNC_END(cpu_v6_reset)
|
||||
*
|
||||
* IRQs are already disabled.
|
||||
*/
|
||||
+
|
||||
+/* See jira SW-5991 for details of this workaround */
|
||||
SYM_TYPED_FUNC_START(cpu_v6_do_idle)
|
||||
- mov r1, #0
|
||||
- mcr p15, 0, r1, c7, c10, 4 @ DWB - WFI may enter a low-power mode
|
||||
- mcr p15, 0, r1, c7, c0, 4 @ wait for interrupt
|
||||
+ .align 5
|
||||
+ mov r1, #2
|
||||
+1: subs r1, #1
|
||||
+ nop
|
||||
+ mcreq p15, 0, r1, c7, c10, 4 @ DWB - WFI may enter a low-power mode
|
||||
+ mcreq p15, 0, r1, c7, c0, 4 @ wait for interrupt
|
||||
+ nop
|
||||
+ nop
|
||||
+ nop
|
||||
+ bne 1b
|
||||
ret lr
|
||||
SYM_FUNC_END(cpu_v6_do_idle)
|
||||
|
||||
--- a/drivers/irqchip/irq-bcm2835.c
|
||||
+++ b/drivers/irqchip/irq-bcm2835.c
|
||||
@@ -43,7 +43,9 @@
|
||||
#include <linux/irqdomain.h>
|
||||
|
||||
#include <asm/exception.h>
|
||||
+#ifndef CONFIG_ARM64
|
||||
#include <asm/mach/irq.h>
|
||||
+#endif
|
||||
|
||||
/* Put the bank and irq (32 bits) into the hwirq */
|
||||
#define MAKE_HWIRQ(b, n) (((b) << 5) | (n))
|
||||
@@ -72,6 +74,7 @@
|
||||
#define NR_BANKS 3
|
||||
#define IRQS_PER_BANK 32
|
||||
#define NUMBER_IRQS MAKE_HWIRQ(NR_BANKS, 0)
|
||||
+#undef FIQ_START
|
||||
#define FIQ_START (NR_IRQS_BANK0 + MAKE_HWIRQ(NR_BANKS - 1, 0))
|
||||
|
||||
static const int reg_pending[] __initconst = { 0x00, 0x04, 0x08 };
|
||||
@@ -255,10 +258,12 @@ static int __init armctrl_of_init(struct
|
||||
MAKE_HWIRQ(b, i) + NUMBER_IRQS);
|
||||
BUG_ON(irq <= 0);
|
||||
irq_set_chip(irq, &armctrl_chip);
|
||||
- set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
|
||||
+ irq_set_probe(irq);
|
||||
}
|
||||
}
|
||||
+#ifndef CONFIG_ARM64
|
||||
init_FIQ(FIQ_START);
|
||||
+#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
--- a/drivers/mailbox/bcm2835-mailbox.c
|
||||
+++ b/drivers/mailbox/bcm2835-mailbox.c
|
||||
@@ -45,12 +45,15 @@
|
||||
#define MAIL1_WRT (ARM_0_MAIL1 + 0x00)
|
||||
#define MAIL1_STA (ARM_0_MAIL1 + 0x18)
|
||||
|
||||
+/* On ARCH_BCM270x these come through <linux/interrupt.h> (arm_control.h ) */
|
||||
+#ifndef ARM_MS_FULL
|
||||
/* Status register: FIFO state. */
|
||||
#define ARM_MS_FULL BIT(31)
|
||||
#define ARM_MS_EMPTY BIT(30)
|
||||
|
||||
/* Configuration register: Enable interrupts. */
|
||||
#define ARM_MC_IHAVEDATAIRQEN BIT(0)
|
||||
+#endif
|
||||
|
||||
struct bcm2835_mbox {
|
||||
void __iomem *regs;
|
||||
@@ -144,7 +147,7 @@ static int bcm2835_mbox_probe(struct pla
|
||||
return -ENOMEM;
|
||||
spin_lock_init(&mbox->lock);
|
||||
|
||||
- ret = devm_request_irq(dev, irq_of_parse_and_map(dev->of_node, 0),
|
||||
+ ret = devm_request_irq(dev, platform_get_irq(pdev, 0),
|
||||
bcm2835_mbox_irq, IRQF_NO_SUSPEND, dev_name(dev),
|
||||
mbox);
|
||||
if (ret) {
|
||||
@@ -193,7 +196,18 @@ static struct platform_driver bcm2835_mb
|
||||
},
|
||||
.probe = bcm2835_mbox_probe,
|
||||
};
|
||||
-module_platform_driver(bcm2835_mbox_driver);
|
||||
+
|
||||
+static int __init bcm2835_mbox_init(void)
|
||||
+{
|
||||
+ return platform_driver_register(&bcm2835_mbox_driver);
|
||||
+}
|
||||
+arch_initcall(bcm2835_mbox_init);
|
||||
+
|
||||
+static void __init bcm2835_mbox_exit(void)
|
||||
+{
|
||||
+ platform_driver_unregister(&bcm2835_mbox_driver);
|
||||
+}
|
||||
+module_exit(bcm2835_mbox_exit);
|
||||
|
||||
MODULE_AUTHOR("Lubomir Rintel <lkundrak@v3.sk>");
|
||||
MODULE_DESCRIPTION("BCM2835 mailbox IPC driver");
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,652 +0,0 @@
|
|||
From 5a1882f4e4544a866f1b07a12bf352bac5a6f90f Mon Sep 17 00:00:00 2001
|
||||
From: Florian Meier <florian.meier@koalo.de>
|
||||
Date: Fri, 22 Nov 2013 14:22:53 +0100
|
||||
Subject: [PATCH 056/697] dmaengine: Add support for BCM2708
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Add support for DMA controller of BCM2708 as used in the Raspberry Pi.
|
||||
Currently it only supports cyclic DMA.
|
||||
|
||||
Signed-off-by: Florian Meier <florian.meier@koalo.de>
|
||||
|
||||
dmaengine: expand functionality by supporting scatter/gather transfers sdhci-bcm2708 and dma.c: fix for LITE channels
|
||||
|
||||
DMA: fix cyclic LITE length overflow bug
|
||||
|
||||
dmaengine: bcm2708: Remove chancnt affectations
|
||||
|
||||
Mirror bcm2835-dma.c commit 9eba5536a7434c69d8c185d4bd1c70734d92287d:
|
||||
chancnt is already filled by dma_async_device_register, which uses the channel
|
||||
list to know how much channels there is.
|
||||
|
||||
Since it's already filled, we can safely remove it from the drivers' probe
|
||||
function.
|
||||
|
||||
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
||||
|
||||
dmaengine: bcm2708: overwrite dreq only if it is not set
|
||||
|
||||
dreq is set when the DMA channel is fetched from Device Tree.
|
||||
slave_id is set using dmaengine_slave_config().
|
||||
Only overwrite dreq with slave_id if it is not set.
|
||||
|
||||
dreq/slave_id in the cyclic DMA case is not touched, because I don't
|
||||
have hardware to test with.
|
||||
|
||||
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
||||
|
||||
dmaengine: bcm2708: do device registration in the board file
|
||||
|
||||
Don't register the device in the driver. Do it in the board file.
|
||||
|
||||
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
||||
|
||||
dmaengine: bcm2708: don't restrict DT support to ARCH_BCM2835
|
||||
|
||||
Both ARCH_BCM2835 and ARCH_BCM270x are built with OF now.
|
||||
Add Device Tree support to the non ARCH_BCM2835 case.
|
||||
Use the same driver name regardless of architecture.
|
||||
|
||||
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
||||
|
||||
BCM270x_DT: add bcm2835-dma entry
|
||||
|
||||
Add Device Tree entry for bcm2835-dma.
|
||||
The entry doesn't contain any resources since they are handled
|
||||
by the arch/arm/mach-bcm270x/dma.c driver.
|
||||
In non-DT mode, don't add the device in the board file.
|
||||
|
||||
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
||||
|
||||
bcm2708-dmaengine: Add debug options
|
||||
|
||||
BCM270x: Add memory and irq resources to dmaengine device and DT
|
||||
|
||||
Prepare for merging of the legacy DMA API arch driver dma.c
|
||||
with bcm2708-dmaengine by adding memory and irq resources both
|
||||
to platform file device and Device Tree node.
|
||||
Don't use BCM_DMAMAN_DRIVER_NAME so we don't have to include mach/dma.h
|
||||
|
||||
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
||||
|
||||
dmaengine: bcm2708: Merge with arch dma.c driver and disable dma.c
|
||||
|
||||
Merge the legacy DMA API driver with bcm2708-dmaengine.
|
||||
This is done so we can use bcm2708_fb on ARCH_BCM2835 (mailbox
|
||||
driver is also needed).
|
||||
|
||||
Changes to the dma.c code:
|
||||
- Use BIT() macro.
|
||||
- Cutdown some comments to one line.
|
||||
- Add mutex to vc_dmaman and use this, since the dev lock is locked
|
||||
during probing of the engine part.
|
||||
- Add global g_dmaman variable since drvdata is used by the engine part.
|
||||
- Restructure for readability:
|
||||
vc_dmaman_chan_alloc()
|
||||
vc_dmaman_chan_free()
|
||||
bcm_dma_chan_free()
|
||||
- Restructure bcm_dma_chan_alloc() to simplify error handling.
|
||||
- Use device irq resources instead of hardcoded bcm_dma_irqs table.
|
||||
- Remove dev_dmaman_register() and code it directly.
|
||||
- Remove dev_dmaman_deregister() and code it directly.
|
||||
- Simplify bcm_dmaman_probe() using devm_* functions.
|
||||
- Get dmachans from DT if available.
|
||||
- Keep 'dma.dmachans' module argument name for backwards compatibility.
|
||||
|
||||
Make it available on ARCH_BCM2835 as well.
|
||||
|
||||
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
||||
|
||||
dmaengine: bcm2708: set residue_granularity field
|
||||
|
||||
bcm2708-dmaengine supports residue reporting at burst level
|
||||
but didn't report this via the residue_granularity field.
|
||||
|
||||
Without this field set properly we get playback issues with I2S cards.
|
||||
|
||||
dmaengine: bcm2708-dmaengine: Fix memory leak when stopping a running transfer
|
||||
|
||||
bcm2708-dmaengine: Use more DMA channels (but not 12)
|
||||
|
||||
1) Only the bcm2708_fb drivers uses the legacy DMA API, and
|
||||
it requires a BULK-capable channel, so all other types
|
||||
(FAST, NORMAL and LITE) can be made available to the regular
|
||||
DMA API.
|
||||
|
||||
2) DMA channels 11-14 share an interrupt. The driver can't
|
||||
handle this, so don't use channels 12-14 (12 was used, probably
|
||||
because it appears to have an interrupt, but in reality that
|
||||
interrupt is for activity on ANY channel). This may explain
|
||||
a lockup encountered when running out of DMA channels.
|
||||
|
||||
The combined effect of this patch is to leave 7 DMA channels
|
||||
available + channel 0 for bcm2708_fb via the legacy API.
|
||||
|
||||
See: https://github.com/raspberrypi/linux/issues/1110
|
||||
https://github.com/raspberrypi/linux/issues/1108
|
||||
|
||||
dmaengine: bcm2708: Make legacy API available for bcm2835-dma
|
||||
|
||||
bcm2708_fb uses the legacy DMA API, so in order to start using
|
||||
bcm2835-dma, bcm2835-dma has to support the legacy API. Make this
|
||||
possible by exporting bcm_dmaman_probe() and bcm_dmaman_remove().
|
||||
|
||||
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
||||
|
||||
dmaengine: bcm2708: Change DT compatible string
|
||||
|
||||
Both bcm2835-dma and bcm2708-dmaengine have the same compatible string.
|
||||
So change compatible to "brcm,bcm2708-dma".
|
||||
|
||||
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
||||
|
||||
dmaengine: bcm2708: Remove driver but keep legacy API
|
||||
|
||||
Dropping non-DT support means we don't need this driver,
|
||||
but we still need the legacy DMA API.
|
||||
|
||||
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
||||
|
||||
bcm2708-dmaengine - Fix arm64 portability/build issues
|
||||
|
||||
dma-bcm2708: Fix module compilation of CONFIG_DMA_BCM2708
|
||||
|
||||
bcm2708-dmaengine.c defines functions like bcm_dma_start which are
|
||||
defined as well in dma-bcm2708.h as inline versions when
|
||||
CONFIG_DMA_BCM2708 is not defined. This works fine when
|
||||
CONFIG_DMA_BCM2708 is built in, but when it is selected as module build
|
||||
fails with redefinition errors because in the build system when
|
||||
CONFIG_DMA_BCM2708 is selected as module, the macro becomes
|
||||
CONFIG_DMA_BCM2708_MODULE.
|
||||
|
||||
This patch makes the header use CONFIG_DMA_BCM2708_MODULE too when
|
||||
available.
|
||||
|
||||
Fixes https://github.com/raspberrypi/linux/issues/2056
|
||||
|
||||
Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
|
||||
|
||||
bcm2708-dmaengine: Use platform_get_irq
|
||||
|
||||
The platform driver framework no longer creates IRQ resources for
|
||||
platform devices because they are expected to use platform_get_irq.
|
||||
This causes the bcm2808_fb acceleration to fail.
|
||||
|
||||
Fix the problem by calling platform_get_irq as intended.
|
||||
|
||||
See: https://github.com/raspberrypi/linux/issues/5131
|
||||
|
||||
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
---
|
||||
drivers/dma/Kconfig | 6 +-
|
||||
drivers/dma/Makefile | 1 +
|
||||
drivers/dma/bcm2708-dmaengine.c | 281 ++++++++++++++++++++++
|
||||
include/linux/platform_data/dma-bcm2708.h | 143 +++++++++++
|
||||
4 files changed, 430 insertions(+), 1 deletion(-)
|
||||
create mode 100644 drivers/dma/bcm2708-dmaengine.c
|
||||
create mode 100644 include/linux/platform_data/dma-bcm2708.h
|
||||
|
||||
--- a/drivers/dma/Kconfig
|
||||
+++ b/drivers/dma/Kconfig
|
||||
@@ -136,7 +136,7 @@ config BCM_SBA_RAID
|
||||
|
||||
config DMA_BCM2835
|
||||
tristate "BCM2835 DMA engine support"
|
||||
- depends on ARCH_BCM2835 || ARCH_BCM2708 || ARCH_BCM2709
|
||||
+ depends on ARCH_BCM2835
|
||||
select DMA_ENGINE
|
||||
select DMA_VIRTUAL_CHANNELS
|
||||
|
||||
@@ -669,6 +669,10 @@ config UNIPHIER_XDMAC
|
||||
UniPhier platform. This DMA controller can transfer data from
|
||||
memory to memory, memory to peripheral and peripheral to memory.
|
||||
|
||||
+config DMA_BCM2708
|
||||
+ tristate "BCM2708 DMA legacy API support"
|
||||
+ depends on DMA_BCM2835
|
||||
+
|
||||
config XGENE_DMA
|
||||
tristate "APM X-Gene DMA support"
|
||||
depends on ARCH_XGENE || COMPILE_TEST
|
||||
--- a/drivers/dma/Makefile
|
||||
+++ b/drivers/dma/Makefile
|
||||
@@ -22,6 +22,7 @@ obj-$(CONFIG_AT_HDMAC) += at_hdmac.o
|
||||
obj-$(CONFIG_AT_XDMAC) += at_xdmac.o
|
||||
obj-$(CONFIG_AXI_DMAC) += dma-axi-dmac.o
|
||||
obj-$(CONFIG_BCM_SBA_RAID) += bcm-sba-raid.o
|
||||
+obj-$(CONFIG_DMA_BCM2708) += bcm2708-dmaengine.o
|
||||
obj-$(CONFIG_DMA_BCM2835) += bcm2835-dma.o
|
||||
obj-$(CONFIG_DMA_JZ4780) += dma-jz4780.o
|
||||
obj-$(CONFIG_DMA_SA11X0) += sa11x0-dma.o
|
||||
--- /dev/null
|
||||
+++ b/drivers/dma/bcm2708-dmaengine.c
|
||||
@@ -0,0 +1,281 @@
|
||||
+/*
|
||||
+ * BCM2708 legacy DMA API
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published by
|
||||
+ * the Free Software Foundation; either version 2 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/interrupt.h>
|
||||
+#include <linux/list.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/platform_data/dma-bcm2708.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/slab.h>
|
||||
+#include <linux/io.h>
|
||||
+#include <linux/spinlock.h>
|
||||
+
|
||||
+#include "virt-dma.h"
|
||||
+
|
||||
+#define CACHE_LINE_MASK 31
|
||||
+#define DEFAULT_DMACHAN_BITMAP 0x10 /* channel 4 only */
|
||||
+
|
||||
+/* valid only for channels 0 - 14, 15 has its own base address */
|
||||
+#define BCM2708_DMA_CHAN(n) ((n) << 8) /* base address */
|
||||
+#define BCM2708_DMA_CHANIO(dma_base, n) \
|
||||
+ ((void __iomem *)((char *)(dma_base) + BCM2708_DMA_CHAN(n)))
|
||||
+
|
||||
+struct vc_dmaman {
|
||||
+ void __iomem *dma_base;
|
||||
+ u32 chan_available; /* bitmap of available channels */
|
||||
+ u32 has_feature[BCM_DMA_FEATURE_COUNT]; /* bitmap of feature presence */
|
||||
+ struct mutex lock;
|
||||
+};
|
||||
+
|
||||
+static struct device *dmaman_dev; /* we assume there's only one! */
|
||||
+static struct vc_dmaman *g_dmaman; /* DMA manager */
|
||||
+
|
||||
+/* DMA Auxiliary Functions */
|
||||
+
|
||||
+/* A DMA buffer on an arbitrary boundary may separate a cache line into a
|
||||
+ section inside the DMA buffer and another section outside it.
|
||||
+ Even if we flush DMA buffers from the cache there is always the chance that
|
||||
+ during a DMA someone will access the part of a cache line that is outside
|
||||
+ the DMA buffer - which will then bring in unwelcome data.
|
||||
+ Without being able to dictate our own buffer pools we must insist that
|
||||
+ DMA buffers consist of a whole number of cache lines.
|
||||
+*/
|
||||
+extern int bcm_sg_suitable_for_dma(struct scatterlist *sg_ptr, int sg_len)
|
||||
+{
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; i < sg_len; i++) {
|
||||
+ if (sg_ptr[i].offset & CACHE_LINE_MASK ||
|
||||
+ sg_ptr[i].length & CACHE_LINE_MASK)
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(bcm_sg_suitable_for_dma);
|
||||
+
|
||||
+extern void bcm_dma_start(void __iomem *dma_chan_base,
|
||||
+ dma_addr_t control_block)
|
||||
+{
|
||||
+ dsb(sy); /* ARM data synchronization (push) operation */
|
||||
+
|
||||
+ writel(control_block, dma_chan_base + BCM2708_DMA_ADDR);
|
||||
+ writel(BCM2708_DMA_ACTIVE, dma_chan_base + BCM2708_DMA_CS);
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(bcm_dma_start);
|
||||
+
|
||||
+extern void bcm_dma_wait_idle(void __iomem *dma_chan_base)
|
||||
+{
|
||||
+ dsb(sy);
|
||||
+
|
||||
+ /* ugly busy wait only option for now */
|
||||
+ while (readl(dma_chan_base + BCM2708_DMA_CS) & BCM2708_DMA_ACTIVE)
|
||||
+ cpu_relax();
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(bcm_dma_wait_idle);
|
||||
+
|
||||
+extern bool bcm_dma_is_busy(void __iomem *dma_chan_base)
|
||||
+{
|
||||
+ dsb(sy);
|
||||
+
|
||||
+ return readl(dma_chan_base + BCM2708_DMA_CS) & BCM2708_DMA_ACTIVE;
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(bcm_dma_is_busy);
|
||||
+
|
||||
+/* Complete an ongoing DMA (assuming its results are to be ignored)
|
||||
+ Does nothing if there is no DMA in progress.
|
||||
+ This routine waits for the current AXI transfer to complete before
|
||||
+ terminating the current DMA. If the current transfer is hung on a DREQ used
|
||||
+ by an uncooperative peripheral the AXI transfer may never complete. In this
|
||||
+ case the routine times out and return a non-zero error code.
|
||||
+ Use of this routine doesn't guarantee that the ongoing or aborted DMA
|
||||
+ does not produce an interrupt.
|
||||
+*/
|
||||
+extern int bcm_dma_abort(void __iomem *dma_chan_base)
|
||||
+{
|
||||
+ unsigned long int cs;
|
||||
+ int rc = 0;
|
||||
+
|
||||
+ cs = readl(dma_chan_base + BCM2708_DMA_CS);
|
||||
+
|
||||
+ if (BCM2708_DMA_ACTIVE & cs) {
|
||||
+ long int timeout = 10000;
|
||||
+
|
||||
+ /* write 0 to the active bit - pause the DMA */
|
||||
+ writel(0, dma_chan_base + BCM2708_DMA_CS);
|
||||
+
|
||||
+ /* wait for any current AXI transfer to complete */
|
||||
+ while (0 != (cs & BCM2708_DMA_ISPAUSED) && --timeout >= 0)
|
||||
+ cs = readl(dma_chan_base + BCM2708_DMA_CS);
|
||||
+
|
||||
+ if (0 != (cs & BCM2708_DMA_ISPAUSED)) {
|
||||
+ /* we'll un-pause when we set of our next DMA */
|
||||
+ rc = -ETIMEDOUT;
|
||||
+
|
||||
+ } else if (BCM2708_DMA_ACTIVE & cs) {
|
||||
+ /* terminate the control block chain */
|
||||
+ writel(0, dma_chan_base + BCM2708_DMA_NEXTCB);
|
||||
+
|
||||
+ /* abort the whole DMA */
|
||||
+ writel(BCM2708_DMA_ABORT | BCM2708_DMA_ACTIVE,
|
||||
+ dma_chan_base + BCM2708_DMA_CS);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(bcm_dma_abort);
|
||||
+
|
||||
+ /* DMA Manager Device Methods */
|
||||
+
|
||||
+static void vc_dmaman_init(struct vc_dmaman *dmaman, void __iomem *dma_base,
|
||||
+ u32 chans_available)
|
||||
+{
|
||||
+ dmaman->dma_base = dma_base;
|
||||
+ dmaman->chan_available = chans_available;
|
||||
+ dmaman->has_feature[BCM_DMA_FEATURE_FAST_ORD] = 0x0c; /* 2 & 3 */
|
||||
+ dmaman->has_feature[BCM_DMA_FEATURE_BULK_ORD] = 0x01; /* 0 */
|
||||
+ dmaman->has_feature[BCM_DMA_FEATURE_NORMAL_ORD] = 0xfe; /* 1 to 7 */
|
||||
+ dmaman->has_feature[BCM_DMA_FEATURE_LITE_ORD] = 0x7f00; /* 8 to 14 */
|
||||
+}
|
||||
+
|
||||
+static int vc_dmaman_chan_alloc(struct vc_dmaman *dmaman,
|
||||
+ unsigned required_feature_set)
|
||||
+{
|
||||
+ u32 chans;
|
||||
+ int chan = 0;
|
||||
+ int feature;
|
||||
+
|
||||
+ chans = dmaman->chan_available;
|
||||
+ for (feature = 0; feature < BCM_DMA_FEATURE_COUNT; feature++)
|
||||
+ /* select the subset of available channels with the desired
|
||||
+ features */
|
||||
+ if (required_feature_set & (1 << feature))
|
||||
+ chans &= dmaman->has_feature[feature];
|
||||
+
|
||||
+ if (!chans)
|
||||
+ return -ENOENT;
|
||||
+
|
||||
+ /* return the ordinal of the first channel in the bitmap */
|
||||
+ while (chans != 0 && (chans & 1) == 0) {
|
||||
+ chans >>= 1;
|
||||
+ chan++;
|
||||
+ }
|
||||
+ /* claim the channel */
|
||||
+ dmaman->chan_available &= ~(1 << chan);
|
||||
+
|
||||
+ return chan;
|
||||
+}
|
||||
+
|
||||
+static int vc_dmaman_chan_free(struct vc_dmaman *dmaman, int chan)
|
||||
+{
|
||||
+ if (chan < 0)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ if ((1 << chan) & dmaman->chan_available)
|
||||
+ return -EIDRM;
|
||||
+
|
||||
+ dmaman->chan_available |= (1 << chan);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+/* DMA Manager Monitor */
|
||||
+
|
||||
+extern int bcm_dma_chan_alloc(unsigned required_feature_set,
|
||||
+ void __iomem **out_dma_base, int *out_dma_irq)
|
||||
+{
|
||||
+ struct vc_dmaman *dmaman = g_dmaman;
|
||||
+ struct platform_device *pdev = to_platform_device(dmaman_dev);
|
||||
+ int chan;
|
||||
+ int irq;
|
||||
+
|
||||
+ if (!dmaman_dev)
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ mutex_lock(&dmaman->lock);
|
||||
+ chan = vc_dmaman_chan_alloc(dmaman, required_feature_set);
|
||||
+ if (chan < 0)
|
||||
+ goto out;
|
||||
+
|
||||
+ irq = platform_get_irq(pdev, (unsigned int)chan);
|
||||
+ if (irq < 0) {
|
||||
+ dev_err(dmaman_dev, "failed to get irq for DMA channel %d\n",
|
||||
+ chan);
|
||||
+ vc_dmaman_chan_free(dmaman, chan);
|
||||
+ chan = -ENOENT;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ *out_dma_base = BCM2708_DMA_CHANIO(dmaman->dma_base, chan);
|
||||
+ *out_dma_irq = irq;
|
||||
+ dev_dbg(dmaman_dev,
|
||||
+ "Legacy API allocated channel=%d, base=%p, irq=%i\n",
|
||||
+ chan, *out_dma_base, *out_dma_irq);
|
||||
+
|
||||
+out:
|
||||
+ mutex_unlock(&dmaman->lock);
|
||||
+
|
||||
+ return chan;
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(bcm_dma_chan_alloc);
|
||||
+
|
||||
+extern int bcm_dma_chan_free(int channel)
|
||||
+{
|
||||
+ struct vc_dmaman *dmaman = g_dmaman;
|
||||
+ int rc;
|
||||
+
|
||||
+ if (!dmaman_dev)
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ mutex_lock(&dmaman->lock);
|
||||
+ rc = vc_dmaman_chan_free(dmaman, channel);
|
||||
+ mutex_unlock(&dmaman->lock);
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(bcm_dma_chan_free);
|
||||
+
|
||||
+int bcm_dmaman_probe(struct platform_device *pdev, void __iomem *base,
|
||||
+ u32 chans_available)
|
||||
+{
|
||||
+ struct device *dev = &pdev->dev;
|
||||
+ struct vc_dmaman *dmaman;
|
||||
+
|
||||
+ dmaman = devm_kzalloc(dev, sizeof(*dmaman), GFP_KERNEL);
|
||||
+ if (!dmaman)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ mutex_init(&dmaman->lock);
|
||||
+ vc_dmaman_init(dmaman, base, chans_available);
|
||||
+ g_dmaman = dmaman;
|
||||
+ dmaman_dev = dev;
|
||||
+
|
||||
+ dev_info(dev, "DMA legacy API manager, dmachans=0x%x\n",
|
||||
+ chans_available);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+EXPORT_SYMBOL(bcm_dmaman_probe);
|
||||
+
|
||||
+int bcm_dmaman_remove(struct platform_device *pdev)
|
||||
+{
|
||||
+ dmaman_dev = NULL;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+EXPORT_SYMBOL(bcm_dmaman_remove);
|
||||
+
|
||||
+MODULE_LICENSE("GPL");
|
||||
--- /dev/null
|
||||
+++ b/include/linux/platform_data/dma-bcm2708.h
|
||||
@@ -0,0 +1,143 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2010 Broadcom
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License version 2 as
|
||||
+ * published by the Free Software Foundation.
|
||||
+ */
|
||||
+
|
||||
+#ifndef _PLAT_BCM2708_DMA_H
|
||||
+#define _PLAT_BCM2708_DMA_H
|
||||
+
|
||||
+/* DMA CS Control and Status bits */
|
||||
+#define BCM2708_DMA_ACTIVE BIT(0)
|
||||
+#define BCM2708_DMA_INT BIT(2)
|
||||
+#define BCM2708_DMA_ISPAUSED BIT(4) /* Pause requested or not active */
|
||||
+#define BCM2708_DMA_ISHELD BIT(5) /* Is held by DREQ flow control */
|
||||
+#define BCM2708_DMA_ERR BIT(8)
|
||||
+#define BCM2708_DMA_ABORT BIT(30) /* stop current CB, go to next, WO */
|
||||
+#define BCM2708_DMA_RESET BIT(31) /* WO, self clearing */
|
||||
+
|
||||
+/* DMA control block "info" field bits */
|
||||
+#define BCM2708_DMA_INT_EN BIT(0)
|
||||
+#define BCM2708_DMA_TDMODE BIT(1)
|
||||
+#define BCM2708_DMA_WAIT_RESP BIT(3)
|
||||
+#define BCM2708_DMA_D_INC BIT(4)
|
||||
+#define BCM2708_DMA_D_WIDTH BIT(5)
|
||||
+#define BCM2708_DMA_D_DREQ BIT(6)
|
||||
+#define BCM2708_DMA_S_INC BIT(8)
|
||||
+#define BCM2708_DMA_S_WIDTH BIT(9)
|
||||
+#define BCM2708_DMA_S_DREQ BIT(10)
|
||||
+
|
||||
+#define BCM2708_DMA_BURST(x) (((x) & 0xf) << 12)
|
||||
+#define BCM2708_DMA_PER_MAP(x) ((x) << 16)
|
||||
+#define BCM2708_DMA_WAITS(x) (((x) & 0x1f) << 21)
|
||||
+
|
||||
+#define BCM2708_DMA_DREQ_EMMC 11
|
||||
+#define BCM2708_DMA_DREQ_SDHOST 13
|
||||
+
|
||||
+#define BCM2708_DMA_CS 0x00 /* Control and Status */
|
||||
+#define BCM2708_DMA_ADDR 0x04
|
||||
+/* the current control block appears in the following registers - read only */
|
||||
+#define BCM2708_DMA_INFO 0x08
|
||||
+#define BCM2708_DMA_SOURCE_AD 0x0c
|
||||
+#define BCM2708_DMA_DEST_AD 0x10
|
||||
+#define BCM2708_DMA_NEXTCB 0x1C
|
||||
+#define BCM2708_DMA_DEBUG 0x20
|
||||
+
|
||||
+#define BCM2708_DMA4_CS (BCM2708_DMA_CHAN(4) + BCM2708_DMA_CS)
|
||||
+#define BCM2708_DMA4_ADDR (BCM2708_DMA_CHAN(4) + BCM2708_DMA_ADDR)
|
||||
+
|
||||
+#define BCM2708_DMA_TDMODE_LEN(w, h) ((h) << 16 | (w))
|
||||
+
|
||||
+/* When listing features we can ask for when allocating DMA channels give
|
||||
+ those with higher priority smaller ordinal numbers */
|
||||
+#define BCM_DMA_FEATURE_FAST_ORD 0
|
||||
+#define BCM_DMA_FEATURE_BULK_ORD 1
|
||||
+#define BCM_DMA_FEATURE_NORMAL_ORD 2
|
||||
+#define BCM_DMA_FEATURE_LITE_ORD 3
|
||||
+#define BCM_DMA_FEATURE_FAST BIT(BCM_DMA_FEATURE_FAST_ORD)
|
||||
+#define BCM_DMA_FEATURE_BULK BIT(BCM_DMA_FEATURE_BULK_ORD)
|
||||
+#define BCM_DMA_FEATURE_NORMAL BIT(BCM_DMA_FEATURE_NORMAL_ORD)
|
||||
+#define BCM_DMA_FEATURE_LITE BIT(BCM_DMA_FEATURE_LITE_ORD)
|
||||
+#define BCM_DMA_FEATURE_COUNT 4
|
||||
+
|
||||
+struct bcm2708_dma_cb {
|
||||
+ u32 info;
|
||||
+ u32 src;
|
||||
+ u32 dst;
|
||||
+ u32 length;
|
||||
+ u32 stride;
|
||||
+ u32 next;
|
||||
+ u32 pad[2];
|
||||
+};
|
||||
+
|
||||
+struct scatterlist;
|
||||
+struct platform_device;
|
||||
+
|
||||
+#if defined(CONFIG_DMA_BCM2708) || defined(CONFIG_DMA_BCM2708_MODULE)
|
||||
+
|
||||
+int bcm_sg_suitable_for_dma(struct scatterlist *sg_ptr, int sg_len);
|
||||
+void bcm_dma_start(void __iomem *dma_chan_base, dma_addr_t control_block);
|
||||
+void bcm_dma_wait_idle(void __iomem *dma_chan_base);
|
||||
+bool bcm_dma_is_busy(void __iomem *dma_chan_base);
|
||||
+int bcm_dma_abort(void __iomem *dma_chan_base);
|
||||
+
|
||||
+/* return channel no or -ve error */
|
||||
+int bcm_dma_chan_alloc(unsigned preferred_feature_set,
|
||||
+ void __iomem **out_dma_base, int *out_dma_irq);
|
||||
+int bcm_dma_chan_free(int channel);
|
||||
+
|
||||
+int bcm_dmaman_probe(struct platform_device *pdev, void __iomem *base,
|
||||
+ u32 chans_available);
|
||||
+int bcm_dmaman_remove(struct platform_device *pdev);
|
||||
+
|
||||
+#else /* CONFIG_DMA_BCM2708 */
|
||||
+
|
||||
+static inline int bcm_sg_suitable_for_dma(struct scatterlist *sg_ptr,
|
||||
+ int sg_len)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static inline void bcm_dma_start(void __iomem *dma_chan_base,
|
||||
+ dma_addr_t control_block) { }
|
||||
+
|
||||
+static inline void bcm_dma_wait_idle(void __iomem *dma_chan_base) { }
|
||||
+
|
||||
+static inline bool bcm_dma_is_busy(void __iomem *dma_chan_base)
|
||||
+{
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
+static inline int bcm_dma_abort(void __iomem *dma_chan_base)
|
||||
+{
|
||||
+ return -EINVAL;
|
||||
+}
|
||||
+
|
||||
+static inline int bcm_dma_chan_alloc(unsigned preferred_feature_set,
|
||||
+ void __iomem **out_dma_base,
|
||||
+ int *out_dma_irq)
|
||||
+{
|
||||
+ return -EINVAL;
|
||||
+}
|
||||
+
|
||||
+static inline int bcm_dma_chan_free(int channel)
|
||||
+{
|
||||
+ return -EINVAL;
|
||||
+}
|
||||
+
|
||||
+static inline int bcm_dmaman_probe(struct platform_device *pdev,
|
||||
+ void __iomem *base, u32 chans_available)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static inline int bcm_dmaman_remove(struct platform_device *pdev)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+#endif /* CONFIG_DMA_BCM2708 || CONFIG_DMA_BCM2708_MODULE */
|
||||
+
|
||||
+#endif /* _PLAT_BCM2708_DMA_H */
|
File diff suppressed because it is too large
Load diff
|
@ -1,34 +0,0 @@
|
|||
From 1d93086aea536ea7025cae7fa370c9c95faafe2e Mon Sep 17 00:00:00 2001
|
||||
From: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
Date: Mon, 16 May 2022 10:28:27 +0100
|
||||
Subject: [PATCH 058/697] mmc: block: Don't do single-sector reads during
|
||||
recovery
|
||||
|
||||
See https://github.com/raspberrypi/linux/issues/5019
|
||||
|
||||
If an SD card has degraded performance such that IO operations time out
|
||||
then the MMC block layer will leak SG DMA mappings in the swiotlb during
|
||||
recovery. It retries the same SG and this causes the leak, as it is
|
||||
mapped twice - once in sdhci_pre_req() and again during single-block
|
||||
reads in sdhci_prepare_data().
|
||||
|
||||
Resetting the card (including power-cycling if a regulator for vmmc is
|
||||
present) ought to be enough to recover a stuck state, so for now don't
|
||||
try single-block reads in the recovery path.
|
||||
|
||||
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
---
|
||||
drivers/mmc/core/block.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/mmc/core/block.c
|
||||
+++ b/drivers/mmc/core/block.c
|
||||
@@ -2011,7 +2011,7 @@ static void mmc_blk_mq_rw_recovery(struc
|
||||
return;
|
||||
}
|
||||
|
||||
- if (rq_data_dir(req) == READ && brq->data.blocks >
|
||||
+ if (0 && rq_data_dir(req) == READ && brq->data.blocks >
|
||||
queue_physical_block_size(mq->queue) >> 9) {
|
||||
/* Read one (native) sector at a time */
|
||||
mmc_blk_read_single(mq, req);
|
File diff suppressed because it is too large
Load diff
|
@ -1,771 +0,0 @@
|
|||
From 29d4966c087ed60cf8423ae91b2055b954a8ec42 Mon Sep 17 00:00:00 2001
|
||||
From: popcornmix <popcornmix@gmail.com>
|
||||
Date: Fri, 28 Oct 2016 15:36:43 +0100
|
||||
Subject: [PATCH 060/697] vc_mem: Add vc_mem driver for querying firmware
|
||||
memory addresses
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: popcornmix <popcornmix@gmail.com>
|
||||
|
||||
BCM270x: Move vc_mem
|
||||
|
||||
Make the vc_mem module available for ARCH_BCM2835 by moving it.
|
||||
|
||||
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
||||
|
||||
char: vc_mem: Fix up compat ioctls for 64bit kernel
|
||||
|
||||
compat_ioctl wasn't defined, so 32bit user/64bit kernel
|
||||
always failed.
|
||||
VC_MEM_IOC_MEM_PHYS_ADDR was defined with parameter size
|
||||
unsigned long, so the ioctl cmd changes between sizes.
|
||||
|
||||
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
|
||||
char: vc_mem: Fix all coding style issues.
|
||||
|
||||
Cleans up all checkpatch errors in vc_mem.c and vc_mem.h
|
||||
No functional change to the code.
|
||||
|
||||
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
|
||||
char: vc_mem: Delete dead code
|
||||
|
||||
There are no error exists once device_create has succeeded, and
|
||||
therefore no need to call device_destroy from vc_mem_init.
|
||||
|
||||
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
|
||||
char: broadcom: vc_mem: Fix preprocessor conditional
|
||||
|
||||
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
|
||||
|
||||
vc_mem: Add the DMA memcpy support from bcm2708_fb
|
||||
|
||||
bcm2708_fb is disabled by the vc4-kms-v3d overlay, which means that the
|
||||
DMA memcpy support it provides is not available to allow vclog to read
|
||||
the VC logs from the top 16MB on Pi 2 and Pi 3. Add the code to the
|
||||
vc_mem driver, which will still be enabled.
|
||||
|
||||
It ought to be possible to do a proper DMA_MEM_TO_MEM copy via the
|
||||
generic DMA customer API, but that can be a later step.
|
||||
|
||||
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
---
|
||||
drivers/char/broadcom/Kconfig | 18 +
|
||||
drivers/char/broadcom/Makefile | 1 +
|
||||
drivers/char/broadcom/vc_mem.c | 635 ++++++++++++++++++++++++++++++++
|
||||
include/linux/broadcom/vc_mem.h | 39 ++
|
||||
4 files changed, 693 insertions(+)
|
||||
create mode 100644 drivers/char/broadcom/Kconfig
|
||||
create mode 100644 drivers/char/broadcom/Makefile
|
||||
create mode 100644 drivers/char/broadcom/vc_mem.c
|
||||
create mode 100644 include/linux/broadcom/vc_mem.h
|
||||
|
||||
--- /dev/null
|
||||
+++ b/drivers/char/broadcom/Kconfig
|
||||
@@ -0,0 +1,18 @@
|
||||
+#
|
||||
+# Broadcom char driver config
|
||||
+#
|
||||
+
|
||||
+menuconfig BRCM_CHAR_DRIVERS
|
||||
+ bool "Broadcom Char Drivers"
|
||||
+ help
|
||||
+ Broadcom's char drivers
|
||||
+
|
||||
+if BRCM_CHAR_DRIVERS
|
||||
+
|
||||
+config BCM2708_VCMEM
|
||||
+ bool "Videocore Memory"
|
||||
+ default y
|
||||
+ help
|
||||
+ Helper for videocore memory access and total size allocation.
|
||||
+
|
||||
+endif
|
||||
--- /dev/null
|
||||
+++ b/drivers/char/broadcom/Makefile
|
||||
@@ -0,0 +1 @@
|
||||
+obj-$(CONFIG_BCM2708_VCMEM) += vc_mem.o
|
||||
--- /dev/null
|
||||
+++ b/drivers/char/broadcom/vc_mem.c
|
||||
@@ -0,0 +1,635 @@
|
||||
+/*
|
||||
+ * Copyright 2010 - 2011 Broadcom Corporation. All rights reserved.
|
||||
+ *
|
||||
+ * Unless you and Broadcom execute a separate written software license
|
||||
+ * agreement governing use of this software, this software is licensed to you
|
||||
+ * under the terms of the GNU General Public License version 2, available at
|
||||
+ * http://www.broadcom.com/licenses/GPLv2.php (the "GPL").
|
||||
+ *
|
||||
+ * Notwithstanding the above, under no circumstances may you combine this
|
||||
+ * software in any way with any other Broadcom software provided under a
|
||||
+ * license other than the GPL, without Broadcom's express prior written
|
||||
+ * consent.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/fs.h>
|
||||
+#include <linux/device.h>
|
||||
+#include <linux/cdev.h>
|
||||
+#include <linux/mm.h>
|
||||
+#include <linux/slab.h>
|
||||
+#include <linux/debugfs.h>
|
||||
+#include <linux/uaccess.h>
|
||||
+#include <linux/dma-mapping.h>
|
||||
+#include <linux/broadcom/vc_mem.h>
|
||||
+#include <linux/compat.h>
|
||||
+#include <linux/of.h>
|
||||
+#include <linux/of_platform.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/platform_data/dma-bcm2708.h>
|
||||
+#include <soc/bcm2835/raspberrypi-firmware.h>
|
||||
+
|
||||
+#define DRIVER_NAME "vc-mem"
|
||||
+
|
||||
+/* N.B. These use a different magic value for compatibility with bmc7208_fb */
|
||||
+#define VC_MEM_IOC_DMACOPY _IOW('z', 0x22, struct vc_mem_dmacopy)
|
||||
+#define VC_MEM_IOC_DMACOPY32 _IOW('z', 0x22, struct vc_mem_dmacopy32)
|
||||
+
|
||||
+/* address with no aliases */
|
||||
+#define INTALIAS_NORMAL(x) ((x) & ~0xc0000000)
|
||||
+/* cache coherent but non-allocating in L1 and L2 */
|
||||
+#define INTALIAS_L1L2_NONALLOCATING(x) (((x) & ~0xc0000000) | 0x80000000)
|
||||
+
|
||||
+/* Device (/dev) related variables */
|
||||
+static dev_t vc_mem_devnum;
|
||||
+static struct class *vc_mem_class;
|
||||
+static struct cdev vc_mem_cdev;
|
||||
+static int vc_mem_inited;
|
||||
+
|
||||
+#ifdef CONFIG_DEBUG_FS
|
||||
+static struct dentry *vc_mem_debugfs_entry;
|
||||
+#endif
|
||||
+
|
||||
+struct vc_mem_dmacopy {
|
||||
+ void *dst;
|
||||
+ __u32 src;
|
||||
+ __u32 length;
|
||||
+};
|
||||
+
|
||||
+#ifdef CONFIG_COMPAT
|
||||
+struct vc_mem_dmacopy32 {
|
||||
+ compat_uptr_t dst;
|
||||
+ __u32 src;
|
||||
+ __u32 length;
|
||||
+};
|
||||
+#endif
|
||||
+
|
||||
+/*
|
||||
+ * Videocore memory addresses and size
|
||||
+ *
|
||||
+ * Drivers that wish to know the videocore memory addresses and sizes should
|
||||
+ * use these variables instead of the MM_IO_BASE and MM_ADDR_IO defines in
|
||||
+ * headers. This allows the other drivers to not be tied down to a a certain
|
||||
+ * address/size at compile time.
|
||||
+ *
|
||||
+ * In the future, the goal is to have the videocore memory virtual address and
|
||||
+ * size be calculated at boot time rather than at compile time. The decision of
|
||||
+ * where the videocore memory resides and its size would be in the hands of the
|
||||
+ * bootloader (and/or kernel). When that happens, the values of these variables
|
||||
+ * would be calculated and assigned in the init function.
|
||||
+ */
|
||||
+/* In the 2835 VC in mapped above ARM, but ARM has full access to VC space */
|
||||
+unsigned long mm_vc_mem_phys_addr;
|
||||
+EXPORT_SYMBOL(mm_vc_mem_phys_addr);
|
||||
+unsigned int mm_vc_mem_size;
|
||||
+EXPORT_SYMBOL(mm_vc_mem_size);
|
||||
+unsigned int mm_vc_mem_base;
|
||||
+EXPORT_SYMBOL(mm_vc_mem_base);
|
||||
+
|
||||
+static uint phys_addr;
|
||||
+static uint mem_size;
|
||||
+static uint mem_base;
|
||||
+
|
||||
+struct vc_mem_dma {
|
||||
+ struct device *dev;
|
||||
+ int dma_chan;
|
||||
+ int dma_irq;
|
||||
+ void __iomem *dma_chan_base;
|
||||
+ wait_queue_head_t dma_waitq;
|
||||
+ void *cb_base; /* DMA control blocks */
|
||||
+ dma_addr_t cb_handle;
|
||||
+};
|
||||
+
|
||||
+struct { u32 base, length; } gpu_mem;
|
||||
+static struct mutex dma_mutex;
|
||||
+static struct vc_mem_dma vc_mem_dma;
|
||||
+
|
||||
+static int
|
||||
+vc_mem_open(struct inode *inode, struct file *file)
|
||||
+{
|
||||
+ (void)inode;
|
||||
+
|
||||
+ pr_debug("%s: called file = 0x%p\n", __func__, file);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+vc_mem_release(struct inode *inode, struct file *file)
|
||||
+{
|
||||
+ (void)inode;
|
||||
+
|
||||
+ pr_debug("%s: called file = 0x%p\n", __func__, file);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+vc_mem_get_size(void)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+vc_mem_get_base(void)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+vc_mem_get_current_size(void)
|
||||
+{
|
||||
+ return mm_vc_mem_size;
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(vc_mem_get_current_size);
|
||||
+
|
||||
+static int
|
||||
+vc_mem_dma_init(void)
|
||||
+{
|
||||
+ struct vc_mem_dma *vcdma = &vc_mem_dma;
|
||||
+ struct platform_device *pdev;
|
||||
+ struct device_node *fwnode;
|
||||
+ struct rpi_firmware *fw;
|
||||
+ struct device *dev;
|
||||
+ u32 revision;
|
||||
+ int rc;
|
||||
+
|
||||
+ if (vcdma->dev)
|
||||
+ return 0;
|
||||
+
|
||||
+ fwnode = of_find_node_by_path("/system");
|
||||
+ rc = of_property_read_u32(fwnode, "linux,revision", &revision);
|
||||
+ revision = (revision >> 12) & 0xf;
|
||||
+ if (revision != 1 && revision != 2) {
|
||||
+ /* Only BCM2709 and BCM2710 may have logs where the ARMs
|
||||
+ * can't see them.
|
||||
+ */
|
||||
+ return -ENXIO;
|
||||
+ }
|
||||
+
|
||||
+ fwnode = rpi_firmware_find_node();
|
||||
+ if (!fwnode)
|
||||
+ return -ENXIO;
|
||||
+
|
||||
+ pdev = of_find_device_by_node(fwnode);
|
||||
+ dev = &pdev->dev;
|
||||
+
|
||||
+ rc = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(32));
|
||||
+ if (rc)
|
||||
+ return rc;
|
||||
+
|
||||
+ fw = rpi_firmware_get(fwnode);
|
||||
+ if (!fw)
|
||||
+ return -ENXIO;
|
||||
+ rc = rpi_firmware_property(fw, RPI_FIRMWARE_GET_VC_MEMORY,
|
||||
+ &gpu_mem, sizeof(gpu_mem));
|
||||
+ if (rc)
|
||||
+ return rc;
|
||||
+
|
||||
+ gpu_mem.base = INTALIAS_NORMAL(gpu_mem.base);
|
||||
+
|
||||
+ if (!gpu_mem.base || !gpu_mem.length) {
|
||||
+ dev_err(dev, "%s: unable to determine gpu memory (%x,%x)\n",
|
||||
+ __func__, gpu_mem.base, gpu_mem.length);
|
||||
+ return -EFAULT;
|
||||
+ }
|
||||
+
|
||||
+ vcdma->cb_base = dma_alloc_wc(dev, SZ_4K, &vcdma->cb_handle, GFP_KERNEL);
|
||||
+ if (!vcdma->cb_base) {
|
||||
+ dev_err(dev, "failed to allocate DMA CBs\n");
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+
|
||||
+ rc = bcm_dma_chan_alloc(BCM_DMA_FEATURE_BULK,
|
||||
+ &vcdma->dma_chan_base,
|
||||
+ &vcdma->dma_irq);
|
||||
+ if (rc < 0) {
|
||||
+ dev_err(dev, "failed to allocate a DMA channel\n");
|
||||
+ goto free_cb;
|
||||
+ }
|
||||
+
|
||||
+ vcdma->dma_chan = rc;
|
||||
+
|
||||
+ init_waitqueue_head(&vcdma->dma_waitq);
|
||||
+
|
||||
+ vcdma->dev = dev;
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+free_cb:
|
||||
+ dma_free_wc(dev, SZ_4K, vcdma->cb_base, vcdma->cb_handle);
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+vc_mem_dma_uninit(void)
|
||||
+{
|
||||
+ struct vc_mem_dma *vcdma = &vc_mem_dma;
|
||||
+
|
||||
+ if (vcdma->dev) {
|
||||
+ bcm_dma_chan_free(vcdma->dma_chan);
|
||||
+ dma_free_wc(vcdma->dev, SZ_4K, vcdma->cb_base, vcdma->cb_handle);
|
||||
+ vcdma->dev = NULL;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static int dma_memcpy(struct vc_mem_dma *vcdma, dma_addr_t dst, dma_addr_t src,
|
||||
+ int size)
|
||||
+{
|
||||
+ struct bcm2708_dma_cb *cb = vcdma->cb_base;
|
||||
+ int burst_size = (vcdma->dma_chan == 0) ? 8 : 2;
|
||||
+
|
||||
+ cb->info = BCM2708_DMA_BURST(burst_size) | BCM2708_DMA_S_WIDTH |
|
||||
+ BCM2708_DMA_S_INC | BCM2708_DMA_D_WIDTH |
|
||||
+ BCM2708_DMA_D_INC;
|
||||
+ cb->dst = dst;
|
||||
+ cb->src = src;
|
||||
+ cb->length = size;
|
||||
+ cb->stride = 0;
|
||||
+ cb->pad[0] = 0;
|
||||
+ cb->pad[1] = 0;
|
||||
+ cb->next = 0;
|
||||
+
|
||||
+ bcm_dma_start(vcdma->dma_chan_base, vcdma->cb_handle);
|
||||
+ bcm_dma_wait_idle(vcdma->dma_chan_base);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static long vc_mem_copy(struct vc_mem_dmacopy *ioparam)
|
||||
+{
|
||||
+ struct vc_mem_dma *vcdma = &vc_mem_dma;
|
||||
+ size_t size = PAGE_SIZE;
|
||||
+ const u32 dma_xfer_chunk = 256;
|
||||
+ u32 *buf = NULL;
|
||||
+ dma_addr_t bus_addr;
|
||||
+ long rc = 0;
|
||||
+ size_t offset;
|
||||
+
|
||||
+ /* restrict this to root user */
|
||||
+ if (!uid_eq(current_euid(), GLOBAL_ROOT_UID))
|
||||
+ return -EFAULT;
|
||||
+
|
||||
+ if (mutex_lock_interruptible(&dma_mutex))
|
||||
+ return -EINTR;
|
||||
+
|
||||
+ rc = vc_mem_dma_init();
|
||||
+ if (rc)
|
||||
+ goto out;
|
||||
+
|
||||
+ vcdma = &vc_mem_dma;
|
||||
+
|
||||
+ if (INTALIAS_NORMAL(ioparam->src) < gpu_mem.base ||
|
||||
+ INTALIAS_NORMAL(ioparam->src) >= gpu_mem.base + gpu_mem.length) {
|
||||
+ pr_err("%s: invalid memory access %x (%x-%x)", __func__,
|
||||
+ INTALIAS_NORMAL(ioparam->src), gpu_mem.base,
|
||||
+ gpu_mem.base + gpu_mem.length);
|
||||
+ rc = -EFAULT;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ buf = dma_alloc_coherent(vcdma->dev, PAGE_ALIGN(size), &bus_addr,
|
||||
+ GFP_ATOMIC);
|
||||
+ if (!buf) {
|
||||
+ rc = -ENOMEM;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ for (offset = 0; offset < ioparam->length; offset += size) {
|
||||
+ size_t remaining = ioparam->length - offset;
|
||||
+ size_t s = min(size, remaining);
|
||||
+ u8 *p = (u8 *)((uintptr_t)ioparam->src + offset);
|
||||
+ u8 *q = (u8 *)ioparam->dst + offset;
|
||||
+
|
||||
+ rc = dma_memcpy(vcdma, bus_addr,
|
||||
+ INTALIAS_L1L2_NONALLOCATING((u32)(uintptr_t)p),
|
||||
+ (s + dma_xfer_chunk - 1) & ~(dma_xfer_chunk - 1));
|
||||
+ if (rc) {
|
||||
+ dev_err(vcdma->dev, "dma_memcpy failed\n");
|
||||
+ break;
|
||||
+ }
|
||||
+ if (copy_to_user(q, buf, s) != 0) {
|
||||
+ pr_err("%s: copy_to_user failed\n", __func__);
|
||||
+ rc = -EFAULT;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+out:
|
||||
+ if (buf)
|
||||
+ dma_free_coherent(vcdma->dev, PAGE_ALIGN(size), buf,
|
||||
+ bus_addr);
|
||||
+
|
||||
+ mutex_unlock(&dma_mutex);
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
+
|
||||
+static long
|
||||
+vc_mem_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
||||
+{
|
||||
+ int rc = 0;
|
||||
+
|
||||
+ (void) cmd;
|
||||
+ (void) arg;
|
||||
+
|
||||
+ pr_debug("%s: called file = 0x%p, cmd %08x\n", __func__, file, cmd);
|
||||
+
|
||||
+ switch (cmd) {
|
||||
+ case VC_MEM_IOC_MEM_PHYS_ADDR:
|
||||
+ {
|
||||
+ pr_debug("%s: VC_MEM_IOC_MEM_PHYS_ADDR=0x%p\n",
|
||||
+ __func__, (void *)mm_vc_mem_phys_addr);
|
||||
+
|
||||
+ if (copy_to_user((void *)arg, &mm_vc_mem_phys_addr,
|
||||
+ sizeof(mm_vc_mem_phys_addr))) {
|
||||
+ rc = -EFAULT;
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
+ case VC_MEM_IOC_MEM_SIZE:
|
||||
+ {
|
||||
+ /* Get the videocore memory size first */
|
||||
+ vc_mem_get_size();
|
||||
+
|
||||
+ pr_debug("%s: VC_MEM_IOC_MEM_SIZE=%x\n", __func__,
|
||||
+ mm_vc_mem_size);
|
||||
+
|
||||
+ if (copy_to_user((void *)arg, &mm_vc_mem_size,
|
||||
+ sizeof(mm_vc_mem_size))) {
|
||||
+ rc = -EFAULT;
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
+ case VC_MEM_IOC_MEM_BASE:
|
||||
+ {
|
||||
+ /* Get the videocore memory base */
|
||||
+ vc_mem_get_base();
|
||||
+
|
||||
+ pr_debug("%s: VC_MEM_IOC_MEM_BASE=%x\n", __func__,
|
||||
+ mm_vc_mem_base);
|
||||
+
|
||||
+ if (copy_to_user((void *)arg, &mm_vc_mem_base,
|
||||
+ sizeof(mm_vc_mem_base))) {
|
||||
+ rc = -EFAULT;
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
+ case VC_MEM_IOC_MEM_LOAD:
|
||||
+ {
|
||||
+ /* Get the videocore memory base */
|
||||
+ vc_mem_get_base();
|
||||
+
|
||||
+ pr_debug("%s: VC_MEM_IOC_MEM_LOAD=%x\n", __func__,
|
||||
+ mm_vc_mem_base);
|
||||
+
|
||||
+ if (copy_to_user((void *)arg, &mm_vc_mem_base,
|
||||
+ sizeof(mm_vc_mem_base))) {
|
||||
+ rc = -EFAULT;
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
+ case VC_MEM_IOC_DMACOPY:
|
||||
+ {
|
||||
+ struct vc_mem_dmacopy ioparam;
|
||||
+ /* Get the parameter data.
|
||||
+ */
|
||||
+ if (copy_from_user
|
||||
+ (&ioparam, (void *)arg, sizeof(ioparam))) {
|
||||
+ pr_err("%s: copy_from_user failed\n", __func__);
|
||||
+ rc = -EFAULT;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ rc = vc_mem_copy(&ioparam);
|
||||
+ break;
|
||||
+ }
|
||||
+ default:
|
||||
+ {
|
||||
+ return -ENOTTY;
|
||||
+ }
|
||||
+ }
|
||||
+ pr_debug("%s: file = 0x%p returning %d\n", __func__, file, rc);
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
+
|
||||
+#ifdef CONFIG_COMPAT
|
||||
+static long
|
||||
+vc_mem_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
||||
+{
|
||||
+ int rc = 0;
|
||||
+
|
||||
+ switch (cmd) {
|
||||
+ case VC_MEM_IOC_MEM_PHYS_ADDR32:
|
||||
+ pr_debug("%s: VC_MEM_IOC_MEM_PHYS_ADDR32=0x%p\n",
|
||||
+ __func__, (void *)mm_vc_mem_phys_addr);
|
||||
+
|
||||
+ /* This isn't correct, but will cover us for now as
|
||||
+ * VideoCore is 32bit only.
|
||||
+ */
|
||||
+ if (copy_to_user((void *)arg, &mm_vc_mem_phys_addr,
|
||||
+ sizeof(compat_ulong_t)))
|
||||
+ rc = -EFAULT;
|
||||
+
|
||||
+ break;
|
||||
+
|
||||
+ case VC_MEM_IOC_DMACOPY32:
|
||||
+ {
|
||||
+ struct vc_mem_dmacopy32 param32;
|
||||
+ struct vc_mem_dmacopy param;
|
||||
+ /* Get the parameter data.
|
||||
+ */
|
||||
+ if (copy_from_user(¶m32, (void *)arg, sizeof(param32))) {
|
||||
+ pr_err("%s: copy_from_user failed\n", __func__);
|
||||
+ rc = -EFAULT;
|
||||
+ break;
|
||||
+ }
|
||||
+ param.dst = compat_ptr(param32.dst);
|
||||
+ param.src = param32.src;
|
||||
+ param.length = param32.length;
|
||||
+ rc = vc_mem_copy(¶m);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ default:
|
||||
+ rc = vc_mem_ioctl(file, cmd, arg);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+static int
|
||||
+vc_mem_mmap(struct file *filp, struct vm_area_struct *vma)
|
||||
+{
|
||||
+ int rc = 0;
|
||||
+ unsigned long length = vma->vm_end - vma->vm_start;
|
||||
+ unsigned long offset = vma->vm_pgoff << PAGE_SHIFT;
|
||||
+
|
||||
+ pr_debug("%s: vm_start = 0x%08lx vm_end = 0x%08lx vm_pgoff = 0x%08lx\n",
|
||||
+ __func__, (long)vma->vm_start, (long)vma->vm_end,
|
||||
+ (long)vma->vm_pgoff);
|
||||
+
|
||||
+ if (offset + length > mm_vc_mem_size) {
|
||||
+ pr_err("%s: length %ld is too big\n", __func__, length);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+ /* Do not cache the memory map */
|
||||
+ vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
|
||||
+
|
||||
+ rc = remap_pfn_range(vma, vma->vm_start,
|
||||
+ (mm_vc_mem_phys_addr >> PAGE_SHIFT) +
|
||||
+ vma->vm_pgoff, length, vma->vm_page_prot);
|
||||
+ if (rc)
|
||||
+ pr_err("%s: remap_pfn_range failed (rc=%d)\n", __func__, rc);
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
+
|
||||
+/* File Operations for the driver. */
|
||||
+static const struct file_operations vc_mem_fops = {
|
||||
+ .owner = THIS_MODULE,
|
||||
+ .open = vc_mem_open,
|
||||
+ .release = vc_mem_release,
|
||||
+ .unlocked_ioctl = vc_mem_ioctl,
|
||||
+#ifdef CONFIG_COMPAT
|
||||
+ .compat_ioctl = vc_mem_compat_ioctl,
|
||||
+#endif
|
||||
+ .mmap = vc_mem_mmap,
|
||||
+};
|
||||
+
|
||||
+#ifdef CONFIG_DEBUG_FS
|
||||
+static void vc_mem_debugfs_deinit(void)
|
||||
+{
|
||||
+ debugfs_remove_recursive(vc_mem_debugfs_entry);
|
||||
+ vc_mem_debugfs_entry = NULL;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int vc_mem_debugfs_init(
|
||||
+ struct device *dev)
|
||||
+{
|
||||
+ vc_mem_debugfs_entry = debugfs_create_dir(DRIVER_NAME, NULL);
|
||||
+ if (!vc_mem_debugfs_entry) {
|
||||
+ dev_warn(dev, "could not create debugfs entry\n");
|
||||
+ return -EFAULT;
|
||||
+ }
|
||||
+
|
||||
+ debugfs_create_x32("vc_mem_phys_addr",
|
||||
+ 0444,
|
||||
+ vc_mem_debugfs_entry,
|
||||
+ (u32 *)&mm_vc_mem_phys_addr);
|
||||
+ debugfs_create_x32("vc_mem_size",
|
||||
+ 0444,
|
||||
+ vc_mem_debugfs_entry,
|
||||
+ (u32 *)&mm_vc_mem_size);
|
||||
+ debugfs_create_x32("vc_mem_base",
|
||||
+ 0444,
|
||||
+ vc_mem_debugfs_entry,
|
||||
+ (u32 *)&mm_vc_mem_base);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+#endif /* CONFIG_DEBUG_FS */
|
||||
+
|
||||
+/* Module load/unload functions */
|
||||
+
|
||||
+static int __init
|
||||
+vc_mem_init(void)
|
||||
+{
|
||||
+ int rc = -EFAULT;
|
||||
+ struct device *dev;
|
||||
+
|
||||
+ pr_debug("%s: called\n", __func__);
|
||||
+
|
||||
+ mm_vc_mem_phys_addr = phys_addr;
|
||||
+ mm_vc_mem_size = mem_size;
|
||||
+ mm_vc_mem_base = mem_base;
|
||||
+
|
||||
+ vc_mem_get_size();
|
||||
+
|
||||
+ pr_info("vc-mem: phys_addr:0x%08lx mem_base=0x%08x mem_size:0x%08x(%u MiB)\n",
|
||||
+ mm_vc_mem_phys_addr, mm_vc_mem_base, mm_vc_mem_size,
|
||||
+ mm_vc_mem_size / (1024 * 1024));
|
||||
+
|
||||
+ rc = alloc_chrdev_region(&vc_mem_devnum, 0, 1, DRIVER_NAME);
|
||||
+ if (rc < 0) {
|
||||
+ pr_err("%s: alloc_chrdev_region failed (rc=%d)\n",
|
||||
+ __func__, rc);
|
||||
+ goto out_err;
|
||||
+ }
|
||||
+
|
||||
+ cdev_init(&vc_mem_cdev, &vc_mem_fops);
|
||||
+ rc = cdev_add(&vc_mem_cdev, vc_mem_devnum, 1);
|
||||
+ if (rc) {
|
||||
+ pr_err("%s: cdev_add failed (rc=%d)\n", __func__, rc);
|
||||
+ goto out_unregister;
|
||||
+ }
|
||||
+
|
||||
+ vc_mem_class = class_create(DRIVER_NAME);
|
||||
+ if (IS_ERR(vc_mem_class)) {
|
||||
+ rc = PTR_ERR(vc_mem_class);
|
||||
+ pr_err("%s: class_create failed (rc=%d)\n", __func__, rc);
|
||||
+ goto out_cdev_del;
|
||||
+ }
|
||||
+
|
||||
+ dev = device_create(vc_mem_class, NULL, vc_mem_devnum, NULL,
|
||||
+ DRIVER_NAME);
|
||||
+ if (IS_ERR(dev)) {
|
||||
+ rc = PTR_ERR(dev);
|
||||
+ pr_err("%s: device_create failed (rc=%d)\n", __func__, rc);
|
||||
+ goto out_class_destroy;
|
||||
+ }
|
||||
+
|
||||
+#ifdef CONFIG_DEBUG_FS
|
||||
+ /* don't fail if the debug entries cannot be created */
|
||||
+ vc_mem_debugfs_init(dev);
|
||||
+#endif
|
||||
+
|
||||
+ mutex_init(&dma_mutex);
|
||||
+ vc_mem_inited = 1;
|
||||
+ return 0;
|
||||
+
|
||||
+out_class_destroy:
|
||||
+ class_destroy(vc_mem_class);
|
||||
+ vc_mem_class = NULL;
|
||||
+
|
||||
+out_cdev_del:
|
||||
+ cdev_del(&vc_mem_cdev);
|
||||
+
|
||||
+out_unregister:
|
||||
+ unregister_chrdev_region(vc_mem_devnum, 1);
|
||||
+
|
||||
+out_err:
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
+static void __exit
|
||||
+vc_mem_exit(void)
|
||||
+{
|
||||
+ pr_debug("%s: called\n", __func__);
|
||||
+
|
||||
+ vc_mem_dma_uninit();
|
||||
+ if (vc_mem_inited) {
|
||||
+#ifdef CONFIG_DEBUG_FS
|
||||
+ vc_mem_debugfs_deinit();
|
||||
+#endif
|
||||
+ device_destroy(vc_mem_class, vc_mem_devnum);
|
||||
+ class_destroy(vc_mem_class);
|
||||
+ cdev_del(&vc_mem_cdev);
|
||||
+ unregister_chrdev_region(vc_mem_devnum, 1);
|
||||
+ vc_mem_inited = 0;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+module_init(vc_mem_init);
|
||||
+module_exit(vc_mem_exit);
|
||||
+MODULE_LICENSE("GPL");
|
||||
+MODULE_AUTHOR("Broadcom Corporation");
|
||||
+
|
||||
+module_param(phys_addr, uint, 0644);
|
||||
+module_param(mem_size, uint, 0644);
|
||||
+module_param(mem_base, uint, 0644);
|
||||
--- /dev/null
|
||||
+++ b/include/linux/broadcom/vc_mem.h
|
||||
@@ -0,0 +1,39 @@
|
||||
+/*
|
||||
+ * Copyright 2010 - 2011 Broadcom Corporation. All rights reserved.
|
||||
+ *
|
||||
+ * Unless you and Broadcom execute a separate written software license
|
||||
+ * agreement governing use of this software, this software is licensed to you
|
||||
+ * under the terms of the GNU General Public License version 2, available at
|
||||
+ * http://www.broadcom.com/licenses/GPLv2.php (the "GPL").
|
||||
+ *
|
||||
+ * Notwithstanding the above, under no circumstances may you combine this
|
||||
+ * software in any way with any other Broadcom software provided under a
|
||||
+ * license other than the GPL, without Broadcom's express prior written
|
||||
+ * consent.
|
||||
+ */
|
||||
+
|
||||
+#ifndef _VC_MEM_H
|
||||
+#define _VC_MEM_H
|
||||
+
|
||||
+#include <linux/ioctl.h>
|
||||
+
|
||||
+#define VC_MEM_IOC_MAGIC 'v'
|
||||
+
|
||||
+#define VC_MEM_IOC_MEM_PHYS_ADDR _IOR(VC_MEM_IOC_MAGIC, 0, unsigned long)
|
||||
+#define VC_MEM_IOC_MEM_SIZE _IOR(VC_MEM_IOC_MAGIC, 1, unsigned int)
|
||||
+#define VC_MEM_IOC_MEM_BASE _IOR(VC_MEM_IOC_MAGIC, 2, unsigned int)
|
||||
+#define VC_MEM_IOC_MEM_LOAD _IOR(VC_MEM_IOC_MAGIC, 3, unsigned int)
|
||||
+
|
||||
+#ifdef __KERNEL__
|
||||
+#define VC_MEM_TO_ARM_ADDR_MASK 0x3FFFFFFF
|
||||
+
|
||||
+extern unsigned long mm_vc_mem_phys_addr;
|
||||
+extern unsigned int mm_vc_mem_size;
|
||||
+extern int vc_mem_get_current_size(void);
|
||||
+#endif
|
||||
+
|
||||
+#ifdef CONFIG_COMPAT
|
||||
+#define VC_MEM_IOC_MEM_PHYS_ADDR32 _IOR(VC_MEM_IOC_MAGIC, 0, compat_ulong_t)
|
||||
+#endif
|
||||
+
|
||||
+#endif /* _VC_MEM_H */
|
File diff suppressed because it is too large
Load diff
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue