Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
commit
af0df84f40
@ -81,6 +81,7 @@ metadata_json = \
|
||||
|
||||
define Build/append-metadata
|
||||
$(if $(SUPPORTED_DEVICES),-echo $(call metadata_json) | fwtool -I - $@)
|
||||
sha256sum "$@" | cut -d" " -f1 > "$@.sha256sum"
|
||||
[ ! -s "$(BUILD_KEY)" -o ! -s "$(BUILD_KEY).ucert" -o ! -s "$@" ] || { \
|
||||
cp "$(BUILD_KEY).ucert" "$@.ucert" ;\
|
||||
usign -S -m "$@" -s "$(BUILD_KEY)" -x "$@.sig" ;\
|
||||
|
||||
@ -230,8 +230,7 @@ $(eval $(foreach S,$(NAND_BLOCKSIZE),$(call Image/mkfs/jffs2-nand/template,$(S))
|
||||
define Image/mkfs/squashfs-common
|
||||
$(STAGING_DIR_HOST)/bin/mksquashfs4 $(call mkfs_target_dir,$(1)) $@ \
|
||||
-nopad -noappend -root-owned \
|
||||
-comp $(SQUASHFSCOMP) $(SQUASHFSOPT) \
|
||||
-processors $(shell nproc)
|
||||
-comp $(SQUASHFSCOMP) $(SQUASHFSOPT)
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_TARGET_ROOTFS_SECURITY_LABELS),y)
|
||||
@ -494,9 +493,9 @@ define Device/Build/initramfs
|
||||
$(BUILD_DIR)/json_info_files/$$(KERNEL_INITRAMFS_IMAGE).json: $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE)
|
||||
@mkdir -p $$(shell dirname $$@)
|
||||
DEVICE_ID="$(1)" \
|
||||
BIN_DIR="$(BIN_DIR)" \
|
||||
SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \
|
||||
FILE_NAME="$$(notdir $$^)" \
|
||||
FILE_DIR="$(KDIR)/tmp" \
|
||||
FILE_TYPE="kernel" \
|
||||
FILE_FILESYSTEM="initramfs" \
|
||||
DEVICE_IMG_PREFIX="$$(DEVICE_IMG_PREFIX)" \
|
||||
@ -601,9 +600,9 @@ define Device/Build/image
|
||||
$(BUILD_DIR)/json_info_files/$(call DEVICE_IMG_NAME,$(1),$(2)).json: $(BIN_DIR)/$(call DEVICE_IMG_NAME,$(1),$(2))$$(GZ_SUFFIX)
|
||||
@mkdir -p $$(shell dirname $$@)
|
||||
DEVICE_ID="$(DEVICE_NAME)" \
|
||||
BIN_DIR="$(BIN_DIR)" \
|
||||
SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \
|
||||
FILE_NAME="$(DEVICE_IMG_NAME)" \
|
||||
FILE_DIR="$(KDIR)/tmp" \
|
||||
FILE_TYPE=$(word 1,$(subst ., ,$(2))) \
|
||||
FILE_FILESYSTEM="$(1)" \
|
||||
DEVICE_IMG_PREFIX="$(DEVICE_IMG_PREFIX)" \
|
||||
@ -647,9 +646,9 @@ define Device/Build/artifact
|
||||
$(BUILD_DIR)/json_info_files/$(DEVICE_IMG_PREFIX)-$(1).json: $(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1)
|
||||
@mkdir -p $$(shell dirname $$@)
|
||||
DEVICE_ID="$(DEVICE_NAME)" \
|
||||
BIN_DIR="$(BIN_DIR)" \
|
||||
SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \
|
||||
FILE_NAME="$(DEVICE_IMG_PREFIX)-$(1)" \
|
||||
FILE_DIR="$(KDIR)/tmp" \
|
||||
FILE_TYPE="$(1)" \
|
||||
DEVICE_IMG_PREFIX="$(DEVICE_IMG_PREFIX)" \
|
||||
DEVICE_VENDOR="$(DEVICE_VENDOR)" \
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-5.10 = .108
|
||||
LINUX_KERNEL_HASH-5.10.108 = bf6cc2d6e0918b8f34d1cde2fa39a6ad69c45025425048be1a1dac4a5b3641d8
|
||||
LINUX_VERSION-5.10 = .109
|
||||
LINUX_KERNEL_HASH-5.10.109 = 18fb22ecb249669ea775474aee614dcb0697cab299068074fd9f0bafa32113dc
|
||||
|
||||
@ -181,7 +181,7 @@ endif
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_GZIP),gzip -n -f -S .gzip -9n $(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),)
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_XZ),$(STAGING_DIR_HOST)/bin/xz -T0 -9 -fz --check=crc32 $(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_LZ4),)
|
||||
$(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
|
||||
|
||||
@ -141,7 +141,7 @@ $(eval $(call KernelPackage,mii))
|
||||
define KernelPackage/mdio-devres
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=Supports MDIO device registration
|
||||
DEPENDS:=@LINUX_5_10 +kmod-libphy PACKAGE_kmod-of-mdio:kmod-of-mdio
|
||||
DEPENDS:=@(LINUX_5_10||LINUX_5_15) +kmod-libphy PACKAGE_kmod-of-mdio:kmod-of-mdio
|
||||
KCONFIG:=CONFIG_MDIO_DEVRES
|
||||
HIDDEN:=1
|
||||
FILES:=$(LINUX_DIR)/drivers/net/phy/mdio_devres.ko
|
||||
@ -577,7 +577,7 @@ $(eval $(call KernelPackage,8139cp))
|
||||
define KernelPackage/r8169
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=RealTek RTL-8169 PCI Gigabit Ethernet Adapter kernel support
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-mii +r8169-firmware +kmod-phy-realtek +LINUX_5_10:kmod-mdio-devres
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-mii +r8169-firmware +kmod-phy-realtek +(LINUX_5_10||LINUX_5_15):kmod-mdio-devres
|
||||
KCONFIG:= \
|
||||
CONFIG_R8169 \
|
||||
CONFIG_R8169_NAPI=y \
|
||||
@ -703,7 +703,7 @@ $(eval $(call KernelPackage,igbvf))
|
||||
define KernelPackage/ixgbe
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=Intel(R) 82598/82599 PCI-Express 10 Gigabit Ethernet support
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-ptp +kmod-hwmon-core +kmod-libphy +LINUX_5_10:kmod-mdio-devres
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-ptp +kmod-hwmon-core +kmod-libphy +(LINUX_5_10||LINUX_5_15):kmod-mdio-devres
|
||||
KCONFIG:=CONFIG_IXGBE \
|
||||
CONFIG_IXGBE_VXLAN=n \
|
||||
CONFIG_IXGBE_HWMON=y \
|
||||
|
||||
@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/openwrt/mt76
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2022-03-28
|
||||
PKG_SOURCE_VERSION:=376ea8152b2bdd84fd43137cf02da383edf20462
|
||||
PKG_MIRROR_HASH:=900a1f42015f099b575ae94553b63043e530748909ca30fe51fe61986f96d854
|
||||
PKG_SOURCE_DATE:=2022-03-29
|
||||
PKG_SOURCE_VERSION:=eed44048ca575863ebdf1dc73f441cb9604cd388
|
||||
PKG_MIRROR_HASH:=fdc2ef82dfcb1880445d6d07d6fdd68373aec263fff15ad26a2d18133dc4fd6b
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_USE_NINJA:=0
|
||||
|
||||
@ -72,9 +72,9 @@
|
||||
+
|
||||
+static int do_lock(void)
|
||||
+{
|
||||
+ int pid;
|
||||
+ pid_t pid;
|
||||
+ int flags;
|
||||
+ char pidstr[8];
|
||||
+ char pidstr[12];
|
||||
+
|
||||
+ if ((fd = open(file, O_RDWR | O_CREAT | O_EXCL, 0700)) < 0) {
|
||||
+ if ((fd = open(file, O_RDWR)) < 0) {
|
||||
@ -109,7 +109,7 @@
|
||||
+ if (!waitonly) {
|
||||
+ lseek(fd, 0, SEEK_SET);
|
||||
+ ftruncate(fd, 0);
|
||||
+ sprintf(pidstr, "%d\n", pid);
|
||||
+ snprintf(sizeof(pidstr), pidstr, "%d\n", pid);
|
||||
+ write(fd, pidstr, strlen(pidstr));
|
||||
+ close(fd);
|
||||
+ }
|
||||
|
||||
@ -34,7 +34,7 @@ if [ -n "$GUID" ]; then
|
||||
mkfs.fat -n kernel -C "$OUTPUT.kernel" -S 512 "$((KERNELSIZE / 1024))"
|
||||
mcopy -s -i "$OUTPUT.kernel" "$KERNELDIR"/* ::/
|
||||
else
|
||||
make_ext4fs -J -L kernel -l "$KERNELSIZE" "$OUTPUT.kernel" "$KERNELDIR"
|
||||
make_ext4fs -J -L kernel -l "$KERNELSIZE" ${SOURCE_DATE_EPOCH:+-T ${SOURCE_DATE_EPOCH}} "$OUTPUT.kernel" "$KERNELDIR"
|
||||
fi
|
||||
dd if="$OUTPUT.kernel" of="$OUTPUT" bs=512 seek="$KERNELOFFSET" conv=notrunc
|
||||
rm -f "$OUTPUT.kernel"
|
||||
|
||||
@ -11,8 +11,8 @@ if len(argv) != 2:
|
||||
exit(1)
|
||||
|
||||
json_path = Path(argv[1])
|
||||
bin_dir = Path(getenv("BIN_DIR"))
|
||||
file_path = bin_dir / getenv("FILE_NAME")
|
||||
file_path = Path(getenv("FILE_DIR")) / getenv("FILE_NAME")
|
||||
|
||||
|
||||
if not file_path.is_file():
|
||||
print("Skip JSON creation for non existing file", file_path)
|
||||
@ -37,7 +37,14 @@ def get_titles():
|
||||
|
||||
|
||||
device_id = getenv("DEVICE_ID")
|
||||
file_hash = hashlib.sha256(file_path.read_bytes()).hexdigest()
|
||||
hash_file = hashlib.sha256(file_path.read_bytes()).hexdigest()
|
||||
|
||||
if file_path.with_suffix(file_path.suffix + ".sha256sum").exists():
|
||||
hash_unsigned = (
|
||||
file_path.with_suffix(file_path.suffix + ".sha256sum").read_text().strip()
|
||||
)
|
||||
else:
|
||||
hash_unsigned = hash_file
|
||||
|
||||
file_info = {
|
||||
"metadata_version": 1,
|
||||
@ -52,7 +59,8 @@ file_info = {
|
||||
{
|
||||
"type": getenv("FILE_TYPE"),
|
||||
"name": getenv("FILE_NAME"),
|
||||
"sha256": file_hash,
|
||||
"sha256": hash_file,
|
||||
"sha256_unsigned": hash_unsigned,
|
||||
}
|
||||
],
|
||||
"device_packages": getenv("DEVICE_PACKAGES").split(),
|
||||
|
||||
207
target/linux/ath79/config-5.15
Normal file
207
target/linux/ath79/config-5.15
Normal file
@ -0,0 +1,207 @@
|
||||
CONFIG_AF_UNIX_OOB=y
|
||||
CONFIG_AG71XX=y
|
||||
# CONFIG_AG71XX_DEBUG is not set
|
||||
CONFIG_AG71XX_DEBUG_FS=y
|
||||
CONFIG_AR8216_PHY=y
|
||||
CONFIG_AR8216_PHY_LEDS=y
|
||||
CONFIG_ARCH_32BIT_OFF_T=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_KEEP_MEMBLOCK=y
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MAX=15
|
||||
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_AT803X_PHY=y
|
||||
CONFIG_ATH79=y
|
||||
CONFIG_ATH79_WDT=y
|
||||
CONFIG_BINARY_PRINTF=y
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
CONFIG_CEVT_R4K=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_CMDLINE="rootfstype=squashfs,jffs2"
|
||||
CONFIG_CMDLINE_BOOL=y
|
||||
# CONFIG_CMDLINE_OVERRIDE is not set
|
||||
CONFIG_COMMON_CLK=y
|
||||
# CONFIG_COMMON_CLK_BOSTON is not set
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
CONFIG_CPU_BIG_ENDIAN=y
|
||||
CONFIG_CPU_GENERIC_DUMP_TLB=y
|
||||
CONFIG_CPU_HAS_DIEI=y
|
||||
CONFIG_CPU_HAS_PREFETCH=y
|
||||
CONFIG_CPU_HAS_RIXI=y
|
||||
CONFIG_CPU_HAS_SYNC=y
|
||||
CONFIG_CPU_MIPS32=y
|
||||
CONFIG_CPU_MIPS32_R2=y
|
||||
CONFIG_CPU_MIPSR2=y
|
||||
CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y
|
||||
CONFIG_CPU_R4K_CACHE_TLB=y
|
||||
CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_CPU_SUPPORTS_HIGHMEM=y
|
||||
CONFIG_CPU_SUPPORTS_MSA=y
|
||||
CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CSRC_R4K=y
|
||||
CONFIG_DMA_NONCOHERENT=y
|
||||
CONFIG_DTC=y
|
||||
CONFIG_EARLY_PRINTK=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FWNODE_MDIO=y
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
CONFIG_GENERIC_ATOMIC64=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CMOS_UPDATE=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_FIND_FIRST_BIT=y
|
||||
CONFIG_GENERIC_GETTIMEOFDAY=y
|
||||
CONFIG_GENERIC_IOMAP=y
|
||||
CONFIG_GENERIC_IRQ_CHIP=y
|
||||
CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GENERIC_LIB_ASHLDI3=y
|
||||
CONFIG_GENERIC_LIB_ASHRDI3=y
|
||||
CONFIG_GENERIC_LIB_CMPDI2=y
|
||||
CONFIG_GENERIC_LIB_LSHRDI3=y
|
||||
CONFIG_GENERIC_LIB_UCMPDI2=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=y
|
||||
CONFIG_GENERIC_PHY=y
|
||||
CONFIG_GENERIC_PINCONF=y
|
||||
CONFIG_GENERIC_PINCTRL_GROUPS=y
|
||||
CONFIG_GENERIC_PINMUX_FUNCTIONS=y
|
||||
CONFIG_GENERIC_SCHED_CLOCK=y
|
||||
CONFIG_GENERIC_SMP_IDLE_THREAD=y
|
||||
CONFIG_GENERIC_TIME_VSYSCALL=y
|
||||
CONFIG_GPIOLIB=y
|
||||
CONFIG_GPIOLIB_IRQCHIP=y
|
||||
CONFIG_GPIO_74X164=y
|
||||
CONFIG_GPIO_ATH79=y
|
||||
CONFIG_GPIO_CDEV=y
|
||||
CONFIG_GPIO_GENERIC=y
|
||||
# CONFIG_GPIO_LATCH is not set
|
||||
# CONFIG_GPIO_RB91X_KEY is not set
|
||||
CONFIG_HANDLE_DOMAIN_IRQ=y
|
||||
CONFIG_HARDWARE_WATCHPOINTS=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HZ_PERIODIC=y
|
||||
CONFIG_IMAGE_CMDLINE_HACK=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_IRQCHIP=y
|
||||
CONFIG_IRQ_DOMAIN=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
CONFIG_IRQ_MIPS_CPU=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
CONFIG_LEDS_GPIO=y
|
||||
# CONFIG_LEDS_RESET is not set
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
CONFIG_LTO_NONE=y
|
||||
CONFIG_MDIO_BITBANG=y
|
||||
CONFIG_MDIO_BUS=y
|
||||
CONFIG_MDIO_DEVICE=y
|
||||
CONFIG_MDIO_DEVRES=y
|
||||
CONFIG_MDIO_GPIO=y
|
||||
CONFIG_MEMFD_CREATE=y
|
||||
# CONFIG_MFD_RB4XX_CPLD is not set
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MIPS=y
|
||||
CONFIG_MIPS_ASID_BITS=8
|
||||
CONFIG_MIPS_ASID_SHIFT=0
|
||||
CONFIG_MIPS_CLOCK_VSYSCALL=y
|
||||
# CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND is not set
|
||||
# CONFIG_MIPS_CMDLINE_DTB_EXTEND is not set
|
||||
# CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set
|
||||
CONFIG_MIPS_CMDLINE_FROM_DTB=y
|
||||
CONFIG_MIPS_EBPF_JIT=y
|
||||
# CONFIG_MIPS_ELF_APPENDED_DTB is not set
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT=5
|
||||
CONFIG_MIPS_LD_CAN_LINK_VDSO=y
|
||||
# CONFIG_MIPS_NO_APPENDED_DTB is not set
|
||||
CONFIG_MIPS_RAW_APPENDED_DTB=y
|
||||
CONFIG_MIPS_SPRAM=y
|
||||
CONFIG_MODULES_USE_ELF_REL=y
|
||||
CONFIG_MTD_CFI_ADV_OPTIONS=y
|
||||
CONFIG_MTD_CFI_GEOMETRY=y
|
||||
# CONFIG_MTD_CFI_I2 is not set
|
||||
# CONFIG_MTD_CFI_INTELEXT is not set
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set
|
||||
# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set
|
||||
CONFIG_MTD_PARSER_CYBERTAN=y
|
||||
CONFIG_MTD_PHYSMAP=y
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
CONFIG_MTD_SPLIT_ELF_FW=y
|
||||
CONFIG_MTD_SPLIT_LZMA_FW=y
|
||||
CONFIG_MTD_SPLIT_SEAMA_FW=y
|
||||
CONFIG_MTD_SPLIT_TPLINK_FW=y
|
||||
CONFIG_MTD_SPLIT_UIMAGE_FW=y
|
||||
CONFIG_MTD_SPLIT_WRGG_FW=y
|
||||
CONFIG_MTD_VIRT_CONCAT=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NEED_PER_CPU_KM=y
|
||||
CONFIG_NET_SELFTESTS=y
|
||||
CONFIG_NET_SOCK_MSG=y
|
||||
CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
CONFIG_OF_FLATTREE=y
|
||||
CONFIG_OF_GPIO=y
|
||||
CONFIG_OF_IRQ=y
|
||||
CONFIG_OF_KOBJ=y
|
||||
CONFIG_OF_MDIO=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_AR71XX=y
|
||||
CONFIG_PCI_AR724X=y
|
||||
CONFIG_PCI_DISABLE_COMMON_QUIRKS=y
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
CONFIG_PCI_DRIVERS_LEGACY=y
|
||||
CONFIG_PERF_USE_VMALLOC=y
|
||||
CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
# CONFIG_PHY_AR7100_USB is not set
|
||||
# CONFIG_PHY_AR7200_USB is not set
|
||||
# CONFIG_PHY_ATH79_USB is not set
|
||||
CONFIG_PINCTRL=y
|
||||
# CONFIG_PINCTRL_PISTACHIO is not set
|
||||
CONFIG_PTP_1588_CLOCK_OPTIONAL=y
|
||||
CONFIG_RATIONAL=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_REGULATOR=y
|
||||
CONFIG_RESET_ATH79=y
|
||||
CONFIG_RESET_CONTROLLER=y
|
||||
CONFIG_SERIAL_8250_NR_UARTS=1
|
||||
CONFIG_SERIAL_8250_RUNTIME_UARTS=1
|
||||
CONFIG_SERIAL_AR933X=y
|
||||
CONFIG_SERIAL_AR933X_CONSOLE=y
|
||||
CONFIG_SERIAL_AR933X_NR_UARTS=2
|
||||
CONFIG_SERIAL_MCTRL_GPIO=y
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_AR934X=y
|
||||
CONFIG_SPI_ATH79=y
|
||||
CONFIG_SPI_BITBANG=y
|
||||
CONFIG_SPI_GPIO=y
|
||||
CONFIG_SPI_MASTER=y
|
||||
CONFIG_SPI_MEM=y
|
||||
# CONFIG_SPI_RB4XX is not set
|
||||
CONFIG_SRCU=y
|
||||
CONFIG_SWCONFIG=y
|
||||
CONFIG_SWCONFIG_LEDS=y
|
||||
CONFIG_SWPHY=y
|
||||
CONFIG_SYSCTL_EXCEPTION_TRACE=y
|
||||
CONFIG_SYS_HAS_CPU_MIPS32_R2=y
|
||||
CONFIG_SYS_HAS_EARLY_PRINTK=y
|
||||
CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
|
||||
CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
|
||||
CONFIG_SYS_SUPPORTS_MIPS16=y
|
||||
CONFIG_SYS_SUPPORTS_ZBOOT=y
|
||||
CONFIG_SYS_SUPPORTS_ZBOOT_UART_PROM=y
|
||||
CONFIG_TARGET_ISA_REV=2
|
||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||
CONFIG_TINY_SRCU=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USE_OF=y
|
||||
@ -7,7 +7,6 @@
|
||||
model = "Ubiquiti UniFi AP Outdoor+";
|
||||
|
||||
aliases {
|
||||
label-mac-device = &wifi;
|
||||
led-boot = &led_white;
|
||||
led-failsafe = &led_white;
|
||||
led-running = &led_blue;
|
||||
|
||||
@ -7,7 +7,6 @@
|
||||
model = "Ubiquiti UniFi AP";
|
||||
|
||||
aliases {
|
||||
label-mac-device = ð0;
|
||||
led-boot = &led_dome_green;
|
||||
led-failsafe = &led_dome_green;
|
||||
led-running = &led_dome_green;
|
||||
|
||||
@ -6,6 +6,10 @@
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
label-mac-device = ð0;
|
||||
};
|
||||
|
||||
extosc: ref {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
|
||||
@ -2,6 +2,8 @@ BOARDNAME:=Generic
|
||||
|
||||
DEFAULT_PACKAGES += wpad-basic-wolfssl
|
||||
|
||||
KERNEL_TESTING_PATCHVER:=5.15
|
||||
|
||||
define Target/Description
|
||||
Build firmware images for generic Atheros AR71xx/AR913x/AR934x based boards.
|
||||
endef
|
||||
|
||||
@ -0,0 +1,186 @@
|
||||
From ecbd9c87f073f097d9fe56390353e64e963e866a Mon Sep 17 00:00:00 2001
|
||||
From: John Crispin <john@phrozen.org>
|
||||
Date: Tue, 6 Mar 2018 10:03:03 +0100
|
||||
Subject: [PATCH 03/27] leds: add reset-controller based driver
|
||||
|
||||
Signed-off-by: John Crispin <john@phrozen.org>
|
||||
---
|
||||
drivers/leds/Kconfig | 11 ++++
|
||||
drivers/leds/Makefile | 1 +
|
||||
drivers/leds/leds-reset.c | 137 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 149 insertions(+)
|
||||
create mode 100644 drivers/leds/leds-reset.c
|
||||
|
||||
--- a/drivers/leds/Kconfig
|
||||
+++ b/drivers/leds/Kconfig
|
||||
@@ -876,6 +876,17 @@ source "drivers/leds/blink/Kconfig"
|
||||
comment "Flash and Torch LED drivers"
|
||||
source "drivers/leds/flash/Kconfig"
|
||||
|
||||
+config LEDS_RESET
|
||||
+ tristate "LED support for reset-controller API"
|
||||
+ depends on LEDS_CLASS
|
||||
+ depends on RESET_CONTROLLER
|
||||
+ help
|
||||
+ This option enables support for LEDs connected to pins driven by reset
|
||||
+ controllers. Yes, DNI actual built HW like that.
|
||||
+
|
||||
+ To compile this driver as a module, choose M here: the module
|
||||
+ will be called leds-reset.
|
||||
+
|
||||
comment "LED Triggers"
|
||||
source "drivers/leds/trigger/Kconfig"
|
||||
|
||||
--- /dev/null
|
||||
+++ b/drivers/leds/leds-reset.c
|
||||
@@ -0,0 +1,140 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2018 John Crispin <john@phrozen.org>
|
||||
+ *
|
||||
+ * 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.
|
||||
+ *
|
||||
+ */
|
||||
+#include <linux/err.h>
|
||||
+#include <linux/reset.h>
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/leds.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/of.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/reset.h>
|
||||
+
|
||||
+struct reset_led_data {
|
||||
+ struct led_classdev cdev;
|
||||
+ struct reset_control *rst;
|
||||
+};
|
||||
+
|
||||
+static inline struct reset_led_data *
|
||||
+ cdev_to_reset_led_data(struct led_classdev *led_cdev)
|
||||
+{
|
||||
+ return container_of(led_cdev, struct reset_led_data, cdev);
|
||||
+}
|
||||
+
|
||||
+static void reset_led_set(struct led_classdev *led_cdev,
|
||||
+ enum led_brightness value)
|
||||
+{
|
||||
+ struct reset_led_data *led_dat = cdev_to_reset_led_data(led_cdev);
|
||||
+
|
||||
+ if (value == LED_OFF)
|
||||
+ reset_control_assert(led_dat->rst);
|
||||
+ else
|
||||
+ reset_control_deassert(led_dat->rst);
|
||||
+}
|
||||
+
|
||||
+struct reset_leds_priv {
|
||||
+ int num_leds;
|
||||
+ struct reset_led_data leds[];
|
||||
+};
|
||||
+
|
||||
+static inline int sizeof_reset_leds_priv(int num_leds)
|
||||
+{
|
||||
+ return sizeof(struct reset_leds_priv) +
|
||||
+ (sizeof(struct reset_led_data) * num_leds);
|
||||
+}
|
||||
+
|
||||
+static struct reset_leds_priv *reset_leds_create(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct device *dev = &pdev->dev;
|
||||
+ struct fwnode_handle *child;
|
||||
+ struct reset_leds_priv *priv;
|
||||
+ int count, ret;
|
||||
+
|
||||
+ count = device_get_child_node_count(dev);
|
||||
+ if (!count)
|
||||
+ return ERR_PTR(-ENODEV);
|
||||
+
|
||||
+ priv = devm_kzalloc(dev, sizeof_reset_leds_priv(count), GFP_KERNEL);
|
||||
+ if (!priv)
|
||||
+ return ERR_PTR(-ENOMEM);
|
||||
+
|
||||
+ device_for_each_child_node(dev, child) {
|
||||
+ struct reset_led_data *led = &priv->leds[priv->num_leds];
|
||||
+ struct device_node *np = to_of_node(child);
|
||||
+
|
||||
+ ret = fwnode_property_read_string(child, "label", &led->cdev.name);
|
||||
+ if (!led->cdev.name) {
|
||||
+ fwnode_handle_put(child);
|
||||
+ return ERR_PTR(-EINVAL);
|
||||
+ }
|
||||
+ led->rst = __of_reset_control_get(np, NULL, 0, 0, 0, true);
|
||||
+ if (IS_ERR(led->rst))
|
||||
+ return ERR_PTR(-EINVAL);
|
||||
+
|
||||
+ fwnode_property_read_string(child, "linux,default-trigger",
|
||||
+ &led->cdev.default_trigger);
|
||||
+
|
||||
+ led->cdev.brightness_set = reset_led_set;
|
||||
+ ret = devm_led_classdev_register(&pdev->dev, &led->cdev);
|
||||
+ if (ret < 0)
|
||||
+ return ERR_PTR(ret);
|
||||
+ led->cdev.dev->of_node = np;
|
||||
+ priv->num_leds++;
|
||||
+ }
|
||||
+
|
||||
+ return priv;
|
||||
+}
|
||||
+
|
||||
+static const struct of_device_id of_reset_leds_match[] = {
|
||||
+ { .compatible = "reset-leds", },
|
||||
+ {},
|
||||
+};
|
||||
+
|
||||
+MODULE_DEVICE_TABLE(of, of_reset_leds_match);
|
||||
+
|
||||
+static int reset_led_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct reset_leds_priv *priv;
|
||||
+
|
||||
+ priv = reset_leds_create(pdev);
|
||||
+ if (IS_ERR(priv))
|
||||
+ return PTR_ERR(priv);
|
||||
+
|
||||
+ platform_set_drvdata(pdev, priv);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void reset_led_shutdown(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct reset_leds_priv *priv = platform_get_drvdata(pdev);
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; i < priv->num_leds; i++) {
|
||||
+ struct reset_led_data *led = &priv->leds[i];
|
||||
+
|
||||
+ if (!(led->cdev.flags & LED_RETAIN_AT_SHUTDOWN))
|
||||
+ reset_led_set(&led->cdev, LED_OFF);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static struct platform_driver reset_led_driver = {
|
||||
+ .probe = reset_led_probe,
|
||||
+ .shutdown = reset_led_shutdown,
|
||||
+ .driver = {
|
||||
+ .name = "leds-reset",
|
||||
+ .of_match_table = of_reset_leds_match,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+module_platform_driver(reset_led_driver);
|
||||
+
|
||||
+MODULE_AUTHOR("John Crispin <john@phrozen.org>");
|
||||
+MODULE_DESCRIPTION("reset controller LED driver");
|
||||
+MODULE_LICENSE("GPL");
|
||||
+MODULE_ALIAS("platform:leds-reset");
|
||||
--- a/drivers/leds/Makefile
|
||||
+++ b/drivers/leds/Makefile
|
||||
@@ -87,6 +87,7 @@ obj-$(CONFIG_LEDS_TURRIS_OMNIA) += leds
|
||||
obj-$(CONFIG_LEDS_WM831X_STATUS) += leds-wm831x-status.o
|
||||
obj-$(CONFIG_LEDS_WM8350) += leds-wm8350.o
|
||||
obj-$(CONFIG_LEDS_WRAP) += leds-wrap.o
|
||||
+obj-$(CONFIG_LEDS_RESET) += leds-reset.o
|
||||
|
||||
# LED SPI Drivers
|
||||
obj-$(CONFIG_LEDS_CR0014114) += leds-cr0014114.o
|
||||
@ -0,0 +1,333 @@
|
||||
From 08c9d6ceef01893678a5d2e8a15517c745417f21 Mon Sep 17 00:00:00 2001
|
||||
From: John Crispin <john@phrozen.org>
|
||||
Date: Tue, 6 Mar 2018 10:04:05 +0100
|
||||
Subject: [PATCH 04/27] phy: add ath79 usb phys
|
||||
|
||||
Signed-off-by: John Crispin <john@phrozen.org>
|
||||
---
|
||||
drivers/phy/Kconfig | 16 ++++++
|
||||
drivers/phy/Makefile | 2 +
|
||||
drivers/phy/phy-ar7100-usb.c | 124 +++++++++++++++++++++++++++++++++++++++++++
|
||||
drivers/phy/phy-ar7200-usb.c | 108 +++++++++++++++++++++++++++++++++++++
|
||||
4 files changed, 250 insertions(+)
|
||||
create mode 100644 drivers/phy/phy-ar7100-usb.c
|
||||
create mode 100644 drivers/phy/phy-ar7200-usb.c
|
||||
|
||||
--- a/drivers/phy/Kconfig
|
||||
+++ b/drivers/phy/Kconfig
|
||||
@@ -24,6 +24,22 @@ config GENERIC_PHY_MIPI_DPHY
|
||||
Provides a number of helpers a core functions for MIPI D-PHY
|
||||
drivers to us.
|
||||
|
||||
+config PHY_AR7100_USB
|
||||
+ tristate "Atheros AR7100 USB PHY driver"
|
||||
+ depends on ATH79 || COMPILE_TEST
|
||||
+ default y if USB_EHCI_HCD_PLATFORM
|
||||
+ select GENERIC_PHY
|
||||
+ help
|
||||
+ Enable this to support the USB PHY on Atheros AR7100 SoCs.
|
||||
+
|
||||
+config PHY_AR7200_USB
|
||||
+ tristate "Atheros AR7200 USB PHY driver"
|
||||
+ depends on ATH79 || COMPILE_TEST
|
||||
+ default y if USB_EHCI_HCD_PLATFORM
|
||||
+ select GENERIC_PHY
|
||||
+ help
|
||||
+ Enable this to support the USB PHY on Atheros AR7200 SoCs.
|
||||
+
|
||||
config PHY_LPC18XX_USB_OTG
|
||||
tristate "NXP LPC18xx/43xx SoC USB OTG PHY driver"
|
||||
depends on OF && (ARCH_LPC18XX || COMPILE_TEST)
|
||||
--- a/drivers/phy/Makefile
|
||||
+++ b/drivers/phy/Makefile
|
||||
@@ -4,6 +4,8 @@
|
||||
#
|
||||
|
||||
obj-$(CONFIG_GENERIC_PHY) += phy-core.o
|
||||
+obj-$(CONFIG_PHY_AR7100_USB) += phy-ar7100-usb.o
|
||||
+obj-$(CONFIG_PHY_AR7200_USB) += phy-ar7200-usb.o
|
||||
obj-$(CONFIG_GENERIC_PHY_MIPI_DPHY) += phy-core-mipi-dphy.o
|
||||
obj-$(CONFIG_PHY_CAN_TRANSCEIVER) += phy-can-transceiver.o
|
||||
obj-$(CONFIG_PHY_LPC18XX_USB_OTG) += phy-lpc18xx-usb-otg.o
|
||||
--- /dev/null
|
||||
+++ b/drivers/phy/phy-ar7100-usb.c
|
||||
@@ -0,0 +1,140 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2018 John Crispin <john@phrozen.org>
|
||||
+ *
|
||||
+ * 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 <linux/module.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/phy/phy.h>
|
||||
+#include <linux/delay.h>
|
||||
+#include <linux/reset.h>
|
||||
+#include <linux/of_gpio.h>
|
||||
+
|
||||
+#include <asm/mach-ath79/ath79.h>
|
||||
+#include <asm/mach-ath79/ar71xx_regs.h>
|
||||
+
|
||||
+struct ar7100_usb_phy {
|
||||
+ struct reset_control *rst_phy;
|
||||
+ struct reset_control *rst_host;
|
||||
+ struct reset_control *rst_ohci_dll;
|
||||
+ void __iomem *io_base;
|
||||
+ struct phy *phy;
|
||||
+ int gpio;
|
||||
+};
|
||||
+
|
||||
+static int ar7100_usb_phy_power_off(struct phy *phy)
|
||||
+{
|
||||
+ struct ar7100_usb_phy *priv = phy_get_drvdata(phy);
|
||||
+ int err = 0;
|
||||
+
|
||||
+ err |= reset_control_assert(priv->rst_host);
|
||||
+ err |= reset_control_assert(priv->rst_phy);
|
||||
+ err |= reset_control_assert(priv->rst_ohci_dll);
|
||||
+
|
||||
+ return err;
|
||||
+}
|
||||
+
|
||||
+static int ar7100_usb_phy_power_on(struct phy *phy)
|
||||
+{
|
||||
+ struct ar7100_usb_phy *priv = phy_get_drvdata(phy);
|
||||
+ int err = 0;
|
||||
+
|
||||
+ err |= ar7100_usb_phy_power_off(phy);
|
||||
+ mdelay(100);
|
||||
+ err |= reset_control_deassert(priv->rst_ohci_dll);
|
||||
+ err |= reset_control_deassert(priv->rst_phy);
|
||||
+ err |= reset_control_deassert(priv->rst_host);
|
||||
+ mdelay(500);
|
||||
+ iowrite32(0xf0000, priv->io_base + AR71XX_USB_CTRL_REG_CONFIG);
|
||||
+ iowrite32(0x20c00, priv->io_base + AR71XX_USB_CTRL_REG_FLADJ);
|
||||
+
|
||||
+ return err;
|
||||
+}
|
||||
+
|
||||
+static const struct phy_ops ar7100_usb_phy_ops = {
|
||||
+ .power_on = ar7100_usb_phy_power_on,
|
||||
+ .power_off = ar7100_usb_phy_power_off,
|
||||
+ .owner = THIS_MODULE,
|
||||
+};
|
||||
+
|
||||
+static int ar7100_usb_phy_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct phy_provider *phy_provider;
|
||||
+ struct resource *res;
|
||||
+ struct ar7100_usb_phy *priv;
|
||||
+
|
||||
+ priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
|
||||
+ if (!priv)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
+ priv->io_base = devm_ioremap_resource(&pdev->dev, res);
|
||||
+ if (IS_ERR(priv->io_base))
|
||||
+ return PTR_ERR(priv->io_base);
|
||||
+
|
||||
+ priv->rst_phy = devm_reset_control_get(&pdev->dev, "usb-phy");
|
||||
+ if (IS_ERR(priv->rst_phy)) {
|
||||
+ dev_err(&pdev->dev, "phy reset is missing\n");
|
||||
+ return PTR_ERR(priv->rst_phy);
|
||||
+ }
|
||||
+
|
||||
+ priv->rst_host = devm_reset_control_get(&pdev->dev, "usb-host");
|
||||
+ if (IS_ERR(priv->rst_host)) {
|
||||
+ dev_err(&pdev->dev, "host reset is missing\n");
|
||||
+ return PTR_ERR(priv->rst_host);
|
||||
+ }
|
||||
+
|
||||
+ priv->rst_ohci_dll = devm_reset_control_get(&pdev->dev, "usb-ohci-dll");
|
||||
+ if (IS_ERR(priv->rst_ohci_dll)) {
|
||||
+ dev_err(&pdev->dev, "ohci-dll reset is missing\n");
|
||||
+ return PTR_ERR(priv->rst_host);
|
||||
+ }
|
||||
+
|
||||
+ priv->phy = devm_phy_create(&pdev->dev, NULL, &ar7100_usb_phy_ops);
|
||||
+ if (IS_ERR(priv->phy)) {
|
||||
+ dev_err(&pdev->dev, "failed to create PHY\n");
|
||||
+ return PTR_ERR(priv->phy);
|
||||
+ }
|
||||
+
|
||||
+ priv->gpio = of_get_gpio(pdev->dev.of_node, 0);
|
||||
+ if (priv->gpio >= 0) {
|
||||
+ int ret = devm_gpio_request(&pdev->dev, priv->gpio, dev_name(&pdev->dev));
|
||||
+
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "failed to request gpio\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+ gpio_export_with_name(priv->gpio, 0, dev_name(&pdev->dev));
|
||||
+ gpio_set_value(priv->gpio, 1);
|
||||
+ }
|
||||
+
|
||||
+ phy_set_drvdata(priv->phy, priv);
|
||||
+
|
||||
+ phy_provider = devm_of_phy_provider_register(&pdev->dev, of_phy_simple_xlate);
|
||||
+
|
||||
+
|
||||
+ return PTR_ERR_OR_ZERO(phy_provider);
|
||||
+}
|
||||
+
|
||||
+static const struct of_device_id ar7100_usb_phy_of_match[] = {
|
||||
+ { .compatible = "qca,ar7100-usb-phy" },
|
||||
+ {}
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(of, ar7100_usb_phy_of_match);
|
||||
+
|
||||
+static struct platform_driver ar7100_usb_phy_driver = {
|
||||
+ .probe = ar7100_usb_phy_probe,
|
||||
+ .driver = {
|
||||
+ .of_match_table = ar7100_usb_phy_of_match,
|
||||
+ .name = "ar7100-usb-phy",
|
||||
+ }
|
||||
+};
|
||||
+module_platform_driver(ar7100_usb_phy_driver);
|
||||
+
|
||||
+MODULE_DESCRIPTION("ATH79 USB PHY driver");
|
||||
+MODULE_AUTHOR("Alban Bedel <albeu@free.fr>");
|
||||
+MODULE_LICENSE("GPL");
|
||||
--- /dev/null
|
||||
+++ b/drivers/phy/phy-ar7200-usb.c
|
||||
@@ -0,0 +1,136 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2015 Alban Bedel <albeu@free.fr>
|
||||
+ *
|
||||
+ * 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 <linux/module.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/phy/phy.h>
|
||||
+#include <linux/reset.h>
|
||||
+#include <linux/of_gpio.h>
|
||||
+
|
||||
+struct ar7200_usb_phy {
|
||||
+ struct reset_control *rst_phy;
|
||||
+ struct reset_control *rst_phy_analog;
|
||||
+ struct reset_control *suspend_override;
|
||||
+ struct phy *phy;
|
||||
+ int gpio;
|
||||
+};
|
||||
+
|
||||
+static int ar7200_usb_phy_power_on(struct phy *phy)
|
||||
+{
|
||||
+ struct ar7200_usb_phy *priv = phy_get_drvdata(phy);
|
||||
+ int err = 0;
|
||||
+
|
||||
+ if (priv->suspend_override)
|
||||
+ err = reset_control_assert(priv->suspend_override);
|
||||
+ if (priv->rst_phy)
|
||||
+ err |= reset_control_deassert(priv->rst_phy);
|
||||
+ if (priv->rst_phy_analog)
|
||||
+ err |= reset_control_deassert(priv->rst_phy_analog);
|
||||
+
|
||||
+ return err;
|
||||
+}
|
||||
+
|
||||
+static int ar7200_usb_phy_power_off(struct phy *phy)
|
||||
+{
|
||||
+ struct ar7200_usb_phy *priv = phy_get_drvdata(phy);
|
||||
+ int err = 0;
|
||||
+
|
||||
+ if (priv->suspend_override)
|
||||
+ err = reset_control_deassert(priv->suspend_override);
|
||||
+ if (priv->rst_phy)
|
||||
+ err |= reset_control_assert(priv->rst_phy);
|
||||
+ if (priv->rst_phy_analog)
|
||||
+ err |= reset_control_assert(priv->rst_phy_analog);
|
||||
+
|
||||
+ return err;
|
||||
+}
|
||||
+
|
||||
+static const struct phy_ops ar7200_usb_phy_ops = {
|
||||
+ .power_on = ar7200_usb_phy_power_on,
|
||||
+ .power_off = ar7200_usb_phy_power_off,
|
||||
+ .owner = THIS_MODULE,
|
||||
+};
|
||||
+
|
||||
+static int ar7200_usb_phy_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct phy_provider *phy_provider;
|
||||
+ struct ar7200_usb_phy *priv;
|
||||
+
|
||||
+ priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
|
||||
+ if (!priv)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ priv->rst_phy = devm_reset_control_get(&pdev->dev, "usb-phy");
|
||||
+ if (IS_ERR(priv->rst_phy)) {
|
||||
+ if (PTR_ERR(priv->rst_phy) != -EPROBE_DEFER)
|
||||
+ dev_err(&pdev->dev, "phy reset is missing\n");
|
||||
+ return PTR_ERR(priv->rst_phy);
|
||||
+ }
|
||||
+
|
||||
+ priv->rst_phy_analog = devm_reset_control_get_optional(
|
||||
+ &pdev->dev, "usb-phy-analog");
|
||||
+ if (IS_ERR(priv->rst_phy_analog)) {
|
||||
+ if (PTR_ERR(priv->rst_phy_analog) == -ENOENT)
|
||||
+ priv->rst_phy_analog = NULL;
|
||||
+ else
|
||||
+ return PTR_ERR(priv->rst_phy_analog);
|
||||
+ }
|
||||
+
|
||||
+ priv->suspend_override = devm_reset_control_get_optional(
|
||||
+ &pdev->dev, "usb-suspend-override");
|
||||
+ if (IS_ERR(priv->suspend_override)) {
|
||||
+ if (PTR_ERR(priv->suspend_override) == -ENOENT)
|
||||
+ priv->suspend_override = NULL;
|
||||
+ else
|
||||
+ return PTR_ERR(priv->suspend_override);
|
||||
+ }
|
||||
+
|
||||
+ priv->phy = devm_phy_create(&pdev->dev, NULL, &ar7200_usb_phy_ops);
|
||||
+ if (IS_ERR(priv->phy)) {
|
||||
+ dev_err(&pdev->dev, "failed to create PHY\n");
|
||||
+ return PTR_ERR(priv->phy);
|
||||
+ }
|
||||
+
|
||||
+ priv->gpio = of_get_gpio(pdev->dev.of_node, 0);
|
||||
+ if (priv->gpio >= 0) {
|
||||
+ int ret = devm_gpio_request(&pdev->dev, priv->gpio, dev_name(&pdev->dev));
|
||||
+
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "failed to request gpio\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+ gpio_export_with_name(priv->gpio, 0, dev_name(&pdev->dev));
|
||||
+ gpio_set_value(priv->gpio, 1);
|
||||
+ }
|
||||
+
|
||||
+ phy_set_drvdata(priv->phy, priv);
|
||||
+
|
||||
+ phy_provider = devm_of_phy_provider_register(&pdev->dev, of_phy_simple_xlate);
|
||||
+
|
||||
+ return PTR_ERR_OR_ZERO(phy_provider);
|
||||
+}
|
||||
+
|
||||
+static const struct of_device_id ar7200_usb_phy_of_match[] = {
|
||||
+ { .compatible = "qca,ar7200-usb-phy" },
|
||||
+ {}
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(of, ar7200_usb_phy_of_match);
|
||||
+
|
||||
+static struct platform_driver ar7200_usb_phy_driver = {
|
||||
+ .probe = ar7200_usb_phy_probe,
|
||||
+ .driver = {
|
||||
+ .of_match_table = ar7200_usb_phy_of_match,
|
||||
+ .name = "ar7200-usb-phy",
|
||||
+ }
|
||||
+};
|
||||
+module_platform_driver(ar7200_usb_phy_driver);
|
||||
+
|
||||
+MODULE_DESCRIPTION("ATH79 USB PHY driver");
|
||||
+MODULE_AUTHOR("Alban Bedel <albeu@free.fr>");
|
||||
+MODULE_LICENSE("GPL");
|
||||
@ -0,0 +1,24 @@
|
||||
From 2201818e5bd33f389beceb3943fdfcf5a698fc5b Mon Sep 17 00:00:00 2001
|
||||
From: John Crispin <john@phrozen.org>
|
||||
Date: Tue, 6 Mar 2018 10:01:43 +0100
|
||||
Subject: [PATCH 05/27] usb: add more OF/quirk properties
|
||||
|
||||
Signed-off-by: John Crispin <john@phrozen.org>
|
||||
---
|
||||
drivers/usb/host/ehci-platform.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
--- a/drivers/usb/host/ehci-platform.c
|
||||
+++ b/drivers/usb/host/ehci-platform.c
|
||||
@@ -277,6 +277,11 @@ static int ehci_platform_probe(struct pl
|
||||
ehci = hcd_to_ehci(hcd);
|
||||
|
||||
if (pdata == &ehci_platform_defaults && dev->dev.of_node) {
|
||||
+ of_property_read_u32(dev->dev.of_node, "caps-offset", &pdata->caps_offset);
|
||||
+
|
||||
+ if (of_property_read_bool(dev->dev.of_node, "has-synopsys-hc-bug"))
|
||||
+ pdata->has_synopsys_hc_bug = 1;
|
||||
+
|
||||
if (of_property_read_bool(dev->dev.of_node, "big-endian-regs"))
|
||||
ehci->big_endian_mmio = 1;
|
||||
|
||||
@ -0,0 +1,168 @@
|
||||
From f3eacff2310a60348a755c50a8da6fc251fc8587 Mon Sep 17 00:00:00 2001
|
||||
From: John Crispin <john@phrozen.org>
|
||||
Date: Tue, 6 Mar 2018 09:55:13 +0100
|
||||
Subject: [PATCH 07/33] irqchip/irq-ath79-intc: add irq cascade driver for
|
||||
QCA9556 SoCs
|
||||
|
||||
Signed-off-by: John Crispin <john@phrozen.org>
|
||||
---
|
||||
drivers/irqchip/Makefile | 1 +
|
||||
drivers/irqchip/irq-ath79-intc.c | 142 +++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 143 insertions(+)
|
||||
create mode 100644 drivers/irqchip/irq-ath79-intc.c
|
||||
|
||||
--- a/drivers/irqchip/Makefile
|
||||
+++ b/drivers/irqchip/Makefile
|
||||
@@ -4,6 +4,7 @@ obj-$(CONFIG_IRQCHIP) += irqchip.o
|
||||
obj-$(CONFIG_AL_FIC) += irq-al-fic.o
|
||||
obj-$(CONFIG_ALPINE_MSI) += irq-alpine-msi.o
|
||||
obj-$(CONFIG_ATH79) += irq-ath79-cpu.o
|
||||
+obj-$(CONFIG_ATH79) += irq-ath79-intc.o
|
||||
obj-$(CONFIG_ATH79) += irq-ath79-misc.o
|
||||
obj-$(CONFIG_ARCH_BCM2835) += irq-bcm2835.o
|
||||
obj-$(CONFIG_ARCH_BCM2835) += irq-bcm2836.o
|
||||
--- /dev/null
|
||||
+++ b/drivers/irqchip/irq-ath79-intc.c
|
||||
@@ -0,0 +1,142 @@
|
||||
+/*
|
||||
+ * Atheros AR71xx/AR724x/AR913x specific interrupt handling
|
||||
+ *
|
||||
+ * Copyright (C) 2018 John Crispin <john@phrozen.org>
|
||||
+ *
|
||||
+ * 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.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/interrupt.h>
|
||||
+#include <linux/irqchip.h>
|
||||
+#include <linux/of.h>
|
||||
+#include <linux/of_irq.h>
|
||||
+#include <linux/irqdomain.h>
|
||||
+
|
||||
+#include <asm/irq_cpu.h>
|
||||
+#include <asm/mach-ath79/ath79.h>
|
||||
+#include <asm/mach-ath79/ar71xx_regs.h>
|
||||
+
|
||||
+#define ATH79_MAX_INTC_CASCADE 3
|
||||
+
|
||||
+struct ath79_intc {
|
||||
+ struct irq_chip chip;
|
||||
+ u32 irq;
|
||||
+ u32 pending_mask;
|
||||
+ u32 int_status;
|
||||
+ u32 irq_mask[ATH79_MAX_INTC_CASCADE];
|
||||
+ u32 irq_wb_chan[ATH79_MAX_INTC_CASCADE];
|
||||
+};
|
||||
+
|
||||
+static void ath79_intc_irq_handler(struct irq_desc *desc)
|
||||
+{
|
||||
+ struct irq_domain *domain = irq_desc_get_handler_data(desc);
|
||||
+ struct ath79_intc *intc = domain->host_data;
|
||||
+ u32 pending;
|
||||
+
|
||||
+ pending = ath79_reset_rr(intc->int_status);
|
||||
+ pending &= intc->pending_mask;
|
||||
+
|
||||
+ if (pending) {
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; i < domain->hwirq_max; i++)
|
||||
+ if (pending & intc->irq_mask[i]) {
|
||||
+ if (intc->irq_wb_chan[i] != 0xffffffff)
|
||||
+ ath79_ddr_wb_flush(intc->irq_wb_chan[i]);
|
||||
+ generic_handle_irq(irq_find_mapping(domain, i));
|
||||
+ }
|
||||
+ } else {
|
||||
+ spurious_interrupt();
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void ath79_intc_irq_enable(struct irq_data *d)
|
||||
+{
|
||||
+ struct ath79_intc *intc = d->domain->host_data;
|
||||
+ enable_irq(intc->irq);
|
||||
+}
|
||||
+
|
||||
+static void ath79_intc_irq_disable(struct irq_data *d)
|
||||
+{
|
||||
+ struct ath79_intc *intc = d->domain->host_data;
|
||||
+ disable_irq(intc->irq);
|
||||
+}
|
||||
+
|
||||
+static int ath79_intc_map(struct irq_domain *d, unsigned int irq, irq_hw_number_t hw)
|
||||
+{
|
||||
+ struct ath79_intc *intc = d->host_data;
|
||||
+
|
||||
+ irq_set_chip_and_handler(irq, &intc->chip, handle_level_irq);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct irq_domain_ops ath79_irq_domain_ops = {
|
||||
+ .xlate = irq_domain_xlate_onecell,
|
||||
+ .map = ath79_intc_map,
|
||||
+};
|
||||
+
|
||||
+static int __init ath79_intc_of_init(
|
||||
+ struct device_node *node, struct device_node *parent)
|
||||
+{
|
||||
+ struct irq_domain *domain;
|
||||
+ struct ath79_intc *intc;
|
||||
+ int cnt, cntwb, i, err;
|
||||
+
|
||||
+ cnt = of_property_count_u32_elems(node, "qca,pending-bits");
|
||||
+ if (cnt > ATH79_MAX_INTC_CASCADE)
|
||||
+ panic("Too many INTC pending bits\n");
|
||||
+
|
||||
+ intc = kzalloc(sizeof(*intc), GFP_KERNEL);
|
||||
+ if (!intc)
|
||||
+ panic("Failed to allocate INTC memory\n");
|
||||
+ intc->chip = dummy_irq_chip;
|
||||
+ intc->chip.name = "INTC";
|
||||
+ intc->chip.irq_disable = ath79_intc_irq_disable;
|
||||
+ intc->chip.irq_enable = ath79_intc_irq_enable;
|
||||
+
|
||||
+ if (of_property_read_u32(node, "qca,int-status-addr", &intc->int_status) < 0) {
|
||||
+ panic("Missing address of interrupt status register\n");
|
||||
+ }
|
||||
+
|
||||
+ of_property_read_u32_array(node, "qca,pending-bits", intc->irq_mask, cnt);
|
||||
+ for (i = 0; i < cnt; i++) {
|
||||
+ intc->pending_mask |= intc->irq_mask[i];
|
||||
+ intc->irq_wb_chan[i] = 0xffffffff;
|
||||
+ }
|
||||
+
|
||||
+ cntwb = of_count_phandle_with_args(
|
||||
+ node, "qca,ddr-wb-channels", "#qca,ddr-wb-channel-cells");
|
||||
+
|
||||
+ for (i = 0; i < cntwb; i++) {
|
||||
+ struct of_phandle_args args;
|
||||
+ u32 irq = i;
|
||||
+
|
||||
+ of_property_read_u32_index(
|
||||
+ node, "qca,ddr-wb-channel-interrupts", i, &irq);
|
||||
+ if (irq >= ATH79_MAX_INTC_CASCADE)
|
||||
+ continue;
|
||||
+
|
||||
+ err = of_parse_phandle_with_args(
|
||||
+ node, "qca,ddr-wb-channels",
|
||||
+ "#qca,ddr-wb-channel-cells",
|
||||
+ i, &args);
|
||||
+ if (err)
|
||||
+ return err;
|
||||
+
|
||||
+ intc->irq_wb_chan[irq] = args.args[0];
|
||||
+ }
|
||||
+
|
||||
+ intc->irq = irq_of_parse_and_map(node, 0);
|
||||
+ if (!intc->irq)
|
||||
+ panic("Failed to get INTC IRQ");
|
||||
+
|
||||
+ domain = irq_domain_add_linear(node, cnt, &ath79_irq_domain_ops, intc);
|
||||
+ irq_set_chained_handler_and_data(intc->irq, ath79_intc_irq_handler, domain);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+IRQCHIP_DECLARE(ath79_intc, "qca,ar9340-intc",
|
||||
+ ath79_intc_of_init);
|
||||
@ -0,0 +1,23 @@
|
||||
From e029f998594f151008ecbfa024e2957edd2a5189 Mon Sep 17 00:00:00 2001
|
||||
From: John Crispin <john@phrozen.org>
|
||||
Date: Tue, 6 Mar 2018 09:58:19 +0100
|
||||
Subject: [PATCH 08/33] irqchip/irq-ath79-cpu: drop !OF init helper
|
||||
|
||||
Signed-off-by: John Crispin <john@phrozen.org>
|
||||
---
|
||||
drivers/irqchip/irq-ath79-cpu.c | 7 -------
|
||||
1 file changed, 7 deletions(-)
|
||||
|
||||
--- a/drivers/irqchip/irq-ath79-cpu.c
|
||||
+++ b/drivers/irqchip/irq-ath79-cpu.c
|
||||
@@ -85,10 +85,3 @@ static int __init ar79_cpu_intc_of_init(
|
||||
}
|
||||
IRQCHIP_DECLARE(ar79_cpu_intc, "qca,ar7100-cpu-intc",
|
||||
ar79_cpu_intc_of_init);
|
||||
-
|
||||
-void __init ath79_cpu_irq_init(unsigned irq_wb_chan2, unsigned irq_wb_chan3)
|
||||
-{
|
||||
- irq_wb_chan[2] = irq_wb_chan2;
|
||||
- irq_wb_chan[3] = irq_wb_chan3;
|
||||
- mips_cpu_irq_init();
|
||||
-}
|
||||
@ -0,0 +1,57 @@
|
||||
From 4a4f869ec58ed8910b9b2e68d0eee50957e9bb20 Mon Sep 17 00:00:00 2001
|
||||
From: John Crispin <john@phrozen.org>
|
||||
Date: Mon, 25 Jun 2018 15:52:10 +0200
|
||||
Subject: [PATCH 17/33] dt-bindings: PCI: qcom,ar7100: adds binding doc
|
||||
|
||||
With the driver being converted from platform_data to pure OF, we need to
|
||||
also add some docs.
|
||||
|
||||
Cc: Rob Herring <robh+dt@kernel.org>
|
||||
Cc: devicetree@vger.kernel.org
|
||||
Signed-off-by: John Crispin <john@phrozen.org>
|
||||
---
|
||||
.../devicetree/bindings/pci/qcom,ar7100-pci.txt | 38 ++++++++++++++++++++++
|
||||
1 file changed, 38 insertions(+)
|
||||
create mode 100644 Documentation/devicetree/bindings/pci/qcom,ar7100-pci.txt
|
||||
|
||||
--- /dev/null
|
||||
+++ b/Documentation/devicetree/bindings/pci/qcom,ar7100-pci.txt
|
||||
@@ -0,0 +1,38 @@
|
||||
+* Qualcomm Atheros AR7100 PCI express root complex
|
||||
+
|
||||
+Required properties:
|
||||
+- compatible: should contain "qcom,ar7100-pci" to identify the core.
|
||||
+- reg: Should contain the register ranges as listed in the reg-names property.
|
||||
+- reg-names: Definition: Must include the following entries
|
||||
+ - "cfg_base" IO Memory
|
||||
+- #address-cells: set to <3>
|
||||
+- #size-cells: set to <2>
|
||||
+- ranges: ranges for the PCI memory and I/O regions
|
||||
+- interrupt-map-mask and interrupt-map: standard PCI
|
||||
+ properties to define the mapping of the PCIe interface to interrupt
|
||||
+ numbers.
|
||||
+- #interrupt-cells: set to <1>
|
||||
+- interrupt-controller: define to enable the builtin IRQ cascade.
|
||||
+
|
||||
+Optional properties:
|
||||
+- interrupt-parent: phandle to the MIPS IRQ controller
|
||||
+
|
||||
+* Example for ar7100
|
||||
+ pcie-controller@180c0000 {
|
||||
+ compatible = "qca,ar7100-pci";
|
||||
+ #address-cells = <3>;
|
||||
+ #size-cells = <2>;
|
||||
+ bus-range = <0x0 0x0>;
|
||||
+ reg = <0x17010000 0x100>;
|
||||
+ reg-names = "cfg_base";
|
||||
+ ranges = <0x2000000 0 0x10000000 0x10000000 0 0x07000000
|
||||
+ 0x1000000 0 0x00000000 0x00000000 0 0x00000001>;
|
||||
+ interrupt-parent = <&cpuintc>;
|
||||
+ interrupts = <2>;
|
||||
+
|
||||
+ interrupt-controller;
|
||||
+ #interrupt-cells = <1>;
|
||||
+
|
||||
+ interrupt-map-mask = <0 0 0 1>;
|
||||
+ interrupt-map = <0 0 0 0 &pcie0 0>;
|
||||
+ };
|
||||
@ -0,0 +1,202 @@
|
||||
From 1855ab6b1d27f5b38a648baf57ff6a534afec26d Mon Sep 17 00:00:00 2001
|
||||
From: John Crispin <john@phrozen.org>
|
||||
Date: Sat, 23 Jun 2018 15:07:23 +0200
|
||||
Subject: [PATCH 18/33] MIPS: pci-ar71xx: convert to OF
|
||||
|
||||
With the ath79 target getting converted to pure OF, we can drop all the
|
||||
platform data code and add the missing OF bits to the driver. We also add
|
||||
a irq domain for the PCI/e controllers cascade, thus making it usable from
|
||||
dts files.
|
||||
|
||||
Signed-off-by: John Crispin <john@phrozen.org>
|
||||
---
|
||||
arch/mips/pci/pci-ar71xx.c | 82 +++++++++++++++++++++++-----------------------
|
||||
1 file changed, 41 insertions(+), 41 deletions(-)
|
||||
|
||||
--- a/arch/mips/pci/pci-ar71xx.c
|
||||
+++ b/arch/mips/pci/pci-ar71xx.c
|
||||
@@ -15,8 +15,11 @@
|
||||
#include <linux/pci.h>
|
||||
#include <linux/pci_regs.h>
|
||||
#include <linux/interrupt.h>
|
||||
+#include <linux/irqchip/chained_irq.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
+#include <linux/of_irq.h>
|
||||
+#include <linux/of_pci.h>
|
||||
|
||||
#include <asm/mach-ath79/ar71xx_regs.h>
|
||||
#include <asm/mach-ath79/ath79.h>
|
||||
@@ -46,12 +49,13 @@
|
||||
#define AR71XX_PCI_IRQ_COUNT 5
|
||||
|
||||
struct ar71xx_pci_controller {
|
||||
+ struct device_node *np;
|
||||
void __iomem *cfg_base;
|
||||
int irq;
|
||||
- int irq_base;
|
||||
struct pci_controller pci_ctrl;
|
||||
struct resource io_res;
|
||||
struct resource mem_res;
|
||||
+ struct irq_domain *domain;
|
||||
};
|
||||
|
||||
/* Byte lane enable bits */
|
||||
@@ -225,29 +229,30 @@ static struct pci_ops ar71xx_pci_ops = {
|
||||
|
||||
static void ar71xx_pci_irq_handler(struct irq_desc *desc)
|
||||
{
|
||||
- struct ar71xx_pci_controller *apc;
|
||||
void __iomem *base = ath79_reset_base;
|
||||
+ struct irq_chip *chip = irq_desc_get_chip(desc);
|
||||
+ struct ar71xx_pci_controller *apc = irq_desc_get_handler_data(desc);
|
||||
u32 pending;
|
||||
|
||||
- apc = irq_desc_get_handler_data(desc);
|
||||
-
|
||||
+ chained_irq_enter(chip, desc);
|
||||
pending = __raw_readl(base + AR71XX_RESET_REG_PCI_INT_STATUS) &
|
||||
__raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
|
||||
|
||||
if (pending & AR71XX_PCI_INT_DEV0)
|
||||
- generic_handle_irq(apc->irq_base + 0);
|
||||
+ generic_handle_irq(irq_linear_revmap(apc->domain, 1));
|
||||
|
||||
else if (pending & AR71XX_PCI_INT_DEV1)
|
||||
- generic_handle_irq(apc->irq_base + 1);
|
||||
+ generic_handle_irq(irq_linear_revmap(apc->domain, 2));
|
||||
|
||||
else if (pending & AR71XX_PCI_INT_DEV2)
|
||||
- generic_handle_irq(apc->irq_base + 2);
|
||||
+ generic_handle_irq(irq_linear_revmap(apc->domain, 3));
|
||||
|
||||
else if (pending & AR71XX_PCI_INT_CORE)
|
||||
- generic_handle_irq(apc->irq_base + 4);
|
||||
+ generic_handle_irq(irq_linear_revmap(apc->domain, 4));
|
||||
|
||||
else
|
||||
spurious_interrupt();
|
||||
+ chained_irq_exit(chip, desc);
|
||||
}
|
||||
|
||||
static void ar71xx_pci_irq_unmask(struct irq_data *d)
|
||||
@@ -258,7 +263,7 @@ static void ar71xx_pci_irq_unmask(struct
|
||||
u32 t;
|
||||
|
||||
apc = irq_data_get_irq_chip_data(d);
|
||||
- irq = d->irq - apc->irq_base;
|
||||
+ irq = irq_linear_revmap(apc->domain, d->irq);
|
||||
|
||||
t = __raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
|
||||
__raw_writel(t | (1 << irq), base + AR71XX_RESET_REG_PCI_INT_ENABLE);
|
||||
@@ -275,7 +280,7 @@ static void ar71xx_pci_irq_mask(struct i
|
||||
u32 t;
|
||||
|
||||
apc = irq_data_get_irq_chip_data(d);
|
||||
- irq = d->irq - apc->irq_base;
|
||||
+ irq = irq_linear_revmap(apc->domain, d->irq);
|
||||
|
||||
t = __raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
|
||||
__raw_writel(t & ~(1 << irq), base + AR71XX_RESET_REG_PCI_INT_ENABLE);
|
||||
@@ -291,24 +296,31 @@ static struct irq_chip ar71xx_pci_irq_ch
|
||||
.irq_mask_ack = ar71xx_pci_irq_mask,
|
||||
};
|
||||
|
||||
+static int ar71xx_pci_irq_map(struct irq_domain *d,
|
||||
+ unsigned int irq, irq_hw_number_t hw)
|
||||
+{
|
||||
+ struct ar71xx_pci_controller *apc = d->host_data;
|
||||
+
|
||||
+ irq_set_chip_and_handler(irq, &ar71xx_pci_irq_chip, handle_level_irq);
|
||||
+ irq_set_chip_data(irq, apc);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct irq_domain_ops ar71xx_pci_domain_ops = {
|
||||
+ .xlate = irq_domain_xlate_onecell,
|
||||
+ .map = ar71xx_pci_irq_map,
|
||||
+};
|
||||
+
|
||||
static void ar71xx_pci_irq_init(struct ar71xx_pci_controller *apc)
|
||||
{
|
||||
void __iomem *base = ath79_reset_base;
|
||||
- int i;
|
||||
|
||||
__raw_writel(0, base + AR71XX_RESET_REG_PCI_INT_ENABLE);
|
||||
__raw_writel(0, base + AR71XX_RESET_REG_PCI_INT_STATUS);
|
||||
|
||||
- BUILD_BUG_ON(ATH79_PCI_IRQ_COUNT < AR71XX_PCI_IRQ_COUNT);
|
||||
-
|
||||
- apc->irq_base = ATH79_PCI_IRQ_BASE;
|
||||
- for (i = apc->irq_base;
|
||||
- i < apc->irq_base + AR71XX_PCI_IRQ_COUNT; i++) {
|
||||
- irq_set_chip_and_handler(i, &ar71xx_pci_irq_chip,
|
||||
- handle_level_irq);
|
||||
- irq_set_chip_data(i, apc);
|
||||
- }
|
||||
-
|
||||
+ apc->domain = irq_domain_add_linear(apc->np, AR71XX_PCI_IRQ_COUNT,
|
||||
+ &ar71xx_pci_domain_ops, apc);
|
||||
irq_set_chained_handler_and_data(apc->irq, ar71xx_pci_irq_handler,
|
||||
apc);
|
||||
}
|
||||
@@ -325,6 +337,11 @@ static void ar71xx_pci_reset(void)
|
||||
mdelay(100);
|
||||
}
|
||||
|
||||
+static const struct of_device_id ar71xx_pci_ids[] = {
|
||||
+ { .compatible = "qca,ar7100-pci" },
|
||||
+ {},
|
||||
+};
|
||||
+
|
||||
static int ar71xx_pci_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct ar71xx_pci_controller *apc;
|
||||
@@ -345,26 +362,6 @@ static int ar71xx_pci_probe(struct platf
|
||||
if (apc->irq < 0)
|
||||
return -EINVAL;
|
||||
|
||||
- res = platform_get_resource_byname(pdev, IORESOURCE_IO, "io_base");
|
||||
- if (!res)
|
||||
- return -EINVAL;
|
||||
-
|
||||
- apc->io_res.parent = res;
|
||||
- apc->io_res.name = "PCI IO space";
|
||||
- apc->io_res.start = res->start;
|
||||
- apc->io_res.end = res->end;
|
||||
- apc->io_res.flags = IORESOURCE_IO;
|
||||
-
|
||||
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mem_base");
|
||||
- if (!res)
|
||||
- return -EINVAL;
|
||||
-
|
||||
- apc->mem_res.parent = res;
|
||||
- apc->mem_res.name = "PCI memory space";
|
||||
- apc->mem_res.start = res->start;
|
||||
- apc->mem_res.end = res->end;
|
||||
- apc->mem_res.flags = IORESOURCE_MEM;
|
||||
-
|
||||
ar71xx_pci_reset();
|
||||
|
||||
/* setup COMMAND register */
|
||||
@@ -377,9 +374,11 @@ static int ar71xx_pci_probe(struct platf
|
||||
|
||||
ar71xx_pci_irq_init(apc);
|
||||
|
||||
+ apc->np = pdev->dev.of_node;
|
||||
apc->pci_ctrl.pci_ops = &ar71xx_pci_ops;
|
||||
apc->pci_ctrl.mem_resource = &apc->mem_res;
|
||||
apc->pci_ctrl.io_resource = &apc->io_res;
|
||||
+ pci_load_of_ranges(&apc->pci_ctrl, pdev->dev.of_node);
|
||||
|
||||
register_pci_controller(&apc->pci_ctrl);
|
||||
|
||||
@@ -390,6 +389,7 @@ static struct platform_driver ar71xx_pci
|
||||
.probe = ar71xx_pci_probe,
|
||||
.driver = {
|
||||
.name = "ar71xx-pci",
|
||||
+ .of_match_table = of_match_ptr(ar71xx_pci_ids),
|
||||
},
|
||||
};
|
||||
|
||||
@ -0,0 +1,61 @@
|
||||
From ea27764bc3ef2a05decf3ae05edffc289cd0d93c Mon Sep 17 00:00:00 2001
|
||||
From: John Crispin <john@phrozen.org>
|
||||
Date: Mon, 25 Jun 2018 15:52:02 +0200
|
||||
Subject: [PATCH 19/33] dt-bindings: PCI: qcom,ar7240: adds binding doc
|
||||
|
||||
With the driver being converted from platform_data to pure OF, we need to
|
||||
also add some docs.
|
||||
|
||||
Cc: Rob Herring <robh+dt@kernel.org>
|
||||
Cc: devicetree@vger.kernel.org
|
||||
Signed-off-by: John Crispin <john@phrozen.org>
|
||||
---
|
||||
.../devicetree/bindings/pci/qcom,ar7240-pci.txt | 42 ++++++++++++++++++++++
|
||||
1 file changed, 42 insertions(+)
|
||||
create mode 100644 Documentation/devicetree/bindings/pci/qcom,ar7240-pci.txt
|
||||
|
||||
--- /dev/null
|
||||
+++ b/Documentation/devicetree/bindings/pci/qcom,ar7240-pci.txt
|
||||
@@ -0,0 +1,42 @@
|
||||
+* Qualcomm Atheros AR724X PCI express root complex
|
||||
+
|
||||
+Required properties:
|
||||
+- compatible: should contain "qcom,ar7240-pci" to identify the core.
|
||||
+- reg: Should contain the register ranges as listed in the reg-names property.
|
||||
+- reg-names: Definition: Must include the following entries
|
||||
+ - "crp_base" Configuration registers
|
||||
+ - "ctrl_base" Control registers
|
||||
+ - "cfg_base" IO Memory
|
||||
+- #address-cells: set to <3>
|
||||
+- #size-cells: set to <2>
|
||||
+- ranges: ranges for the PCI memory and I/O regions
|
||||
+- interrupt-map-mask and interrupt-map: standard PCI
|
||||
+ properties to define the mapping of the PCIe interface to interrupt
|
||||
+ numbers.
|
||||
+- #interrupt-cells: set to <1>
|
||||
+- interrupt-parent: phandle to the MIPS IRQ controller
|
||||
+
|
||||
+Optional properties:
|
||||
+- interrupt-controller: define to enable the builtin IRQ cascade.
|
||||
+
|
||||
+* Example for qca9557
|
||||
+ pcie-controller@180c0000 {
|
||||
+ compatible = "qcom,ar7240-pci";
|
||||
+ #address-cells = <3>;
|
||||
+ #size-cells = <2>;
|
||||
+ bus-range = <0x0 0x0>;
|
||||
+ reg = <0x180c0000 0x1000>,
|
||||
+ <0x180f0000 0x100>,
|
||||
+ <0x14000000 0x1000>;
|
||||
+ reg-names = "crp_base", "ctrl_base", "cfg_base";
|
||||
+ ranges = <0x2000000 0 0x10000000 0x10000000 0 0x04000000
|
||||
+ 0x1000000 0 0x00000000 0x00000000 0 0x00000001>;
|
||||
+ interrupt-parent = <&intc2>;
|
||||
+ interrupts = <1>;
|
||||
+
|
||||
+ interrupt-controller;
|
||||
+ #interrupt-cells = <1>;
|
||||
+
|
||||
+ interrupt-map-mask = <0 0 0 1>;
|
||||
+ interrupt-map = <0 0 0 0 &pcie0 0>;
|
||||
+ };
|
||||
@ -0,0 +1,205 @@
|
||||
From a522ee0199d5d3ea114ca2e211f6ac398d3e8e0b Mon Sep 17 00:00:00 2001
|
||||
From: John Crispin <john@phrozen.org>
|
||||
Date: Sat, 23 Jun 2018 15:07:37 +0200
|
||||
Subject: [PATCH 20/33] MIPS: pci-ar724x: convert to OF
|
||||
|
||||
With the ath79 target getting converted to pure OF, we can drop all the
|
||||
platform data code and add the missing OF bits to the driver. We also add
|
||||
a irq domain for the PCI/e controllers cascade, thus making it usable from
|
||||
dts files.
|
||||
|
||||
Signed-off-by: John Crispin <john@phrozen.org>
|
||||
---
|
||||
arch/mips/pci/pci-ar724x.c | 88 ++++++++++++++++++++++------------------------
|
||||
1 file changed, 42 insertions(+), 46 deletions(-)
|
||||
|
||||
--- a/arch/mips/pci/pci-ar724x.c
|
||||
+++ b/arch/mips/pci/pci-ar724x.c
|
||||
@@ -11,8 +11,11 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/platform_device.h>
|
||||
+#include <linux/irqchip/chained_irq.h>
|
||||
#include <asm/mach-ath79/ath79.h>
|
||||
#include <asm/mach-ath79/ar71xx_regs.h>
|
||||
+#include <linux/of_irq.h>
|
||||
+#include <linux/of_pci.h>
|
||||
|
||||
#define AR724X_PCI_REG_APP 0x00
|
||||
#define AR724X_PCI_REG_RESET 0x18
|
||||
@@ -42,17 +45,20 @@ struct ar724x_pci_controller {
|
||||
void __iomem *crp_base;
|
||||
|
||||
int irq;
|
||||
- int irq_base;
|
||||
|
||||
bool link_up;
|
||||
bool bar0_is_cached;
|
||||
u32 bar0_value;
|
||||
|
||||
+ struct device_node *np;
|
||||
struct pci_controller pci_controller;
|
||||
+ struct irq_domain *domain;
|
||||
struct resource io_res;
|
||||
struct resource mem_res;
|
||||
};
|
||||
|
||||
+static struct irq_chip ar724x_pci_irq_chip;
|
||||
+
|
||||
static inline bool ar724x_pci_check_link(struct ar724x_pci_controller *apc)
|
||||
{
|
||||
u32 reset;
|
||||
@@ -228,35 +234,31 @@ static struct pci_ops ar724x_pci_ops = {
|
||||
|
||||
static void ar724x_pci_irq_handler(struct irq_desc *desc)
|
||||
{
|
||||
- struct ar724x_pci_controller *apc;
|
||||
- void __iomem *base;
|
||||
+ struct irq_chip *chip = irq_desc_get_chip(desc);
|
||||
+ struct ar724x_pci_controller *apc = irq_desc_get_handler_data(desc);
|
||||
u32 pending;
|
||||
|
||||
- apc = irq_desc_get_handler_data(desc);
|
||||
- base = apc->ctrl_base;
|
||||
-
|
||||
- pending = __raw_readl(base + AR724X_PCI_REG_INT_STATUS) &
|
||||
- __raw_readl(base + AR724X_PCI_REG_INT_MASK);
|
||||
+ chained_irq_enter(chip, desc);
|
||||
+ pending = __raw_readl(apc->ctrl_base + AR724X_PCI_REG_INT_STATUS) &
|
||||
+ __raw_readl(apc->ctrl_base + AR724X_PCI_REG_INT_MASK);
|
||||
|
||||
if (pending & AR724X_PCI_INT_DEV0)
|
||||
- generic_handle_irq(apc->irq_base + 0);
|
||||
-
|
||||
+ generic_handle_irq(irq_linear_revmap(apc->domain, 1));
|
||||
else
|
||||
spurious_interrupt();
|
||||
+ chained_irq_exit(chip, desc);
|
||||
}
|
||||
|
||||
static void ar724x_pci_irq_unmask(struct irq_data *d)
|
||||
{
|
||||
struct ar724x_pci_controller *apc;
|
||||
void __iomem *base;
|
||||
- int offset;
|
||||
u32 t;
|
||||
|
||||
apc = irq_data_get_irq_chip_data(d);
|
||||
base = apc->ctrl_base;
|
||||
- offset = apc->irq_base - d->irq;
|
||||
|
||||
- switch (offset) {
|
||||
+ switch (irq_linear_revmap(apc->domain, d->irq)) {
|
||||
case 0:
|
||||
t = __raw_readl(base + AR724X_PCI_REG_INT_MASK);
|
||||
__raw_writel(t | AR724X_PCI_INT_DEV0,
|
||||
@@ -270,14 +272,12 @@ static void ar724x_pci_irq_mask(struct i
|
||||
{
|
||||
struct ar724x_pci_controller *apc;
|
||||
void __iomem *base;
|
||||
- int offset;
|
||||
u32 t;
|
||||
|
||||
apc = irq_data_get_irq_chip_data(d);
|
||||
base = apc->ctrl_base;
|
||||
- offset = apc->irq_base - d->irq;
|
||||
|
||||
- switch (offset) {
|
||||
+ switch (irq_linear_revmap(apc->domain, d->irq)) {
|
||||
case 0:
|
||||
t = __raw_readl(base + AR724X_PCI_REG_INT_MASK);
|
||||
__raw_writel(t & ~AR724X_PCI_INT_DEV0,
|
||||
@@ -302,26 +302,34 @@ static struct irq_chip ar724x_pci_irq_ch
|
||||
.irq_mask_ack = ar724x_pci_irq_mask,
|
||||
};
|
||||
|
||||
+static int ar724x_pci_irq_map(struct irq_domain *d,
|
||||
+ unsigned int irq, irq_hw_number_t hw)
|
||||
+{
|
||||
+ struct ar724x_pci_controller *apc = d->host_data;
|
||||
+
|
||||
+ irq_set_chip_and_handler(irq, &ar724x_pci_irq_chip, handle_level_irq);
|
||||
+ irq_set_chip_data(irq, apc);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct irq_domain_ops ar724x_pci_domain_ops = {
|
||||
+ .xlate = irq_domain_xlate_onecell,
|
||||
+ .map = ar724x_pci_irq_map,
|
||||
+};
|
||||
+
|
||||
static void ar724x_pci_irq_init(struct ar724x_pci_controller *apc,
|
||||
int id)
|
||||
{
|
||||
void __iomem *base;
|
||||
- int i;
|
||||
|
||||
base = apc->ctrl_base;
|
||||
|
||||
__raw_writel(0, base + AR724X_PCI_REG_INT_MASK);
|
||||
__raw_writel(0, base + AR724X_PCI_REG_INT_STATUS);
|
||||
|
||||
- apc->irq_base = ATH79_PCI_IRQ_BASE + (id * AR724X_PCI_IRQ_COUNT);
|
||||
-
|
||||
- for (i = apc->irq_base;
|
||||
- i < apc->irq_base + AR724X_PCI_IRQ_COUNT; i++) {
|
||||
- irq_set_chip_and_handler(i, &ar724x_pci_irq_chip,
|
||||
- handle_level_irq);
|
||||
- irq_set_chip_data(i, apc);
|
||||
- }
|
||||
-
|
||||
+ apc->domain = irq_domain_add_linear(apc->np, 2,
|
||||
+ &ar724x_pci_domain_ops, apc);
|
||||
irq_set_chained_handler_and_data(apc->irq, ar724x_pci_irq_handler,
|
||||
apc);
|
||||
}
|
||||
@@ -388,29 +396,11 @@ static int ar724x_pci_probe(struct platf
|
||||
if (apc->irq < 0)
|
||||
return -EINVAL;
|
||||
|
||||
- res = platform_get_resource_byname(pdev, IORESOURCE_IO, "io_base");
|
||||
- if (!res)
|
||||
- return -EINVAL;
|
||||
-
|
||||
- apc->io_res.parent = res;
|
||||
- apc->io_res.name = "PCI IO space";
|
||||
- apc->io_res.start = res->start;
|
||||
- apc->io_res.end = res->end;
|
||||
- apc->io_res.flags = IORESOURCE_IO;
|
||||
-
|
||||
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mem_base");
|
||||
- if (!res)
|
||||
- return -EINVAL;
|
||||
-
|
||||
- apc->mem_res.parent = res;
|
||||
- apc->mem_res.name = "PCI memory space";
|
||||
- apc->mem_res.start = res->start;
|
||||
- apc->mem_res.end = res->end;
|
||||
- apc->mem_res.flags = IORESOURCE_MEM;
|
||||
-
|
||||
+ apc->np = pdev->dev.of_node;
|
||||
apc->pci_controller.pci_ops = &ar724x_pci_ops;
|
||||
apc->pci_controller.io_resource = &apc->io_res;
|
||||
apc->pci_controller.mem_resource = &apc->mem_res;
|
||||
+ pci_load_of_ranges(&apc->pci_controller, pdev->dev.of_node);
|
||||
|
||||
/*
|
||||
* Do the full PCIE Root Complex Initialization Sequence if the PCIe
|
||||
@@ -432,10 +422,16 @@ static int ar724x_pci_probe(struct platf
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static const struct of_device_id ar724x_pci_ids[] = {
|
||||
+ { .compatible = "qcom,ar7240-pci" },
|
||||
+ {},
|
||||
+};
|
||||
+
|
||||
static struct platform_driver ar724x_pci_driver = {
|
||||
.probe = ar724x_pci_probe,
|
||||
.driver = {
|
||||
.name = "ar724x-pci",
|
||||
+ .of_match_table = of_match_ptr(ar724x_pci_ids),
|
||||
},
|
||||
};
|
||||
|
||||
@ -0,0 +1,93 @@
|
||||
From 3fc8585cf76022dba7496627074d42af88c30718 Mon Sep 17 00:00:00 2001
|
||||
From: John Crispin <john@phrozen.org>
|
||||
Date: Sat, 23 Jun 2018 15:16:55 +0200
|
||||
Subject: [PATCH 32/33] MIPS: ath79: sanitize symbols
|
||||
|
||||
We no longer need to select which SoCs are supported as the whole arch
|
||||
code is always built. So lets drop all the SoC symbols
|
||||
|
||||
Signed-off-by: John Crispin <john@phrozen.org>
|
||||
---
|
||||
arch/mips/Kconfig | 2 ++
|
||||
arch/mips/ath79/Kconfig | 44 +++++---------------------------------------
|
||||
arch/mips/pci/Makefile | 2 +-
|
||||
3 files changed, 8 insertions(+), 40 deletions(-)
|
||||
|
||||
--- a/arch/mips/Kconfig
|
||||
+++ b/arch/mips/Kconfig
|
||||
@@ -256,6 +256,8 @@ config ATH79
|
||||
select SYS_SUPPORTS_BIG_ENDIAN
|
||||
select SYS_SUPPORTS_MIPS16
|
||||
select SYS_SUPPORTS_ZBOOT_UART_PROM
|
||||
+ select HAVE_PCI
|
||||
+ select USB_ARCH_HAS_EHCI
|
||||
select USE_OF
|
||||
select USB_EHCI_ROOT_HUB_TT if USB_EHCI_HCD_PLATFORM
|
||||
help
|
||||
--- a/arch/mips/ath79/Kconfig
|
||||
+++ b/arch/mips/ath79/Kconfig
|
||||
@@ -1,48 +1,14 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
if ATH79
|
||||
|
||||
-config SOC_AR71XX
|
||||
- select HAVE_PCI
|
||||
- def_bool n
|
||||
-
|
||||
-config SOC_AR724X
|
||||
- select HAVE_PCI
|
||||
- select PCI_AR724X if PCI
|
||||
- def_bool n
|
||||
-
|
||||
-config SOC_AR913X
|
||||
- def_bool n
|
||||
-
|
||||
-config SOC_AR933X
|
||||
- def_bool n
|
||||
-
|
||||
-config SOC_AR934X
|
||||
- select HAVE_PCI
|
||||
- select PCI_AR724X if PCI
|
||||
- def_bool n
|
||||
-
|
||||
-config SOC_QCA955X
|
||||
- select HAVE_PCI
|
||||
- select PCI_AR724X if PCI
|
||||
+config PCI_AR71XX
|
||||
+ bool "PCI support for AR7100 type SoCs"
|
||||
+ depends on PCI
|
||||
def_bool n
|
||||
|
||||
config PCI_AR724X
|
||||
- def_bool n
|
||||
-
|
||||
-config ATH79_DEV_GPIO_BUTTONS
|
||||
- def_bool n
|
||||
-
|
||||
-config ATH79_DEV_LEDS_GPIO
|
||||
- def_bool n
|
||||
-
|
||||
-config ATH79_DEV_SPI
|
||||
- def_bool n
|
||||
-
|
||||
-config ATH79_DEV_USB
|
||||
- def_bool n
|
||||
-
|
||||
-config ATH79_DEV_WMAC
|
||||
- depends on (SOC_AR913X || SOC_AR933X || SOC_AR934X || SOC_QCA955X)
|
||||
+ bool "PCI support for AR724x type SoCs"
|
||||
+ depends on PCI
|
||||
def_bool n
|
||||
|
||||
endif
|
||||
--- a/arch/mips/pci/Makefile
|
||||
+++ b/arch/mips/pci/Makefile
|
||||
@@ -21,7 +21,7 @@ obj-$(CONFIG_BCM63XX) += pci-bcm63xx.o
|
||||
ops-bcm63xx.o
|
||||
obj-$(CONFIG_MIPS_ALCHEMY) += pci-alchemy.o
|
||||
obj-$(CONFIG_PCI_AR2315) += pci-ar2315.o
|
||||
-obj-$(CONFIG_SOC_AR71XX) += pci-ar71xx.o
|
||||
+obj-$(CONFIG_PCI_AR71XX) += pci-ar71xx.o
|
||||
obj-$(CONFIG_PCI_AR724X) += pci-ar724x.o
|
||||
obj-$(CONFIG_PCI_XTALK_BRIDGE) += pci-xtalk-bridge.o
|
||||
#
|
||||
@ -0,0 +1,27 @@
|
||||
--- a/arch/mips/ath79/common.c
|
||||
+++ b/arch/mips/ath79/common.c
|
||||
@@ -31,11 +31,13 @@ EXPORT_SYMBOL_GPL(ath79_ddr_freq);
|
||||
|
||||
enum ath79_soc_type ath79_soc;
|
||||
unsigned int ath79_soc_rev;
|
||||
+EXPORT_SYMBOL_GPL(ath79_soc_rev);
|
||||
|
||||
void __iomem *ath79_pll_base;
|
||||
void __iomem *ath79_reset_base;
|
||||
EXPORT_SYMBOL_GPL(ath79_reset_base);
|
||||
-static void __iomem *ath79_ddr_base;
|
||||
+void __iomem *ath79_ddr_base;
|
||||
+EXPORT_SYMBOL_GPL(ath79_ddr_base);
|
||||
static void __iomem *ath79_ddr_wb_flush_base;
|
||||
static void __iomem *ath79_ddr_pci_win_base;
|
||||
|
||||
--- a/arch/mips/include/asm/mach-ath79/ath79.h
|
||||
+++ b/arch/mips/include/asm/mach-ath79/ath79.h
|
||||
@@ -149,6 +149,7 @@ void ath79_ddr_wb_flush(unsigned int reg
|
||||
void ath79_ddr_set_pci_windows(void);
|
||||
|
||||
extern void __iomem *ath79_pll_base;
|
||||
+extern void __iomem *ath79_ddr_base;
|
||||
extern void __iomem *ath79_reset_base;
|
||||
|
||||
static inline void ath79_pll_wr(unsigned reg, u32 val)
|
||||
@ -0,0 +1,139 @@
|
||||
--- a/arch/mips/pci/pci-ar71xx.c
|
||||
+++ b/arch/mips/pci/pci-ar71xx.c
|
||||
@@ -51,11 +51,9 @@
|
||||
struct ar71xx_pci_controller {
|
||||
struct device_node *np;
|
||||
void __iomem *cfg_base;
|
||||
- int irq;
|
||||
struct pci_controller pci_ctrl;
|
||||
struct resource io_res;
|
||||
struct resource mem_res;
|
||||
- struct irq_domain *domain;
|
||||
};
|
||||
|
||||
/* Byte lane enable bits */
|
||||
@@ -227,104 +225,6 @@ static struct pci_ops ar71xx_pci_ops = {
|
||||
.write = ar71xx_pci_write_config,
|
||||
};
|
||||
|
||||
-static void ar71xx_pci_irq_handler(struct irq_desc *desc)
|
||||
-{
|
||||
- void __iomem *base = ath79_reset_base;
|
||||
- struct irq_chip *chip = irq_desc_get_chip(desc);
|
||||
- struct ar71xx_pci_controller *apc = irq_desc_get_handler_data(desc);
|
||||
- u32 pending;
|
||||
-
|
||||
- chained_irq_enter(chip, desc);
|
||||
- pending = __raw_readl(base + AR71XX_RESET_REG_PCI_INT_STATUS) &
|
||||
- __raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
|
||||
-
|
||||
- if (pending & AR71XX_PCI_INT_DEV0)
|
||||
- generic_handle_irq(irq_linear_revmap(apc->domain, 1));
|
||||
-
|
||||
- else if (pending & AR71XX_PCI_INT_DEV1)
|
||||
- generic_handle_irq(irq_linear_revmap(apc->domain, 2));
|
||||
-
|
||||
- else if (pending & AR71XX_PCI_INT_DEV2)
|
||||
- generic_handle_irq(irq_linear_revmap(apc->domain, 3));
|
||||
-
|
||||
- else if (pending & AR71XX_PCI_INT_CORE)
|
||||
- generic_handle_irq(irq_linear_revmap(apc->domain, 4));
|
||||
-
|
||||
- else
|
||||
- spurious_interrupt();
|
||||
- chained_irq_exit(chip, desc);
|
||||
-}
|
||||
-
|
||||
-static void ar71xx_pci_irq_unmask(struct irq_data *d)
|
||||
-{
|
||||
- struct ar71xx_pci_controller *apc;
|
||||
- unsigned int irq;
|
||||
- void __iomem *base = ath79_reset_base;
|
||||
- u32 t;
|
||||
-
|
||||
- apc = irq_data_get_irq_chip_data(d);
|
||||
- irq = irq_linear_revmap(apc->domain, d->irq);
|
||||
-
|
||||
- t = __raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
|
||||
- __raw_writel(t | (1 << irq), base + AR71XX_RESET_REG_PCI_INT_ENABLE);
|
||||
-
|
||||
- /* flush write */
|
||||
- __raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
|
||||
-}
|
||||
-
|
||||
-static void ar71xx_pci_irq_mask(struct irq_data *d)
|
||||
-{
|
||||
- struct ar71xx_pci_controller *apc;
|
||||
- unsigned int irq;
|
||||
- void __iomem *base = ath79_reset_base;
|
||||
- u32 t;
|
||||
-
|
||||
- apc = irq_data_get_irq_chip_data(d);
|
||||
- irq = irq_linear_revmap(apc->domain, d->irq);
|
||||
-
|
||||
- t = __raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
|
||||
- __raw_writel(t & ~(1 << irq), base + AR71XX_RESET_REG_PCI_INT_ENABLE);
|
||||
-
|
||||
- /* flush write */
|
||||
- __raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
|
||||
-}
|
||||
-
|
||||
-static struct irq_chip ar71xx_pci_irq_chip = {
|
||||
- .name = "AR71XX PCI",
|
||||
- .irq_mask = ar71xx_pci_irq_mask,
|
||||
- .irq_unmask = ar71xx_pci_irq_unmask,
|
||||
- .irq_mask_ack = ar71xx_pci_irq_mask,
|
||||
-};
|
||||
-
|
||||
-static int ar71xx_pci_irq_map(struct irq_domain *d,
|
||||
- unsigned int irq, irq_hw_number_t hw)
|
||||
-{
|
||||
- struct ar71xx_pci_controller *apc = d->host_data;
|
||||
-
|
||||
- irq_set_chip_and_handler(irq, &ar71xx_pci_irq_chip, handle_level_irq);
|
||||
- irq_set_chip_data(irq, apc);
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-static const struct irq_domain_ops ar71xx_pci_domain_ops = {
|
||||
- .xlate = irq_domain_xlate_onecell,
|
||||
- .map = ar71xx_pci_irq_map,
|
||||
-};
|
||||
-
|
||||
-static void ar71xx_pci_irq_init(struct ar71xx_pci_controller *apc)
|
||||
-{
|
||||
- void __iomem *base = ath79_reset_base;
|
||||
-
|
||||
- __raw_writel(0, base + AR71XX_RESET_REG_PCI_INT_ENABLE);
|
||||
- __raw_writel(0, base + AR71XX_RESET_REG_PCI_INT_STATUS);
|
||||
-
|
||||
- apc->domain = irq_domain_add_linear(apc->np, AR71XX_PCI_IRQ_COUNT,
|
||||
- &ar71xx_pci_domain_ops, apc);
|
||||
- irq_set_chained_handler_and_data(apc->irq, ar71xx_pci_irq_handler,
|
||||
- apc);
|
||||
-}
|
||||
-
|
||||
static void ar71xx_pci_reset(void)
|
||||
{
|
||||
ath79_device_reset_set(AR71XX_RESET_PCI_BUS | AR71XX_RESET_PCI_CORE);
|
||||
@@ -358,10 +258,6 @@ static int ar71xx_pci_probe(struct platf
|
||||
if (IS_ERR(apc->cfg_base))
|
||||
return PTR_ERR(apc->cfg_base);
|
||||
|
||||
- apc->irq = platform_get_irq(pdev, 0);
|
||||
- if (apc->irq < 0)
|
||||
- return -EINVAL;
|
||||
-
|
||||
ar71xx_pci_reset();
|
||||
|
||||
/* setup COMMAND register */
|
||||
@@ -372,8 +268,6 @@ static int ar71xx_pci_probe(struct platf
|
||||
/* clear bus errors */
|
||||
ar71xx_pci_check_error(apc, 1);
|
||||
|
||||
- ar71xx_pci_irq_init(apc);
|
||||
-
|
||||
apc->np = pdev->dev.of_node;
|
||||
apc->pci_ctrl.pci_ops = &ar71xx_pci_ops;
|
||||
apc->pci_ctrl.mem_resource = &apc->mem_res;
|
||||
21
target/linux/ath79/patches-5.15/0037-missing-registers.patch
Normal file
21
target/linux/ath79/patches-5.15/0037-missing-registers.patch
Normal file
@ -0,0 +1,21 @@
|
||||
commit f3ffac90bc7266b7d917616f3233f58e8c08a196
|
||||
Author: Christian Lamparter <chunkeey@gmail.com>
|
||||
Date: Fri Aug 10 23:24:47 2018 +0200
|
||||
|
||||
ath79: gmac: add parsers for rxd(v)- and tx(d|en)-delay for AR9344
|
||||
|
||||
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||
|
||||
--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
|
||||
+++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
|
||||
@@ -1226,6 +1226,10 @@
|
||||
#define AR934X_ETH_CFG_RDV_DELAY BIT(16)
|
||||
#define AR934X_ETH_CFG_RDV_DELAY_MASK 0x3
|
||||
#define AR934X_ETH_CFG_RDV_DELAY_SHIFT 16
|
||||
+#define AR934X_ETH_CFG_TXD_DELAY_MASK 0x3
|
||||
+#define AR934X_ETH_CFG_TXD_DELAY_SHIFT 18
|
||||
+#define AR934X_ETH_CFG_TXE_DELAY_MASK 0x3
|
||||
+#define AR934X_ETH_CFG_TXE_DELAY_SHIFT 20
|
||||
|
||||
/*
|
||||
* QCA953X GMAC Interface
|
||||
@ -0,0 +1,90 @@
|
||||
From 60efe35257b063ce584968f9f80b437030ce6ba6 Mon Sep 17 00:00:00 2001
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Date: Mon, 18 Mar 2019 00:54:06 +0100
|
||||
Subject: [PATCH] MIPS: ath79: add missing QCA955x GMAC registers
|
||||
|
||||
This adds missing GMAC register definitions for the Qualcomm Atheros
|
||||
QCA955X series MIPS SoCs.
|
||||
|
||||
They originate from the platforms U-Boot code and the AVM FRITZ!WLAN
|
||||
Repeater 450E's GPL tarball.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
---
|
||||
.../mips/include/asm/mach-ath79/ar71xx_regs.h | 54 +++++++++++++++++++
|
||||
1 file changed, 54 insertions(+)
|
||||
|
||||
--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
|
||||
+++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
|
||||
@@ -1246,7 +1246,12 @@
|
||||
*/
|
||||
|
||||
#define QCA955X_GMAC_REG_ETH_CFG 0x00
|
||||
+#define QCA955X_GMAC_REG_SGMII_RESET 0x14
|
||||
#define QCA955X_GMAC_REG_SGMII_SERDES 0x18
|
||||
+#define QCA955X_GMAC_REG_MR_AN_CONTROL 0x1c
|
||||
+#define QCA955X_GMAC_REG_MR_AN_STATUS 0x20
|
||||
+#define QCA955X_GMAC_REG_SGMII_CONFIG 0x34
|
||||
+#define QCA955X_GMAC_REG_SGMII_DEBUG 0x58
|
||||
|
||||
#define QCA955X_ETH_CFG_RGMII_EN BIT(0)
|
||||
#define QCA955X_ETH_CFG_MII_GE0 BIT(1)
|
||||
@@ -1268,9 +1273,58 @@
|
||||
#define QCA955X_ETH_CFG_TXE_DELAY_MASK 0x3
|
||||
#define QCA955X_ETH_CFG_TXE_DELAY_SHIFT 20
|
||||
|
||||
+#define QCA955X_SGMII_RESET_RX_CLK_N_RESET 0
|
||||
+#define QCA955X_SGMII_RESET_RX_CLK_N BIT(0)
|
||||
+#define QCA955X_SGMII_RESET_TX_CLK_N BIT(1)
|
||||
+#define QCA955X_SGMII_RESET_RX_125M_N BIT(2)
|
||||
+#define QCA955X_SGMII_RESET_TX_125M_N BIT(3)
|
||||
+#define QCA955X_SGMII_RESET_HW_RX_125M_N BIT(4)
|
||||
+
|
||||
#define QCA955X_SGMII_SERDES_LOCK_DETECT_STATUS BIT(15)
|
||||
#define QCA955X_SGMII_SERDES_RES_CALIBRATION_SHIFT 23
|
||||
#define QCA955X_SGMII_SERDES_RES_CALIBRATION_MASK 0xf
|
||||
+
|
||||
+#define QCA955X_MR_AN_CONTROL_SPEED_SEL1 BIT(6)
|
||||
+#define QCA955X_MR_AN_CONTROL_DUPLEX_MODE BIT(8)
|
||||
+#define QCA955X_MR_AN_CONTROL_RESTART_AN BIT(9)
|
||||
+#define QCA955X_MR_AN_CONTROL_POWER_DOWN BIT(11)
|
||||
+#define QCA955X_MR_AN_CONTROL_AN_ENABLE BIT(12)
|
||||
+#define QCA955X_MR_AN_CONTROL_SPEED_SEL0 BIT(13)
|
||||
+#define QCA955X_MR_AN_CONTROL_LOOPBACK BIT(14)
|
||||
+#define QCA955X_MR_AN_CONTROL_PHY_RESET BIT(15)
|
||||
+
|
||||
+#define QCA955X_MR_AN_STATUS_EXT_CAP BIT(0)
|
||||
+#define QCA955X_MR_AN_STATUS_LINK_UP BIT(2)
|
||||
+#define QCA955X_MR_AN_STATUS_AN_ABILITY BIT(3)
|
||||
+#define QCA955X_MR_AN_STATUS_REMOTE_FAULT BIT(4)
|
||||
+#define QCA955X_MR_AN_STATUS_AN_COMPLETE BIT(5)
|
||||
+#define QCA955X_MR_AN_STATUS_NO_PREAMBLE BIT(6)
|
||||
+#define QCA955X_MR_AN_STATUS_BASE_PAGE BIT(7)
|
||||
+
|
||||
+#define QCA955X_SGMII_CONFIG_MODE_CTRL_SHIFT 0
|
||||
+#define QCA955X_SGMII_CONFIG_MODE_CTRL_MASK 0x7
|
||||
+#define QCA955X_SGMII_CONFIG_ENABLE_SGMII_TX_PAUSE BIT(3)
|
||||
+#define QCA955X_SGMII_CONFIG_MR_REG4_CHANGED BIT(4)
|
||||
+#define QCA955X_SGMII_CONFIG_FORCE_SPEED BIT(5)
|
||||
+#define QCA955X_SGMII_CONFIG_SPEED_SHIFT 6
|
||||
+#define QCA955X_SGMII_CONFIG_SPEED_MASK 0xc0
|
||||
+#define QCA955X_SGMII_CONFIG_REMOTE_PHY_LOOPBACK BIT(8)
|
||||
+#define QCA955X_SGMII_CONFIG_NEXT_PAGE_LOADED BIT(9)
|
||||
+#define QCA955X_SGMII_CONFIG_MDIO_ENABLE BIT(10)
|
||||
+#define QCA955X_SGMII_CONFIG_MDIO_PULSE BIT(11)
|
||||
+#define QCA955X_SGMII_CONFIG_MDIO_COMPLETE BIT(12)
|
||||
+#define QCA955X_SGMII_CONFIG_PRBS_ENABLE BIT(13)
|
||||
+#define QCA955X_SGMII_CONFIG_BERT_ENABLE BIT(14)
|
||||
+
|
||||
+#define QCA955X_SGMII_DEBUG_TX_STATE_MASK 0xff
|
||||
+#define QCA955X_SGMII_DEBUG_TX_STATE_SHIFT 0
|
||||
+#define QCA955X_SGMII_DEBUG_RX_STATE_MASK 0xff00
|
||||
+#define QCA955X_SGMII_DEBUG_RX_STATE_SHIFT 8
|
||||
+#define QCA955X_SGMII_DEBUG_RX_SYNC_STATE_MASK 0xff0000
|
||||
+#define QCA955X_SGMII_DEBUG_RX_SYNC_STATE_SHIFT 16
|
||||
+#define QCA955X_SGMII_DEBUG_ARB_STATE_MASK 0xf000000
|
||||
+#define QCA955X_SGMII_DEBUG_ARB_STATE_SHIFT 24
|
||||
+
|
||||
/*
|
||||
* QCA956X GMAC Interface
|
||||
*/
|
||||
@ -0,0 +1,52 @@
|
||||
--- a/arch/mips/ath79/clock.c
|
||||
+++ b/arch/mips/ath79/clock.c
|
||||
@@ -40,6 +40,7 @@ static const char * const clk_names[ATH7
|
||||
[ATH79_CLK_AHB] = "ahb",
|
||||
[ATH79_CLK_REF] = "ref",
|
||||
[ATH79_CLK_MDIO] = "mdio",
|
||||
+ [ATH79_CLK_UART1] = "uart1",
|
||||
};
|
||||
|
||||
static const char * __init ath79_clk_name(int type)
|
||||
@@ -344,6 +345,9 @@ static void __init ar934x_clocks_init(vo
|
||||
if (clk_ctrl & AR934X_PLL_SWITCH_CLOCK_CONTROL_MDIO_CLK_SEL)
|
||||
ath79_set_clk(ATH79_CLK_MDIO, 100 * 1000 * 1000);
|
||||
|
||||
+ if (clk_ctrl & AR934X_PLL_SWITCH_CLOCK_CONTROL_UART1_CLK_SEL)
|
||||
+ ath79_set_clk(ATH79_CLK_UART1, 100 * 1000 * 1000);
|
||||
+
|
||||
iounmap(dpll_base);
|
||||
}
|
||||
|
||||
@@ -649,6 +653,9 @@ static void __init ath79_clocks_init_dt(
|
||||
if (!clks[ATH79_CLK_MDIO])
|
||||
clks[ATH79_CLK_MDIO] = clks[ATH79_CLK_REF];
|
||||
|
||||
+ if (!clks[ATH79_CLK_UART1])
|
||||
+ clks[ATH79_CLK_UART1] = clks[ATH79_CLK_REF];
|
||||
+
|
||||
if (of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data)) {
|
||||
pr_err("%pOF: could not register clk provider\n", np);
|
||||
goto err_iounmap;
|
||||
--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
|
||||
+++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
|
||||
@@ -348,6 +348,7 @@
|
||||
#define AR934X_PLL_CPU_DDR_CLK_CTRL_AHBCLK_FROM_DDRPLL BIT(24)
|
||||
|
||||
#define AR934X_PLL_SWITCH_CLOCK_CONTROL_MDIO_CLK_SEL BIT(6)
|
||||
+#define AR934X_PLL_SWITCH_CLOCK_CONTROL_UART1_CLK_SEL BIT(7)
|
||||
|
||||
#define QCA953X_PLL_CPU_CONFIG_REG 0x00
|
||||
#define QCA953X_PLL_DDR_CONFIG_REG 0x04
|
||||
--- a/include/dt-bindings/clock/ath79-clk.h
|
||||
+++ b/include/dt-bindings/clock/ath79-clk.h
|
||||
@@ -11,7 +11,8 @@
|
||||
#define ATH79_CLK_AHB 2
|
||||
#define ATH79_CLK_REF 3
|
||||
#define ATH79_CLK_MDIO 4
|
||||
+#define ATH79_CLK_UART1 5
|
||||
|
||||
-#define ATH79_CLK_END 5
|
||||
+#define ATH79_CLK_END 6
|
||||
|
||||
#endif /* __DT_BINDINGS_ATH79_CLK_H */
|
||||
@ -0,0 +1,18 @@
|
||||
HACK: register the GPIO driver earlier to ensure that gpio_request calls
|
||||
from mach files succeed.
|
||||
|
||||
--- a/drivers/gpio/gpio-ath79.c
|
||||
+++ b/drivers/gpio/gpio-ath79.c
|
||||
@@ -297,7 +297,11 @@ static struct platform_driver ath79_gpio
|
||||
.probe = ath79_gpio_probe,
|
||||
};
|
||||
|
||||
-module_platform_driver(ath79_gpio_driver);
|
||||
+static int __init ath79_gpio_init(void)
|
||||
+{
|
||||
+ return platform_driver_register(&ath79_gpio_driver);
|
||||
+}
|
||||
+postcore_initcall(ath79_gpio_init);
|
||||
|
||||
MODULE_DESCRIPTION("Atheros AR71XX/AR724X/AR913X GPIO API support");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
@ -0,0 +1,9 @@
|
||||
--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
|
||||
+++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
|
||||
@@ -1376,5 +1376,6 @@
|
||||
|
||||
#define QCA956X_SGMII_CONFIG_MODE_CTRL_SHIFT 0
|
||||
#define QCA956X_SGMII_CONFIG_MODE_CTRL_MASK 0x7
|
||||
+#define QCA956X_SGMII_CONFIG_MODE_CTRL_SGMII_MAC 0x2
|
||||
|
||||
#endif /* __ASM_MACH_AR71XX_REGS_H */
|
||||
@ -0,0 +1,130 @@
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Date: Sat, 11 Apr 2020 14:03:12 +0200
|
||||
Subject: MIPS: pci-ar724x: add QCA9550 reset sequence
|
||||
|
||||
The QCA9550 family of SoCs have a slightly different reset
|
||||
sequence compared to older chips.
|
||||
|
||||
Normally the bootloader performs this sequence, however
|
||||
some bootloader implementation expect the operating system
|
||||
to clear the reset.
|
||||
|
||||
Also get the resets from OF to support handling of the second
|
||||
PCIe root-complex on the QCA9558.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
|
||||
--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
|
||||
+++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
|
||||
@@ -391,6 +391,7 @@
|
||||
#define QCA955X_PLL_CPU_CONFIG_REG 0x00
|
||||
#define QCA955X_PLL_DDR_CONFIG_REG 0x04
|
||||
#define QCA955X_PLL_CLK_CTRL_REG 0x08
|
||||
+#define QCA955X_PLL_PCIE_CONFIG_REG 0x0c
|
||||
#define QCA955X_PLL_ETH_XMII_CONTROL_REG 0x28
|
||||
#define QCA955X_PLL_ETH_SGMII_CONTROL_REG 0x48
|
||||
#define QCA955X_PLL_ETH_SGMII_SERDES_REG 0x4c
|
||||
@@ -476,6 +477,9 @@
|
||||
#define QCA956X_PLL_CLK_CTRL_CPU_DDRCLK_FROM_CPUPLL BIT(21)
|
||||
#define QCA956X_PLL_CLK_CTRL_AHBCLK_FROM_DDRPLL BIT(24)
|
||||
|
||||
+#define QCA955X_PLL_PCIE_CONFIG_PLL_PWD BIT(30)
|
||||
+#define QCA955X_PLL_PCIE_CONFIG_PLL_BYPASS BIT(16)
|
||||
+
|
||||
#define QCA956X_PLL_SWITCH_CLOCK_SPARE_I2C_CLK_SELB BIT(5)
|
||||
#define QCA956X_PLL_SWITCH_CLOCK_SPARE_MDIO_CLK_SEL0_1 BIT(6)
|
||||
#define QCA956X_PLL_SWITCH_CLOCK_SPARE_UART1_CLK_SEL BIT(7)
|
||||
--- a/arch/mips/pci/pci-ar724x.c
|
||||
+++ b/arch/mips/pci/pci-ar724x.c
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#include <linux/irq.h>
|
||||
#include <linux/pci.h>
|
||||
+#include <linux/reset.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/platform_device.h>
|
||||
@@ -55,6 +56,9 @@ struct ar724x_pci_controller {
|
||||
struct irq_domain *domain;
|
||||
struct resource io_res;
|
||||
struct resource mem_res;
|
||||
+
|
||||
+ struct reset_control *hc_reset;
|
||||
+ struct reset_control *phy_reset;
|
||||
};
|
||||
|
||||
static struct irq_chip ar724x_pci_irq_chip;
|
||||
@@ -340,18 +344,30 @@ static void ar724x_pci_hw_init(struct ar
|
||||
int wait = 0;
|
||||
|
||||
/* deassert PCIe host controller and PCIe PHY reset */
|
||||
- ath79_device_reset_clear(AR724X_RESET_PCIE);
|
||||
- ath79_device_reset_clear(AR724X_RESET_PCIE_PHY);
|
||||
+ reset_control_deassert(apc->hc_reset);
|
||||
+ reset_control_deassert(apc->phy_reset);
|
||||
|
||||
- /* remove the reset of the PCIE PLL */
|
||||
- ppl = ath79_pll_rr(AR724X_PLL_REG_PCIE_CONFIG);
|
||||
- ppl &= ~AR724X_PLL_REG_PCIE_CONFIG_PPL_RESET;
|
||||
- ath79_pll_wr(AR724X_PLL_REG_PCIE_CONFIG, ppl);
|
||||
-
|
||||
- /* deassert bypass for the PCIE PLL */
|
||||
- ppl = ath79_pll_rr(AR724X_PLL_REG_PCIE_CONFIG);
|
||||
- ppl &= ~AR724X_PLL_REG_PCIE_CONFIG_PPL_BYPASS;
|
||||
- ath79_pll_wr(AR724X_PLL_REG_PCIE_CONFIG, ppl);
|
||||
+ if (of_device_is_compatible(apc->np, "qcom,qca9550-pci")) {
|
||||
+ /* remove the reset of the PCIE PLL */
|
||||
+ ppl = ath79_pll_rr(QCA955X_PLL_PCIE_CONFIG_REG);
|
||||
+ ppl &= ~QCA955X_PLL_PCIE_CONFIG_PLL_PWD;
|
||||
+ ath79_pll_wr(QCA955X_PLL_PCIE_CONFIG_REG, ppl);
|
||||
+
|
||||
+ /* deassert bypass for the PCIE PLL */
|
||||
+ ppl = ath79_pll_rr(QCA955X_PLL_PCIE_CONFIG_REG);
|
||||
+ ppl &= ~QCA955X_PLL_PCIE_CONFIG_PLL_BYPASS;
|
||||
+ ath79_pll_wr(QCA955X_PLL_PCIE_CONFIG_REG, ppl);
|
||||
+ } else {
|
||||
+ /* remove the reset of the PCIE PLL */
|
||||
+ ppl = ath79_pll_rr(AR724X_PLL_REG_PCIE_CONFIG);
|
||||
+ ppl &= ~AR724X_PLL_REG_PCIE_CONFIG_PPL_RESET;
|
||||
+ ath79_pll_wr(AR724X_PLL_REG_PCIE_CONFIG, ppl);
|
||||
+
|
||||
+ /* deassert bypass for the PCIE PLL */
|
||||
+ ppl = ath79_pll_rr(AR724X_PLL_REG_PCIE_CONFIG);
|
||||
+ ppl &= ~AR724X_PLL_REG_PCIE_CONFIG_PPL_BYPASS;
|
||||
+ ath79_pll_wr(AR724X_PLL_REG_PCIE_CONFIG, ppl);
|
||||
+ }
|
||||
|
||||
/* set PCIE Application Control to ready */
|
||||
app = __raw_readl(apc->ctrl_base + AR724X_PCI_REG_APP);
|
||||
@@ -396,6 +412,14 @@ static int ar724x_pci_probe(struct platf
|
||||
if (apc->irq < 0)
|
||||
return -EINVAL;
|
||||
|
||||
+ apc->hc_reset = devm_reset_control_get_exclusive(&pdev->dev, "hc");
|
||||
+ if (IS_ERR(apc->hc_reset))
|
||||
+ return PTR_ERR(apc->hc_reset);
|
||||
+
|
||||
+ apc->phy_reset = devm_reset_control_get_exclusive(&pdev->dev, "phy");
|
||||
+ if (IS_ERR(apc->phy_reset))
|
||||
+ return PTR_ERR(apc->phy_reset);
|
||||
+
|
||||
apc->np = pdev->dev.of_node;
|
||||
apc->pci_controller.pci_ops = &ar724x_pci_ops;
|
||||
apc->pci_controller.io_resource = &apc->io_res;
|
||||
@@ -406,7 +430,7 @@ static int ar724x_pci_probe(struct platf
|
||||
* Do the full PCIE Root Complex Initialization Sequence if the PCIe
|
||||
* host controller is in reset.
|
||||
*/
|
||||
- if (ath79_reset_rr(AR724X_RESET_REG_RESET_MODULE) & AR724X_RESET_PCIE)
|
||||
+ if (reset_control_status(apc->hc_reset))
|
||||
ar724x_pci_hw_init(apc);
|
||||
|
||||
apc->link_up = ar724x_pci_check_link(apc);
|
||||
@@ -424,6 +448,7 @@ static int ar724x_pci_probe(struct platf
|
||||
|
||||
static const struct of_device_id ar724x_pci_ids[] = {
|
||||
{ .compatible = "qcom,ar7240-pci" },
|
||||
+ { .compatible = "qcom,qca9550-pci" },
|
||||
{},
|
||||
};
|
||||
|
||||
@ -0,0 +1,54 @@
|
||||
From f32bc2aa01edcba2f2ed5db151cf183eac9ef919 Mon Sep 17 00:00:00 2001
|
||||
From: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
|
||||
Date: Sat, 25 Feb 2017 16:42:50 +0000
|
||||
Subject: mtd: nor: support mtd name from device tree
|
||||
|
||||
Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
|
||||
---
|
||||
drivers/mtd/spi-nor/spi-nor.c | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/mtd/spi-nor/core.c
|
||||
+++ b/drivers/mtd/spi-nor/core.c
|
||||
@@ -3101,6 +3101,7 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
struct device *dev = nor->dev;
|
||||
struct mtd_info *mtd = &nor->mtd;
|
||||
struct device_node *np = spi_nor_get_flash_node(nor);
|
||||
+ const char __maybe_unused *of_mtd_name = NULL;
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
@@ -3155,7 +3156,12 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
- if (!mtd->name)
|
||||
+#ifdef CONFIG_MTD_OF_PARTS
|
||||
+ of_property_read_string(np, "linux,mtd-name", &of_mtd_name);
|
||||
+#endif
|
||||
+ if (of_mtd_name)
|
||||
+ mtd->name = of_mtd_name;
|
||||
+ else if (!mtd->name)
|
||||
mtd->name = dev_name(dev);
|
||||
mtd->priv = nor;
|
||||
mtd->type = MTD_NORFLASH;
|
||||
--- a/drivers/mtd/mtdcore.c
|
||||
+++ b/drivers/mtd/mtdcore.c
|
||||
@@ -778,6 +778,17 @@ out_error:
|
||||
*/
|
||||
static void mtd_set_dev_defaults(struct mtd_info *mtd)
|
||||
{
|
||||
+#ifdef CONFIG_MTD_OF_PARTS
|
||||
+ const char __maybe_unused *of_mtd_name = NULL;
|
||||
+ struct device_node *np;
|
||||
+
|
||||
+ np = mtd_get_of_node(mtd);
|
||||
+ if (np && !mtd->name) {
|
||||
+ of_property_read_string(np, "linux,mtd-name", &of_mtd_name);
|
||||
+ if (of_mtd_name)
|
||||
+ mtd->name = of_mtd_name;
|
||||
+ } else
|
||||
+#endif
|
||||
if (mtd->dev.parent) {
|
||||
if (!mtd->owner && mtd->dev.parent->driver)
|
||||
mtd->owner = mtd->dev.parent->driver->owner;
|
||||
@ -0,0 +1,27 @@
|
||||
--- a/drivers/mtd/parsers/Makefile
|
||||
+++ b/drivers/mtd/parsers/Makefile
|
||||
@@ -8,6 +8,7 @@ obj-$(CONFIG_MTD_OF_PARTS) += ofpart.o
|
||||
ofpart-y += ofpart_core.o
|
||||
ofpart-$(CONFIG_MTD_OF_PARTS_BCM4908) += ofpart_bcm4908.o
|
||||
ofpart-$(CONFIG_MTD_OF_PARTS_LINKSYS_NS)+= ofpart_linksys_ns.o
|
||||
+obj-$(CONFIG_MTD_PARSER_CYBERTAN) += parser_cybertan.o
|
||||
obj-$(CONFIG_MTD_PARSER_IMAGETAG) += parser_imagetag.o
|
||||
obj-$(CONFIG_MTD_AFS_PARTS) += afs.o
|
||||
obj-$(CONFIG_MTD_PARSER_TRX) += parser_trx.o
|
||||
--- a/drivers/mtd/parsers/Kconfig
|
||||
+++ b/drivers/mtd/parsers/Kconfig
|
||||
@@ -102,6 +102,14 @@ config MTD_OF_PARTS_LINKSYS_NS
|
||||
two "firmware" partitions. Currently used firmware has to be detected
|
||||
using CFE environment variable.
|
||||
|
||||
+config MTD_PARSER_CYBERTAN
|
||||
+ tristate "Parser for Cybertan format partitions"
|
||||
+ depends on MTD && (ATH79 || COMPILE_TEST)
|
||||
+ help
|
||||
+ Cybertan has a proprietory header than encompasses a Broadcom trx
|
||||
+ header. This driver will parse the header and take care of the
|
||||
+ special offsets that result in the extra headers.
|
||||
+
|
||||
config MTD_PARSER_IMAGETAG
|
||||
tristate "Parser for BCM963XX Image Tag format partitions"
|
||||
depends on BCM63XX || BMIPS_GENERIC || COMPILE_TEST
|
||||
@ -0,0 +1,45 @@
|
||||
--- a/drivers/mtd/parsers/redboot.c
|
||||
+++ b/drivers/mtd/parsers/redboot.c
|
||||
@@ -90,12 +90,18 @@ static int parse_redboot_partitions(stru
|
||||
|
||||
parse_redboot_of(master);
|
||||
|
||||
+ buf = vmalloc(master->erasesize);
|
||||
+ if (!buf)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ restart:
|
||||
if (directory < 0) {
|
||||
offset = master->size + directory * master->erasesize;
|
||||
while (mtd_block_isbad(master, offset)) {
|
||||
if (!offset) {
|
||||
nogood:
|
||||
pr_notice("Failed to find a non-bad block to check for RedBoot partition table\n");
|
||||
+ vfree(buf);
|
||||
return -EIO;
|
||||
}
|
||||
offset -= master->erasesize;
|
||||
@@ -108,10 +113,6 @@ nogood:
|
||||
goto nogood;
|
||||
}
|
||||
}
|
||||
- buf = vmalloc(master->erasesize);
|
||||
-
|
||||
- if (!buf)
|
||||
- return -ENOMEM;
|
||||
|
||||
pr_notice("Searching for RedBoot partition table in %s at offset 0x%lx\n",
|
||||
master->name, offset);
|
||||
@@ -183,6 +184,12 @@ nogood:
|
||||
}
|
||||
if (i == numslots) {
|
||||
/* Didn't find it */
|
||||
+ if (offset + master->erasesize < master->size) {
|
||||
+ /* not at the end of the flash yet, maybe next block :) */
|
||||
+ directory++;
|
||||
+ goto restart;
|
||||
+ }
|
||||
+
|
||||
pr_notice("No RedBoot partition table detected in %s\n",
|
||||
master->name);
|
||||
ret = 0;
|
||||
@ -0,0 +1,68 @@
|
||||
From 8d8cdb4a6ccee5b62cc0dc64651c3946364514dc Mon Sep 17 00:00:00 2001
|
||||
From: Luiz Angelo Daros de Luca <luizluca@gmail.com>
|
||||
Date: Mon, 10 Feb 2020 16:11:27 -0300
|
||||
Subject: [PATCH] spi: ath79: Implement the spi_mem interface
|
||||
|
||||
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
|
||||
---
|
||||
drivers/spi/spi-ath79.c | 35 +++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 35 insertions(+)
|
||||
|
||||
--- a/drivers/spi/spi-ath79.c
|
||||
+++ b/drivers/spi/spi-ath79.c
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/spi/spi.h>
|
||||
+#include <linux/spi/spi-mem.h>
|
||||
#include <linux/spi/spi_bitbang.h>
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/clk.h>
|
||||
@@ -133,6 +134,39 @@ static u32 ath79_spi_txrx_mode0(struct s
|
||||
return ath79_spi_rr(sp, AR71XX_SPI_REG_RDS);
|
||||
}
|
||||
|
||||
+static int ath79_exec_mem_op(struct spi_mem *mem,
|
||||
+ const struct spi_mem_op *op)
|
||||
+{
|
||||
+ struct ath79_spi *sp = ath79_spidev_to_sp(mem->spi);
|
||||
+
|
||||
+ /* Ensures that reading is performed on device connected
|
||||
+ to hardware cs0 */
|
||||
+ if (mem->spi->chip_select || mem->spi->cs_gpiod)
|
||||
+ return -ENOTSUPP;
|
||||
+
|
||||
+ /* Only use for fast-read op. */
|
||||
+ if (op->cmd.opcode != 0x0b || op->data.dir != SPI_MEM_DATA_IN ||
|
||||
+ op->addr.nbytes != 3 || op->dummy.nbytes != 1)
|
||||
+ return -ENOTSUPP;
|
||||
+
|
||||
+ /* disable GPIO mode */
|
||||
+ ath79_spi_wr(sp, AR71XX_SPI_REG_FS, 0);
|
||||
+
|
||||
+ memcpy_fromio(op->data.buf.in, sp->base + op->addr.val, op->data.nbytes);
|
||||
+
|
||||
+ /* enable GPIO mode */
|
||||
+ ath79_spi_wr(sp, AR71XX_SPI_REG_FS, AR71XX_SPI_FS_GPIO);
|
||||
+
|
||||
+ /* restore IOC register */
|
||||
+ ath79_spi_wr(sp, AR71XX_SPI_REG_IOC, sp->ioc_base);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct spi_controller_mem_ops ath79_mem_ops = {
|
||||
+ .exec_op = ath79_exec_mem_op,
|
||||
+};
|
||||
+
|
||||
static int ath79_spi_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct spi_master *master;
|
||||
@@ -165,6 +199,7 @@ static int ath79_spi_probe(struct platfo
|
||||
ret = PTR_ERR(sp->base);
|
||||
goto err_put_master;
|
||||
}
|
||||
+ master->mem_ops = &ath79_mem_ops;
|
||||
|
||||
sp->clk = devm_clk_get(&pdev->dev, "ahb");
|
||||
if (IS_ERR(sp->clk)) {
|
||||
@ -0,0 +1,29 @@
|
||||
--- a/drivers/net/ethernet/atheros/Kconfig
|
||||
+++ b/drivers/net/ethernet/atheros/Kconfig
|
||||
@@ -17,14 +17,7 @@ config NET_VENDOR_ATHEROS
|
||||
|
||||
if NET_VENDOR_ATHEROS
|
||||
|
||||
-config AG71XX
|
||||
- tristate "Atheros AR7XXX/AR9XXX built-in ethernet mac support"
|
||||
- depends on ATH79
|
||||
- select PHYLINK
|
||||
- imply NET_SELFTESTS
|
||||
- help
|
||||
- If you wish to compile a kernel for AR7XXX/91XXX and enable
|
||||
- ethernet support, then you should always answer Y to this.
|
||||
+source "drivers/net/ethernet/atheros/ag71xx/Kconfig"
|
||||
|
||||
config ATL2
|
||||
tristate "Atheros L2 Fast Ethernet support"
|
||||
--- a/drivers/net/ethernet/atheros/Makefile
|
||||
+++ b/drivers/net/ethernet/atheros/Makefile
|
||||
@@ -3,7 +3,7 @@
|
||||
# Makefile for the Atheros network device drivers.
|
||||
#
|
||||
|
||||
-obj-$(CONFIG_AG71XX) += ag71xx.o
|
||||
+obj-$(CONFIG_AG71XX) += ag71xx/
|
||||
obj-$(CONFIG_ATL1) += atlx/
|
||||
obj-$(CONFIG_ATL2) += atlx/
|
||||
obj-$(CONFIG_ATL1E) += atl1e/
|
||||
@ -0,0 +1,12 @@
|
||||
--- a/drivers/Makefile
|
||||
+++ b/drivers/Makefile
|
||||
@@ -80,8 +80,8 @@ obj-y += scsi/
|
||||
obj-y += nvme/
|
||||
obj-$(CONFIG_ATA) += ata/
|
||||
obj-$(CONFIG_TARGET_CORE) += target/
|
||||
-obj-$(CONFIG_MTD) += mtd/
|
||||
obj-$(CONFIG_SPI) += spi/
|
||||
+obj-$(CONFIG_MTD) += mtd/
|
||||
obj-$(CONFIG_SPMI) += spmi/
|
||||
obj-$(CONFIG_HSI) += hsi/
|
||||
obj-$(CONFIG_SLIMBUS) += slimbus/
|
||||
@ -0,0 +1,25 @@
|
||||
--- a/drivers/mtd/nand/raw/Kconfig
|
||||
+++ b/drivers/mtd/nand/raw/Kconfig
|
||||
@@ -555,4 +555,12 @@ config MTD_NAND_DISKONCHIP_BBTWRITE
|
||||
load time (assuming you build diskonchip as a module) with the module
|
||||
parameter "inftl_bbt_write=1".
|
||||
|
||||
+config MTD_NAND_AR934X
|
||||
+ tristate "Support for NAND controller on Qualcomm Atheros AR934x/QCA955x SoCs"
|
||||
+ depends on ATH79 || COMPILE_TEST
|
||||
+ depends on HAS_IOMEM
|
||||
+ help
|
||||
+ Enables support for NAND controller on Qualcomm Atheros SoCs.
|
||||
+ This controller is found on AR934x and QCA955x SoCs.
|
||||
+
|
||||
endif # MTD_RAW_NAND
|
||||
--- a/drivers/mtd/nand/raw/Makefile
|
||||
+++ b/drivers/mtd/nand/raw/Makefile
|
||||
@@ -58,6 +58,7 @@ obj-$(CONFIG_MTD_NAND_ARASAN) += arasan
|
||||
obj-$(CONFIG_MTD_NAND_INTEL_LGM) += intel-nand-controller.o
|
||||
obj-$(CONFIG_MTD_NAND_ROCKCHIP) += rockchip-nand-controller.o
|
||||
obj-$(CONFIG_MTD_NAND_PL35X) += pl35x-nand-controller.o
|
||||
+obj-$(CONFIG_MTD_NAND_AR934X) += ar934x_nand.o
|
||||
|
||||
nand-objs := nand_base.o nand_legacy.o nand_bbt.o nand_timings.o nand_ids.o
|
||||
nand-objs += nand_onfi.o
|
||||
@ -0,0 +1,98 @@
|
||||
--- /dev/null
|
||||
+++ b/arch/mips/include/asm/mach-ath79/mangle-port.h
|
||||
@@ -0,0 +1,37 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2012 Gabor Juhos <juhosg@openwrt.org>
|
||||
+ *
|
||||
+ * This file was derived from: inlude/asm-mips/mach-generic/mangle-port.h
|
||||
+ * Copyright (C) 2003, 2004 Ralf Baechle
|
||||
+ *
|
||||
+ * 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 __ASM_MACH_ATH79_MANGLE_PORT_H
|
||||
+#define __ASM_MACH_ATH79_MANGLE_PORT_H
|
||||
+
|
||||
+#ifdef CONFIG_PCI_AR71XX
|
||||
+extern unsigned long (ath79_pci_swizzle_b)(unsigned long port);
|
||||
+extern unsigned long (ath79_pci_swizzle_w)(unsigned long port);
|
||||
+#else
|
||||
+#define ath79_pci_swizzle_b(port) (port)
|
||||
+#define ath79_pci_swizzle_w(port) (port)
|
||||
+#endif
|
||||
+
|
||||
+#define __swizzle_addr_b(port) ath79_pci_swizzle_b(port)
|
||||
+#define __swizzle_addr_w(port) ath79_pci_swizzle_w(port)
|
||||
+#define __swizzle_addr_l(port) (port)
|
||||
+#define __swizzle_addr_q(port) (port)
|
||||
+
|
||||
+# define ioswabb(a, x) (x)
|
||||
+# define __mem_ioswabb(a, x) (x)
|
||||
+# define ioswabw(a, x) (x)
|
||||
+# define __mem_ioswabw(a, x) cpu_to_le16(x)
|
||||
+# define ioswabl(a, x) (x)
|
||||
+# define __mem_ioswabl(a, x) cpu_to_le32(x)
|
||||
+# define ioswabq(a, x) (x)
|
||||
+# define __mem_ioswabq(a, x) cpu_to_le64(x)
|
||||
+
|
||||
+#endif /* __ASM_MACH_ATH79_MANGLE_PORT_H */
|
||||
--- a/arch/mips/pci/pci-ar71xx.c
|
||||
+++ b/arch/mips/pci/pci-ar71xx.c
|
||||
@@ -68,6 +68,45 @@ static const u32 ar71xx_pci_read_mask[8]
|
||||
0, 0xff, 0xffff, 0, 0xffffffff, 0, 0, 0
|
||||
};
|
||||
|
||||
+static unsigned long (*__ath79_pci_swizzle_b)(unsigned long port);
|
||||
+static unsigned long (*__ath79_pci_swizzle_w)(unsigned long port);
|
||||
+
|
||||
+static inline bool ar71xx_is_pci_addr(unsigned long port)
|
||||
+{
|
||||
+ unsigned long phys = CPHYSADDR(port);
|
||||
+
|
||||
+ return (phys >= AR71XX_PCI_MEM_BASE &&
|
||||
+ phys < AR71XX_PCI_MEM_BASE + AR71XX_PCI_MEM_SIZE);
|
||||
+}
|
||||
+
|
||||
+static unsigned long ar71xx_pci_swizzle_b(unsigned long port)
|
||||
+{
|
||||
+ return ar71xx_is_pci_addr(port) ? port ^ 3 : port;
|
||||
+}
|
||||
+
|
||||
+static unsigned long ar71xx_pci_swizzle_w(unsigned long port)
|
||||
+{
|
||||
+ return ar71xx_is_pci_addr(port) ? port ^ 2 : port;
|
||||
+}
|
||||
+
|
||||
+unsigned long ath79_pci_swizzle_b(unsigned long port)
|
||||
+{
|
||||
+ if (__ath79_pci_swizzle_b)
|
||||
+ return __ath79_pci_swizzle_b(port);
|
||||
+
|
||||
+ return port;
|
||||
+}
|
||||
+EXPORT_SYMBOL(ath79_pci_swizzle_b);
|
||||
+
|
||||
+unsigned long ath79_pci_swizzle_w(unsigned long port)
|
||||
+{
|
||||
+ if (__ath79_pci_swizzle_w)
|
||||
+ return __ath79_pci_swizzle_w(port);
|
||||
+
|
||||
+ return port;
|
||||
+}
|
||||
+EXPORT_SYMBOL(ath79_pci_swizzle_w);
|
||||
+
|
||||
static inline u32 ar71xx_pci_get_ble(int where, int size, int local)
|
||||
{
|
||||
u32 t;
|
||||
@@ -276,6 +315,9 @@ static int ar71xx_pci_probe(struct platf
|
||||
|
||||
register_pci_controller(&apc->pci_ctrl);
|
||||
|
||||
+ __ath79_pci_swizzle_b = ar71xx_pci_swizzle_b;
|
||||
+ __ath79_pci_swizzle_w = ar71xx_pci_swizzle_w;
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -0,0 +1,32 @@
|
||||
--- a/drivers/net/mdio/mdio-bitbang.c
|
||||
+++ b/drivers/net/mdio/mdio-bitbang.c
|
||||
@@ -152,7 +152,7 @@ static int mdiobb_cmd_addr(struct mdiobb
|
||||
int mdiobb_read(struct mii_bus *bus, int phy, int reg)
|
||||
{
|
||||
struct mdiobb_ctrl *ctrl = bus->priv;
|
||||
- int ret, i;
|
||||
+ int ret;
|
||||
|
||||
if (reg & MII_ADDR_C45) {
|
||||
reg = mdiobb_cmd_addr(ctrl, phy, reg);
|
||||
@@ -162,19 +162,7 @@ int mdiobb_read(struct mii_bus *bus, int
|
||||
|
||||
ctrl->ops->set_mdio_dir(ctrl, 0);
|
||||
|
||||
- /* check the turnaround bit: the PHY should be driving it to zero, if this
|
||||
- * PHY is listed in phy_ignore_ta_mask as having broken TA, skip that
|
||||
- */
|
||||
- if (mdiobb_get_bit(ctrl) != 0 &&
|
||||
- !(bus->phy_ignore_ta_mask & (1 << phy))) {
|
||||
- /* PHY didn't drive TA low -- flush any bits it
|
||||
- * may be trying to send.
|
||||
- */
|
||||
- for (i = 0; i < 32; i++)
|
||||
- mdiobb_get_bit(ctrl);
|
||||
-
|
||||
- return 0xffff;
|
||||
- }
|
||||
+ mdiobb_get_bit(ctrl);
|
||||
|
||||
ret = mdiobb_get_num(ctrl, 16);
|
||||
mdiobb_get_bit(ctrl);
|
||||
@ -0,0 +1,61 @@
|
||||
From 66e584435ac0de6e0abeb6d7166fe4fe25d6bb73 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Gorski <jogo@openwrt.org>
|
||||
Date: Tue, 16 Jun 2015 13:15:08 +0200
|
||||
Subject: [PATCH] phy/mdio-bitbang: prevent rescheduling during command
|
||||
|
||||
It seems some phys have some maximum timings for accessing the MDIO line,
|
||||
resulting in bit errors under cpu stress. Prevent this from happening by
|
||||
disabling interrupts when sending commands.
|
||||
|
||||
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
---
|
||||
drivers/net/mdio/mdio-bitbang.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
--- a/drivers/net/mdio/mdio-bitbang.c
|
||||
+++ b/drivers/net/mdio/mdio-bitbang.c
|
||||
@@ -14,6 +14,7 @@
|
||||
* Vitaly Bordug <vbordug@ru.mvista.com>
|
||||
*/
|
||||
|
||||
+#include <linux/irqflags.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/mdio-bitbang.h>
|
||||
#include <linux/module.h>
|
||||
@@ -153,7 +154,9 @@ int mdiobb_read(struct mii_bus *bus, int
|
||||
{
|
||||
struct mdiobb_ctrl *ctrl = bus->priv;
|
||||
int ret;
|
||||
+ unsigned long flags;
|
||||
|
||||
+ local_irq_save(flags);
|
||||
if (reg & MII_ADDR_C45) {
|
||||
reg = mdiobb_cmd_addr(ctrl, phy, reg);
|
||||
mdiobb_cmd(ctrl, MDIO_C45_READ, phy, reg);
|
||||
@@ -166,6 +169,7 @@ int mdiobb_read(struct mii_bus *bus, int
|
||||
|
||||
ret = mdiobb_get_num(ctrl, 16);
|
||||
mdiobb_get_bit(ctrl);
|
||||
+ local_irq_restore(flags);
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(mdiobb_read);
|
||||
@@ -173,7 +177,9 @@ EXPORT_SYMBOL(mdiobb_read);
|
||||
int mdiobb_write(struct mii_bus *bus, int phy, int reg, u16 val)
|
||||
{
|
||||
struct mdiobb_ctrl *ctrl = bus->priv;
|
||||
+ unsigned long flags;
|
||||
|
||||
+ local_irq_save(flags);
|
||||
if (reg & MII_ADDR_C45) {
|
||||
reg = mdiobb_cmd_addr(ctrl, phy, reg);
|
||||
mdiobb_cmd(ctrl, MDIO_C45_WRITE, phy, reg);
|
||||
@@ -188,6 +194,8 @@ int mdiobb_write(struct mii_bus *bus, in
|
||||
|
||||
ctrl->ops->set_mdio_dir(ctrl, 0);
|
||||
mdiobb_get_bit(ctrl);
|
||||
+ local_irq_restore(flags);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(mdiobb_write);
|
||||
855
target/linux/ath79/patches-5.15/910-unaligned_access_hacks.patch
Normal file
855
target/linux/ath79/patches-5.15/910-unaligned_access_hacks.patch
Normal file
@ -0,0 +1,855 @@
|
||||
--- a/arch/mips/include/asm/checksum.h
|
||||
+++ b/arch/mips/include/asm/checksum.h
|
||||
@@ -100,26 +100,30 @@ static inline __sum16 ip_fast_csum(const
|
||||
const unsigned int *stop = word + ihl;
|
||||
unsigned int csum;
|
||||
int carry;
|
||||
+ unsigned int w;
|
||||
|
||||
- csum = word[0];
|
||||
- csum += word[1];
|
||||
- carry = (csum < word[1]);
|
||||
+ csum = net_hdr_word(word++);
|
||||
+
|
||||
+ w = net_hdr_word(word++);
|
||||
+ csum += w;
|
||||
+ carry = (csum < w);
|
||||
csum += carry;
|
||||
|
||||
- csum += word[2];
|
||||
- carry = (csum < word[2]);
|
||||
+ w = net_hdr_word(word++);
|
||||
+ csum += w;
|
||||
+ carry = (csum < w);
|
||||
csum += carry;
|
||||
|
||||
- csum += word[3];
|
||||
- carry = (csum < word[3]);
|
||||
+ w = net_hdr_word(word++);
|
||||
+ csum += w;
|
||||
+ carry = (csum < w);
|
||||
csum += carry;
|
||||
|
||||
- word += 4;
|
||||
do {
|
||||
- csum += *word;
|
||||
- carry = (csum < *word);
|
||||
+ w = net_hdr_word(word++);
|
||||
+ csum += w;
|
||||
+ carry = (csum < w);
|
||||
csum += carry;
|
||||
- word++;
|
||||
} while (word != stop);
|
||||
|
||||
return csum_fold(csum);
|
||||
@@ -182,73 +186,6 @@ static inline __sum16 ip_compute_csum(co
|
||||
return csum_fold(csum_partial(buff, len, 0));
|
||||
}
|
||||
|
||||
-#define _HAVE_ARCH_IPV6_CSUM
|
||||
-static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr,
|
||||
- const struct in6_addr *daddr,
|
||||
- __u32 len, __u8 proto,
|
||||
- __wsum sum)
|
||||
-{
|
||||
- __wsum tmp;
|
||||
-
|
||||
- __asm__(
|
||||
- " .set push # csum_ipv6_magic\n"
|
||||
- " .set noreorder \n"
|
||||
- " .set noat \n"
|
||||
- " addu %0, %5 # proto (long in network byte order)\n"
|
||||
- " sltu $1, %0, %5 \n"
|
||||
- " addu %0, $1 \n"
|
||||
-
|
||||
- " addu %0, %6 # csum\n"
|
||||
- " sltu $1, %0, %6 \n"
|
||||
- " lw %1, 0(%2) # four words source address\n"
|
||||
- " addu %0, $1 \n"
|
||||
- " addu %0, %1 \n"
|
||||
- " sltu $1, %0, %1 \n"
|
||||
-
|
||||
- " lw %1, 4(%2) \n"
|
||||
- " addu %0, $1 \n"
|
||||
- " addu %0, %1 \n"
|
||||
- " sltu $1, %0, %1 \n"
|
||||
-
|
||||
- " lw %1, 8(%2) \n"
|
||||
- " addu %0, $1 \n"
|
||||
- " addu %0, %1 \n"
|
||||
- " sltu $1, %0, %1 \n"
|
||||
-
|
||||
- " lw %1, 12(%2) \n"
|
||||
- " addu %0, $1 \n"
|
||||
- " addu %0, %1 \n"
|
||||
- " sltu $1, %0, %1 \n"
|
||||
-
|
||||
- " lw %1, 0(%3) \n"
|
||||
- " addu %0, $1 \n"
|
||||
- " addu %0, %1 \n"
|
||||
- " sltu $1, %0, %1 \n"
|
||||
-
|
||||
- " lw %1, 4(%3) \n"
|
||||
- " addu %0, $1 \n"
|
||||
- " addu %0, %1 \n"
|
||||
- " sltu $1, %0, %1 \n"
|
||||
-
|
||||
- " lw %1, 8(%3) \n"
|
||||
- " addu %0, $1 \n"
|
||||
- " addu %0, %1 \n"
|
||||
- " sltu $1, %0, %1 \n"
|
||||
-
|
||||
- " lw %1, 12(%3) \n"
|
||||
- " addu %0, $1 \n"
|
||||
- " addu %0, %1 \n"
|
||||
- " sltu $1, %0, %1 \n"
|
||||
-
|
||||
- " addu %0, $1 # Add final carry\n"
|
||||
- " .set pop"
|
||||
- : "=&r" (sum), "=&r" (tmp)
|
||||
- : "r" (saddr), "r" (daddr),
|
||||
- "0" (htonl(len)), "r" (htonl(proto)), "r" (sum));
|
||||
-
|
||||
- return csum_fold(sum);
|
||||
-}
|
||||
-
|
||||
#include <asm-generic/checksum.h>
|
||||
#endif /* CONFIG_GENERIC_CSUM */
|
||||
|
||||
--- a/include/uapi/linux/ip.h
|
||||
+++ b/include/uapi/linux/ip.h
|
||||
@@ -103,7 +103,7 @@ struct iphdr {
|
||||
__be32 saddr;
|
||||
__be32 daddr;
|
||||
/*The options start here. */
|
||||
-};
|
||||
+} __attribute__((packed, aligned(2)));
|
||||
|
||||
|
||||
struct ip_auth_hdr {
|
||||
--- a/include/uapi/linux/ipv6.h
|
||||
+++ b/include/uapi/linux/ipv6.h
|
||||
@@ -132,7 +132,7 @@ struct ipv6hdr {
|
||||
|
||||
struct in6_addr saddr;
|
||||
struct in6_addr daddr;
|
||||
-};
|
||||
+} __attribute__((packed, aligned(2)));
|
||||
|
||||
|
||||
/* index values for the variables in ipv6_devconf */
|
||||
--- a/include/uapi/linux/tcp.h
|
||||
+++ b/include/uapi/linux/tcp.h
|
||||
@@ -55,7 +55,7 @@ struct tcphdr {
|
||||
__be16 window;
|
||||
__sum16 check;
|
||||
__be16 urg_ptr;
|
||||
-};
|
||||
+} __attribute__((packed, aligned(2)));
|
||||
|
||||
/*
|
||||
* The union cast uses a gcc extension to avoid aliasing problems
|
||||
@@ -65,7 +65,7 @@ struct tcphdr {
|
||||
union tcp_word_hdr {
|
||||
struct tcphdr hdr;
|
||||
__be32 words[5];
|
||||
-};
|
||||
+} __attribute__((packed, aligned(2)));
|
||||
|
||||
#define tcp_flag_word(tp) (((union tcp_word_hdr *)(tp))->words[3])
|
||||
|
||||
--- a/include/uapi/linux/udp.h
|
||||
+++ b/include/uapi/linux/udp.h
|
||||
@@ -25,7 +25,7 @@ struct udphdr {
|
||||
__be16 dest;
|
||||
__be16 len;
|
||||
__sum16 check;
|
||||
-};
|
||||
+} __attribute__((packed, aligned(2)));
|
||||
|
||||
/* UDP socket options */
|
||||
#define UDP_CORK 1 /* Never send partially complete segments */
|
||||
--- a/net/netfilter/nf_conntrack_core.c
|
||||
+++ b/net/netfilter/nf_conntrack_core.c
|
||||
@@ -292,8 +292,8 @@ nf_ct_get_tuple(const struct sk_buff *sk
|
||||
|
||||
switch (l3num) {
|
||||
case NFPROTO_IPV4:
|
||||
- tuple->src.u3.ip = ap[0];
|
||||
- tuple->dst.u3.ip = ap[1];
|
||||
+ tuple->src.u3.ip = net_hdr_word(ap++);
|
||||
+ tuple->dst.u3.ip = net_hdr_word(ap);
|
||||
break;
|
||||
case NFPROTO_IPV6:
|
||||
memcpy(tuple->src.u3.ip6, ap, sizeof(tuple->src.u3.ip6));
|
||||
--- a/include/uapi/linux/icmp.h
|
||||
+++ b/include/uapi/linux/icmp.h
|
||||
@@ -102,7 +102,7 @@ struct icmphdr {
|
||||
} frag;
|
||||
__u8 reserved[4];
|
||||
} un;
|
||||
-};
|
||||
+} __attribute__((packed, aligned(2)));
|
||||
|
||||
|
||||
/*
|
||||
--- a/include/uapi/linux/in6.h
|
||||
+++ b/include/uapi/linux/in6.h
|
||||
@@ -43,7 +43,7 @@ struct in6_addr {
|
||||
#define s6_addr16 in6_u.u6_addr16
|
||||
#define s6_addr32 in6_u.u6_addr32
|
||||
#endif
|
||||
-};
|
||||
+} __attribute__((packed, aligned(2)));
|
||||
#endif /* __UAPI_DEF_IN6_ADDR */
|
||||
|
||||
#if __UAPI_DEF_SOCKADDR_IN6
|
||||
--- a/net/ipv6/tcp_ipv6.c
|
||||
+++ b/net/ipv6/tcp_ipv6.c
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <linux/ipsec.h>
|
||||
#include <linux/times.h>
|
||||
#include <linux/slab.h>
|
||||
+#include <asm/unaligned.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/ipv6.h>
|
||||
#include <linux/icmpv6.h>
|
||||
@@ -941,10 +942,10 @@ static void tcp_v6_send_response(const s
|
||||
topt = (__be32 *)(t1 + 1);
|
||||
|
||||
if (tsecr) {
|
||||
- *topt++ = htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) |
|
||||
- (TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP);
|
||||
- *topt++ = htonl(tsval);
|
||||
- *topt++ = htonl(tsecr);
|
||||
+ put_unaligned_be32((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) |
|
||||
+ (TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP, topt++);
|
||||
+ put_unaligned_be32(tsval, topt++);
|
||||
+ put_unaligned_be32(tsecr, topt++);
|
||||
}
|
||||
|
||||
if (mrst)
|
||||
--- a/include/linux/ipv6.h
|
||||
+++ b/include/linux/ipv6.h
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#define ipv6_optlen(p) (((p)->hdrlen+1) << 3)
|
||||
#define ipv6_authlen(p) (((p)->hdrlen+2) << 2)
|
||||
+
|
||||
/*
|
||||
* This structure contains configuration options per IPv6 link.
|
||||
*/
|
||||
--- a/net/ipv6/datagram.c
|
||||
+++ b/net/ipv6/datagram.c
|
||||
@@ -492,7 +492,7 @@ int ipv6_recv_error(struct sock *sk, str
|
||||
ipv6_iface_scope_id(&sin->sin6_addr,
|
||||
IP6CB(skb)->iif);
|
||||
} else {
|
||||
- ipv6_addr_set_v4mapped(*(__be32 *)(nh + serr->addr_offset),
|
||||
+ ipv6_addr_set_v4mapped(net_hdr_word(nh + serr->addr_offset),
|
||||
&sin->sin6_addr);
|
||||
sin->sin6_scope_id = 0;
|
||||
}
|
||||
@@ -846,12 +846,12 @@ int ip6_datagram_send_ctl(struct net *ne
|
||||
}
|
||||
|
||||
if (fl6->flowlabel&IPV6_FLOWINFO_MASK) {
|
||||
- if ((fl6->flowlabel^*(__be32 *)CMSG_DATA(cmsg))&~IPV6_FLOWINFO_MASK) {
|
||||
+ if ((fl6->flowlabel^net_hdr_word(CMSG_DATA(cmsg)))&~IPV6_FLOWINFO_MASK) {
|
||||
err = -EINVAL;
|
||||
goto exit_f;
|
||||
}
|
||||
}
|
||||
- fl6->flowlabel = IPV6_FLOWINFO_MASK & *(__be32 *)CMSG_DATA(cmsg);
|
||||
+ fl6->flowlabel = IPV6_FLOWINFO_MASK & net_hdr_word(CMSG_DATA(cmsg));
|
||||
break;
|
||||
|
||||
case IPV6_2292HOPOPTS:
|
||||
--- a/net/ipv6/exthdrs.c
|
||||
+++ b/net/ipv6/exthdrs.c
|
||||
@@ -1009,7 +1009,7 @@ static bool ipv6_hop_jumbo(struct sk_buf
|
||||
goto drop;
|
||||
}
|
||||
|
||||
- pkt_len = ntohl(*(__be32 *)(nh + optoff + 2));
|
||||
+ pkt_len = ntohl(net_hdr_word(nh + optoff + 2));
|
||||
if (pkt_len <= IPV6_MAXPLEN) {
|
||||
__IP6_INC_STATS(net, idev, IPSTATS_MIB_INHDRERRORS);
|
||||
icmpv6_param_prob(skb, ICMPV6_HDR_FIELD, optoff+2);
|
||||
--- a/include/linux/types.h
|
||||
+++ b/include/linux/types.h
|
||||
@@ -231,5 +231,11 @@ typedef void (*swap_func_t)(void *a, voi
|
||||
typedef int (*cmp_r_func_t)(const void *a, const void *b, const void *priv);
|
||||
typedef int (*cmp_func_t)(const void *a, const void *b);
|
||||
|
||||
+struct net_hdr_word {
|
||||
+ u32 words[1];
|
||||
+} __attribute__((packed, aligned(2)));
|
||||
+
|
||||
+#define net_hdr_word(_p) (((struct net_hdr_word *) (_p))->words[0])
|
||||
+
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* _LINUX_TYPES_H */
|
||||
--- a/net/ipv4/af_inet.c
|
||||
+++ b/net/ipv4/af_inet.c
|
||||
@@ -1475,8 +1475,8 @@ struct sk_buff *inet_gro_receive(struct
|
||||
if (unlikely(ip_fast_csum((u8 *)iph, 5)))
|
||||
goto out_unlock;
|
||||
|
||||
- id = ntohl(*(__be32 *)&iph->id);
|
||||
- flush = (u16)((ntohl(*(__be32 *)iph) ^ skb_gro_len(skb)) | (id & ~IP_DF));
|
||||
+ id = ntohl(net_hdr_word(&iph->id));
|
||||
+ flush = (u16)((ntohl(net_hdr_word(iph)) ^ skb_gro_len(skb)) | (id & ~IP_DF));
|
||||
id >>= 16;
|
||||
|
||||
list_for_each_entry(p, head, list) {
|
||||
--- a/net/ipv4/tcp_output.c
|
||||
+++ b/net/ipv4/tcp_output.c
|
||||
@@ -612,48 +612,53 @@ static void tcp_options_write(__be32 *pt
|
||||
u16 options = opts->options; /* mungable copy */
|
||||
|
||||
if (unlikely(OPTION_MD5 & options)) {
|
||||
- *ptr++ = htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) |
|
||||
- (TCPOPT_MD5SIG << 8) | TCPOLEN_MD5SIG);
|
||||
+ net_hdr_word(ptr++) =
|
||||
+ htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) |
|
||||
+ (TCPOPT_MD5SIG << 8) | TCPOLEN_MD5SIG);
|
||||
/* overload cookie hash location */
|
||||
opts->hash_location = (__u8 *)ptr;
|
||||
ptr += 4;
|
||||
}
|
||||
|
||||
if (unlikely(opts->mss)) {
|
||||
- *ptr++ = htonl((TCPOPT_MSS << 24) |
|
||||
- (TCPOLEN_MSS << 16) |
|
||||
- opts->mss);
|
||||
+ net_hdr_word(ptr++) =
|
||||
+ htonl((TCPOPT_MSS << 24) | (TCPOLEN_MSS << 16) |
|
||||
+ opts->mss);
|
||||
}
|
||||
|
||||
if (likely(OPTION_TS & options)) {
|
||||
if (unlikely(OPTION_SACK_ADVERTISE & options)) {
|
||||
- *ptr++ = htonl((TCPOPT_SACK_PERM << 24) |
|
||||
- (TCPOLEN_SACK_PERM << 16) |
|
||||
- (TCPOPT_TIMESTAMP << 8) |
|
||||
- TCPOLEN_TIMESTAMP);
|
||||
+ net_hdr_word(ptr++) =
|
||||
+ htonl((TCPOPT_SACK_PERM << 24) |
|
||||
+ (TCPOLEN_SACK_PERM << 16) |
|
||||
+ (TCPOPT_TIMESTAMP << 8) |
|
||||
+ TCPOLEN_TIMESTAMP);
|
||||
options &= ~OPTION_SACK_ADVERTISE;
|
||||
} else {
|
||||
- *ptr++ = htonl((TCPOPT_NOP << 24) |
|
||||
- (TCPOPT_NOP << 16) |
|
||||
- (TCPOPT_TIMESTAMP << 8) |
|
||||
- TCPOLEN_TIMESTAMP);
|
||||
+ net_hdr_word(ptr++) =
|
||||
+ htonl((TCPOPT_NOP << 24) |
|
||||
+ (TCPOPT_NOP << 16) |
|
||||
+ (TCPOPT_TIMESTAMP << 8) |
|
||||
+ TCPOLEN_TIMESTAMP);
|
||||
}
|
||||
- *ptr++ = htonl(opts->tsval);
|
||||
- *ptr++ = htonl(opts->tsecr);
|
||||
+ net_hdr_word(ptr++) = htonl(opts->tsval);
|
||||
+ net_hdr_word(ptr++) = htonl(opts->tsecr);
|
||||
}
|
||||
|
||||
if (unlikely(OPTION_SACK_ADVERTISE & options)) {
|
||||
- *ptr++ = htonl((TCPOPT_NOP << 24) |
|
||||
- (TCPOPT_NOP << 16) |
|
||||
- (TCPOPT_SACK_PERM << 8) |
|
||||
- TCPOLEN_SACK_PERM);
|
||||
+ net_hdr_word(ptr++) =
|
||||
+ htonl((TCPOPT_NOP << 24) |
|
||||
+ (TCPOPT_NOP << 16) |
|
||||
+ (TCPOPT_SACK_PERM << 8) |
|
||||
+ TCPOLEN_SACK_PERM);
|
||||
}
|
||||
|
||||
if (unlikely(OPTION_WSCALE & options)) {
|
||||
- *ptr++ = htonl((TCPOPT_NOP << 24) |
|
||||
- (TCPOPT_WINDOW << 16) |
|
||||
- (TCPOLEN_WINDOW << 8) |
|
||||
- opts->ws);
|
||||
+ net_hdr_word(ptr++) =
|
||||
+ htonl((TCPOPT_NOP << 24) |
|
||||
+ (TCPOPT_WINDOW << 16) |
|
||||
+ (TCPOLEN_WINDOW << 8) |
|
||||
+ opts->ws);
|
||||
}
|
||||
|
||||
if (unlikely(opts->num_sack_blocks)) {
|
||||
@@ -661,16 +666,17 @@ static void tcp_options_write(__be32 *pt
|
||||
tp->duplicate_sack : tp->selective_acks;
|
||||
int this_sack;
|
||||
|
||||
- *ptr++ = htonl((TCPOPT_NOP << 24) |
|
||||
- (TCPOPT_NOP << 16) |
|
||||
- (TCPOPT_SACK << 8) |
|
||||
- (TCPOLEN_SACK_BASE + (opts->num_sack_blocks *
|
||||
+ net_hdr_word(ptr++) =
|
||||
+ htonl((TCPOPT_NOP << 24) |
|
||||
+ (TCPOPT_NOP << 16) |
|
||||
+ (TCPOPT_SACK << 8) |
|
||||
+ (TCPOLEN_SACK_BASE + (opts->num_sack_blocks *
|
||||
TCPOLEN_SACK_PERBLOCK)));
|
||||
|
||||
for (this_sack = 0; this_sack < opts->num_sack_blocks;
|
||||
++this_sack) {
|
||||
- *ptr++ = htonl(sp[this_sack].start_seq);
|
||||
- *ptr++ = htonl(sp[this_sack].end_seq);
|
||||
+ net_hdr_word(ptr++) = htonl(sp[this_sack].start_seq);
|
||||
+ net_hdr_word(ptr++) = htonl(sp[this_sack].end_seq);
|
||||
}
|
||||
|
||||
tp->rx_opt.dsack = 0;
|
||||
@@ -683,13 +689,14 @@ static void tcp_options_write(__be32 *pt
|
||||
|
||||
if (foc->exp) {
|
||||
len = TCPOLEN_EXP_FASTOPEN_BASE + foc->len;
|
||||
- *ptr = htonl((TCPOPT_EXP << 24) | (len << 16) |
|
||||
+ net_hdr_word(ptr) =
|
||||
+ htonl((TCPOPT_EXP << 24) | (len << 16) |
|
||||
TCPOPT_FASTOPEN_MAGIC);
|
||||
p += TCPOLEN_EXP_FASTOPEN_BASE;
|
||||
} else {
|
||||
len = TCPOLEN_FASTOPEN_BASE + foc->len;
|
||||
- *p++ = TCPOPT_FASTOPEN;
|
||||
- *p++ = len;
|
||||
+ net_hdr_word(p++) = TCPOPT_FASTOPEN;
|
||||
+ net_hdr_word(p++) = len;
|
||||
}
|
||||
|
||||
memcpy(p, foc->val, foc->len);
|
||||
--- a/include/uapi/linux/igmp.h
|
||||
+++ b/include/uapi/linux/igmp.h
|
||||
@@ -33,7 +33,7 @@ struct igmphdr {
|
||||
__u8 code; /* For newer IGMP */
|
||||
__sum16 csum;
|
||||
__be32 group;
|
||||
-};
|
||||
+} __attribute__((packed, aligned(2)));
|
||||
|
||||
/* V3 group record types [grec_type] */
|
||||
#define IGMPV3_MODE_IS_INCLUDE 1
|
||||
@@ -49,7 +49,7 @@ struct igmpv3_grec {
|
||||
__be16 grec_nsrcs;
|
||||
__be32 grec_mca;
|
||||
__be32 grec_src[0];
|
||||
-};
|
||||
+} __attribute__((packed, aligned(2)));
|
||||
|
||||
struct igmpv3_report {
|
||||
__u8 type;
|
||||
@@ -58,7 +58,7 @@ struct igmpv3_report {
|
||||
__be16 resv2;
|
||||
__be16 ngrec;
|
||||
struct igmpv3_grec grec[0];
|
||||
-};
|
||||
+} __attribute__((packed, aligned(2)));
|
||||
|
||||
struct igmpv3_query {
|
||||
__u8 type;
|
||||
@@ -79,7 +79,7 @@ struct igmpv3_query {
|
||||
__u8 qqic;
|
||||
__be16 nsrcs;
|
||||
__be32 srcs[0];
|
||||
-};
|
||||
+} __attribute__((packed, aligned(2)));
|
||||
|
||||
#define IGMP_HOST_MEMBERSHIP_QUERY 0x11 /* From RFC1112 */
|
||||
#define IGMP_HOST_MEMBERSHIP_REPORT 0x12 /* Ditto */
|
||||
--- a/net/core/flow_dissector.c
|
||||
+++ b/net/core/flow_dissector.c
|
||||
@@ -129,7 +129,7 @@ __be32 __skb_flow_get_ports(const struct
|
||||
ports = __skb_header_pointer(skb, thoff + poff,
|
||||
sizeof(_ports), data, hlen, &_ports);
|
||||
if (ports)
|
||||
- return *ports;
|
||||
+ return (__be32)net_hdr_word(ports);
|
||||
}
|
||||
|
||||
return 0;
|
||||
--- a/include/uapi/linux/icmpv6.h
|
||||
+++ b/include/uapi/linux/icmpv6.h
|
||||
@@ -78,7 +78,7 @@ struct icmp6hdr {
|
||||
#define icmp6_addrconf_other icmp6_dataun.u_nd_ra.other
|
||||
#define icmp6_rt_lifetime icmp6_dataun.u_nd_ra.rt_lifetime
|
||||
#define icmp6_router_pref icmp6_dataun.u_nd_ra.router_pref
|
||||
-};
|
||||
+} __attribute__((packed, aligned(2)));
|
||||
|
||||
|
||||
#define ICMPV6_ROUTER_PREF_LOW 0x3
|
||||
--- a/include/net/ndisc.h
|
||||
+++ b/include/net/ndisc.h
|
||||
@@ -93,7 +93,7 @@ struct ra_msg {
|
||||
struct icmp6hdr icmph;
|
||||
__be32 reachable_time;
|
||||
__be32 retrans_timer;
|
||||
-};
|
||||
+} __attribute__((packed, aligned(2)));
|
||||
|
||||
struct rd_msg {
|
||||
struct icmp6hdr icmph;
|
||||
@@ -372,10 +372,10 @@ static inline u32 ndisc_hashfn(const voi
|
||||
{
|
||||
const u32 *p32 = pkey;
|
||||
|
||||
- return (((p32[0] ^ hash32_ptr(dev)) * hash_rnd[0]) +
|
||||
- (p32[1] * hash_rnd[1]) +
|
||||
- (p32[2] * hash_rnd[2]) +
|
||||
- (p32[3] * hash_rnd[3]));
|
||||
+ return (((net_hdr_word(&p32[0]) ^ hash32_ptr(dev)) * hash_rnd[0]) +
|
||||
+ (net_hdr_word(&p32[1]) * hash_rnd[1]) +
|
||||
+ (net_hdr_word(&p32[2]) * hash_rnd[2]) +
|
||||
+ (net_hdr_word(&p32[3]) * hash_rnd[3]));
|
||||
}
|
||||
|
||||
static inline struct neighbour *__ipv6_neigh_lookup_noref(struct net_device *dev, const void *pkey)
|
||||
--- a/net/sched/cls_u32.c
|
||||
+++ b/net/sched/cls_u32.c
|
||||
@@ -155,7 +155,7 @@ next_knode:
|
||||
data = skb_header_pointer(skb, toff, 4, &hdata);
|
||||
if (!data)
|
||||
goto out;
|
||||
- if ((*data ^ key->val) & key->mask) {
|
||||
+ if ((net_hdr_word(data) ^ key->val) & key->mask) {
|
||||
n = rcu_dereference_bh(n->next);
|
||||
goto next_knode;
|
||||
}
|
||||
@@ -206,8 +206,8 @@ check_terminal:
|
||||
&hdata);
|
||||
if (!data)
|
||||
goto out;
|
||||
- sel = ht->divisor & u32_hash_fold(*data, &n->sel,
|
||||
- n->fshift);
|
||||
+ sel = ht->divisor & u32_hash_fold(net_hdr_word(data),
|
||||
+ &n->sel, n->fshift);
|
||||
}
|
||||
if (!(n->sel.flags & (TC_U32_VAROFFSET | TC_U32_OFFSET | TC_U32_EAT)))
|
||||
goto next_ht;
|
||||
--- a/net/ipv6/ip6_offload.c
|
||||
+++ b/net/ipv6/ip6_offload.c
|
||||
@@ -241,7 +241,7 @@ INDIRECT_CALLABLE_SCOPE struct sk_buff *
|
||||
continue;
|
||||
|
||||
iph2 = (struct ipv6hdr *)(p->data + off);
|
||||
- first_word = *(__be32 *)iph ^ *(__be32 *)iph2;
|
||||
+ first_word = net_hdr_word(iph) ^ net_hdr_word(iph2);
|
||||
|
||||
/* All fields must match except length and Traffic Class.
|
||||
* XXX skbs on the gro_list have all been parsed and pulled
|
||||
--- a/include/net/addrconf.h
|
||||
+++ b/include/net/addrconf.h
|
||||
@@ -47,7 +47,7 @@ struct prefix_info {
|
||||
__be32 reserved2;
|
||||
|
||||
struct in6_addr prefix;
|
||||
-};
|
||||
+} __attribute__((packed, aligned(2)));
|
||||
|
||||
#include <linux/ipv6.h>
|
||||
#include <linux/netdevice.h>
|
||||
--- a/include/net/inet_ecn.h
|
||||
+++ b/include/net/inet_ecn.h
|
||||
@@ -138,9 +138,9 @@ static inline int IP6_ECN_set_ce(struct
|
||||
if (INET_ECN_is_not_ect(ipv6_get_dsfield(iph)))
|
||||
return 0;
|
||||
|
||||
- from = *(__be32 *)iph;
|
||||
+ from = net_hdr_word(iph);
|
||||
to = from | htonl(INET_ECN_CE << 20);
|
||||
- *(__be32 *)iph = to;
|
||||
+ net_hdr_word(iph) = to;
|
||||
if (skb->ip_summed == CHECKSUM_COMPLETE)
|
||||
skb->csum = csum_add(csum_sub(skb->csum, (__force __wsum)from),
|
||||
(__force __wsum)to);
|
||||
--- a/include/net/ipv6.h
|
||||
+++ b/include/net/ipv6.h
|
||||
@@ -147,7 +147,7 @@ struct frag_hdr {
|
||||
__u8 reserved;
|
||||
__be16 frag_off;
|
||||
__be32 identification;
|
||||
-};
|
||||
+} __attribute__((packed, aligned(2)));
|
||||
|
||||
#define IP6_MF 0x0001
|
||||
#define IP6_OFFSET 0xFFF8
|
||||
@@ -561,8 +561,8 @@ static inline void __ipv6_addr_set_half(
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
- addr[0] = wh;
|
||||
- addr[1] = wl;
|
||||
+ net_hdr_word(&addr[0]) = wh;
|
||||
+ net_hdr_word(&addr[1]) = wl;
|
||||
}
|
||||
|
||||
static inline void ipv6_addr_set(struct in6_addr *addr,
|
||||
@@ -621,6 +621,8 @@ static inline bool ipv6_prefix_equal(con
|
||||
const __be32 *a1 = addr1->s6_addr32;
|
||||
const __be32 *a2 = addr2->s6_addr32;
|
||||
unsigned int pdw, pbi;
|
||||
+ /* Used for last <32-bit fraction of prefix */
|
||||
+ u32 pbia1, pbia2;
|
||||
|
||||
/* check complete u32 in prefix */
|
||||
pdw = prefixlen >> 5;
|
||||
@@ -629,7 +631,9 @@ static inline bool ipv6_prefix_equal(con
|
||||
|
||||
/* check incomplete u32 in prefix */
|
||||
pbi = prefixlen & 0x1f;
|
||||
- if (pbi && ((a1[pdw] ^ a2[pdw]) & htonl((0xffffffff) << (32 - pbi))))
|
||||
+ pbia1 = net_hdr_word(&a1[pdw]);
|
||||
+ pbia2 = net_hdr_word(&a2[pdw]);
|
||||
+ if (pbi && ((pbia1 ^ pbia2) & htonl((0xffffffff) << (32 - pbi))))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@@ -750,13 +754,13 @@ static inline void ipv6_addr_set_v4mappe
|
||||
*/
|
||||
static inline int __ipv6_addr_diff32(const void *token1, const void *token2, int addrlen)
|
||||
{
|
||||
- const __be32 *a1 = token1, *a2 = token2;
|
||||
+ const struct in6_addr *a1 = token1, *a2 = token2;
|
||||
int i;
|
||||
|
||||
addrlen >>= 2;
|
||||
|
||||
for (i = 0; i < addrlen; i++) {
|
||||
- __be32 xb = a1[i] ^ a2[i];
|
||||
+ __be32 xb = a1->s6_addr32[i] ^ a2->s6_addr32[i];
|
||||
if (xb)
|
||||
return i * 32 + 31 - __fls(ntohl(xb));
|
||||
}
|
||||
@@ -950,17 +954,18 @@ static inline u32 ip6_multipath_hash_fie
|
||||
static inline void ip6_flow_hdr(struct ipv6hdr *hdr, unsigned int tclass,
|
||||
__be32 flowlabel)
|
||||
{
|
||||
- *(__be32 *)hdr = htonl(0x60000000 | (tclass << 20)) | flowlabel;
|
||||
+ net_hdr_word((__be32 *)hdr) =
|
||||
+ htonl(0x60000000 | (tclass << 20)) | flowlabel;
|
||||
}
|
||||
|
||||
static inline __be32 ip6_flowinfo(const struct ipv6hdr *hdr)
|
||||
{
|
||||
- return *(__be32 *)hdr & IPV6_FLOWINFO_MASK;
|
||||
+ return net_hdr_word((__be32 *)hdr) & IPV6_FLOWINFO_MASK;
|
||||
}
|
||||
|
||||
static inline __be32 ip6_flowlabel(const struct ipv6hdr *hdr)
|
||||
{
|
||||
- return *(__be32 *)hdr & IPV6_FLOWLABEL_MASK;
|
||||
+ return net_hdr_word((__be32 *)hdr) & IPV6_FLOWLABEL_MASK;
|
||||
}
|
||||
|
||||
static inline u8 ip6_tclass(__be32 flowinfo)
|
||||
--- a/include/net/secure_seq.h
|
||||
+++ b/include/net/secure_seq.h
|
||||
@@ -3,6 +3,7 @@
|
||||
#define _NET_SECURE_SEQ
|
||||
|
||||
#include <linux/types.h>
|
||||
+#include <linux/in6.h>
|
||||
|
||||
u32 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport);
|
||||
u32 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr,
|
||||
--- a/include/uapi/linux/in.h
|
||||
+++ b/include/uapi/linux/in.h
|
||||
@@ -88,7 +88,7 @@ enum {
|
||||
/* Internet address. */
|
||||
struct in_addr {
|
||||
__be32 s_addr;
|
||||
-};
|
||||
+} __attribute__((packed, aligned(2)));
|
||||
#endif
|
||||
|
||||
#define IP_TOS 1
|
||||
--- a/net/ipv6/ip6_fib.c
|
||||
+++ b/net/ipv6/ip6_fib.c
|
||||
@@ -141,7 +141,7 @@ static __be32 addr_bit_set(const void *t
|
||||
* See include/asm-generic/bitops/le.h.
|
||||
*/
|
||||
return (__force __be32)(1 << ((~fn_bit ^ BITOP_BE32_SWIZZLE) & 0x1f)) &
|
||||
- addr[fn_bit >> 5];
|
||||
+ net_hdr_word(&addr[fn_bit >> 5]);
|
||||
}
|
||||
|
||||
struct fib6_info *fib6_info_alloc(gfp_t gfp_flags, bool with_fib6_nh)
|
||||
--- a/net/netfilter/nf_conntrack_proto_tcp.c
|
||||
+++ b/net/netfilter/nf_conntrack_proto_tcp.c
|
||||
@@ -400,7 +400,7 @@ static void tcp_sack(const struct sk_buf
|
||||
|
||||
/* Fast path for timestamp-only option */
|
||||
if (length == TCPOLEN_TSTAMP_ALIGNED
|
||||
- && *(__be32 *)ptr == htonl((TCPOPT_NOP << 24)
|
||||
+ && net_hdr_word(ptr) == htonl((TCPOPT_NOP << 24)
|
||||
| (TCPOPT_NOP << 16)
|
||||
| (TCPOPT_TIMESTAMP << 8)
|
||||
| TCPOLEN_TIMESTAMP))
|
||||
--- a/net/xfrm/xfrm_input.c
|
||||
+++ b/net/xfrm/xfrm_input.c
|
||||
@@ -165,8 +165,8 @@ int xfrm_parse_spi(struct sk_buff *skb,
|
||||
if (!pskb_may_pull(skb, hlen))
|
||||
return -EINVAL;
|
||||
|
||||
- *spi = *(__be32 *)(skb_transport_header(skb) + offset);
|
||||
- *seq = *(__be32 *)(skb_transport_header(skb) + offset_seq);
|
||||
+ *spi = net_hdr_word(skb_transport_header(skb) + offset);
|
||||
+ *seq = net_hdr_word(skb_transport_header(skb) + offset_seq);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(xfrm_parse_spi);
|
||||
--- a/net/ipv4/tcp_input.c
|
||||
+++ b/net/ipv4/tcp_input.c
|
||||
@@ -4129,14 +4129,16 @@ static bool tcp_parse_aligned_timestamp(
|
||||
{
|
||||
const __be32 *ptr = (const __be32 *)(th + 1);
|
||||
|
||||
- if (*ptr == htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16)
|
||||
- | (TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP)) {
|
||||
+ if (net_hdr_word(ptr) ==
|
||||
+ htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) |
|
||||
+ (TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP)) {
|
||||
tp->rx_opt.saw_tstamp = 1;
|
||||
++ptr;
|
||||
- tp->rx_opt.rcv_tsval = ntohl(*ptr);
|
||||
+ tp->rx_opt.rcv_tsval = get_unaligned_be32(ptr);
|
||||
++ptr;
|
||||
- if (*ptr)
|
||||
- tp->rx_opt.rcv_tsecr = ntohl(*ptr) - tp->tsoffset;
|
||||
+ if (net_hdr_word(ptr))
|
||||
+ tp->rx_opt.rcv_tsecr = get_unaligned_be32(ptr) -
|
||||
+ tp->tsoffset;
|
||||
else
|
||||
tp->rx_opt.rcv_tsecr = 0;
|
||||
return true;
|
||||
--- a/include/uapi/linux/if_pppox.h
|
||||
+++ b/include/uapi/linux/if_pppox.h
|
||||
@@ -51,6 +51,7 @@ struct pppoe_addr {
|
||||
*/
|
||||
struct pptp_addr {
|
||||
__u16 call_id;
|
||||
+ __u16 pad;
|
||||
struct in_addr sin_addr;
|
||||
};
|
||||
|
||||
--- a/include/net/neighbour.h
|
||||
+++ b/include/net/neighbour.h
|
||||
@@ -275,8 +275,10 @@ static inline bool neigh_key_eq128(const
|
||||
const u32 *n32 = (const u32 *)n->primary_key;
|
||||
const u32 *p32 = pkey;
|
||||
|
||||
- return ((n32[0] ^ p32[0]) | (n32[1] ^ p32[1]) |
|
||||
- (n32[2] ^ p32[2]) | (n32[3] ^ p32[3])) == 0;
|
||||
+ return ((n32[0] ^ net_hdr_word(&p32[0])) |
|
||||
+ (n32[1] ^ net_hdr_word(&p32[1])) |
|
||||
+ (n32[2] ^ net_hdr_word(&p32[2])) |
|
||||
+ (n32[3] ^ net_hdr_word(&p32[3]))) == 0;
|
||||
}
|
||||
|
||||
static inline struct neighbour *___neigh_lookup_noref(
|
||||
--- a/include/uapi/linux/netfilter_arp/arp_tables.h
|
||||
+++ b/include/uapi/linux/netfilter_arp/arp_tables.h
|
||||
@@ -70,7 +70,7 @@ struct arpt_arp {
|
||||
__u8 flags;
|
||||
/* Inverse flags */
|
||||
__u16 invflags;
|
||||
-};
|
||||
+} __attribute__((aligned(4)));
|
||||
|
||||
/* Values for "flag" field in struct arpt_ip (general arp structure).
|
||||
* No flags defined yet.
|
||||
--- a/net/core/utils.c
|
||||
+++ b/net/core/utils.c
|
||||
@@ -460,8 +460,14 @@ void inet_proto_csum_replace16(__sum16 *
|
||||
bool pseudohdr)
|
||||
{
|
||||
__be32 diff[] = {
|
||||
- ~from[0], ~from[1], ~from[2], ~from[3],
|
||||
- to[0], to[1], to[2], to[3],
|
||||
+ ~net_hdr_word(&from[0]),
|
||||
+ ~net_hdr_word(&from[1]),
|
||||
+ ~net_hdr_word(&from[2]),
|
||||
+ ~net_hdr_word(&from[3]),
|
||||
+ net_hdr_word(&to[0]),
|
||||
+ net_hdr_word(&to[1]),
|
||||
+ net_hdr_word(&to[2]),
|
||||
+ net_hdr_word(&to[3]),
|
||||
};
|
||||
if (skb->ip_summed != CHECKSUM_PARTIAL) {
|
||||
*sum = csum_fold(csum_partial(diff, sizeof(diff),
|
||||
--- a/include/linux/etherdevice.h
|
||||
+++ b/include/linux/etherdevice.h
|
||||
@@ -512,7 +512,7 @@ static inline bool is_etherdev_addr(cons
|
||||
* @b: Pointer to Ethernet header
|
||||
*
|
||||
* Compare two Ethernet headers, returns 0 if equal.
|
||||
- * This assumes that the network header (i.e., IP header) is 4-byte
|
||||
+ * This assumes that the network header (i.e., IP header) is 2-byte
|
||||
* aligned OR the platform can handle unaligned access. This is the
|
||||
* case for all packets coming into netif_receive_skb or similar
|
||||
* entry points.
|
||||
@@ -535,11 +535,12 @@ static inline unsigned long compare_ethe
|
||||
fold |= *(unsigned long *)(a + 6) ^ *(unsigned long *)(b + 6);
|
||||
return fold;
|
||||
#else
|
||||
- u32 *a32 = (u32 *)((u8 *)a + 2);
|
||||
- u32 *b32 = (u32 *)((u8 *)b + 2);
|
||||
+ const u16 *a16 = a;
|
||||
+ const u16 *b16 = b;
|
||||
|
||||
- return (*(u16 *)a ^ *(u16 *)b) | (a32[0] ^ b32[0]) |
|
||||
- (a32[1] ^ b32[1]) | (a32[2] ^ b32[2]);
|
||||
+ return (a16[0] ^ b16[0]) | (a16[1] ^ b16[1]) | (a16[2] ^ b16[2]) |
|
||||
+ (a16[3] ^ b16[3]) | (a16[4] ^ b16[4]) | (a16[5] ^ b16[5]) |
|
||||
+ (a16[6] ^ b16[6]);
|
||||
#endif
|
||||
}
|
||||
|
||||
--- a/net/ipv4/tcp_offload.c
|
||||
+++ b/net/ipv4/tcp_offload.c
|
||||
@@ -223,7 +223,7 @@ struct sk_buff *tcp_gro_receive(struct l
|
||||
|
||||
th2 = tcp_hdr(p);
|
||||
|
||||
- if (*(u32 *)&th->source ^ *(u32 *)&th2->source) {
|
||||
+ if (net_hdr_word(&th->source) ^ net_hdr_word(&th2->source)) {
|
||||
NAPI_GRO_CB(p)->same_flow = 0;
|
||||
continue;
|
||||
}
|
||||
@@ -241,8 +241,8 @@ found:
|
||||
~(TCP_FLAG_CWR | TCP_FLAG_FIN | TCP_FLAG_PSH));
|
||||
flush |= (__force int)(th->ack_seq ^ th2->ack_seq);
|
||||
for (i = sizeof(*th); i < thlen; i += 4)
|
||||
- flush |= *(u32 *)((u8 *)th + i) ^
|
||||
- *(u32 *)((u8 *)th2 + i);
|
||||
+ flush |= net_hdr_word((u8 *)th + i) ^
|
||||
+ net_hdr_word((u8 *)th2 + i);
|
||||
|
||||
/* When we receive our second frame we can made a decision on if we
|
||||
* continue this flow as an atomic flow with a fixed ID or if we use
|
||||
--- a/net/ipv6/netfilter/ip6table_mangle.c
|
||||
+++ b/net/ipv6/netfilter/ip6table_mangle.c
|
||||
@@ -44,7 +44,7 @@ ip6t_mangle_out(struct sk_buff *skb, con
|
||||
hop_limit = ipv6_hdr(skb)->hop_limit;
|
||||
|
||||
/* flowlabel and prio (includes version, which shouldn't change either */
|
||||
- flowlabel = *((u_int32_t *)ipv6_hdr(skb));
|
||||
+ flowlabel = net_hdr_word(ipv6_hdr(skb));
|
||||
|
||||
ret = ip6t_do_table(skb, state, priv);
|
||||
|
||||
@@ -53,7 +53,7 @@ ip6t_mangle_out(struct sk_buff *skb, con
|
||||
!ipv6_addr_equal(&ipv6_hdr(skb)->daddr, &daddr) ||
|
||||
skb->mark != mark ||
|
||||
ipv6_hdr(skb)->hop_limit != hop_limit ||
|
||||
- flowlabel != *((u_int32_t *)ipv6_hdr(skb)))) {
|
||||
+ flowlabel != net_hdr_word(ipv6_hdr(skb)))) {
|
||||
err = ip6_route_me_harder(state->net, state->sk, skb);
|
||||
if (err < 0)
|
||||
ret = NF_DROP_ERR(err);
|
||||
76
target/linux/ath79/patches-5.15/920-mikrotik-rb4xx.patch
Normal file
76
target/linux/ath79/patches-5.15/920-mikrotik-rb4xx.patch
Normal file
@ -0,0 +1,76 @@
|
||||
--- a/drivers/mfd/Kconfig
|
||||
+++ b/drivers/mfd/Kconfig
|
||||
@@ -2174,6 +2174,14 @@ config RAVE_SP_CORE
|
||||
Select this to get support for the Supervisory Processor
|
||||
device found on several devices in RAVE line of hardware.
|
||||
|
||||
+config MFD_RB4XX_CPLD
|
||||
+ tristate "CPLD driver for Mikrotik RB4xx series boards"
|
||||
+ select MFD_CORE
|
||||
+ depends on ATH79 || COMPILE_TEST
|
||||
+ help
|
||||
+ Enables support for the CPLD chip (NAND & GPIO) on Mikrotik
|
||||
+ Routerboard RB4xx series.
|
||||
+
|
||||
config SGI_MFD_IOC3
|
||||
bool "SGI IOC3 core driver"
|
||||
depends on PCI && MIPS && 64BIT
|
||||
--- a/drivers/mfd/Makefile
|
||||
+++ b/drivers/mfd/Makefile
|
||||
@@ -267,6 +267,7 @@ obj-$(CONFIG_MFD_KHADAS_MCU) += khadas-
|
||||
obj-$(CONFIG_MFD_ACER_A500_EC) += acer-ec-a500.o
|
||||
obj-$(CONFIG_MFD_QCOM_PM8008) += qcom-pm8008.o
|
||||
|
||||
+obj-$(CONFIG_MFD_RB4XX_CPLD) += rb4xx-cpld.o
|
||||
obj-$(CONFIG_SGI_MFD_IOC3) += ioc3.o
|
||||
obj-$(CONFIG_MFD_SIMPLE_MFD_I2C) += simple-mfd-i2c.o
|
||||
obj-$(CONFIG_MFD_INTEL_M10_BMC) += intel-m10-bmc.o
|
||||
--- a/drivers/gpio/Kconfig
|
||||
+++ b/drivers/gpio/Kconfig
|
||||
@@ -1574,6 +1574,12 @@ config GPIO_SODAVILLE
|
||||
help
|
||||
Say Y here to support Intel Sodaville GPIO.
|
||||
|
||||
+config GPIO_RB4XX
|
||||
+ tristate "GPIO expander for Mikrotik RB4xx series boards"
|
||||
+ depends on MFD_RB4XX_CPLD
|
||||
+ help
|
||||
+ GPIO driver for Mikrotik Routerboard RB4xx series.
|
||||
+
|
||||
endmenu
|
||||
|
||||
menu "SPI GPIO expanders"
|
||||
--- a/drivers/gpio/Makefile
|
||||
+++ b/drivers/gpio/Makefile
|
||||
@@ -122,6 +122,7 @@ obj-$(CONFIG_GPIO_PL061) += gpio-pl061.
|
||||
obj-$(CONFIG_GPIO_PMIC_EIC_SPRD) += gpio-pmic-eic-sprd.o
|
||||
obj-$(CONFIG_GPIO_PXA) += gpio-pxa.o
|
||||
obj-$(CONFIG_GPIO_RASPBERRYPI_EXP) += gpio-raspberrypi-exp.o
|
||||
+obj-$(CONFIG_GPIO_RB4XX) += gpio-rb4xx.o
|
||||
obj-$(CONFIG_GPIO_RC5T583) += gpio-rc5t583.o
|
||||
obj-$(CONFIG_GPIO_RCAR) += gpio-rcar.o
|
||||
obj-$(CONFIG_GPIO_RDA) += gpio-rda.o
|
||||
--- a/drivers/mtd/nand/raw/Kconfig
|
||||
+++ b/drivers/mtd/nand/raw/Kconfig
|
||||
@@ -563,4 +563,11 @@ config MTD_NAND_AR934X
|
||||
Enables support for NAND controller on Qualcomm Atheros SoCs.
|
||||
This controller is found on AR934x and QCA955x SoCs.
|
||||
|
||||
+config MTD_NAND_RB4XX
|
||||
+ tristate "Support for NAND driver for Mikrotik RB4xx series boards"
|
||||
+ depends on MFD_RB4XX_CPLD
|
||||
+ help
|
||||
+ Enables support for the NAND flash chip on Mikrotik Routerboard
|
||||
+ RB4xx series.
|
||||
+
|
||||
endif # MTD_RAW_NAND
|
||||
--- a/drivers/mtd/nand/raw/Makefile
|
||||
+++ b/drivers/mtd/nand/raw/Makefile
|
||||
@@ -59,6 +59,7 @@ obj-$(CONFIG_MTD_NAND_INTEL_LGM) += inte
|
||||
obj-$(CONFIG_MTD_NAND_ROCKCHIP) += rockchip-nand-controller.o
|
||||
obj-$(CONFIG_MTD_NAND_PL35X) += pl35x-nand-controller.o
|
||||
obj-$(CONFIG_MTD_NAND_AR934X) += ar934x_nand.o
|
||||
+obj-$(CONFIG_MTD_NAND_RB4XX) += nand_rb4xx.o
|
||||
|
||||
nand-objs := nand_base.o nand_legacy.o nand_bbt.o nand_timings.o nand_ids.o
|
||||
nand-objs += nand_onfi.o
|
||||
@ -0,0 +1,59 @@
|
||||
From b3797d1a92afe97c173b00fdb7824cedba24eef0 Mon Sep 17 00:00:00 2001
|
||||
From: Chuanhong Guo <gch981213@gmail.com>
|
||||
Date: Sun, 20 Sep 2020 01:00:45 +0800
|
||||
Subject: [PATCH] ath79: ar8216: make switch register access atomic
|
||||
|
||||
due to some unknown reason these register accesses sometimes fail
|
||||
on the integrated switch without this patch.
|
||||
|
||||
THIS ONLY WORKS ON ATH79 AND MAY BREAK THE DRIVER ON OTHER PLATFORMS!
|
||||
The mdio bus on ath79 works in polling mode and doesn't rely on
|
||||
any interrupt. This patch breaks the driver on any mdio master
|
||||
with interrupts used.
|
||||
|
||||
---
|
||||
--- a/drivers/net/phy/ar8216.c
|
||||
+++ b/drivers/net/phy/ar8216.c
|
||||
@@ -252,6 +252,7 @@ ar8xxx_mii_write32(struct ar8xxx_priv *p
|
||||
u32
|
||||
ar8xxx_read(struct ar8xxx_priv *priv, int reg)
|
||||
{
|
||||
+ unsigned long flags;
|
||||
struct mii_bus *bus = priv->mii_bus;
|
||||
u16 r1, r2, page;
|
||||
u32 val;
|
||||
@@ -259,11 +260,13 @@ ar8xxx_read(struct ar8xxx_priv *priv, in
|
||||
split_addr((u32) reg, &r1, &r2, &page);
|
||||
|
||||
mutex_lock(&bus->mdio_lock);
|
||||
+ local_irq_save(flags);
|
||||
|
||||
bus->write(bus, 0x18, 0, page);
|
||||
wait_for_page_switch();
|
||||
val = ar8xxx_mii_read32(priv, 0x10 | r2, r1);
|
||||
|
||||
+ local_irq_restore(flags);
|
||||
mutex_unlock(&bus->mdio_lock);
|
||||
|
||||
return val;
|
||||
@@ -272,17 +275,20 @@ ar8xxx_read(struct ar8xxx_priv *priv, in
|
||||
void
|
||||
ar8xxx_write(struct ar8xxx_priv *priv, int reg, u32 val)
|
||||
{
|
||||
+ unsigned long flags;
|
||||
struct mii_bus *bus = priv->mii_bus;
|
||||
u16 r1, r2, page;
|
||||
|
||||
split_addr((u32) reg, &r1, &r2, &page);
|
||||
|
||||
mutex_lock(&bus->mdio_lock);
|
||||
+ local_irq_save(flags);
|
||||
|
||||
bus->write(bus, 0x18, 0, page);
|
||||
wait_for_page_switch();
|
||||
ar8xxx_mii_write32(priv, 0x10 | r2, r1, val);
|
||||
|
||||
+ local_irq_restore(flags);
|
||||
mutex_unlock(&bus->mdio_lock);
|
||||
}
|
||||
|
||||
68
target/linux/ath79/patches-5.15/939-mikrotik-rb91x.patch
Normal file
68
target/linux/ath79/patches-5.15/939-mikrotik-rb91x.patch
Normal file
@ -0,0 +1,68 @@
|
||||
--- a/drivers/gpio/Kconfig
|
||||
+++ b/drivers/gpio/Kconfig
|
||||
@@ -353,6 +353,13 @@ config GPIO_IXP4XX
|
||||
IXP4xx series of chips.
|
||||
|
||||
If unsure, say N.
|
||||
+
|
||||
+config GPIO_LATCH
|
||||
+ tristate "MikroTik RouterBOARD GPIO latch support"
|
||||
+ depends on ATH79
|
||||
+ help
|
||||
+ GPIO driver for latch on some MikroTik RouterBOARDs.
|
||||
+
|
||||
config GPIO_LOGICVC
|
||||
tristate "Xylon LogiCVC GPIO support"
|
||||
depends on MFD_SYSCON && OF
|
||||
@@ -529,6 +536,10 @@ config GPIO_ROCKCHIP
|
||||
help
|
||||
Say yes here to support GPIO on Rockchip SoCs.
|
||||
|
||||
+config GPIO_RB91X_KEY
|
||||
+ tristate "MikroTik RB91x board series reset key support"
|
||||
+ depends on ATH79
|
||||
+
|
||||
config GPIO_SAMA5D2_PIOBU
|
||||
tristate "SAMA5D2 PIOBU GPIO support"
|
||||
depends on MFD_SYSCON
|
||||
--- a/drivers/gpio/Makefile
|
||||
+++ b/drivers/gpio/Makefile
|
||||
@@ -75,6 +75,7 @@ obj-$(CONFIG_GPIO_IT87) += gpio-it87.o
|
||||
obj-$(CONFIG_GPIO_IXP4XX) += gpio-ixp4xx.o
|
||||
obj-$(CONFIG_GPIO_JANZ_TTL) += gpio-janz-ttl.o
|
||||
obj-$(CONFIG_GPIO_KEMPLD) += gpio-kempld.o
|
||||
+obj-$(CONFIG_GPIO_LATCH) += gpio-latch.o
|
||||
obj-$(CONFIG_GPIO_LOGICVC) += gpio-logicvc.o
|
||||
obj-$(CONFIG_GPIO_LOONGSON1) += gpio-loongson1.o
|
||||
obj-$(CONFIG_GPIO_LOONGSON) += gpio-loongson.o
|
||||
@@ -123,6 +124,7 @@ obj-$(CONFIG_GPIO_PMIC_EIC_SPRD) += gpio
|
||||
obj-$(CONFIG_GPIO_PXA) += gpio-pxa.o
|
||||
obj-$(CONFIG_GPIO_RASPBERRYPI_EXP) += gpio-raspberrypi-exp.o
|
||||
obj-$(CONFIG_GPIO_RB4XX) += gpio-rb4xx.o
|
||||
+obj-$(CONFIG_GPIO_RB91X_KEY) += gpio-rb91x-key.o
|
||||
obj-$(CONFIG_GPIO_RC5T583) += gpio-rc5t583.o
|
||||
obj-$(CONFIG_GPIO_RCAR) += gpio-rcar.o
|
||||
obj-$(CONFIG_GPIO_RDA) += gpio-rda.o
|
||||
--- a/drivers/mtd/nand/raw/Kconfig
|
||||
+++ b/drivers/mtd/nand/raw/Kconfig
|
||||
@@ -570,4 +570,10 @@ config MTD_NAND_RB4XX
|
||||
Enables support for the NAND flash chip on Mikrotik Routerboard
|
||||
RB4xx series.
|
||||
|
||||
+config MTD_NAND_RB91X
|
||||
+ tristate "MikroTik RB91x NAND driver support"
|
||||
+ depends on ATH79 && MTD_RAW_NAND
|
||||
+ help
|
||||
+ Enables support for the NAND flash chip on MikroTik RB91x series.
|
||||
+
|
||||
endif # MTD_RAW_NAND
|
||||
--- a/drivers/mtd/nand/raw/Makefile
|
||||
+++ b/drivers/mtd/nand/raw/Makefile
|
||||
@@ -60,6 +60,7 @@ obj-$(CONFIG_MTD_NAND_ROCKCHIP) += rock
|
||||
obj-$(CONFIG_MTD_NAND_PL35X) += pl35x-nand-controller.o
|
||||
obj-$(CONFIG_MTD_NAND_AR934X) += ar934x_nand.o
|
||||
obj-$(CONFIG_MTD_NAND_RB4XX) += nand_rb4xx.o
|
||||
+obj-$(CONFIG_MTD_NAND_RB91X) += rb91x_nand.o
|
||||
|
||||
nand-objs := nand_base.o nand_legacy.o nand_bbt.o nand_timings.o nand_ids.o
|
||||
nand-objs += nand_onfi.o
|
||||
@ -0,0 +1,48 @@
|
||||
From: Wenli Looi <wlooi@ucalgary.ca>
|
||||
Date: Sun, 20 Jun 2021 23:32:28 -0700
|
||||
Subject: [PATCH] ath79: add support for booting QCN550x
|
||||
|
||||
Based on wikidevi, QCN550x is a "Dragonfly" like QCA9561 and QCA9563.
|
||||
Treating it as QCA956x seems to work.
|
||||
Tested on Netgear EX7300v2 which boots successfully with
|
||||
the same CPU clock as the stock firmware.
|
||||
|
||||
Link: https://wikidevi.wi-cat.ru/Qualcomm#bgn
|
||||
Link: https://wikidevi.wi-cat.ru/Qualcomm_Atheros#.28a.29bgn_2
|
||||
Signed-off-by: Wenli Looi <wlooi@ucalgary.ca>
|
||||
|
||||
--- a/arch/mips/ath79/early_printk.c
|
||||
+++ b/arch/mips/ath79/early_printk.c
|
||||
@@ -121,6 +121,7 @@ static void prom_putchar_init(void)
|
||||
case REV_ID_MAJOR_QCA9558:
|
||||
case REV_ID_MAJOR_TP9343:
|
||||
case REV_ID_MAJOR_QCA956X:
|
||||
+ case REV_ID_MAJOR_QCN550X:
|
||||
_prom_putchar = prom_putchar_ar71xx;
|
||||
break;
|
||||
|
||||
--- a/arch/mips/ath79/setup.c
|
||||
+++ b/arch/mips/ath79/setup.c
|
||||
@@ -168,6 +168,12 @@ static void __init ath79_detect_sys_type
|
||||
rev = id & QCA956X_REV_ID_REVISION_MASK;
|
||||
break;
|
||||
|
||||
+ case REV_ID_MAJOR_QCN550X:
|
||||
+ ath79_soc = ATH79_SOC_QCA956X;
|
||||
+ chip = "550X";
|
||||
+ rev = id & QCA956X_REV_ID_REVISION_MASK;
|
||||
+ break;
|
||||
+
|
||||
case REV_ID_MAJOR_TP9343:
|
||||
ath79_soc = ATH79_SOC_TP9343;
|
||||
chip = "9343";
|
||||
--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
|
||||
+++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
|
||||
@@ -867,6 +867,7 @@
|
||||
#define REV_ID_MAJOR_QCA9558 0x1130
|
||||
#define REV_ID_MAJOR_TP9343 0x0150
|
||||
#define REV_ID_MAJOR_QCA956X 0x1150
|
||||
+#define REV_ID_MAJOR_QCN550X 0x2170
|
||||
|
||||
#define AR71XX_REV_ID_MINOR_MASK 0x3
|
||||
#define AR71XX_REV_ID_MINOR_AR7130 0x0
|
||||
@ -29,7 +29,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
/**
|
||||
* init_display() - initialize the display controller
|
||||
*
|
||||
@@ -145,6 +151,22 @@ static int init_display(struct fbtft_par
|
||||
@@ -147,6 +153,22 @@ static int init_display(struct fbtft_par
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
/**
|
||||
* set_var() - apply LCD properties like rotation and BGR mode
|
||||
*
|
||||
@@ -155,20 +177,32 @@ static int init_display(struct fbtft_par
|
||||
@@ -157,20 +179,32 @@ static int init_display(struct fbtft_par
|
||||
static int set_var(struct fbtft_par *par)
|
||||
{
|
||||
u8 madctl_par = 0;
|
||||
@ -85,7 +85,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
@@ -265,7 +299,16 @@ static struct fbtft_display display = {
|
||||
@@ -267,7 +301,16 @@ static struct fbtft_display display = {
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- a/kernel/cgroup/cgroup.c
|
||||
+++ b/kernel/cgroup/cgroup.c
|
||||
@@ -5695,6 +5695,9 @@ int __init cgroup_init_early(void)
|
||||
@@ -5720,6 +5720,9 @@ int __init cgroup_init_early(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
/**
|
||||
* cgroup_init - cgroup initialization
|
||||
*
|
||||
@@ -5733,6 +5736,12 @@ int __init cgroup_init(void)
|
||||
@@ -5758,6 +5761,12 @@ int __init cgroup_init(void)
|
||||
|
||||
mutex_unlock(&cgroup_mutex);
|
||||
|
||||
@ -40,7 +40,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
for_each_subsys(ss, ssid) {
|
||||
if (ss->early_init) {
|
||||
struct cgroup_subsys_state *css =
|
||||
@@ -6270,6 +6279,10 @@ static int __init cgroup_disable(char *s
|
||||
@@ -6296,6 +6305,10 @@ static int __init cgroup_disable(char *s
|
||||
strcmp(token, ss->legacy_name))
|
||||
continue;
|
||||
|
||||
@ -51,7 +51,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
static_branch_disable(cgroup_subsys_enabled_key[i]);
|
||||
pr_info("Disabling %s control group subsystem\n",
|
||||
ss->name);
|
||||
@@ -6279,6 +6292,31 @@ static int __init cgroup_disable(char *s
|
||||
@@ -6305,6 +6318,31 @@ static int __init cgroup_disable(char *s
|
||||
}
|
||||
__setup("cgroup_disable=", cgroup_disable);
|
||||
|
||||
|
||||
@ -13,6 +13,9 @@ bcm53xx_setup_interfaces()
|
||||
asus,rt-ac87u)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan"
|
||||
;;
|
||||
asus,rt-ac88u)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 extsw" "wan"
|
||||
;;
|
||||
linksys,panamera)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5 lan6 lan7 lan8 extsw" "wan"
|
||||
;;
|
||||
|
||||
@ -403,11 +403,3 @@ platform_do_upgrade() {
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
platform_nand_pre_upgrade() {
|
||||
case "$(board_name)" in
|
||||
meraki,mr32)
|
||||
CI_KERNPART="part.safe"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
@ -167,6 +167,15 @@ define Device/asus_rt-ac87u
|
||||
endef
|
||||
TARGET_DEVICES += asus_rt-ac87u
|
||||
|
||||
define Device/asus_rt-ac88u
|
||||
$(call Device/asus)
|
||||
DEVICE_MODEL := RT-AC88U
|
||||
DEVICE_PACKAGES := $(BRCMFMAC_4366C0) $(USB3_PACKAGES)
|
||||
ASUS_PRODUCTID := RT-AC88U
|
||||
BROKEN := y
|
||||
endef
|
||||
TARGET_DEVICES += asus_rt-ac88u
|
||||
|
||||
define Device/asus_rt-n18u
|
||||
$(call Device/asus)
|
||||
DEVICE_MODEL := RT-N18U
|
||||
@ -218,7 +227,6 @@ define Device/buffalo_wzr-900dhp
|
||||
buffalo-enc WZR-900DHP2 $$(BUFFALO_TAG_VERSION) | \
|
||||
buffalo-tag-dhp WZR-900DHP2 JP jp | buffalo-enc-tag | \
|
||||
buffalo-dhp-image
|
||||
BROKEN := y
|
||||
endef
|
||||
TARGET_DEVICES += buffalo_wzr-900dhp
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
From 1a46061a2a4130a08841941ce6dcaa32be2ce312 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Tue, 23 Nov 2021 09:55:06 +0100
|
||||
Date: Tue, 23 Nov 2021 10:03:33 +0100
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: use non-deprecated USB 2.0 PHY binding
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
@ -10,6 +11,7 @@ register.
|
||||
|
||||
References: 55b9b741712d ("dt-bindings: phy: brcm,ns-usb2-phy: bind just a PHY block")
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm5301x.dtsi | 20 ++++++++++----------
|
||||
1 file changed, 10 insertions(+), 10 deletions(-)
|
||||
@ -0,0 +1,42 @@
|
||||
From 69c4e53bdd055ecc27761f6971a50c631ff9072e Mon Sep 17 00:00:00 2001
|
||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Date: Thu, 2 Dec 2021 15:16:27 -0800
|
||||
Subject: [PATCH] ARM: dts: NSP: Fixed iProc PCIe MSI sub-node
|
||||
|
||||
Rename the msi controller unit name to 'msi' to avoid collisions with
|
||||
the 'msi-controller' boolean property.
|
||||
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm-nsp.dtsi | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm-nsp.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm-nsp.dtsi
|
||||
@@ -587,7 +587,7 @@
|
||||
status = "disabled";
|
||||
|
||||
msi-parent = <&msi0>;
|
||||
- msi0: msi-controller {
|
||||
+ msi0: msi {
|
||||
compatible = "brcm,iproc-msi";
|
||||
msi-controller;
|
||||
interrupt-parent = <&gic>;
|
||||
@@ -624,7 +624,7 @@
|
||||
status = "disabled";
|
||||
|
||||
msi-parent = <&msi1>;
|
||||
- msi1: msi-controller {
|
||||
+ msi1: msi {
|
||||
compatible = "brcm,iproc-msi";
|
||||
msi-controller;
|
||||
interrupt-parent = <&gic>;
|
||||
@@ -661,7 +661,7 @@
|
||||
status = "disabled";
|
||||
|
||||
msi-parent = <&msi2>;
|
||||
- msi2: msi-controller {
|
||||
+ msi2: msi {
|
||||
compatible = "brcm,iproc-msi";
|
||||
msi-controller;
|
||||
interrupt-parent = <&gic>;
|
||||
@ -0,0 +1,25 @@
|
||||
From 9a68c53f875e88edd3403c001ad85f4ac0ed3486 Mon Sep 17 00:00:00 2001
|
||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Date: Tue, 7 Dec 2021 10:19:09 -0800
|
||||
Subject: [PATCH] ARM: dts: NSP: Rename SATA unit name
|
||||
|
||||
Rename the SATA controller unit name from ahci to sata in preparation
|
||||
for adding the Broadcom SATA3 controller YAML binding which will bring
|
||||
validation.
|
||||
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm-nsp.dtsi | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm-nsp.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm-nsp.dtsi
|
||||
@@ -534,7 +534,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
- sata: ahci@41000 {
|
||||
+ sata: sata@41000 {
|
||||
compatible = "brcm,bcm-nsp-ahci";
|
||||
reg-names = "ahci", "top-ctrl";
|
||||
reg = <0x41000 0x1000>, <0x40020 0x1c>;
|
||||
@ -0,0 +1,45 @@
|
||||
From 5e33f1c4a7cb914a003a304ab8eef705b17aabb7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal@arinc9.com>
|
||||
Date: Fri, 17 Dec 2021 00:03:19 +0800
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: correct RX delay and enable flow control
|
||||
on Asus RT-AC88U
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The current 'rx-internal-delay-ps' property value on the Realtek switch
|
||||
node, 2000, will be divided by 300, resulting in 6.66, which will be
|
||||
rounded to the closest step value, 7. Change it to 2100 to be accurate.
|
||||
See ef136837aaf6 ("net: dsa: rtl8365mb: set RGMII RX delay in steps of
|
||||
0.3 ns") for reference.
|
||||
|
||||
Flow control needs to be enabled on both sides of the internal and
|
||||
external switch. It is already enabled on the CPU port of the Realtek
|
||||
switch so we also enable it on the external switch port of the Broadcom
|
||||
switch as well.
|
||||
|
||||
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts
|
||||
@@ -138,7 +138,7 @@
|
||||
ethernet = <&sw0_p5>;
|
||||
phy-mode = "rgmii";
|
||||
tx-internal-delay-ps = <2000>;
|
||||
- rx-internal-delay-ps = <2000>;
|
||||
+ rx-internal-delay-ps = <2100>;
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
@@ -213,6 +213,7 @@
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
+ pause;
|
||||
};
|
||||
};
|
||||
|
||||
@ -0,0 +1,109 @@
|
||||
From 8b0c59c622dc4dab970ec63264fb5b152944ac80 Mon Sep 17 00:00:00 2001
|
||||
From: Arnd Bergmann <arnd@arndb.de>
|
||||
Date: Thu, 23 Dec 2021 00:17:17 +0100
|
||||
Subject: [PATCH] Revert "ARM: dts: BCM5301X: define RTL8365MB switch on Asus
|
||||
RT-AC88U"
|
||||
|
||||
This reverts commit 3d2d52a0d1835b56f6bd67d268f6c39df0e41692, it caused
|
||||
a build regression:
|
||||
|
||||
arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts:109.4-14: Warning (reg_format): /switch/ports:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
|
||||
arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dtb: Warning (pci_device_reg): Failed prerequisite 'reg_format'
|
||||
arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dtb: Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
|
||||
arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dtb: Warning (i2c_bus_reg): Failed prerequisite 'reg_format'
|
||||
arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dtb: Warning (spi_bus_reg): Failed prerequisite 'reg_format'
|
||||
arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts:106.9-149.5: Warning (avoid_default_addr_size): /switch/ports: Relying on default #address-cells value
|
||||
arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts:106.9-149.5: Warning (avoid_default_addr_size): /switch/ports: Relying on default #size-cells value
|
||||
|
||||
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
|
||||
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
||||
---
|
||||
arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts | 77 --------------------
|
||||
1 file changed, 77 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts
|
||||
@@ -93,83 +93,6 @@
|
||||
gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
-
|
||||
- switch {
|
||||
- compatible = "realtek,rtl8365mb";
|
||||
- /* 7 = MDIO (has input reads), 6 = MDC (clock, output only) */
|
||||
- mdc-gpios = <&chipcommon 6 GPIO_ACTIVE_HIGH>;
|
||||
- mdio-gpios = <&chipcommon 7 GPIO_ACTIVE_HIGH>;
|
||||
- reset-gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>;
|
||||
- realtek,disable-leds;
|
||||
- dsa,member = <1 0>;
|
||||
-
|
||||
- ports {
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <0>;
|
||||
- reg = <0>;
|
||||
-
|
||||
- port@0 {
|
||||
- reg = <0>;
|
||||
- label = "lan5";
|
||||
- phy-handle = <ðphy0>;
|
||||
- };
|
||||
-
|
||||
- port@1 {
|
||||
- reg = <1>;
|
||||
- label = "lan6";
|
||||
- phy-handle = <ðphy1>;
|
||||
- };
|
||||
-
|
||||
- port@2 {
|
||||
- reg = <2>;
|
||||
- label = "lan7";
|
||||
- phy-handle = <ðphy2>;
|
||||
- };
|
||||
-
|
||||
- port@3 {
|
||||
- reg = <3>;
|
||||
- label = "lan8";
|
||||
- phy-handle = <ðphy3>;
|
||||
- };
|
||||
-
|
||||
- port@6 {
|
||||
- reg = <6>;
|
||||
- label = "cpu";
|
||||
- ethernet = <&sw0_p5>;
|
||||
- phy-mode = "rgmii";
|
||||
- tx-internal-delay-ps = <2000>;
|
||||
- rx-internal-delay-ps = <2100>;
|
||||
-
|
||||
- fixed-link {
|
||||
- speed = <1000>;
|
||||
- full-duplex;
|
||||
- pause;
|
||||
- };
|
||||
- };
|
||||
- };
|
||||
-
|
||||
- mdio {
|
||||
- compatible = "realtek,smi-mdio";
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <0>;
|
||||
-
|
||||
- ethphy0: ethernet-phy@0 {
|
||||
- reg = <0>;
|
||||
- };
|
||||
-
|
||||
- ethphy1: ethernet-phy@1 {
|
||||
- reg = <1>;
|
||||
- };
|
||||
-
|
||||
- ethphy2: ethernet-phy@2 {
|
||||
- reg = <2>;
|
||||
- };
|
||||
-
|
||||
- ethphy3: ethernet-phy@3 {
|
||||
- reg = <3>;
|
||||
- };
|
||||
- };
|
||||
- };
|
||||
};
|
||||
|
||||
&srab {
|
||||
@ -0,0 +1,103 @@
|
||||
From 441d531ec9b766f49e01c107a3043235daa4493f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal@arinc9.com>
|
||||
Date: Sun, 2 Jan 2022 23:33:04 +0300
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: define RTL8365MB switch on Asus RT-AC88U
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Define the Realtek RTL8365MB switch without interrupt support on the device
|
||||
tree of Asus RT-AC88U.
|
||||
|
||||
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
|
||||
Acked-by: Alvin Šipraga <alsi@bang-olufsen.dk>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts | 76 ++++++++++++++++++++
|
||||
1 file changed, 76 insertions(+)
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts
|
||||
@@ -93,6 +93,82 @@
|
||||
gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
+
|
||||
+ switch {
|
||||
+ compatible = "realtek,rtl8365mb";
|
||||
+ /* 7 = MDIO (has input reads), 6 = MDC (clock, output only) */
|
||||
+ mdc-gpios = <&chipcommon 6 GPIO_ACTIVE_HIGH>;
|
||||
+ mdio-gpios = <&chipcommon 7 GPIO_ACTIVE_HIGH>;
|
||||
+ reset-gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>;
|
||||
+ realtek,disable-leds;
|
||||
+ dsa,member = <1 0>;
|
||||
+
|
||||
+ ports {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ port@0 {
|
||||
+ reg = <0>;
|
||||
+ label = "lan5";
|
||||
+ phy-handle = <ðphy0>;
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ reg = <1>;
|
||||
+ label = "lan6";
|
||||
+ phy-handle = <ðphy1>;
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ reg = <2>;
|
||||
+ label = "lan7";
|
||||
+ phy-handle = <ðphy2>;
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ reg = <3>;
|
||||
+ label = "lan8";
|
||||
+ phy-handle = <ðphy3>;
|
||||
+ };
|
||||
+
|
||||
+ port@6 {
|
||||
+ reg = <6>;
|
||||
+ label = "cpu";
|
||||
+ ethernet = <&sw0_p5>;
|
||||
+ phy-mode = "rgmii";
|
||||
+ tx-internal-delay-ps = <2000>;
|
||||
+ rx-internal-delay-ps = <2100>;
|
||||
+
|
||||
+ fixed-link {
|
||||
+ speed = <1000>;
|
||||
+ full-duplex;
|
||||
+ pause;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ mdio {
|
||||
+ compatible = "realtek,smi-mdio";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ ethphy0: ethernet-phy@0 {
|
||||
+ reg = <0>;
|
||||
+ };
|
||||
+
|
||||
+ ethphy1: ethernet-phy@1 {
|
||||
+ reg = <1>;
|
||||
+ };
|
||||
+
|
||||
+ ethphy2: ethernet-phy@2 {
|
||||
+ reg = <2>;
|
||||
+ };
|
||||
+
|
||||
+ ethphy3: ethernet-phy@3 {
|
||||
+ reg = <3>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&srab {
|
||||
@ -0,0 +1,40 @@
|
||||
From 66848aff05f669e95795b5f3a163f4762781333e Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Hagan <mnhagan88@gmail.com>
|
||||
Date: Wed, 23 Feb 2022 23:50:39 +0000
|
||||
Subject: [PATCH] ARM: dts: NSP: MX6X: get mac-address from eeprom
|
||||
|
||||
The MAC address on the MX64/MX65 series is located on the AT24 EEPROM.
|
||||
This is the same as other Meraki devices such as the MR32 [1].
|
||||
|
||||
[1] https://lore.kernel.org/linux-arm-kernel/fa8271d02ef74a687f365cebe5c55ec846963ab7.1631986106.git.chunkeey@gmail.com/
|
||||
|
||||
Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi
|
||||
@@ -39,6 +39,8 @@
|
||||
|
||||
&amac2 {
|
||||
status = "okay";
|
||||
+ nvmem-cells = <&mac_address>;
|
||||
+ nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&ehci0 {
|
||||
@@ -53,6 +55,12 @@
|
||||
reg = <0x50>;
|
||||
pagesize = <32>;
|
||||
read-only;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ mac_address: mac-address@66 {
|
||||
+ reg = <0x66 0x6>;
|
||||
+ };
|
||||
};
|
||||
};
|
||||
|
||||
@ -0,0 +1,62 @@
|
||||
From 482c85c7fc95c572d368b2214b9e9d2c4a2e5789 Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Hagan <mnhagan88@gmail.com>
|
||||
Date: Wed, 23 Feb 2022 23:50:40 +0000
|
||||
Subject: [PATCH] ARM: dts: NSP: MX6X: correct LED function types
|
||||
|
||||
Currently, the amber LED will remain always on. This is due to a
|
||||
misinterpretation of the LED sub-node properties, where-by "default-state"
|
||||
was used to indicate the initial state when powering on the device. When in
|
||||
use, however, this resulted in the amber LED always being on. Instead change
|
||||
this to only indicate a fault state.
|
||||
|
||||
Assign LED_FUNCTION_POWER to the green PWM LED.
|
||||
|
||||
These changes bring the MX64/65 in line with the MR32's devicetree.
|
||||
|
||||
Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi | 3 +--
|
||||
arch/arm/boot/dts/bcm958625-meraki-kingpin.dtsi | 3 +--
|
||||
arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi | 2 +-
|
||||
3 files changed, 3 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi
|
||||
@@ -57,10 +57,9 @@
|
||||
|
||||
led-4 {
|
||||
/* amber:power */
|
||||
- function = LED_FUNCTION_POWER;
|
||||
+ function = LED_FUNCTION_FAULT;
|
||||
color = <LED_COLOR_ID_AMBER>;
|
||||
gpios = <&gpioa 3 GPIO_ACTIVE_HIGH>;
|
||||
- default-state = "on";
|
||||
};
|
||||
|
||||
led-5 {
|
||||
--- a/arch/arm/boot/dts/bcm958625-meraki-kingpin.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm958625-meraki-kingpin.dtsi
|
||||
@@ -106,10 +106,9 @@
|
||||
|
||||
led-a {
|
||||
/* amber:power */
|
||||
- function = LED_FUNCTION_POWER;
|
||||
+ function = LED_FUNCTION_FAULT;
|
||||
color = <LED_COLOR_ID_AMBER>;
|
||||
gpios = <&gpioa 0 GPIO_ACTIVE_LOW>;
|
||||
- default-state = "on";
|
||||
};
|
||||
|
||||
led-b {
|
||||
--- a/arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi
|
||||
@@ -22,7 +22,7 @@
|
||||
};
|
||||
|
||||
led-2 {
|
||||
- function = LED_FUNCTION_INDICATOR;
|
||||
+ function = LED_FUNCTION_POWER;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
pwms = <&pwm 2 50000>;
|
||||
max-brightness = <255>;
|
||||
@ -0,0 +1,42 @@
|
||||
From c8442f0fb09ca3d842b9b23d1d0650f649fd10f8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Mon, 28 Feb 2022 10:52:07 +0100
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Add Ethernet MAC address to Luxul
|
||||
XWR-3150
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Luxul XWR-3150 stores MAC as NVRAM variable. Add NVMEM cell for it and
|
||||
reference it in the Ethernet interface node.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts
|
||||
@@ -25,6 +25,9 @@
|
||||
nvram@1eff0000 {
|
||||
compatible = "brcm,nvram";
|
||||
reg = <0x1eff0000 0x10000>;
|
||||
+
|
||||
+ et0macaddr: et0macaddr {
|
||||
+ };
|
||||
};
|
||||
|
||||
leds {
|
||||
@@ -72,6 +75,11 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&gmac0 {
|
||||
+ nvmem-cells = <&et0macaddr>;
|
||||
+ nvmem-cell-names = "mac-address";
|
||||
+};
|
||||
+
|
||||
&usb3 {
|
||||
vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
@ -665,3 +665,47 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
&spi_nor {
|
||||
status = "okay";
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts
|
||||
@@ -107,3 +107,41 @@
|
||||
&usb3_phy {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&srab {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ ports {
|
||||
+ port@0 {
|
||||
+ reg = <0>;
|
||||
+ label = "lan1";
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ reg = <1>;
|
||||
+ label = "lan2";
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ reg = <2>;
|
||||
+ label = "lan3";
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ reg = <3>;
|
||||
+ label = "lan4";
|
||||
+ };
|
||||
+
|
||||
+ port@4 {
|
||||
+ reg = <4>;
|
||||
+ label = "wan";
|
||||
+ };
|
||||
+
|
||||
+ port@5 {
|
||||
+ reg = <5>;
|
||||
+ label = "cpu";
|
||||
+ ethernet = <&gmac0>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
|
||||
@ -61,11 +61,9 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
drivers/net/dsa/mv88e6xxx/port.h | 2 ++
|
||||
4 files changed, 81 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
|
||||
index 1992be77522a..a77c86e0321d 100644
|
||||
--- a/drivers/net/dsa/mv88e6xxx/chip.c
|
||||
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
|
||||
@@ -1586,6 +1586,26 @@ static int mv88e6xxx_port_check_hw_vlan(struct dsa_switch *ds, int port,
|
||||
@@ -1586,6 +1586,26 @@ static int mv88e6xxx_port_check_hw_vlan(
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -92,7 +90,7 @@ index 1992be77522a..a77c86e0321d 100644
|
||||
static int mv88e6xxx_port_vlan_filtering(struct dsa_switch *ds, int port,
|
||||
bool vlan_filtering,
|
||||
struct switchdev_trans *trans)
|
||||
@@ -1599,7 +1619,16 @@ static int mv88e6xxx_port_vlan_filtering(struct dsa_switch *ds, int port,
|
||||
@@ -1599,7 +1619,16 @@ static int mv88e6xxx_port_vlan_filtering
|
||||
return chip->info->max_vid ? 0 : -EOPNOTSUPP;
|
||||
|
||||
mv88e6xxx_reg_lock(chip);
|
||||
@ -109,7 +107,7 @@ index 1992be77522a..a77c86e0321d 100644
|
||||
mv88e6xxx_reg_unlock(chip);
|
||||
|
||||
return err;
|
||||
@@ -1982,8 +2011,10 @@ static void mv88e6xxx_port_vlan_add(struct dsa_switch *ds, int port,
|
||||
@@ -1982,8 +2011,10 @@ static void mv88e6xxx_port_vlan_add(stru
|
||||
struct mv88e6xxx_chip *chip = ds->priv;
|
||||
bool untagged = vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED;
|
||||
bool pvid = vlan->flags & BRIDGE_VLAN_INFO_PVID;
|
||||
@ -120,7 +118,7 @@ index 1992be77522a..a77c86e0321d 100644
|
||||
u16 vid;
|
||||
|
||||
if (!chip->info->max_vid)
|
||||
@@ -2008,9 +2039,23 @@ static void mv88e6xxx_port_vlan_add(struct dsa_switch *ds, int port,
|
||||
@@ -2008,9 +2039,23 @@ static void mv88e6xxx_port_vlan_add(stru
|
||||
dev_err(ds->dev, "p%d: failed to add VLAN %d%c\n", port,
|
||||
vid, untagged ? 'u' : 't');
|
||||
|
||||
@ -147,7 +145,7 @@ index 1992be77522a..a77c86e0321d 100644
|
||||
|
||||
mv88e6xxx_reg_unlock(chip);
|
||||
}
|
||||
@@ -2061,6 +2106,7 @@ static int mv88e6xxx_port_vlan_del(struct dsa_switch *ds, int port,
|
||||
@@ -2061,6 +2106,7 @@ static int mv88e6xxx_port_vlan_del(struc
|
||||
const struct switchdev_obj_port_vlan *vlan)
|
||||
{
|
||||
struct mv88e6xxx_chip *chip = ds->priv;
|
||||
@ -155,7 +153,7 @@ index 1992be77522a..a77c86e0321d 100644
|
||||
u16 pvid, vid;
|
||||
int err = 0;
|
||||
|
||||
@@ -2079,7 +2125,9 @@ static int mv88e6xxx_port_vlan_del(struct dsa_switch *ds, int port,
|
||||
@@ -2079,7 +2125,9 @@ static int mv88e6xxx_port_vlan_del(struc
|
||||
goto unlock;
|
||||
|
||||
if (vid == pvid) {
|
||||
@ -166,8 +164,6 @@ index 1992be77522a..a77c86e0321d 100644
|
||||
if (err)
|
||||
goto unlock;
|
||||
}
|
||||
diff --git a/drivers/net/dsa/mv88e6xxx/chip.h b/drivers/net/dsa/mv88e6xxx/chip.h
|
||||
index 51a7ff44478e..843803c3adf2 100644
|
||||
--- a/drivers/net/dsa/mv88e6xxx/chip.h
|
||||
+++ b/drivers/net/dsa/mv88e6xxx/chip.h
|
||||
@@ -224,9 +224,15 @@ struct mv88e6xxx_policy {
|
||||
@ -186,11 +182,9 @@ index 51a7ff44478e..843803c3adf2 100644
|
||||
u64 serdes_stats[2];
|
||||
u64 atu_member_violation;
|
||||
u64 atu_miss_violation;
|
||||
diff --git a/drivers/net/dsa/mv88e6xxx/port.c b/drivers/net/dsa/mv88e6xxx/port.c
|
||||
index dfd9e8292e9a..a7177aa254a8 100644
|
||||
--- a/drivers/net/dsa/mv88e6xxx/port.c
|
||||
+++ b/drivers/net/dsa/mv88e6xxx/port.c
|
||||
@@ -1062,6 +1062,27 @@ int mv88e6xxx_port_set_8021q_mode(struct mv88e6xxx_chip *chip, int port,
|
||||
@@ -1062,6 +1062,27 @@ int mv88e6xxx_port_set_8021q_mode(struct
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -218,11 +212,9 @@ index dfd9e8292e9a..a7177aa254a8 100644
|
||||
int mv88e6xxx_port_set_map_da(struct mv88e6xxx_chip *chip, int port)
|
||||
{
|
||||
u16 reg;
|
||||
diff --git a/drivers/net/dsa/mv88e6xxx/port.h b/drivers/net/dsa/mv88e6xxx/port.h
|
||||
index 44d76ac973f6..3390517df42e 100644
|
||||
--- a/drivers/net/dsa/mv88e6xxx/port.h
|
||||
+++ b/drivers/net/dsa/mv88e6xxx/port.h
|
||||
@@ -364,6 +364,8 @@ int mv88e6390x_port_set_cmode(struct mv88e6xxx_chip *chip, int port,
|
||||
@@ -364,6 +364,8 @@ int mv88e6390x_port_set_cmode(struct mv8
|
||||
phy_interface_t mode);
|
||||
int mv88e6185_port_get_cmode(struct mv88e6xxx_chip *chip, int port, u8 *cmode);
|
||||
int mv88e6352_port_get_cmode(struct mv88e6xxx_chip *chip, int port, u8 *cmode);
|
||||
@ -231,6 +223,3 @@ index 44d76ac973f6..3390517df42e 100644
|
||||
int mv88e6xxx_port_set_map_da(struct mv88e6xxx_chip *chip, int port);
|
||||
int mv88e6095_port_set_upstream_port(struct mv88e6xxx_chip *chip, int port,
|
||||
int upstream_port);
|
||||
--
|
||||
2.34.1
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/drivers/net/usb/r8152.c
|
||||
+++ b/drivers/net/usb/r8152.c
|
||||
@@ -899,6 +899,7 @@ struct fw_header {
|
||||
@@ -898,6 +898,7 @@ struct fw_header {
|
||||
* struct fw_mac - a firmware block used by RTL_FW_PLA and RTL_FW_USB.
|
||||
* The layout of the firmware block is:
|
||||
* <struct fw_mac> + <info> + <firmware data>.
|
||||
@ -35,7 +35,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
* @fw_offset: offset of the firmware binary data. The start address of
|
||||
* the data would be the address of struct fw_mac + @fw_offset.
|
||||
* @fw_reg: the register to load the firmware. Depends on chip.
|
||||
@@ -912,6 +913,7 @@ struct fw_header {
|
||||
@@ -911,6 +912,7 @@ struct fw_header {
|
||||
* @bp_num: the break point number which needs to be set for this firmware.
|
||||
* Depends on the firmware.
|
||||
* @bp: break points. Depends on firmware.
|
||||
@ -43,7 +43,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
* @fw_ver_reg: the register to store the fw version.
|
||||
* @fw_ver_data: the firmware version of the current type.
|
||||
* @info: additional information for debugging, and is followed by the
|
||||
@@ -937,8 +939,10 @@ struct fw_mac {
|
||||
@@ -936,8 +938,10 @@ struct fw_mac {
|
||||
/**
|
||||
* struct fw_phy_patch_key - a firmware block used by RTL_FW_PHY_START.
|
||||
* This is used to set patch key when loading the firmware of PHY.
|
||||
@ -54,7 +54,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
*/
|
||||
struct fw_phy_patch_key {
|
||||
struct fw_block blk_hdr;
|
||||
@@ -951,6 +955,7 @@ struct fw_phy_patch_key {
|
||||
@@ -950,6 +954,7 @@ struct fw_phy_patch_key {
|
||||
* struct fw_phy_nc - a firmware block used by RTL_FW_PHY_NC.
|
||||
* The layout of the firmware block is:
|
||||
* <struct fw_phy_nc> + <info> + <firmware data>.
|
||||
@ -62,7 +62,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
* @fw_offset: offset of the firmware binary data. The start address of
|
||||
* the data would be the address of struct fw_phy_nc + @fw_offset.
|
||||
* @fw_reg: the register to load the firmware. Depends on chip.
|
||||
@@ -961,6 +966,7 @@ struct fw_phy_patch_key {
|
||||
@@ -960,6 +965,7 @@ struct fw_phy_patch_key {
|
||||
* @mode_reg: the regitster of switching the mode.
|
||||
* @mod_pre: the mode needing to be set before loading the firmware.
|
||||
* @mod_post: the mode to be set when finishing to load the firmware.
|
||||
|
||||
@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/drivers/net/usb/r8152.c
|
||||
+++ b/drivers/net/usb/r8152.c
|
||||
@@ -964,8 +964,8 @@ struct fw_phy_patch_key {
|
||||
@@ -963,8 +963,8 @@ struct fw_phy_patch_key {
|
||||
* @patch_en_addr: the register of enabling patch mode. Depends on chip.
|
||||
* @patch_en_value: patch mode enabled mask. Depends on the firmware.
|
||||
* @mode_reg: the regitster of switching the mode.
|
||||
|
||||
@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
obj-$(CONFIG_USB_NET_SR9700) += sr9700.o
|
||||
--- a/drivers/net/usb/r8152.c
|
||||
+++ b/drivers/net/usb/r8152.c
|
||||
@@ -27,6 +27,7 @@
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <linux/acpi.h>
|
||||
#include <linux/firmware.h>
|
||||
#include <crypto/hash.h>
|
||||
@ -48,7 +48,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
/* Information for net-next */
|
||||
#define NETNEXT_VERSION "11"
|
||||
@@ -654,18 +655,6 @@ enum rtl_register_content {
|
||||
@@ -653,18 +654,6 @@ enum rtl_register_content {
|
||||
|
||||
#define INTR_LINK 0x0004
|
||||
|
||||
@ -67,7 +67,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
#define RTL8153_MAX_PACKET 9216 /* 9K */
|
||||
#define RTL8153_MAX_MTU (RTL8153_MAX_PACKET - VLAN_ETH_HLEN - \
|
||||
ETH_FCS_LEN)
|
||||
@@ -690,21 +679,9 @@ enum rtl8152_flags {
|
||||
@@ -689,21 +678,9 @@ enum rtl8152_flags {
|
||||
LENOVO_MACPASSTHRU,
|
||||
};
|
||||
|
||||
@ -89,7 +89,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
struct tally_counter {
|
||||
__le64 tx_packets;
|
||||
__le64 rx_packets;
|
||||
@@ -6625,7 +6602,7 @@ static int rtl_fw_init(struct r8152 *tp)
|
||||
@@ -6602,7 +6579,7 @@ static int rtl_fw_init(struct r8152 *tp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -98,7 +98,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
{
|
||||
struct usb_device *udev = interface_to_usbdev(intf);
|
||||
u32 ocp_data = 0;
|
||||
@@ -6683,12 +6660,13 @@ static u8 rtl_get_version(struct usb_int
|
||||
@@ -6660,12 +6637,13 @@ static u8 rtl_get_version(struct usb_int
|
||||
|
||||
return version;
|
||||
}
|
||||
|
||||
@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/drivers/net/usb/r8152.c
|
||||
+++ b/drivers/net/usb/r8152.c
|
||||
@@ -2394,11 +2394,9 @@ static void tx_bottom(struct r8152 *tp)
|
||||
@@ -2393,11 +2393,9 @@ static void tx_bottom(struct r8152 *tp)
|
||||
} while (res == 0);
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
if (test_bit(RTL8152_UNPLUG, &tp->flags))
|
||||
return;
|
||||
@@ -6718,7 +6716,7 @@ static int rtl8152_probe(struct usb_inte
|
||||
@@ -6695,7 +6693,7 @@ static int rtl8152_probe(struct usb_inte
|
||||
mutex_init(&tp->control);
|
||||
INIT_DELAYED_WORK(&tp->schedule, rtl_work_func_t);
|
||||
INIT_DELAYED_WORK(&tp->hw_phy_work, rtl_hw_phy_work_func_t);
|
||||
|
||||
@ -25,7 +25,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/drivers/net/usb/r8152.c
|
||||
+++ b/drivers/net/usb/r8152.c
|
||||
@@ -3444,59 +3444,76 @@ static void rtl_clear_bp(struct r8152 *t
|
||||
@@ -3443,59 +3443,76 @@ static void rtl_clear_bp(struct r8152 *t
|
||||
ocp_write_word(tp, type, PLA_BP_BA, 0);
|
||||
}
|
||||
|
||||
@ -127,7 +127,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
ocp_write_word(tp, MCU_TYPE_PLA, PLA_OCP_GPHY_BASE, tp->ocp_base);
|
||||
|
||||
@@ -3981,7 +3998,7 @@ static void rtl8152_fw_mac_apply(struct
|
||||
@@ -3980,7 +3997,7 @@ static void rtl8152_fw_mac_apply(struct
|
||||
dev_dbg(&tp->intf->dev, "successfully applied %s\n", mac->info);
|
||||
}
|
||||
|
||||
@ -136,7 +136,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
{
|
||||
struct rtl_fw *rtl_fw = &tp->rtl_fw;
|
||||
const struct firmware *fw;
|
||||
@@ -4012,12 +4029,11 @@ static void rtl8152_apply_firmware(struc
|
||||
@@ -4011,12 +4028,11 @@ static void rtl8152_apply_firmware(struc
|
||||
case RTL_FW_PHY_START:
|
||||
key = (struct fw_phy_patch_key *)block;
|
||||
key_addr = __le16_to_cpu(key->key_reg);
|
||||
@ -151,7 +151,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
break;
|
||||
case RTL_FW_PHY_NC:
|
||||
rtl8152_fw_phy_nc_apply(tp, (struct fw_phy_nc *)block);
|
||||
@@ -4222,7 +4238,7 @@ static void rtl8152_disable(struct r8152
|
||||
@@ -4221,7 +4237,7 @@ static void rtl8152_disable(struct r8152
|
||||
|
||||
static void r8152b_hw_phy_cfg(struct r8152 *tp)
|
||||
{
|
||||
@ -160,7 +160,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
rtl_eee_enable(tp, tp->eee_en);
|
||||
r8152_aldps_en(tp, true);
|
||||
r8152b_enable_fc(tp);
|
||||
@@ -4504,7 +4520,7 @@ static void r8153_hw_phy_cfg(struct r815
|
||||
@@ -4503,7 +4519,7 @@ static void r8153_hw_phy_cfg(struct r815
|
||||
/* disable EEE before updating the PHY parameters */
|
||||
rtl_eee_enable(tp, false);
|
||||
|
||||
@ -169,7 +169,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
if (tp->version == RTL_VER_03) {
|
||||
data = ocp_reg_read(tp, OCP_EEE_CFG);
|
||||
@@ -4578,7 +4594,7 @@ static void r8153b_hw_phy_cfg(struct r81
|
||||
@@ -4577,7 +4593,7 @@ static void r8153b_hw_phy_cfg(struct r81
|
||||
/* disable EEE before updating the PHY parameters */
|
||||
rtl_eee_enable(tp, false);
|
||||
|
||||
@ -178,7 +178,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
r8153b_green_en(tp, test_bit(GREEN_ETHERNET, &tp->flags));
|
||||
|
||||
@@ -4619,7 +4635,7 @@ static void r8153b_hw_phy_cfg(struct r81
|
||||
@@ -4618,7 +4634,7 @@ static void r8153b_hw_phy_cfg(struct r81
|
||||
ocp_write_word(tp, MCU_TYPE_PLA, PLA_PHY_PWR, ocp_data);
|
||||
|
||||
/* Advnace EEE */
|
||||
@ -187,7 +187,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
data = ocp_reg_read(tp, OCP_POWER_CFG);
|
||||
data |= EEE_CLKDIV_EN;
|
||||
ocp_reg_write(tp, OCP_POWER_CFG, data);
|
||||
@@ -4636,7 +4652,7 @@ static void r8153b_hw_phy_cfg(struct r81
|
||||
@@ -4635,7 +4651,7 @@ static void r8153b_hw_phy_cfg(struct r81
|
||||
ocp_reg_write(tp, OCP_SYSCLK_CFG, clk_div_expo(5));
|
||||
tp->ups_info._250m_ckdiv = true;
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/drivers/net/usb/r8152.c
|
||||
+++ b/drivers/net/usb/r8152.c
|
||||
@@ -1372,6 +1372,10 @@ void write_mii_word(struct net_device *n
|
||||
@@ -1371,6 +1371,10 @@ void write_mii_word(struct net_device *n
|
||||
static int
|
||||
r8152_submit_rx(struct r8152 *tp, struct rx_agg *agg, gfp_t mem_flags);
|
||||
|
||||
@ -31,7 +31,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
static int rtl8152_set_mac_address(struct net_device *netdev, void *p)
|
||||
{
|
||||
struct r8152 *tp = netdev_priv(netdev);
|
||||
@@ -3183,8 +3187,6 @@ static void r8153b_ups_en(struct r8152 *
|
||||
@@ -3182,8 +3186,6 @@ static void r8153b_ups_en(struct r8152 *
|
||||
ocp_data |= BIT(0);
|
||||
ocp_write_byte(tp, MCU_TYPE_USB, 0xcfff, ocp_data);
|
||||
} else {
|
||||
@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
ocp_data &= ~(UPS_EN | USP_PREWAKE);
|
||||
ocp_write_byte(tp, MCU_TYPE_USB, USB_POWER_CUT, ocp_data);
|
||||
|
||||
@@ -3192,31 +3194,20 @@ static void r8153b_ups_en(struct r8152 *
|
||||
@@ -3191,31 +3193,20 @@ static void r8153b_ups_en(struct r8152 *
|
||||
ocp_data &= ~BIT(0);
|
||||
ocp_write_byte(tp, MCU_TYPE_USB, 0xcfff, ocp_data);
|
||||
|
||||
@ -83,7 +83,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4588,13 +4579,37 @@ static void r8153b_hw_phy_cfg(struct r81
|
||||
@@ -4587,13 +4578,37 @@ static void r8153b_hw_phy_cfg(struct r81
|
||||
u32 ocp_data;
|
||||
u16 data;
|
||||
|
||||
@ -122,7 +122,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
r8153b_green_en(tp, test_bit(GREEN_ETHERNET, &tp->flags));
|
||||
|
||||
@@ -5543,9 +5558,6 @@ static void r8153b_init(struct r8152 *tp
|
||||
@@ -5522,9 +5537,6 @@ static void r8153b_init(struct r8152 *tp
|
||||
/* MSC timer = 0xfff * 8ms = 32760 ms */
|
||||
ocp_write_word(tp, MCU_TYPE_USB, USB_MSC_TIMER, 0x0fff);
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/drivers/net/usb/r8152.c
|
||||
+++ b/drivers/net/usb/r8152.c
|
||||
@@ -3336,7 +3336,7 @@ static void rtl8153b_runtime_enable(stru
|
||||
@@ -3335,7 +3335,7 @@ static void rtl8153b_runtime_enable(stru
|
||||
r8153b_ups_en(tp, false);
|
||||
r8153_queue_wake(tp, false);
|
||||
rtl_runtime_suspend_enable(tp, false);
|
||||
@ -25,7 +25,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
r8153b_u1u2en(tp, true);
|
||||
}
|
||||
}
|
||||
@@ -5029,7 +5029,7 @@ static void rtl8153b_up(struct r8152 *tp
|
||||
@@ -5028,7 +5028,7 @@ static void rtl8153b_up(struct r8152 *tp
|
||||
|
||||
r8153_aldps_en(tp, true);
|
||||
|
||||
@ -34,7 +34,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
r8153b_u1u2en(tp, true);
|
||||
}
|
||||
|
||||
@@ -5571,8 +5571,9 @@ static void r8153b_init(struct r8152 *tp
|
||||
@@ -5550,8 +5550,9 @@ static void r8153b_init(struct r8152 *tp
|
||||
ocp_data |= POLL_LINK_CHG;
|
||||
ocp_write_word(tp, MCU_TYPE_PLA, PLA_EXTRA_STATUS, ocp_data);
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/drivers/net/usb/r8152.c
|
||||
+++ b/drivers/net/usb/r8152.c
|
||||
@@ -5758,6 +5758,9 @@ static int rtl8152_runtime_suspend(struc
|
||||
@@ -5735,6 +5735,9 @@ static int rtl8152_runtime_suspend(struc
|
||||
struct net_device *netdev = tp->netdev;
|
||||
int ret = 0;
|
||||
|
||||
@ -25,7 +25,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
set_bit(SELECTIVE_SUSPEND, &tp->flags);
|
||||
smp_mb__after_atomic();
|
||||
|
||||
@@ -6157,6 +6160,11 @@ rtl_ethtool_get_eee(struct net_device *n
|
||||
@@ -6134,6 +6137,11 @@ rtl_ethtool_get_eee(struct net_device *n
|
||||
struct r8152 *tp = netdev_priv(net);
|
||||
int ret;
|
||||
|
||||
@ -37,7 +37,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
ret = usb_autopm_get_interface(tp->intf);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
@@ -6179,6 +6187,11 @@ rtl_ethtool_set_eee(struct net_device *n
|
||||
@@ -6156,6 +6164,11 @@ rtl_ethtool_set_eee(struct net_device *n
|
||||
struct r8152 *tp = netdev_priv(net);
|
||||
int ret;
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/drivers/net/usb/r8152.c
|
||||
+++ b/drivers/net/usb/r8152.c
|
||||
@@ -6594,7 +6594,7 @@ static int rtl_ops_init(struct r8152 *tp
|
||||
@@ -6571,7 +6571,7 @@ static int rtl_ops_init(struct r8152 *tp
|
||||
|
||||
default:
|
||||
ret = -ENODEV;
|
||||
@ -25,7 +25,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -6851,7 +6851,7 @@ static int rtl8152_probe(struct usb_inte
|
||||
@@ -6828,7 +6828,7 @@ static int rtl8152_probe(struct usb_inte
|
||||
|
||||
ret = register_netdev(netdev);
|
||||
if (ret != 0) {
|
||||
|
||||
@ -15,7 +15,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/drivers/net/usb/r8152.c
|
||||
+++ b/drivers/net/usb/r8152.c
|
||||
@@ -2633,21 +2633,24 @@ static inline u8 rtl8152_get_speed(struc
|
||||
@@ -2632,21 +2632,24 @@ static inline u8 rtl8152_get_speed(struc
|
||||
return ocp_read_byte(tp, MCU_TYPE_PLA, PLA_PHYSTATUS);
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
}
|
||||
|
||||
static void rxdy_gated_en(struct r8152 *tp, bool enable)
|
||||
@@ -3128,10 +3131,22 @@ static void r8153b_ups_flags(struct r815
|
||||
@@ -3127,10 +3130,22 @@ static void r8153b_ups_flags(struct r815
|
||||
ocp_write_dword(tp, MCU_TYPE_USB, USB_UPS_FLAGS, ups_flags);
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
if (enable) {
|
||||
sram_write(tp, 0x8045, 0); /* 10M abiq&ldvbias */
|
||||
sram_write(tp, 0x804d, 0x1222); /* 100M short abiq&ldvbias */
|
||||
@@ -3142,11 +3157,7 @@ static void r8153b_green_en(struct r8152
|
||||
@@ -3141,11 +3156,7 @@ static void r8153b_green_en(struct r8152
|
||||
sram_write(tp, 0x805d, 0x2444); /* 1000M short abiq&ldvbias */
|
||||
}
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/drivers/net/usb/r8152.c
|
||||
+++ b/drivers/net/usb/r8152.c
|
||||
@@ -250,6 +250,9 @@
|
||||
@@ -249,6 +249,9 @@
|
||||
|
||||
/* PLA_TCR1 */
|
||||
#define VERSION_MASK 0x7cf0
|
||||
@ -34,7 +34,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
/* PLA_MTPS */
|
||||
#define MTPS_JUMBO (12 * 1024 / 64)
|
||||
@@ -2748,6 +2751,29 @@ static int rtl_stop_rx(struct r8152 *tp)
|
||||
@@ -2747,6 +2750,29 @@ static int rtl_stop_rx(struct r8152 *tp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static inline void r8153b_rx_agg_chg_indicate(struct r8152 *tp)
|
||||
{
|
||||
ocp_write_byte(tp, MCU_TYPE_USB, USB_UPT_RXDMA_OWN,
|
||||
@@ -2851,6 +2877,8 @@ static int rtl8153_enable(struct r8152 *
|
||||
@@ -2850,6 +2876,8 @@ static int rtl8153_enable(struct r8152 *
|
||||
r8153_set_rx_early_timeout(tp);
|
||||
r8153_set_rx_early_size(tp);
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/drivers/net/usb/r8152.c
|
||||
+++ b/drivers/net/usb/r8152.c
|
||||
@@ -875,6 +875,14 @@ struct fw_header {
|
||||
@@ -874,6 +874,14 @@ struct fw_header {
|
||||
struct fw_block blocks[];
|
||||
} __packed;
|
||||
|
||||
@ -30,7 +30,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
/**
|
||||
* struct fw_mac - a firmware block used by RTL_FW_PLA and RTL_FW_USB.
|
||||
* The layout of the firmware block is:
|
||||
@@ -3801,10 +3809,7 @@ static long rtl8152_check_firmware(struc
|
||||
@@ -3800,10 +3808,7 @@ static long rtl8152_check_firmware(struc
|
||||
{
|
||||
const struct firmware *fw = rtl_fw->fw;
|
||||
struct fw_header *fw_hdr = (struct fw_header *)fw->data;
|
||||
@ -42,7 +42,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
long ret = -EFAULT;
|
||||
int i;
|
||||
|
||||
@@ -3833,50 +3838,52 @@ static long rtl8152_check_firmware(struc
|
||||
@@ -3832,50 +3837,52 @@ static long rtl8152_check_firmware(struc
|
||||
goto fail;
|
||||
goto fw_end;
|
||||
case RTL_FW_PLA:
|
||||
@ -106,7 +106,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
dev_err(&tp->intf->dev,
|
||||
"Check PHY_STOP fail\n");
|
||||
goto fail;
|
||||
@@ -3887,28 +3894,28 @@ static long rtl8152_check_firmware(struc
|
||||
@@ -3886,28 +3893,28 @@ static long rtl8152_check_firmware(struc
|
||||
"Invalid length for PHY_STOP\n");
|
||||
goto fail;
|
||||
}
|
||||
@ -141,7 +141,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
break;
|
||||
default:
|
||||
@@ -3922,7 +3929,7 @@ static long rtl8152_check_firmware(struc
|
||||
@@ -3921,7 +3928,7 @@ static long rtl8152_check_firmware(struc
|
||||
}
|
||||
|
||||
fw_end:
|
||||
|
||||
@ -20,7 +20,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/drivers/net/usb/r8152.c
|
||||
+++ b/drivers/net/usb/r8152.c
|
||||
@@ -658,15 +658,13 @@ enum rtl_register_content {
|
||||
@@ -657,15 +657,13 @@ enum rtl_register_content {
|
||||
|
||||
#define INTR_LINK 0x0004
|
||||
|
||||
@ -39,7 +39,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
/* rtl8152 flags */
|
||||
enum rtl8152_flags {
|
||||
@@ -796,6 +794,7 @@ struct r8152 {
|
||||
@@ -795,6 +793,7 @@ struct r8152 {
|
||||
bool (*in_nway)(struct r8152 *tp);
|
||||
void (*hw_phy_cfg)(struct r8152 *tp);
|
||||
void (*autosuspend_en)(struct r8152 *tp, bool enable);
|
||||
@ -47,7 +47,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
} rtl_ops;
|
||||
|
||||
struct ups_info {
|
||||
@@ -1022,8 +1021,7 @@ enum tx_csum_stat {
|
||||
@@ -1021,8 +1020,7 @@ enum tx_csum_stat {
|
||||
static const int multicast_filter_limit = 32;
|
||||
static unsigned int agg_buf_sz = 16384;
|
||||
|
||||
@ -57,7 +57,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
static
|
||||
int get_registers(struct r8152 *tp, u16 value, u16 index, u16 size, void *data)
|
||||
@@ -2633,10 +2631,7 @@ static void rtl8152_nic_reset(struct r81
|
||||
@@ -2632,10 +2630,7 @@ static void rtl8152_nic_reset(struct r81
|
||||
|
||||
static void set_tx_qlen(struct r8152 *tp)
|
||||
{
|
||||
@ -69,7 +69,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
}
|
||||
|
||||
static inline u8 rtl8152_get_speed(struct r8152 *tp)
|
||||
@@ -4725,6 +4720,12 @@ static void r8153b_hw_phy_cfg(struct r81
|
||||
@@ -4724,6 +4719,12 @@ static void r8153b_hw_phy_cfg(struct r81
|
||||
set_bit(PHY_RESET, &tp->flags);
|
||||
}
|
||||
|
||||
@ -82,7 +82,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static void r8153_first_init(struct r8152 *tp)
|
||||
{
|
||||
u32 ocp_data;
|
||||
@@ -4757,9 +4758,7 @@ static void r8153_first_init(struct r815
|
||||
@@ -4756,9 +4757,7 @@ static void r8153_first_init(struct r815
|
||||
|
||||
rtl_rx_vlan_en(tp, tp->netdev->features & NETIF_F_HW_VLAN_CTAG_RX);
|
||||
|
||||
@ -93,7 +93,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_TCR0);
|
||||
ocp_data |= TCR0_AUTO_FIFO;
|
||||
@@ -4794,8 +4793,7 @@ static void r8153_enter_oob(struct r8152
|
||||
@@ -4793,8 +4792,7 @@ static void r8153_enter_oob(struct r8152
|
||||
|
||||
wait_oob_link_list_ready(tp);
|
||||
|
||||
@ -103,7 +103,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
switch (tp->version) {
|
||||
case RTL_VER_03:
|
||||
@@ -6518,12 +6516,21 @@ static int rtl8152_change_mtu(struct net
|
||||
@@ -6495,12 +6493,21 @@ static int rtl8152_change_mtu(struct net
|
||||
dev->mtu = new_mtu;
|
||||
|
||||
if (netif_running(dev)) {
|
||||
@ -130,7 +130,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
}
|
||||
|
||||
mutex_unlock(&tp->control);
|
||||
@@ -6612,6 +6619,7 @@ static int rtl_ops_init(struct r8152 *tp
|
||||
@@ -6589,6 +6596,7 @@ static int rtl_ops_init(struct r8152 *tp
|
||||
ops->in_nway = rtl8153_in_nway;
|
||||
ops->hw_phy_cfg = r8153_hw_phy_cfg;
|
||||
ops->autosuspend_en = rtl8153_runtime_enable;
|
||||
@ -138,7 +138,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
if (tp->udev->speed < USB_SPEED_SUPER)
|
||||
tp->rx_buf_sz = 16 * 1024;
|
||||
else
|
||||
@@ -6633,6 +6641,7 @@ static int rtl_ops_init(struct r8152 *tp
|
||||
@@ -6610,6 +6618,7 @@ static int rtl_ops_init(struct r8152 *tp
|
||||
ops->in_nway = rtl8153_in_nway;
|
||||
ops->hw_phy_cfg = r8153b_hw_phy_cfg;
|
||||
ops->autosuspend_en = rtl8153b_runtime_enable;
|
||||
@ -146,7 +146,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
tp->rx_buf_sz = 32 * 1024;
|
||||
tp->eee_en = true;
|
||||
tp->eee_adv = MDIO_EEE_1000T | MDIO_EEE_100TX;
|
||||
@@ -6853,7 +6862,7 @@ static int rtl8152_probe(struct usb_inte
|
||||
@@ -6830,7 +6839,7 @@ static int rtl8152_probe(struct usb_inte
|
||||
netdev->max_mtu = ETH_DATA_LEN;
|
||||
break;
|
||||
default:
|
||||
|
||||
@ -16,7 +16,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/drivers/net/usb/r8152.c
|
||||
+++ b/drivers/net/usb/r8152.c
|
||||
@@ -44,10 +44,14 @@
|
||||
@@ -43,10 +43,14 @@
|
||||
|
||||
#define PLA_IDR 0xc000
|
||||
#define PLA_RCR 0xc010
|
||||
@ -31,7 +31,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
#define PLA_DMY_REG0 0xc0b0
|
||||
#define PLA_FMC 0xc0b4
|
||||
#define PLA_CFG_WOL 0xc0b6
|
||||
@@ -64,6 +68,8 @@
|
||||
@@ -63,6 +67,8 @@
|
||||
#define PLA_MACDBG_PRE 0xd38c /* RTL_VER_04 only */
|
||||
#define PLA_MACDBG_POST 0xd38e /* RTL_VER_04 only */
|
||||
#define PLA_EXTRA_STATUS 0xd398
|
||||
@ -40,7 +40,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
#define PLA_EFUSE_DATA 0xdd00
|
||||
#define PLA_EFUSE_CMD 0xdd02
|
||||
#define PLA_LEDSEL 0xdd90
|
||||
@@ -73,6 +79,8 @@
|
||||
@@ -72,6 +78,8 @@
|
||||
#define PLA_LWAKE_CTRL_REG 0xe007
|
||||
#define PLA_GPHY_INTR_IMR 0xe022
|
||||
#define PLA_EEE_CR 0xe040
|
||||
@ -49,7 +49,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
#define PLA_EEEP_CR 0xe080
|
||||
#define PLA_MAC_PWR_CTRL 0xe0c0
|
||||
#define PLA_MAC_PWR_CTRL2 0xe0ca
|
||||
@@ -83,6 +91,7 @@
|
||||
@@ -82,6 +90,7 @@
|
||||
#define PLA_TCR1 0xe612
|
||||
#define PLA_MTPS 0xe615
|
||||
#define PLA_TXFIFO_CTRL 0xe618
|
||||
@ -57,7 +57,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
#define PLA_RSTTALLY 0xe800
|
||||
#define PLA_CR 0xe813
|
||||
#define PLA_CRWECR 0xe81c
|
||||
@@ -99,6 +108,7 @@
|
||||
@@ -98,6 +107,7 @@
|
||||
#define PLA_SFF_STS_7 0xe8de
|
||||
#define PLA_PHYSTATUS 0xe908
|
||||
#define PLA_CONFIG6 0xe90a /* CONFIG6 */
|
||||
@ -65,7 +65,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
#define PLA_BP_BA 0xfc26
|
||||
#define PLA_BP_0 0xfc28
|
||||
#define PLA_BP_1 0xfc2a
|
||||
@@ -113,6 +123,7 @@
|
||||
@@ -112,6 +122,7 @@
|
||||
#define USB_USB2PHY 0xb41e
|
||||
#define USB_SSPHYLINK1 0xb426
|
||||
#define USB_SSPHYLINK2 0xb428
|
||||
@ -73,7 +73,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
#define USB_U2P3_CTRL 0xb460
|
||||
#define USB_CSR_DUMMY1 0xb464
|
||||
#define USB_CSR_DUMMY2 0xb466
|
||||
@@ -123,7 +134,12 @@
|
||||
@@ -122,7 +133,12 @@
|
||||
#define USB_FW_FIX_EN0 0xcfca
|
||||
#define USB_FW_FIX_EN1 0xcfcc
|
||||
#define USB_LPM_CONFIG 0xcfd8
|
||||
@ -86,7 +86,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
#define USB_FW_CTRL 0xd334 /* RTL8153B */
|
||||
#define USB_FC_TIMER 0xd340
|
||||
#define USB_USB_CTRL 0xd406
|
||||
@@ -137,16 +153,20 @@
|
||||
@@ -136,16 +152,20 @@
|
||||
#define USB_RX_EXTRA_AGGR_TMR 0xd432 /* RTL8153B */
|
||||
#define USB_TX_DMA 0xd434
|
||||
#define USB_UPT_RXDMA_OWN 0xd437
|
||||
@ -107,7 +107,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
#define USB_UPS_CFG 0xd842
|
||||
#define USB_UPS_FLAGS 0xd848
|
||||
#define USB_WDT1_CTRL 0xe404
|
||||
@@ -189,6 +209,9 @@
|
||||
@@ -188,6 +208,9 @@
|
||||
#define OCP_EEE_ABLE 0xa5c4
|
||||
#define OCP_EEE_ADV 0xa5d0
|
||||
#define OCP_EEE_LPABLE 0xa5d2
|
||||
@ -117,7 +117,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
#define OCP_PHY_STATE 0xa708 /* nway state for 8153 */
|
||||
#define OCP_PHY_PATCH_STAT 0xb800
|
||||
#define OCP_PHY_PATCH_CMD 0xb820
|
||||
@@ -200,6 +223,7 @@
|
||||
@@ -199,6 +222,7 @@
|
||||
/* SRAM Register */
|
||||
#define SRAM_GREEN_CFG 0x8011
|
||||
#define SRAM_LPF_CFG 0x8012
|
||||
@ -125,7 +125,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
#define SRAM_10M_AMP1 0x8080
|
||||
#define SRAM_10M_AMP2 0x8082
|
||||
#define SRAM_IMPEDANCE 0x8084
|
||||
@@ -211,11 +235,19 @@
|
||||
@@ -210,11 +234,19 @@
|
||||
#define RCR_AM 0x00000004
|
||||
#define RCR_AB 0x00000008
|
||||
#define RCR_ACPT_ALL (RCR_AAP | RCR_APM | RCR_AM | RCR_AB)
|
||||
@ -145,7 +145,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
/* PLA_RXFIFO_CTRL1 */
|
||||
#define RXFIFO_THR2_FULL 0x00000060
|
||||
#define RXFIFO_THR2_HIGH 0x00000038
|
||||
@@ -286,6 +318,7 @@
|
||||
@@ -285,6 +317,7 @@
|
||||
#define MCU_BORW_EN 0x4000
|
||||
|
||||
/* PLA_CPCR */
|
||||
@ -153,7 +153,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
#define CPCR_RX_VLAN 0x0040
|
||||
|
||||
/* PLA_CFG_WOL */
|
||||
@@ -311,6 +344,10 @@
|
||||
@@ -310,6 +343,10 @@
|
||||
/* PLA_CONFIG6 */
|
||||
#define LANWAKE_CLR_EN BIT(0)
|
||||
|
||||
@ -164,7 +164,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
/* PLA_CONFIG5 */
|
||||
#define BWF_EN 0x0040
|
||||
#define MWF_EN 0x0020
|
||||
@@ -334,6 +371,7 @@
|
||||
@@ -333,6 +370,7 @@
|
||||
/* PLA_MAC_PWR_CTRL2 */
|
||||
#define EEE_SPDWN_RATIO 0x8007
|
||||
#define MAC_CLK_SPDWN_EN BIT(15)
|
||||
@ -172,7 +172,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
/* PLA_MAC_PWR_CTRL3 */
|
||||
#define PLA_MCU_SPDWN_EN BIT(14)
|
||||
@@ -346,6 +384,7 @@
|
||||
@@ -345,6 +383,7 @@
|
||||
#define PWRSAVE_SPDWN_EN 0x1000
|
||||
#define RXDV_SPDWN_EN 0x0800
|
||||
#define TX10MIDLE_EN 0x0100
|
||||
@ -180,7 +180,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
#define TP100_SPDWN_EN 0x0020
|
||||
#define TP500_SPDWN_EN 0x0010
|
||||
#define TP1000_SPDWN_EN 0x0008
|
||||
@@ -386,6 +425,13 @@
|
||||
@@ -385,6 +424,13 @@
|
||||
#define LINK_CHANGE_FLAG BIT(8)
|
||||
#define POLL_LINK_CHG BIT(0)
|
||||
|
||||
@ -194,7 +194,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
/* USB_USB2PHY */
|
||||
#define USB2PHY_SUSPEND 0x0001
|
||||
#define USB2PHY_L1 0x0002
|
||||
@@ -434,6 +480,9 @@
|
||||
@@ -433,6 +479,9 @@
|
||||
#define BMU_RESET_EP_IN 0x01
|
||||
#define BMU_RESET_EP_OUT 0x02
|
||||
|
||||
@ -204,7 +204,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
/* USB_UPT_RXDMA_OWN */
|
||||
#define OWN_UPDATE BIT(0)
|
||||
#define OWN_CLEAR BIT(1)
|
||||
@@ -441,27 +490,52 @@
|
||||
@@ -440,27 +489,52 @@
|
||||
/* USB_FW_TASK */
|
||||
#define FC_PATCH_TASK BIT(1)
|
||||
|
||||
@ -257,7 +257,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
/* USB_POWER_CUT */
|
||||
#define PWR_EN 0x0001
|
||||
@@ -497,8 +571,12 @@
|
||||
@@ -496,8 +570,12 @@
|
||||
#define SEN_VAL_NORMAL 0xa000
|
||||
#define SEL_RXIDLE 0x0100
|
||||
|
||||
@ -270,7 +270,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
/* USB_UPS_FLAGS */
|
||||
#define UPS_FLAGS_R_TUNE BIT(0)
|
||||
@@ -506,6 +584,7 @@
|
||||
@@ -505,6 +583,7 @@
|
||||
#define UPS_FLAGS_250M_CKDIV BIT(2)
|
||||
#define UPS_FLAGS_EN_ALDPS BIT(3)
|
||||
#define UPS_FLAGS_CTAP_SHORT_DIS BIT(4)
|
||||
@ -278,7 +278,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
#define ups_flags_speed(x) ((x) << 16)
|
||||
#define UPS_FLAGS_EN_EEE BIT(20)
|
||||
#define UPS_FLAGS_EN_500M_EEE BIT(21)
|
||||
@@ -526,6 +605,8 @@ enum spd_duplex {
|
||||
@@ -525,6 +604,8 @@ enum spd_duplex {
|
||||
FORCE_10M_FULL,
|
||||
FORCE_100M_HALF,
|
||||
FORCE_100M_FULL,
|
||||
@ -287,7 +287,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
};
|
||||
|
||||
/* OCP_ALDPS_CONFIG */
|
||||
@@ -590,6 +671,9 @@ enum spd_duplex {
|
||||
@@ -589,6 +670,9 @@ enum spd_duplex {
|
||||
#define EN_10M_CLKDIV BIT(11)
|
||||
#define EN_10M_BGOFF 0x0080
|
||||
|
||||
@ -297,7 +297,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
/* OCP_PHY_STATE */
|
||||
#define TXDIS_STATE 0x01
|
||||
#define ABD_STATE 0x02
|
||||
@@ -609,7 +693,8 @@ enum spd_duplex {
|
||||
@@ -608,7 +692,8 @@ enum spd_duplex {
|
||||
#define EN_EMI_L 0x0040
|
||||
|
||||
/* OCP_SYSCLK_CFG */
|
||||
@ -307,7 +307,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
/* SRAM_GREEN_CFG */
|
||||
#define GREEN_ETH_EN BIT(15)
|
||||
@@ -640,6 +725,11 @@ enum spd_duplex {
|
||||
@@ -639,6 +724,11 @@ enum spd_duplex {
|
||||
#define BP4_SUPER_ONLY 0x1578 /* RTL_VER_04 only */
|
||||
|
||||
enum rtl_register_content {
|
||||
@ -319,7 +319,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
_1000bps = 0x10,
|
||||
_100bps = 0x08,
|
||||
_10bps = 0x04,
|
||||
@@ -647,6 +737,9 @@ enum rtl_register_content {
|
||||
@@ -646,6 +736,9 @@ enum rtl_register_content {
|
||||
FULL_DUP = 0x01,
|
||||
};
|
||||
|
||||
@ -329,7 +329,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
#define RTL8152_MAX_TX 4
|
||||
#define RTL8152_MAX_RX 10
|
||||
#define INTBUFSIZE 2
|
||||
@@ -661,7 +754,6 @@ enum rtl_register_content {
|
||||
@@ -660,7 +753,6 @@ enum rtl_register_content {
|
||||
#define RTL8152_RMS (VLAN_ETH_FRAME_LEN + ETH_FCS_LEN)
|
||||
#define RTL8153_RMS RTL8153_MAX_PACKET
|
||||
#define RTL8152_TX_TIMEOUT (5 * HZ)
|
||||
@ -337,7 +337,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
#define mtu_to_size(m) ((m) + VLAN_ETH_HLEN + ETH_FCS_LEN)
|
||||
#define size_to_mtu(s) ((s) - VLAN_ETH_HLEN - ETH_FCS_LEN)
|
||||
#define rx_reserved_size(x) (mtu_to_size(x) + sizeof(struct rx_desc) + RX_ALIGN)
|
||||
@@ -798,6 +890,7 @@ struct r8152 {
|
||||
@@ -797,6 +889,7 @@ struct r8152 {
|
||||
} rtl_ops;
|
||||
|
||||
struct ups_info {
|
||||
@ -345,7 +345,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
u32 _10m_ckdiv:1;
|
||||
u32 _250m_ckdiv:1;
|
||||
u32 aldps:1;
|
||||
@@ -839,7 +932,9 @@ struct r8152 {
|
||||
@@ -838,7 +931,9 @@ struct r8152 {
|
||||
u32 rx_buf_sz;
|
||||
u32 rx_copybreak;
|
||||
u32 rx_pending;
|
||||
@ -355,7 +355,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
u16 ocp_base;
|
||||
u16 speed;
|
||||
u16 eee_adv;
|
||||
@@ -999,6 +1094,15 @@ enum rtl_version {
|
||||
@@ -998,6 +1093,15 @@ enum rtl_version {
|
||||
RTL_VER_07,
|
||||
RTL_VER_08,
|
||||
RTL_VER_09,
|
||||
@ -371,7 +371,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
RTL_VER_MAX
|
||||
};
|
||||
|
||||
@@ -1014,6 +1118,7 @@ enum tx_csum_stat {
|
||||
@@ -1013,6 +1117,7 @@ enum tx_csum_stat {
|
||||
#define RTL_ADVERTISED_100_FULL BIT(3)
|
||||
#define RTL_ADVERTISED_1000_HALF BIT(4)
|
||||
#define RTL_ADVERTISED_1000_FULL BIT(5)
|
||||
@ -379,7 +379,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
/* Maximum number of multicast addresses to filter (vs. Rx-all-multicast).
|
||||
* The RTL chips use a 64 element hash table based on the Ethernet CRC.
|
||||
@@ -2607,7 +2712,7 @@ static netdev_tx_t rtl8152_start_xmit(st
|
||||
@@ -2606,7 +2711,7 @@ static netdev_tx_t rtl8152_start_xmit(st
|
||||
|
||||
static void r8152b_reset_packet_filter(struct r8152 *tp)
|
||||
{
|
||||
@ -388,7 +388,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_FMC);
|
||||
ocp_data &= ~FMC_FCR_MCU_EN;
|
||||
@@ -2618,14 +2723,47 @@ static void r8152b_reset_packet_filter(s
|
||||
@@ -2617,14 +2722,47 @@ static void r8152b_reset_packet_filter(s
|
||||
|
||||
static void rtl8152_nic_reset(struct r8152 *tp)
|
||||
{
|
||||
@ -442,7 +442,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2634,9 +2772,9 @@ static void set_tx_qlen(struct r8152 *tp
|
||||
@@ -2633,9 +2771,9 @@ static void set_tx_qlen(struct r8152 *tp
|
||||
tp->tx_qlen = agg_buf_sz / (mtu_to_size(tp->netdev->mtu) + sizeof(struct tx_desc));
|
||||
}
|
||||
|
||||
@ -454,7 +454,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
}
|
||||
|
||||
static void rtl_eee_plus_en(struct r8152 *tp, bool enable)
|
||||
@@ -2796,6 +2934,7 @@ static int rtl_enable(struct r8152 *tp)
|
||||
@@ -2795,6 +2933,7 @@ static int rtl_enable(struct r8152 *tp)
|
||||
switch (tp->version) {
|
||||
case RTL_VER_08:
|
||||
case RTL_VER_09:
|
||||
@ -462,7 +462,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
r8153b_rx_agg_chg_indicate(tp);
|
||||
break;
|
||||
default:
|
||||
@@ -2833,6 +2972,7 @@ static void r8153_set_rx_early_timeout(s
|
||||
@@ -2832,6 +2971,7 @@ static void r8153_set_rx_early_timeout(s
|
||||
|
||||
case RTL_VER_08:
|
||||
case RTL_VER_09:
|
||||
@ -470,7 +470,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
/* The RTL8153B uses USB_RX_EXTRA_AGGR_TMR for rx timeout
|
||||
* primarily. For USB_RX_EARLY_TIMEOUT, we fix it to 128ns.
|
||||
*/
|
||||
@@ -2842,6 +2982,18 @@ static void r8153_set_rx_early_timeout(s
|
||||
@@ -2841,6 +2981,18 @@ static void r8153_set_rx_early_timeout(s
|
||||
ocp_data);
|
||||
break;
|
||||
|
||||
@ -489,7 +489,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -2861,8 +3013,19 @@ static void r8153_set_rx_early_size(stru
|
||||
@@ -2860,8 +3012,19 @@ static void r8153_set_rx_early_size(stru
|
||||
break;
|
||||
case RTL_VER_08:
|
||||
case RTL_VER_09:
|
||||
@ -509,7 +509,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
break;
|
||||
default:
|
||||
WARN_ON_ONCE(1);
|
||||
@@ -2872,6 +3035,8 @@ static void r8153_set_rx_early_size(stru
|
||||
@@ -2871,6 +3034,8 @@ static void r8153_set_rx_early_size(stru
|
||||
|
||||
static int rtl8153_enable(struct r8152 *tp)
|
||||
{
|
||||
@ -518,7 +518,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
if (test_bit(RTL8152_UNPLUG, &tp->flags))
|
||||
return -ENODEV;
|
||||
|
||||
@@ -2882,15 +3047,18 @@ static int rtl8153_enable(struct r8152 *
|
||||
@@ -2881,15 +3046,18 @@ static int rtl8153_enable(struct r8152 *
|
||||
|
||||
rtl_set_ifg(tp, rtl8152_get_speed(tp));
|
||||
|
||||
@ -540,7 +540,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
}
|
||||
|
||||
return rtl_enable(tp);
|
||||
@@ -2955,12 +3123,40 @@ static void rtl_rx_vlan_en(struct r8152
|
||||
@@ -2954,12 +3122,40 @@ static void rtl_rx_vlan_en(struct r8152
|
||||
{
|
||||
u32 ocp_data;
|
||||
|
||||
@ -587,7 +587,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
}
|
||||
|
||||
static int rtl8152_set_features(struct net_device *dev,
|
||||
@@ -3053,6 +3249,40 @@ static void __rtl_set_wol(struct r8152 *
|
||||
@@ -3052,6 +3248,40 @@ static void __rtl_set_wol(struct r8152 *
|
||||
device_set_wakeup_enable(&tp->udev->dev, false);
|
||||
}
|
||||
|
||||
@ -628,7 +628,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static void r8153_u1u2en(struct r8152 *tp, bool enable)
|
||||
{
|
||||
u8 u1u2[8];
|
||||
@@ -3112,6 +3342,9 @@ static void r8153b_ups_flags(struct r815
|
||||
@@ -3111,6 +3341,9 @@ static void r8153b_ups_flags(struct r815
|
||||
if (tp->ups_info.eee_cmod_lv)
|
||||
ups_flags |= UPS_FLAGS_EEE_CMOD_LV_EN;
|
||||
|
||||
@ -638,7 +638,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
if (tp->ups_info._10m_ckdiv)
|
||||
ups_flags |= UPS_FLAGS_EN_10M_CKDIV;
|
||||
|
||||
@@ -3162,6 +3395,88 @@ static void r8153b_ups_flags(struct r815
|
||||
@@ -3161,6 +3394,88 @@ static void r8153b_ups_flags(struct r815
|
||||
ocp_write_dword(tp, MCU_TYPE_USB, USB_UPS_FLAGS, ups_flags);
|
||||
}
|
||||
|
||||
@ -727,7 +727,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static void rtl_green_en(struct r8152 *tp, bool enable)
|
||||
{
|
||||
u16 data;
|
||||
@@ -3225,16 +3540,16 @@ static void r8153b_ups_en(struct r8152 *
|
||||
@@ -3224,16 +3539,16 @@ static void r8153b_ups_en(struct r8152 *
|
||||
ocp_data |= UPS_EN | USP_PREWAKE | PHASE2_EN;
|
||||
ocp_write_byte(tp, MCU_TYPE_USB, USB_POWER_CUT, ocp_data);
|
||||
|
||||
@ -750,7 +750,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
if (ocp_read_word(tp, MCU_TYPE_USB, USB_MISC_0) & PCUT_STATUS) {
|
||||
int i;
|
||||
@@ -3254,6 +3569,95 @@ static void r8153b_ups_en(struct r8152 *
|
||||
@@ -3253,6 +3568,95 @@ static void r8153b_ups_en(struct r8152 *
|
||||
}
|
||||
}
|
||||
|
||||
@ -846,7 +846,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static void r8153_power_cut_en(struct r8152 *tp, bool enable)
|
||||
{
|
||||
u32 ocp_data;
|
||||
@@ -3383,6 +3787,38 @@ static void rtl8153b_runtime_enable(stru
|
||||
@@ -3382,6 +3786,38 @@ static void rtl8153b_runtime_enable(stru
|
||||
}
|
||||
}
|
||||
|
||||
@ -885,7 +885,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static void r8153_teredo_off(struct r8152 *tp)
|
||||
{
|
||||
u32 ocp_data;
|
||||
@@ -3403,14 +3839,19 @@ static void r8153_teredo_off(struct r815
|
||||
@@ -3402,14 +3838,19 @@ static void r8153_teredo_off(struct r815
|
||||
|
||||
case RTL_VER_08:
|
||||
case RTL_VER_09:
|
||||
@ -908,7 +908,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
}
|
||||
|
||||
ocp_write_word(tp, MCU_TYPE_PLA, PLA_WDT6_CTRL, WDT6_SET_MODE);
|
||||
@@ -3445,6 +3886,12 @@ static void rtl_clear_bp(struct r8152 *t
|
||||
@@ -3444,6 +3885,12 @@ static void rtl_clear_bp(struct r8152 *t
|
||||
break;
|
||||
case RTL_VER_08:
|
||||
case RTL_VER_09:
|
||||
@ -921,7 +921,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
default:
|
||||
if (type == MCU_TYPE_USB) {
|
||||
ocp_write_word(tp, MCU_TYPE_USB, USB_BP2_EN, 0);
|
||||
@@ -3654,6 +4101,11 @@ static bool rtl8152_is_fw_mac_ok(struct
|
||||
@@ -3653,6 +4100,11 @@ static bool rtl8152_is_fw_mac_ok(struct
|
||||
case RTL_VER_06:
|
||||
case RTL_VER_08:
|
||||
case RTL_VER_09:
|
||||
@ -933,7 +933,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
fw_reg = 0xf800;
|
||||
bp_ba_addr = PLA_BP_BA;
|
||||
bp_en_addr = PLA_BP_EN;
|
||||
@@ -3677,6 +4129,11 @@ static bool rtl8152_is_fw_mac_ok(struct
|
||||
@@ -3676,6 +4128,11 @@ static bool rtl8152_is_fw_mac_ok(struct
|
||||
break;
|
||||
case RTL_VER_08:
|
||||
case RTL_VER_09:
|
||||
@ -945,7 +945,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
fw_reg = 0xe600;
|
||||
bp_ba_addr = USB_BP_BA;
|
||||
bp_en_addr = USB_BP2_EN;
|
||||
@@ -4216,6 +4673,22 @@ static void r8153_eee_en(struct r8152 *t
|
||||
@@ -4215,6 +4672,22 @@ static void r8153_eee_en(struct r8152 *t
|
||||
tp->ups_info.eee = enable;
|
||||
}
|
||||
|
||||
@ -968,7 +968,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static void rtl_eee_enable(struct r8152 *tp, bool enable)
|
||||
{
|
||||
switch (tp->version) {
|
||||
@@ -4237,6 +4710,7 @@ static void rtl_eee_enable(struct r8152
|
||||
@@ -4236,6 +4709,7 @@ static void rtl_eee_enable(struct r8152
|
||||
case RTL_VER_06:
|
||||
case RTL_VER_08:
|
||||
case RTL_VER_09:
|
||||
@ -976,7 +976,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
if (enable) {
|
||||
r8153_eee_en(tp, true);
|
||||
ocp_reg_write(tp, OCP_EEE_ADV, tp->eee_adv);
|
||||
@@ -4245,6 +4719,19 @@ static void rtl_eee_enable(struct r8152
|
||||
@@ -4244,6 +4718,19 @@ static void rtl_eee_enable(struct r8152
|
||||
ocp_reg_write(tp, OCP_EEE_ADV, 0);
|
||||
}
|
||||
break;
|
||||
@ -996,7 +996,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -4291,6 +4778,20 @@ static void wait_oob_link_list_ready(str
|
||||
@@ -4290,6 +4777,20 @@ static void wait_oob_link_list_ready(str
|
||||
}
|
||||
}
|
||||
|
||||
@ -1017,7 +1017,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static void r8152b_exit_oob(struct r8152 *tp)
|
||||
{
|
||||
u32 ocp_data;
|
||||
@@ -4341,7 +4842,7 @@ static void r8152b_exit_oob(struct r8152
|
||||
@@ -4340,7 +4841,7 @@ static void r8152b_exit_oob(struct r8152
|
||||
}
|
||||
|
||||
/* TX share fifo free credit full threshold */
|
||||
@ -1026,7 +1026,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
ocp_write_byte(tp, MCU_TYPE_USB, USB_TX_AGG, TX_AGG_MAX_THRESHOLD);
|
||||
ocp_write_dword(tp, MCU_TYPE_USB, USB_RX_BUF_TH, RX_THR_HIGH);
|
||||
@@ -4518,6 +5019,21 @@ static int r8153b_post_firmware_1(struct
|
||||
@@ -4517,6 +5018,21 @@ static int r8153b_post_firmware_1(struct
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1048,7 +1048,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static void r8153_aldps_en(struct r8152 *tp, bool enable)
|
||||
{
|
||||
u16 data;
|
||||
@@ -4720,6 +5236,13 @@ static void r8153b_hw_phy_cfg(struct r81
|
||||
@@ -4719,6 +5235,13 @@ static void r8153b_hw_phy_cfg(struct r81
|
||||
set_bit(PHY_RESET, &tp->flags);
|
||||
}
|
||||
|
||||
@ -1062,7 +1062,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static void rtl8153_change_mtu(struct r8152 *tp)
|
||||
{
|
||||
ocp_write_word(tp, MCU_TYPE_PLA, PLA_RMS, mtu_to_size(tp->netdev->mtu));
|
||||
@@ -4807,6 +5330,7 @@ static void r8153_enter_oob(struct r8152
|
||||
@@ -4806,6 +5329,7 @@ static void r8153_enter_oob(struct r8152
|
||||
|
||||
case RTL_VER_08:
|
||||
case RTL_VER_09:
|
||||
@ -1070,7 +1070,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
/* Clear teredo wake event. bit[15:8] is the teredo wakeup
|
||||
* type. Set it to zero. bits[7:0] are the W1C bits about
|
||||
* the events. Set them to all 1 to clear them.
|
||||
@@ -4843,6 +5367,96 @@ static void rtl8153_disable(struct r8152
|
||||
@@ -4842,6 +5366,96 @@ static void rtl8153_disable(struct r8152
|
||||
r8153_aldps_en(tp, true);
|
||||
}
|
||||
|
||||
@ -1167,7 +1167,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static int rtl8152_set_speed(struct r8152 *tp, u8 autoneg, u32 speed, u8 duplex,
|
||||
u32 advertising)
|
||||
{
|
||||
@@ -4891,58 +5505,73 @@ static int rtl8152_set_speed(struct r815
|
||||
@@ -4890,58 +5504,73 @@ static int rtl8152_set_speed(struct r815
|
||||
|
||||
tp->mii.force_media = 1;
|
||||
} else {
|
||||
@ -1259,7 +1259,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
}
|
||||
|
||||
bmcr = BMCR_ANENABLE | BMCR_ANRESTART;
|
||||
@@ -5098,6 +5727,253 @@ static void rtl8153b_down(struct r8152 *
|
||||
@@ -5097,6 +5726,253 @@ static void rtl8153b_down(struct r8152 *
|
||||
r8153_aldps_en(tp, true);
|
||||
}
|
||||
|
||||
@ -1513,7 +1513,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static bool rtl8152_in_nway(struct r8152 *tp)
|
||||
{
|
||||
u16 nway_state;
|
||||
@@ -5128,7 +6004,7 @@ static void set_carrier(struct r8152 *tp
|
||||
@@ -5127,7 +6003,7 @@ static void set_carrier(struct r8152 *tp
|
||||
{
|
||||
struct net_device *netdev = tp->netdev;
|
||||
struct napi_struct *napi = &tp->napi;
|
||||
@ -1522,7 +1522,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
speed = rtl8152_get_speed(tp);
|
||||
|
||||
@@ -5141,7 +6017,7 @@ static void set_carrier(struct r8152 *tp
|
||||
@@ -5140,7 +6016,7 @@ static void set_carrier(struct r8152 *tp
|
||||
rtl_start_rx(tp);
|
||||
clear_bit(RTL8152_SET_RX_MODE, &tp->flags);
|
||||
_rtl8152_set_rx_mode(netdev);
|
||||
@ -1531,7 +1531,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
netif_wake_queue(netdev);
|
||||
netif_info(tp, link, netdev, "carrier on\n");
|
||||
} else if (netif_queue_stopped(netdev) &&
|
||||
@@ -5521,14 +6397,9 @@ static void r8153_init(struct r8152 *tp)
|
||||
@@ -5502,14 +6378,9 @@ static void r8153_init(struct r8152 *tp)
|
||||
|
||||
ocp_write_word(tp, MCU_TYPE_USB, USB_CONNECT_TIMER, 0x0001);
|
||||
|
||||
@ -1547,7 +1547,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
r8153_u1u2en(tp, true);
|
||||
usb_enable_lpm(tp->udev);
|
||||
|
||||
@@ -5621,9 +6492,7 @@ static void r8153b_init(struct r8152 *tp
|
||||
@@ -5600,9 +6471,7 @@ static void r8153b_init(struct r8152 *tp
|
||||
usb_enable_lpm(tp->udev);
|
||||
|
||||
/* MAC clock speed down */
|
||||
@ -1558,8 +1558,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL3);
|
||||
ocp_data &= ~PLA_MCU_SPDWN_EN;
|
||||
@@ -5652,6 +6521,1069 @@ static void r8153b_init(struct r8152 *tp
|
||||
r8152_led_configuration(tp);
|
||||
@@ -5629,6 +6498,1069 @@ static void r8153b_init(struct r8152 *tp
|
||||
tp->coalesce = 15000; /* 15 us */
|
||||
}
|
||||
|
||||
+static void r8153c_init(struct r8152 *tp)
|
||||
@ -2628,7 +2628,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static int rtl8152_pre_reset(struct usb_interface *intf)
|
||||
{
|
||||
struct r8152 *tp = usb_get_intfdata(intf);
|
||||
@@ -6015,6 +7947,22 @@ int rtl8152_get_link_ksettings(struct ne
|
||||
@@ -5992,6 +7924,22 @@ int rtl8152_get_link_ksettings(struct ne
|
||||
|
||||
mii_ethtool_get_link_ksettings(&tp->mii, cmd);
|
||||
|
||||
@ -2651,7 +2651,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
mutex_unlock(&tp->control);
|
||||
|
||||
usb_autopm_put_interface(tp->intf);
|
||||
@@ -6058,6 +8006,10 @@ static int rtl8152_set_link_ksettings(st
|
||||
@@ -6035,6 +7983,10 @@ static int rtl8152_set_link_ksettings(st
|
||||
cmd->link_modes.advertising))
|
||||
advertising |= RTL_ADVERTISED_1000_FULL;
|
||||
|
||||
@ -2662,7 +2662,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
mutex_lock(&tp->control);
|
||||
|
||||
ret = rtl8152_set_speed(tp, cmd->base.autoneg, cmd->base.speed,
|
||||
@@ -6647,6 +8599,67 @@ static int rtl_ops_init(struct r8152 *tp
|
||||
@@ -6624,6 +8576,67 @@ static int rtl_ops_init(struct r8152 *tp
|
||||
tp->eee_adv = MDIO_EEE_1000T | MDIO_EEE_100TX;
|
||||
break;
|
||||
|
||||
@ -2730,7 +2730,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
default:
|
||||
ret = -ENODEV;
|
||||
dev_err(&tp->intf->dev, "Unknown Device\n");
|
||||
@@ -6660,11 +8673,13 @@ static int rtl_ops_init(struct r8152 *tp
|
||||
@@ -6637,11 +8650,13 @@ static int rtl_ops_init(struct r8152 *tp
|
||||
#define FIRMWARE_8153A_3 "rtl_nic/rtl8153a-3.fw"
|
||||
#define FIRMWARE_8153A_4 "rtl_nic/rtl8153a-4.fw"
|
||||
#define FIRMWARE_8153B_2 "rtl_nic/rtl8153b-2.fw"
|
||||
@ -2744,7 +2744,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
static int rtl_fw_init(struct r8152 *tp)
|
||||
{
|
||||
@@ -6690,6 +8705,11 @@ static int rtl_fw_init(struct r8152 *tp)
|
||||
@@ -6667,6 +8682,11 @@ static int rtl_fw_init(struct r8152 *tp)
|
||||
rtl_fw->pre_fw = r8153b_pre_firmware_1;
|
||||
rtl_fw->post_fw = r8153b_post_firmware_1;
|
||||
break;
|
||||
@ -2756,7 +2756,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -6745,6 +8765,27 @@ u8 rtl8152_get_version(struct usb_interf
|
||||
@@ -6722,6 +8742,27 @@ u8 rtl8152_get_version(struct usb_interf
|
||||
case 0x6010:
|
||||
version = RTL_VER_09;
|
||||
break;
|
||||
@ -2784,7 +2784,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
default:
|
||||
version = RTL_VER_UNKNOWN;
|
||||
dev_info(&intf->dev, "Unknown version 0x%04x\n", ocp_data);
|
||||
@@ -6857,12 +8898,29 @@ static int rtl8152_probe(struct usb_inte
|
||||
@@ -6834,12 +8875,29 @@ static int rtl8152_probe(struct usb_inte
|
||||
/* MTU range: 68 - 1500 or 9194 */
|
||||
netdev->min_mtu = ETH_MIN_MTU;
|
||||
switch (tp->version) {
|
||||
@ -2817,7 +2817,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -6878,7 +8936,13 @@ static int rtl8152_probe(struct usb_inte
|
||||
@@ -6855,7 +8913,13 @@ static int rtl8152_probe(struct usb_inte
|
||||
tp->advertising = RTL_ADVERTISED_10_HALF | RTL_ADVERTISED_10_FULL |
|
||||
RTL_ADVERTISED_100_HALF | RTL_ADVERTISED_100_FULL;
|
||||
if (tp->mii.supports_gmii) {
|
||||
@ -2832,7 +2832,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
tp->advertising |= RTL_ADVERTISED_1000_FULL;
|
||||
}
|
||||
tp->duplex = DUPLEX_FULL;
|
||||
@@ -6902,7 +8966,11 @@ static int rtl8152_probe(struct usb_inte
|
||||
@@ -6879,7 +8943,11 @@ static int rtl8152_probe(struct usb_inte
|
||||
set_ethernet_addr(tp);
|
||||
|
||||
usb_set_intfdata(intf, tp);
|
||||
@ -2845,7 +2845,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
ret = register_netdev(netdev);
|
||||
if (ret != 0) {
|
||||
@@ -6938,7 +9006,8 @@ static void rtl8152_disconnect(struct us
|
||||
@@ -6915,7 +8983,8 @@ static void rtl8152_disconnect(struct us
|
||||
unregister_netdev(tp->netdev);
|
||||
tasklet_kill(&tp->tx_tl);
|
||||
cancel_delayed_work_sync(&tp->hw_phy_work);
|
||||
@ -2855,7 +2855,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
rtl8152_release_firmware(tp);
|
||||
free_netdev(tp->netdev);
|
||||
}
|
||||
@@ -6958,13 +9027,28 @@ static void rtl8152_disconnect(struct us
|
||||
@@ -6935,13 +9004,28 @@ static void rtl8152_disconnect(struct us
|
||||
.idProduct = (prod), \
|
||||
.bInterfaceClass = USB_CLASS_COMM, \
|
||||
.bInterfaceSubClass = USB_CDC_SUBCLASS_ETHERNET, \
|
||||
|
||||
@ -15,7 +15,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/drivers/net/usb/r8152.c
|
||||
+++ b/drivers/net/usb/r8152.c
|
||||
@@ -975,8 +975,60 @@ enum rtl8152_fw_flags {
|
||||
@@ -974,8 +974,60 @@ enum rtl8152_fw_flags {
|
||||
FW_FLAGS_START,
|
||||
FW_FLAGS_STOP,
|
||||
FW_FLAGS_NC,
|
||||
@ -76,7 +76,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
/**
|
||||
* struct fw_mac - a firmware block used by RTL_FW_PLA and RTL_FW_USB.
|
||||
* The layout of the firmware block is:
|
||||
@@ -1081,6 +1133,15 @@ enum rtl_fw_type {
|
||||
@@ -1080,6 +1132,15 @@ enum rtl_fw_type {
|
||||
RTL_FW_PHY_START,
|
||||
RTL_FW_PHY_STOP,
|
||||
RTL_FW_PHY_NC,
|
||||
@ -92,7 +92,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
};
|
||||
|
||||
enum rtl_version {
|
||||
@@ -4000,6 +4061,162 @@ static int rtl_post_ram_code(struct r815
|
||||
@@ -3999,6 +4060,162 @@ static int rtl_post_ram_code(struct r815
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -255,7 +255,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static bool rtl8152_is_fw_phy_nc_ok(struct r8152 *tp, struct fw_phy_nc *phy)
|
||||
{
|
||||
u32 length;
|
||||
@@ -4320,6 +4537,10 @@ static long rtl8152_check_firmware(struc
|
||||
@@ -4319,6 +4536,10 @@ static long rtl8152_check_firmware(struc
|
||||
case RTL_FW_PHY_START:
|
||||
if (test_bit(FW_FLAGS_START, &fw_flags) ||
|
||||
test_bit(FW_FLAGS_NC, &fw_flags) ||
|
||||
@ -266,7 +266,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
test_bit(FW_FLAGS_STOP, &fw_flags)) {
|
||||
dev_err(&tp->intf->dev,
|
||||
"check PHY_START fail\n");
|
||||
@@ -4368,7 +4589,153 @@ static long rtl8152_check_firmware(struc
|
||||
@@ -4367,7 +4588,153 @@ static long rtl8152_check_firmware(struc
|
||||
goto fail;
|
||||
}
|
||||
__set_bit(FW_FLAGS_NC, &fw_flags);
|
||||
@ -420,7 +420,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
break;
|
||||
default:
|
||||
dev_warn(&tp->intf->dev, "Unknown type %u is found\n",
|
||||
@@ -4391,6 +4758,143 @@ fail:
|
||||
@@ -4390,6 +4757,143 @@ fail:
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -564,7 +564,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static void rtl8152_fw_phy_nc_apply(struct r8152 *tp, struct fw_phy_nc *phy)
|
||||
{
|
||||
u16 mode_reg, bp_index;
|
||||
@@ -4444,6 +4948,12 @@ static void rtl8152_fw_mac_apply(struct
|
||||
@@ -4443,6 +4947,12 @@ static void rtl8152_fw_mac_apply(struct
|
||||
return;
|
||||
}
|
||||
|
||||
@ -577,7 +577,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
rtl_clear_bp(tp, type);
|
||||
|
||||
/* Enable backup/restore of MACDBG. This is required after clearing PLA
|
||||
@@ -4479,7 +4989,6 @@ static void rtl8152_fw_mac_apply(struct
|
||||
@@ -4478,7 +4988,6 @@ static void rtl8152_fw_mac_apply(struct
|
||||
ocp_write_word(tp, type, bp_en_addr,
|
||||
__le16_to_cpu(mac->bp_en_value));
|
||||
|
||||
@ -585,7 +585,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
if (fw_ver_reg)
|
||||
ocp_write_byte(tp, MCU_TYPE_USB, fw_ver_reg,
|
||||
mac->fw_ver_data);
|
||||
@@ -4494,7 +5003,7 @@ static void rtl8152_apply_firmware(struc
|
||||
@@ -4493,7 +5002,7 @@ static void rtl8152_apply_firmware(struc
|
||||
struct fw_header *fw_hdr;
|
||||
struct fw_phy_patch_key *key;
|
||||
u16 key_addr = 0;
|
||||
@ -594,7 +594,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
if (IS_ERR_OR_NULL(rtl_fw->fw))
|
||||
return;
|
||||
@@ -4516,17 +5025,40 @@ static void rtl8152_apply_firmware(struc
|
||||
@@ -4515,17 +5024,40 @@ static void rtl8152_apply_firmware(struc
|
||||
rtl8152_fw_mac_apply(tp, (struct fw_mac *)block);
|
||||
break;
|
||||
case RTL_FW_PHY_START:
|
||||
@ -635,7 +635,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -5034,6 +5566,21 @@ static int r8153c_post_firmware_1(struct
|
||||
@@ -5033,6 +5565,21 @@ static int r8153c_post_firmware_1(struct
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -657,7 +657,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static void r8153_aldps_en(struct r8152 *tp, bool enable)
|
||||
{
|
||||
u16 data;
|
||||
@@ -8674,12 +9221,16 @@ static int rtl_ops_init(struct r8152 *tp
|
||||
@@ -8651,12 +9198,16 @@ static int rtl_ops_init(struct r8152 *tp
|
||||
#define FIRMWARE_8153A_4 "rtl_nic/rtl8153a-4.fw"
|
||||
#define FIRMWARE_8153B_2 "rtl_nic/rtl8153b-2.fw"
|
||||
#define FIRMWARE_8153C_1 "rtl_nic/rtl8153c-1.fw"
|
||||
@ -674,7 +674,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
static int rtl_fw_init(struct r8152 *tp)
|
||||
{
|
||||
@@ -8705,6 +9256,14 @@ static int rtl_fw_init(struct r8152 *tp)
|
||||
@@ -8682,6 +9233,14 @@ static int rtl_fw_init(struct r8152 *tp)
|
||||
rtl_fw->pre_fw = r8153b_pre_firmware_1;
|
||||
rtl_fw->post_fw = r8153b_post_firmware_1;
|
||||
break;
|
||||
|
||||
@ -16,7 +16,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/drivers/net/usb/r8152.c
|
||||
+++ b/drivers/net/usb/r8152.c
|
||||
@@ -30,7 +30,7 @@
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <linux/usb/r8152.h>
|
||||
|
||||
/* Information for net-next */
|
||||
@ -25,7 +25,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
/* Information for net */
|
||||
#define NET_VERSION "11"
|
||||
@@ -8131,6 +8131,39 @@ static void r8156b_init(struct r8152 *tp
|
||||
@@ -8108,6 +8108,39 @@ static void r8156b_init(struct r8152 *tp
|
||||
tp->coalesce = 15000; /* 15 us */
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static int rtl8152_pre_reset(struct usb_interface *intf)
|
||||
{
|
||||
struct r8152 *tp = usb_get_intfdata(intf);
|
||||
@@ -9369,10 +9402,8 @@ static int rtl8152_probe(struct usb_inte
|
||||
@@ -9346,10 +9379,8 @@ static int rtl8152_probe(struct usb_inte
|
||||
if (version == RTL_VER_UNKNOWN)
|
||||
return -ENODEV;
|
||||
|
||||
|
||||
@ -0,0 +1,46 @@
|
||||
From fba2153a200716c1fec1eafda7356bb347589efb Mon Sep 17 00:00:00 2001
|
||||
From: Randy Dunlap <rdunlap@infradead.org>
|
||||
Date: Thu, 25 Nov 2021 18:33:16 -0800
|
||||
Subject: [PATCH] hv: utils: add PTP_1588_CLOCK to Kconfig to fix build
|
||||
|
||||
The hyperv utilities use PTP clock interfaces and should depend a
|
||||
a kconfig symbol such that they will be built as a loadable module or
|
||||
builtin so that linker errors do not happen.
|
||||
|
||||
Prevents these build errors:
|
||||
|
||||
ld: drivers/hv/hv_util.o: in function `hv_timesync_deinit':
|
||||
hv_util.c:(.text+0x37d): undefined reference to `ptp_clock_unregister'
|
||||
ld: drivers/hv/hv_util.o: in function `hv_timesync_init':
|
||||
hv_util.c:(.text+0x738): undefined reference to `ptp_clock_register'
|
||||
|
||||
References: https://lore.kernel.org/stable/20220328093115.7486-1-ynezz@true.cz/T/#u
|
||||
Fixes: 3716a49a81ba ("hv_utils: implement Hyper-V PTP source")
|
||||
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
|
||||
Reported-by: kernel test robot <lkp@intel.com>
|
||||
Cc: Arnd Bergmann <arnd@arndb.de>
|
||||
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
|
||||
Cc: Haiyang Zhang <haiyangz@microsoft.com>
|
||||
Cc: Stephen Hemminger <sthemmin@microsoft.com>
|
||||
Cc: Wei Liu <wei.liu@kernel.org>
|
||||
Cc: Dexuan Cui <decui@microsoft.com>
|
||||
Cc: linux-hyperv@vger.kernel.org
|
||||
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
|
||||
Link: https://lore.kernel.org/r/20211126023316.25184-1-rdunlap@infradead.org
|
||||
Signed-off-by: Wei Liu <wei.liu@kernel.org>
|
||||
(cherry picked from commit 1dc2f2b81a6a9895da59f3915760f6c0c3074492)
|
||||
---
|
||||
drivers/hv/Kconfig | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/drivers/hv/Kconfig
|
||||
+++ b/drivers/hv/Kconfig
|
||||
@@ -18,6 +18,7 @@ config HYPERV_TIMER
|
||||
config HYPERV_UTILS
|
||||
tristate "Microsoft Hyper-V Utilities driver"
|
||||
depends on HYPERV && CONNECTOR && NLS
|
||||
+ depends on PTP_1588_CLOCK_OPTIONAL
|
||||
help
|
||||
Select this option to enable the Hyper-V Utilities.
|
||||
|
||||
@ -803,6 +803,7 @@ CONFIG_BT_HCIUART_H4=y
|
||||
# CONFIG_BT_RFCOMM is not set
|
||||
CONFIG_BT_RFCOMM_TTY=y
|
||||
# CONFIG_BT_SELFTEST is not set
|
||||
# CONFIG_BT_VIRTIO is not set
|
||||
CONFIG_BUG=y
|
||||
# CONFIG_BUG_ON_DATA_CORRUPTION is not set
|
||||
CONFIG_BUILDTIME_EXTABLE_SORT=y
|
||||
@ -1127,6 +1128,7 @@ CONFIG_CRYPTO_CTR=y
|
||||
# CONFIG_CRYPTO_DEV_MXS_DCP is not set
|
||||
# CONFIG_CRYPTO_DEV_NITROX_CNN55XX is not set
|
||||
# CONFIG_CRYPTO_DEV_OCTEONTX_CPT is not set
|
||||
# CONFIG_CRYPTO_DEV_QAT_4XXX is not set
|
||||
# CONFIG_CRYPTO_DEV_QAT_C3XXX is not set
|
||||
# CONFIG_CRYPTO_DEV_QAT_C3XXXVF is not set
|
||||
# CONFIG_CRYPTO_DEV_QAT_C62X is not set
|
||||
@ -1484,6 +1486,7 @@ CONFIG_DQL=y
|
||||
# CONFIG_DRM_AMD_DC_DCN3_0 is not set
|
||||
# CONFIG_DRM_AMD_DC_HDCP is not set
|
||||
# CONFIG_DRM_AMD_DC_SI is not set
|
||||
# CONFIG_DRM_AMD_SECURE_DISPLAY is not set
|
||||
# CONFIG_DRM_ANALOGIX_ANX6345 is not set
|
||||
# CONFIG_DRM_ANALOGIX_ANX7625 is not set
|
||||
# CONFIG_DRM_ANALOGIX_ANX78XX is not set
|
||||
@ -2133,6 +2136,9 @@ CONFIG_GENERIC_VDSO_TIME_NS=y
|
||||
# CONFIG_GNSS is not set
|
||||
# CONFIG_GOLDFISH is not set
|
||||
# CONFIG_GOOGLE_FIRMWARE is not set
|
||||
# CONFIG_GOOGLE_FRAMEBUFFER_COREBOOT is not set
|
||||
# CONFIG_GOOGLE_MEMCONSOLE_X86_LEGACY is not set
|
||||
# CONFIG_GOOGLE_SMI is not set
|
||||
# CONFIG_GP2AP002 is not set
|
||||
# CONFIG_GP2AP020A00F is not set
|
||||
# CONFIG_GPD_POCKET_FAN is not set
|
||||
@ -3017,6 +3023,7 @@ CONFIG_KUSER_HELPERS=y
|
||||
# CONFIG_KVM_GUEST is not set
|
||||
# CONFIG_KVM_INTEL is not set
|
||||
# CONFIG_KVM_WERROR is not set
|
||||
# CONFIG_KVM_XEN is not set
|
||||
# CONFIG_KXCJK1013 is not set
|
||||
# CONFIG_KXSD9 is not set
|
||||
# CONFIG_L2TP is not set
|
||||
@ -5736,6 +5743,7 @@ CONFIG_SND_DRIVERS=y
|
||||
# CONFIG_SND_GUSCLASSIC is not set
|
||||
# CONFIG_SND_GUSEXTREME is not set
|
||||
# CONFIG_SND_GUSMAX is not set
|
||||
# CONFIG_SND_HDA_CODEC_CS8409 is not set
|
||||
# CONFIG_SND_HDA_INTEL is not set
|
||||
# CONFIG_SND_HDA_INTEL_DETECT_DMIC is not set
|
||||
# CONFIG_SND_HDA_INTEL_HDMI_SILENT_STREAM is not set
|
||||
@ -5838,6 +5846,7 @@ CONFIG_SND_PROC_FS=y
|
||||
# CONFIG_SND_SOC_ALC5623 is not set
|
||||
# CONFIG_SND_SOC_AMD_ACP is not set
|
||||
# CONFIG_SND_SOC_AMD_ACP3x is not set
|
||||
# CONFIG_SND_SOC_AMD_ACP5x is not set
|
||||
# CONFIG_SND_SOC_AMD_RENOIR is not set
|
||||
# CONFIG_SND_SOC_AU1XAUDIO is not set
|
||||
# CONFIG_SND_SOC_AU1XPSC is not set
|
||||
@ -6081,6 +6090,7 @@ CONFIG_SND_USB=y
|
||||
CONFIG_SND_VERBOSE_PROCFS=y
|
||||
# CONFIG_SND_VIA82XX is not set
|
||||
# CONFIG_SND_VIA82XX_MODEM is not set
|
||||
# CONFIG_SND_VIRTIO is not set
|
||||
# CONFIG_SND_VIRTUOSO is not set
|
||||
# CONFIG_SND_VX222 is not set
|
||||
# CONFIG_SND_VXPOCKET is not set
|
||||
@ -7187,6 +7197,7 @@ CONFIG_VHOST_MENU=y
|
||||
# CONFIG_VIDEO_OV9282 is not set
|
||||
# CONFIG_VIDEO_OV9640 is not set
|
||||
# CONFIG_VIDEO_OV9650 is not set
|
||||
# CONFIG_VIDEO_OV9734 is not set
|
||||
# CONFIG_VIDEO_PVRUSB2 is not set
|
||||
# CONFIG_VIDEO_RDACM20 is not set
|
||||
# CONFIG_VIDEO_RDACM21 is not set
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/dsa/mv88e6xxx/chip.c
|
||||
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
|
||||
@@ -2659,6 +2659,9 @@ static int mv88e6xxx_setup_port(struct m
|
||||
@@ -2705,6 +2705,9 @@ static int mv88e6xxx_setup_port(struct m
|
||||
if (dsa_is_cpu_port(ds, port))
|
||||
reg = 0;
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
#include <linux/crc32.h>
|
||||
#include <linux/if_vlan.h>
|
||||
#include <linux/uaccess.h>
|
||||
@@ -5301,6 +5302,22 @@ static void rtl_tally_reset(struct r8152
|
||||
@@ -6780,6 +6781,22 @@ static void rtl_tally_reset(struct r8152
|
||||
ocp_write_word(tp, MCU_TYPE_PLA, PLA_RSTTALLY, ocp_data);
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
static void r8152b_init(struct r8152 *tp)
|
||||
{
|
||||
u32 ocp_data;
|
||||
@@ -5342,6 +5359,8 @@ static void r8152b_init(struct r8152 *tp
|
||||
@@ -6821,6 +6838,8 @@ static void r8152b_init(struct r8152 *tp
|
||||
ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_USB_CTRL);
|
||||
ocp_data &= ~(RX_AGG_DISABLE | RX_ZERO_EN);
|
||||
ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data);
|
||||
@ -54,7 +54,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
}
|
||||
|
||||
static void r8153_init(struct r8152 *tp)
|
||||
@@ -5487,6 +5506,8 @@ static void r8153_init(struct r8152 *tp)
|
||||
@@ -6961,6 +6980,8 @@ static void r8153_init(struct r8152 *tp)
|
||||
tp->coalesce = COALESCE_SLOW;
|
||||
break;
|
||||
}
|
||||
@ -63,7 +63,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
}
|
||||
|
||||
static void r8153b_init(struct r8152 *tp)
|
||||
@@ -5573,6 +5594,8 @@ static void r8153b_init(struct r8152 *tp
|
||||
@@ -7043,6 +7064,8 @@ static void r8153b_init(struct r8152 *tp
|
||||
rtl_tally_reset(tp);
|
||||
|
||||
tp->coalesce = 15000; /* 15 us */
|
||||
@ -71,4 +71,4 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
+ r8152_led_configuration(tp);
|
||||
}
|
||||
|
||||
static int rtl8152_pre_reset(struct usb_interface *intf)
|
||||
static void r8153c_init(struct r8152 *tp)
|
||||
|
||||
@ -74,16 +74,25 @@
|
||||
#ifdef CONFIG_SGI_PARTITION
|
||||
sgi_partition,
|
||||
#endif
|
||||
@@ -598,6 +605,14 @@ static bool blk_add_partition(struct gen
|
||||
@@ -408,6 +415,11 @@ static struct block_device *add_partitio
|
||||
goto out_del;
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_FIT_PARTITION
|
||||
+ if (flags & ADDPART_FLAG_READONLY)
|
||||
+ bdev->bd_read_only = true;
|
||||
+#endif
|
||||
+
|
||||
/* everything is up and running, commence */
|
||||
err = xa_insert(&disk->part_tbl, partno, bdev, GFP_KERNEL);
|
||||
if (err)
|
||||
@@ -598,6 +610,11 @@ static bool blk_add_partition(struct gen
|
||||
(state->parts[p].flags & ADDPART_FLAG_RAID))
|
||||
md_autodetect_dev(part->bd_dev);
|
||||
|
||||
+#ifdef CONFIG_FIT_PARTITION
|
||||
+ if ((state->parts[p].flags & ADDPART_FLAG_ROOTDEV) && ROOT_DEV == 0)
|
||||
+ ROOT_DEV = part->bd_dev;
|
||||
+
|
||||
+ if (state->parts[p].flags & ADDPART_FLAG_READONLY)
|
||||
+ set_disk_ro(disk, true);
|
||||
+#endif
|
||||
+
|
||||
return true;
|
||||
|
||||
@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -2171,8 +2171,8 @@ static irqreturn_t mtk_handle_irq_rx(int
|
||||
@@ -2179,8 +2179,8 @@ static irqreturn_t mtk_handle_irq_rx(int
|
||||
|
||||
eth->rx_events++;
|
||||
if (likely(napi_schedule_prep(ð->rx_napi))) {
|
||||
@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
|
||||
return IRQ_HANDLED;
|
||||
@@ -2184,8 +2184,8 @@ static irqreturn_t mtk_handle_irq_tx(int
|
||||
@@ -2192,8 +2192,8 @@ static irqreturn_t mtk_handle_irq_tx(int
|
||||
|
||||
eth->tx_events++;
|
||||
if (likely(napi_schedule_prep(ð->tx_napi))) {
|
||||
@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
|
||||
return IRQ_HANDLED;
|
||||
@@ -3229,6 +3229,8 @@ static int mtk_probe(struct platform_dev
|
||||
@@ -3300,6 +3300,8 @@ static int mtk_probe(struct platform_dev
|
||||
* for NAPI to work
|
||||
*/
|
||||
init_dummy_netdev(ð->dummy_dev);
|
||||
|
||||
@ -17,7 +17,7 @@ Signed-off-by: DENG Qingfang <dqfext@gmail.com>
|
||||
|
||||
--- a/drivers/net/dsa/mv88e6xxx/chip.c
|
||||
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
|
||||
@@ -2869,6 +2869,7 @@ static int mv88e6xxx_setup(struct dsa_sw
|
||||
@@ -2917,6 +2917,7 @@ static int mv88e6xxx_setup(struct dsa_sw
|
||||
|
||||
chip->ds = ds;
|
||||
ds->slave_mii_bus = mv88e6xxx_default_mdio_bus(chip);
|
||||
|
||||
@ -17,7 +17,7 @@ Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
|
||||
--- a/drivers/net/dsa/mv88e6xxx/chip.c
|
||||
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
|
||||
@@ -5436,6 +5436,7 @@ static int mv88e6xxx_register_switch(str
|
||||
@@ -5484,6 +5484,7 @@ static int mv88e6xxx_register_switch(str
|
||||
ds->ops = &mv88e6xxx_switch_ops;
|
||||
ds->ageing_time_min = chip->info->age_time_coeff;
|
||||
ds->ageing_time_max = chip->info->age_time_coeff * U8_MAX;
|
||||
|
||||
@ -41,7 +41,7 @@ Reviewed-by: Grant Grundler <grundler@chromium.org>
|
||||
/*
|
||||
* This structure holds all XPS maps for device. Maps are indexed by CPU.
|
||||
*/
|
||||
@@ -1445,6 +1455,9 @@ struct net_device_ops {
|
||||
@@ -1452,6 +1462,9 @@ struct net_device_ops {
|
||||
const struct sk_buff *skb,
|
||||
u16 rxq_index,
|
||||
u32 flow_id);
|
||||
|
||||
@ -36,7 +36,9 @@ endef
|
||||
define Build/ls-append-kernel
|
||||
mkdir -p $@.tmp && \
|
||||
cp $(IMAGE_KERNEL) $@.tmp/fitImage && \
|
||||
make_ext4fs -J -L kernel -l "$(LS_SD_KERNELPART_SIZE)M" "$@.kernel.part" "$@.tmp" && \
|
||||
make_ext4fs -J -L kernel -l "$(LS_SD_KERNELPART_SIZE)M" \
|
||||
$(if $(SOURCE_DATE_EPOCH),-T $(SOURCE_DATE_EPOCH)) \
|
||||
"$@.kernel.part" "$@.tmp" && \
|
||||
dd if=$@.kernel.part >> $@ && \
|
||||
rm -rf $@.tmp && \
|
||||
rm -f $@.kernel.part
|
||||
|
||||
@ -14,7 +14,7 @@ Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -3373,6 +3373,7 @@ static const struct mtk_soc_data mt7623_
|
||||
@@ -3375,6 +3375,7 @@ static const struct mtk_soc_data mt7623_
|
||||
.hw_features = MTK_HW_FEATURES,
|
||||
.required_clks = MT7623_CLKS_BITMAP,
|
||||
.required_pctl = true,
|
||||
|
||||
@ -34,7 +34,9 @@ define Build/boot-img-ext4
|
||||
$(foreach dts,$(DEVICE_DTS), $(CP) $(KDIR)/image-$(dts).dtb $@.boot/$(dts).dtb;)
|
||||
$(CP) $(IMAGE_KERNEL) $@.boot/$(KERNEL_NAME)
|
||||
-$(CP) $@-boot.scr $@.boot/boot.scr
|
||||
make_ext4fs -J -L kernel -l $(CONFIG_TARGET_KERNEL_PARTSIZE)M $@.bootimg $@.boot
|
||||
make_ext4fs -J -L kernel -l $(CONFIG_TARGET_KERNEL_PARTSIZE)M \
|
||||
$(if $(SOURCE_DATE_EPOCH),-T $(SOURCE_DATE_EPOCH)) \
|
||||
$@.bootimg $@.boot
|
||||
endef
|
||||
|
||||
define Build/buffalo-kernel-jffs2
|
||||
|
||||
@ -14,7 +14,7 @@ Signed-off-by: René van Dorst <opensource@vdorst.com>
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -2949,6 +2949,7 @@ static const struct net_device_ops mtk_n
|
||||
@@ -2955,6 +2955,7 @@ static const struct net_device_ops mtk_n
|
||||
|
||||
static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
|
||||
{
|
||||
@ -22,7 +22,7 @@ Signed-off-by: René van Dorst <opensource@vdorst.com>
|
||||
const __be32 *_id = of_get_property(np, "reg", NULL);
|
||||
phy_interface_t phy_mode;
|
||||
struct phylink *phylink;
|
||||
@@ -3044,6 +3045,9 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||
@@ -3050,6 +3051,9 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||
else
|
||||
eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH_2K - MTK_RX_ETH_HLEN;
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ endef
|
||||
include $(INCLUDE_DIR)/target.mk
|
||||
|
||||
DEFAULT_PACKAGES += uboot-envtools ethtool kmod-gpio-button-hotplug \
|
||||
dnsmasq firewall ip6tables iptables odhcp6c odhcpd-ipv6only \
|
||||
ip-full ip-bridge tc
|
||||
firewall4 nftables kmod-nft-offload odhcp6c \
|
||||
ip-full ip-bridge tc-bpf
|
||||
|
||||
$(eval $(call BuildTarget))
|
||||
|
||||
@ -11,6 +11,7 @@ FEATURES:=fpu usb ext4 display rootfs-part rtc squashfs
|
||||
SUBTARGETS:=cortexa8 cortexa7 cortexa53
|
||||
|
||||
KERNEL_PATCHVER:=5.10
|
||||
KERNEL_TESTING_PATCHVER:=5.15
|
||||
|
||||
KERNELNAME:=zImage dtbs
|
||||
|
||||
|
||||
527
target/linux/sunxi/config-5.15
Normal file
527
target/linux/sunxi/config-5.15
Normal file
@ -0,0 +1,527 @@
|
||||
CONFIG_AF_UNIX_OOB=y
|
||||
# CONFIG_AHCI_SUNXI is not set
|
||||
CONFIG_ALIGNMENT_TRAP=y
|
||||
CONFIG_ARCH_32BIT_OFF_T=y
|
||||
CONFIG_ARCH_DMA_ADDR_T_64BIT=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_KEEP_MEMBLOCK=y
|
||||
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
|
||||
CONFIG_ARCH_MULTIPLATFORM=y
|
||||
CONFIG_ARCH_MULTI_V6_V7=y
|
||||
CONFIG_ARCH_MULTI_V7=y
|
||||
CONFIG_ARCH_NR_GPIO=416
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
|
||||
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
|
||||
CONFIG_ARCH_SPARSEMEM_ENABLE=y
|
||||
CONFIG_ARCH_SUNXI=y
|
||||
CONFIG_ARCH_SUNXI_MC_SMP=y
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_ARM=y
|
||||
# CONFIG_ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM is not set
|
||||
CONFIG_ARM_APPENDED_DTB=y
|
||||
CONFIG_ARM_ARCH_TIMER=y
|
||||
CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
|
||||
CONFIG_ARM_ATAG_DTB_COMPAT=y
|
||||
CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y
|
||||
CONFIG_ARM_CCI=y
|
||||
CONFIG_ARM_CCI400_COMMON=y
|
||||
CONFIG_ARM_CCI400_PORT_CTRL=y
|
||||
CONFIG_ARM_CPU_SUSPEND=y
|
||||
CONFIG_ARM_CRYPTO=y
|
||||
CONFIG_ARM_ERRATA_643719=y
|
||||
CONFIG_ARM_GIC=y
|
||||
CONFIG_ARM_HAS_SG_CHAIN=y
|
||||
CONFIG_ARM_HEAVY_MB=y
|
||||
CONFIG_ARM_L1_CACHE_SHIFT=6
|
||||
CONFIG_ARM_L1_CACHE_SHIFT_6=y
|
||||
CONFIG_ARM_LPAE=y
|
||||
CONFIG_ARM_PATCH_IDIV=y
|
||||
CONFIG_ARM_PATCH_PHYS_VIRT=y
|
||||
CONFIG_ARM_PSCI=y
|
||||
CONFIG_ARM_PSCI_FW=y
|
||||
CONFIG_ARM_THUMB=y
|
||||
CONFIG_ARM_UNWIND=y
|
||||
CONFIG_ARM_VIRT_EXT=y
|
||||
CONFIG_ATA=y
|
||||
CONFIG_ATAGS=y
|
||||
CONFIG_AUTO_ZRELADDR=y
|
||||
CONFIG_AXP20X_POWER=y
|
||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||
CONFIG_BACKLIGHT_PWM=y
|
||||
CONFIG_BINARY_PRINTF=y
|
||||
CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_BLK_PM=y
|
||||
CONFIG_BOUNCE=y
|
||||
CONFIG_CACHE_L2X0=y
|
||||
CONFIG_CAN=y
|
||||
CONFIG_CLKSRC_MMIO=y
|
||||
CONFIG_CLK_SUNXI=y
|
||||
CONFIG_CLK_SUNXI_CLOCKS=y
|
||||
CONFIG_CLK_SUNXI_PRCM_SUN6I=y
|
||||
CONFIG_CLK_SUNXI_PRCM_SUN8I=y
|
||||
CONFIG_CLK_SUNXI_PRCM_SUN9I=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
CONFIG_CONFIGFS_FS=y
|
||||
CONFIG_CONNECTOR=y
|
||||
CONFIG_CONSOLE_TRANSLATIONS=y
|
||||
CONFIG_COREDUMP=y
|
||||
CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
|
||||
CONFIG_CPUFREQ_DT=y
|
||||
CONFIG_CPUFREQ_DT_PLATDEV=y
|
||||
CONFIG_CPU_32v6K=y
|
||||
CONFIG_CPU_32v7=y
|
||||
CONFIG_CPU_ABRT_EV7=y
|
||||
CONFIG_CPU_CACHE_V7=y
|
||||
CONFIG_CPU_CACHE_VIPT=y
|
||||
CONFIG_CPU_COPY_V6=y
|
||||
CONFIG_CPU_CP15=y
|
||||
CONFIG_CPU_CP15_MMU=y
|
||||
CONFIG_CPU_FREQ=y
|
||||
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
|
||||
CONFIG_CPU_FREQ_GOV_ATTR_SET=y
|
||||
CONFIG_CPU_FREQ_GOV_COMMON=y
|
||||
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
|
||||
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
|
||||
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
|
||||
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
|
||||
CONFIG_CPU_FREQ_GOV_USERSPACE=y
|
||||
CONFIG_CPU_FREQ_STAT=y
|
||||
CONFIG_CPU_HAS_ASID=y
|
||||
CONFIG_CPU_PABRT_V7=y
|
||||
CONFIG_CPU_PM=y
|
||||
CONFIG_CPU_RMAP=y
|
||||
CONFIG_CPU_SPECTRE=y
|
||||
CONFIG_CPU_THERMAL=y
|
||||
CONFIG_CPU_THUMB_CAPABLE=y
|
||||
CONFIG_CPU_TLB_V7=y
|
||||
CONFIG_CPU_V7=y
|
||||
CONFIG_CRC16=y
|
||||
CONFIG_CRC_T10DIF=y
|
||||
CONFIG_CRYPTO_CRC32=y
|
||||
CONFIG_CRYPTO_CRC32C=y
|
||||
CONFIG_CRYPTO_CRCT10DIF=y
|
||||
CONFIG_CRYPTO_CRCT10DIF_ARM_CE=y
|
||||
CONFIG_CRYPTO_DES=y
|
||||
CONFIG_CRYPTO_DEV_ALLWINNER=y
|
||||
CONFIG_CRYPTO_DEV_SUN4I_SS=y
|
||||
# CONFIG_CRYPTO_DEV_SUN4I_SS_DEBUG is not set
|
||||
CONFIG_CRYPTO_DEV_SUN4I_SS_PRNG=y
|
||||
# CONFIG_CRYPTO_DEV_SUN8I_CE is not set
|
||||
# CONFIG_CRYPTO_DEV_SUN8I_SS is not set
|
||||
CONFIG_CRYPTO_HW=y
|
||||
CONFIG_CRYPTO_LIB_DES=y
|
||||
CONFIG_CRYPTO_MD5=y
|
||||
CONFIG_CRYPTO_RNG=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_SHA1=y
|
||||
CONFIG_DCACHE_WORD_ACCESS=y
|
||||
CONFIG_DEBUG_BUGVERBOSE=y
|
||||
CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
|
||||
CONFIG_DEBUG_MEMORY_INIT=y
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_DMA_ENGINE=y
|
||||
CONFIG_DMA_OF=y
|
||||
CONFIG_DMA_OPS=y
|
||||
CONFIG_DMA_REMAP=y
|
||||
CONFIG_DMA_SUN4I=y
|
||||
CONFIG_DMA_SUN6I=y
|
||||
CONFIG_DMA_VIRTUAL_CHANNELS=y
|
||||
CONFIG_DNOTIFY=y
|
||||
CONFIG_DTC=y
|
||||
CONFIG_DUMMY_CONSOLE=y
|
||||
CONFIG_DVB_CORE=y
|
||||
CONFIG_DWMAC_GENERIC=y
|
||||
# CONFIG_DWMAC_SUN8I is not set
|
||||
CONFIG_DWMAC_SUNXI=y
|
||||
CONFIG_DYNAMIC_DEBUG=y
|
||||
CONFIG_EDAC_ATOMIC_SCRUB=y
|
||||
CONFIG_EDAC_SUPPORT=y
|
||||
CONFIG_ELF_CORE=y
|
||||
CONFIG_EXT4_FS=y
|
||||
CONFIG_EXTCON=y
|
||||
CONFIG_F2FS_FS=y
|
||||
CONFIG_FAT_FS=y
|
||||
CONFIG_FB=y
|
||||
CONFIG_FB_CFB_COPYAREA=y
|
||||
CONFIG_FB_CFB_FILLRECT=y
|
||||
CONFIG_FB_CFB_IMAGEBLIT=y
|
||||
CONFIG_FB_CMDLINE=y
|
||||
CONFIG_FB_FOREIGN_ENDIAN=y
|
||||
CONFIG_FB_LITTLE_ENDIAN=y
|
||||
CONFIG_FB_MODE_HELPERS=y
|
||||
CONFIG_FB_SIMPLE=y
|
||||
CONFIG_FB_TILEBLITTING=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FIX_EARLYCON_MEM=y
|
||||
CONFIG_FONT_8x16=y
|
||||
CONFIG_FONT_8x8=y
|
||||
CONFIG_FONT_SUPPORT=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
|
||||
CONFIG_FRAME_WARN=2048
|
||||
CONFIG_FREEZER=y
|
||||
CONFIG_FS_IOMAP=y
|
||||
CONFIG_FS_MBCACHE=y
|
||||
CONFIG_FS_POSIX_ACL=y
|
||||
CONFIG_FWNODE_MDIO=y
|
||||
CONFIG_FW_CACHE=y
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
CONFIG_GENERIC_ALLOCATOR=y
|
||||
CONFIG_GENERIC_ARCH_TOPOLOGY=y
|
||||
CONFIG_GENERIC_BUG=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_CPU_VULNERABILITIES=y
|
||||
CONFIG_GENERIC_EARLY_IOREMAP=y
|
||||
CONFIG_GENERIC_GETTIMEOFDAY=y
|
||||
CONFIG_GENERIC_IDLE_POLL_SETUP=y
|
||||
CONFIG_GENERIC_IRQ_CHIP=y
|
||||
CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
|
||||
CONFIG_GENERIC_IRQ_MIGRATION=y
|
||||
CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
|
||||
CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=y
|
||||
CONFIG_GENERIC_PHY=y
|
||||
CONFIG_GENERIC_PINCONF=y
|
||||
CONFIG_GENERIC_PINCTRL_GROUPS=y
|
||||
CONFIG_GENERIC_PINMUX_FUNCTIONS=y
|
||||
CONFIG_GENERIC_SCHED_CLOCK=y
|
||||
CONFIG_GENERIC_SMP_IDLE_THREAD=y
|
||||
CONFIG_GENERIC_STRNCPY_FROM_USER=y
|
||||
CONFIG_GENERIC_STRNLEN_USER=y
|
||||
CONFIG_GENERIC_TIME_VSYSCALL=y
|
||||
CONFIG_GENERIC_VDSO_32=y
|
||||
CONFIG_GLOB=y
|
||||
CONFIG_GPIOLIB=y
|
||||
CONFIG_GPIO_CDEV=y
|
||||
CONFIG_HANDLE_DOMAIN_IRQ=y
|
||||
CONFIG_HARDEN_BRANCH_PREDICTOR=y
|
||||
CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HAVE_SMP=y
|
||||
CONFIG_HIGHMEM=y
|
||||
CONFIG_HIGHPTE=y
|
||||
CONFIG_HOTPLUG_CPU=y
|
||||
CONFIG_HWMON=y
|
||||
CONFIG_HW_CONSOLE=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_TIMERIOMEM=y
|
||||
CONFIG_HZ_FIXED=0
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
CONFIG_I2C_COMPAT=y
|
||||
CONFIG_I2C_HELPER_AUTO=y
|
||||
CONFIG_I2C_MV64XXX=y
|
||||
CONFIG_I2C_SUN6I_P2WI=y
|
||||
CONFIG_IIO=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_INPUT=y
|
||||
CONFIG_INPUT_AXP20X_PEK=y
|
||||
CONFIG_INPUT_KEYBOARD=y
|
||||
CONFIG_INPUT_MOUSEDEV=y
|
||||
CONFIG_INPUT_MOUSEDEV_PSAUX=y
|
||||
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
|
||||
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
|
||||
CONFIG_INPUT_TOUCHSCREEN=y
|
||||
CONFIG_IRQCHIP=y
|
||||
CONFIG_IRQ_DOMAIN=y
|
||||
CONFIG_IRQ_DOMAIN_HIERARCHY=y
|
||||
CONFIG_IRQ_FASTEOI_HIERARCHY_HANDLERS=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
CONFIG_JBD2=y
|
||||
CONFIG_KALLSYMS=y
|
||||
CONFIG_KEYBOARD_SUN4I_LRADC=y
|
||||
CONFIG_KMAP_LOCAL=y
|
||||
CONFIG_KMAP_LOCAL_NON_LINEAR_PTE_ARRAY=y
|
||||
CONFIG_KSM=y
|
||||
CONFIG_LCD_CLASS_DEVICE=y
|
||||
CONFIG_LCD_PLATFORM=y
|
||||
CONFIG_LEDS_GPIO=y
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
CONFIG_LOCK_SPIN_ON_OWNER=y
|
||||
CONFIG_LOGO=y
|
||||
CONFIG_LOGO_LINUX_CLUT224=y
|
||||
CONFIG_LOGO_LINUX_MONO=y
|
||||
CONFIG_LOGO_LINUX_VGA16=y
|
||||
CONFIG_LTO_NONE=y
|
||||
CONFIG_MACH_SUN4I=y
|
||||
CONFIG_MACH_SUN5I=y
|
||||
CONFIG_MACH_SUN6I=y
|
||||
CONFIG_MACH_SUN7I=y
|
||||
CONFIG_MACH_SUN8I=y
|
||||
CONFIG_MACH_SUN9I=y
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_MDIO_BUS=y
|
||||
CONFIG_MDIO_DEVICE=y
|
||||
CONFIG_MDIO_DEVRES=y
|
||||
CONFIG_MDIO_SUN4I=y
|
||||
CONFIG_MEDIA_ANALOG_TV_SUPPORT=y
|
||||
CONFIG_MEDIA_ATTACH=y
|
||||
CONFIG_MEDIA_CAMERA_SUPPORT=y
|
||||
CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
|
||||
CONFIG_MEDIA_PLATFORM_SUPPORT=y
|
||||
CONFIG_MEDIA_RADIO_SUPPORT=y
|
||||
CONFIG_MEDIA_SDR_SUPPORT=y
|
||||
CONFIG_MEDIA_SUPPORT=y
|
||||
CONFIG_MEDIA_TEST_SUPPORT=y
|
||||
CONFIG_MEDIA_TUNER=y
|
||||
CONFIG_MEMFD_CREATE=y
|
||||
CONFIG_MFD_AXP20X=y
|
||||
CONFIG_MFD_AXP20X_I2C=y
|
||||
CONFIG_MFD_AXP20X_RSB=y
|
||||
CONFIG_MFD_CORE=y
|
||||
CONFIG_MFD_SUN6I_PRCM=y
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_MIGHT_HAVE_CACHE_L2X0=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_BLOCK=y
|
||||
CONFIG_MMC_SUNXI=y
|
||||
CONFIG_MODULES_USE_ELF_REL=y
|
||||
CONFIG_MTD_JEDECPROBE=y
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
CONFIG_MTD_SPLIT_FIT_FW=y
|
||||
CONFIG_MUTEX_SPIN_ON_OWNER=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NEON=y
|
||||
CONFIG_NET_FLOW_LIMIT=y
|
||||
CONFIG_NET_PTP_CLASSIFY=y
|
||||
CONFIG_NET_SELFTESTS=y
|
||||
CONFIG_NET_SOCK_MSG=y
|
||||
CONFIG_NET_VENDOR_ALLWINNER=y
|
||||
CONFIG_NLS=y
|
||||
CONFIG_NLS_CODEPAGE_437=y
|
||||
CONFIG_NLS_ISO8859_1=y
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_NO_HZ_COMMON=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_NR_CPUS=8
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_NVMEM_SUNXI_SID=y
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
CONFIG_OF_FLATTREE=y
|
||||
CONFIG_OF_GPIO=y
|
||||
CONFIG_OF_IRQ=y
|
||||
CONFIG_OF_KOBJ=y
|
||||
CONFIG_OF_MDIO=y
|
||||
CONFIG_OLD_SIGACTION=y
|
||||
CONFIG_OLD_SIGSUSPEND3=y
|
||||
CONFIG_OUTER_CACHE=y
|
||||
CONFIG_OUTER_CACHE_SYNC=y
|
||||
CONFIG_PADATA=y
|
||||
CONFIG_PAGE_OFFSET=0xC0000000
|
||||
CONFIG_PAGE_POOL=y
|
||||
CONFIG_PCS_XPCS=y
|
||||
CONFIG_PERF_USE_VMALLOC=y
|
||||
CONFIG_PGTABLE_LEVELS=3
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHYLINK=y
|
||||
CONFIG_PHYS_ADDR_T_64BIT=y
|
||||
CONFIG_PHY_SUN4I_USB=y
|
||||
# CONFIG_PHY_SUN50I_USB3 is not set
|
||||
# CONFIG_PHY_SUN6I_MIPI_DPHY is not set
|
||||
CONFIG_PHY_SUN9I_USB=y
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_PINCTRL_AXP209=y
|
||||
CONFIG_PINCTRL_SUN4I_A10=y
|
||||
# CONFIG_PINCTRL_SUN50I_A100 is not set
|
||||
# CONFIG_PINCTRL_SUN50I_A100_R is not set
|
||||
# CONFIG_PINCTRL_SUN50I_A64 is not set
|
||||
# CONFIG_PINCTRL_SUN50I_A64_R is not set
|
||||
# CONFIG_PINCTRL_SUN50I_H5 is not set
|
||||
# CONFIG_PINCTRL_SUN50I_H6 is not set
|
||||
# CONFIG_PINCTRL_SUN50I_H616 is not set
|
||||
# CONFIG_PINCTRL_SUN50I_H616_R is not set
|
||||
# CONFIG_PINCTRL_SUN50I_H6_R is not set
|
||||
CONFIG_PINCTRL_SUN5I=y
|
||||
CONFIG_PINCTRL_SUN6I_A31=y
|
||||
CONFIG_PINCTRL_SUN6I_A31_R=y
|
||||
CONFIG_PINCTRL_SUN8I_A23=y
|
||||
CONFIG_PINCTRL_SUN8I_A23_R=y
|
||||
CONFIG_PINCTRL_SUN8I_A33=y
|
||||
CONFIG_PINCTRL_SUN8I_A83T=y
|
||||
CONFIG_PINCTRL_SUN8I_A83T_R=y
|
||||
CONFIG_PINCTRL_SUN8I_H3=y
|
||||
CONFIG_PINCTRL_SUN8I_H3_R=y
|
||||
CONFIG_PINCTRL_SUN8I_V3S=y
|
||||
CONFIG_PINCTRL_SUN9I_A80=y
|
||||
CONFIG_PINCTRL_SUN9I_A80_R=y
|
||||
CONFIG_PINCTRL_SUNXI=y
|
||||
CONFIG_PM=y
|
||||
CONFIG_PM_CLK=y
|
||||
CONFIG_PM_OPP=y
|
||||
CONFIG_PM_SLEEP=y
|
||||
CONFIG_PM_SLEEP_SMP=y
|
||||
CONFIG_POWER_RESET=y
|
||||
CONFIG_POWER_SUPPLY=y
|
||||
CONFIG_PPS=y
|
||||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_PROC_EVENTS=y
|
||||
CONFIG_PROC_PAGE_MONITOR=y
|
||||
CONFIG_PTP_1588_CLOCK=y
|
||||
CONFIG_PTP_1588_CLOCK_OPTIONAL=y
|
||||
CONFIG_PWM=y
|
||||
CONFIG_PWM_SUN4I=y
|
||||
CONFIG_PWM_SYSFS=y
|
||||
CONFIG_RATIONAL=y
|
||||
CONFIG_REALTEK_PHY=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_I2C=y
|
||||
CONFIG_REGMAP_IRQ=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_REGMAP_SPI=y
|
||||
CONFIG_REGULATOR=y
|
||||
CONFIG_REGULATOR_AXP20X=y
|
||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||
CONFIG_REGULATOR_GPIO=y
|
||||
CONFIG_REGULATOR_SY8106A=y
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_RESET_CONTROLLER=y
|
||||
CONFIG_RESET_SIMPLE=y
|
||||
CONFIG_RESET_SUNXI=y
|
||||
CONFIG_RFS_ACCEL=y
|
||||
CONFIG_RPS=y
|
||||
CONFIG_RWSEM_SPIN_ON_OWNER=y
|
||||
CONFIG_SATA_HOST=y
|
||||
CONFIG_SATA_PMP=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_SCSI_COMMON=y
|
||||
CONFIG_SDIO_UART=y
|
||||
CONFIG_SECURITYFS=y
|
||||
CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y
|
||||
CONFIG_SERIAL_8250_DW=y
|
||||
CONFIG_SERIAL_8250_DWLIB=y
|
||||
CONFIG_SERIAL_8250_FSL=y
|
||||
CONFIG_SERIAL_8250_NR_UARTS=8
|
||||
CONFIG_SERIAL_8250_RUNTIME_UARTS=8
|
||||
CONFIG_SERIAL_MCTRL_GPIO=y
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SERIO=y
|
||||
CONFIG_SERIO_SERPORT=y
|
||||
CONFIG_SG_POOL=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_SMP_ON_UP=y
|
||||
CONFIG_SND=y
|
||||
CONFIG_SND_COMPRESS_OFFLOAD=y
|
||||
CONFIG_SND_JACK=y
|
||||
CONFIG_SND_JACK_INPUT_DEV=y
|
||||
CONFIG_SND_PCM=y
|
||||
CONFIG_SND_SIMPLE_CARD=y
|
||||
CONFIG_SND_SIMPLE_CARD_UTILS=y
|
||||
CONFIG_SND_SOC=y
|
||||
# CONFIG_SND_SOC_ADI is not set
|
||||
CONFIG_SND_SOC_I2C_AND_SPI=y
|
||||
# CONFIG_SND_SOC_PCM5102A is not set
|
||||
# CONFIG_SND_SUN4I_I2S is not set
|
||||
# CONFIG_SND_SUN4I_SPDIF is not set
|
||||
# CONFIG_SND_SUN8I_CODEC is not set
|
||||
# CONFIG_SND_SUN8I_CODEC_ANALOG is not set
|
||||
CONFIG_SOCK_RX_QUEUE_MAPPING=y
|
||||
CONFIG_SOUND=y
|
||||
CONFIG_SOUND_OSS_CORE=y
|
||||
CONFIG_SPARSE_IRQ=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_MASTER=y
|
||||
CONFIG_SPI_MEM=y
|
||||
CONFIG_SPI_SUN4I=y
|
||||
CONFIG_SPI_SUN6I=y
|
||||
CONFIG_SRCU=y
|
||||
CONFIG_STMMAC_ETH=y
|
||||
CONFIG_STMMAC_PLATFORM=y
|
||||
# CONFIG_STMMAC_SELFTESTS is not set
|
||||
CONFIG_SUN4I_A10_CCU=y
|
||||
# CONFIG_SUN4I_EMAC is not set
|
||||
CONFIG_SUN4I_TIMER=y
|
||||
CONFIG_SUN5I_CCU=y
|
||||
CONFIG_SUN5I_HSTIMER=y
|
||||
CONFIG_SUN6I_A31_CCU=y
|
||||
CONFIG_SUN8I_A23_CCU=y
|
||||
CONFIG_SUN8I_A33_CCU=y
|
||||
CONFIG_SUN8I_A83T_CCU=y
|
||||
CONFIG_SUN8I_DE2_CCU=y
|
||||
CONFIG_SUN8I_H3_CCU=y
|
||||
CONFIG_SUN8I_R40_CCU=y
|
||||
CONFIG_SUN8I_R_CCU=y
|
||||
CONFIG_SUN8I_THERMAL=y
|
||||
CONFIG_SUN8I_V3S_CCU=y
|
||||
CONFIG_SUN9I_A80_CCU=y
|
||||
CONFIG_SUNXI_CCU=y
|
||||
CONFIG_SUNXI_MBUS=y
|
||||
CONFIG_SUNXI_RSB=y
|
||||
CONFIG_SUNXI_SRAM=y
|
||||
CONFIG_SUNXI_WATCHDOG=y
|
||||
CONFIG_SUSPEND=y
|
||||
CONFIG_SUSPEND_FREEZER=y
|
||||
CONFIG_SWIOTLB=y
|
||||
CONFIG_SWPHY=y
|
||||
CONFIG_SWP_EMULATE=y
|
||||
CONFIG_SYSFS_SYSCALL=y
|
||||
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
|
||||
CONFIG_THERMAL=y
|
||||
CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
|
||||
CONFIG_THERMAL_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_HWMON=y
|
||||
CONFIG_THERMAL_OF=y
|
||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||
CONFIG_TIMER_OF=y
|
||||
CONFIG_TIMER_PROBE=y
|
||||
CONFIG_TMPFS_POSIX_ACL=y
|
||||
CONFIG_TOUCHSCREEN_SUN4I=y
|
||||
CONFIG_TREE_RCU=y
|
||||
CONFIG_TREE_SRCU=y
|
||||
CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
|
||||
CONFIG_UNWINDER_ARM=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
|
||||
# CONFIG_USB_AUDIO is not set
|
||||
CONFIG_USB_COMMON=y
|
||||
CONFIG_USB_DWC2=y
|
||||
CONFIG_USB_DWC2_HOST=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_HCD_PLATFORM=y
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_NET_DRIVERS=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD_PLATFORM=y
|
||||
CONFIG_USB_ROLE_SWITCH=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USERIO=y
|
||||
CONFIG_USE_OF=y
|
||||
CONFIG_VFAT_FS=y
|
||||
CONFIG_VFP=y
|
||||
CONFIG_VFPv3=y
|
||||
CONFIG_VHOST=y
|
||||
CONFIG_VHOST_IOTLB=y
|
||||
CONFIG_VHOST_NET=y
|
||||
# CONFIG_VIDEO_SUN4I_CSI is not set
|
||||
# CONFIG_VIDEO_SUN6I_CSI is not set
|
||||
CONFIG_VM_EVENT_COUNTERS=y
|
||||
CONFIG_VT=y
|
||||
CONFIG_VT_CONSOLE=y
|
||||
CONFIG_VT_CONSOLE_SLEEP=y
|
||||
CONFIG_VT_HW_CONSOLE_BINDING=y
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_XPS=y
|
||||
CONFIG_XXHASH=y
|
||||
CONFIG_XZ_DEC_ARM=y
|
||||
CONFIG_XZ_DEC_BCJ=y
|
||||
CONFIG_ZBOOT_ROM_BSS=0
|
||||
CONFIG_ZBOOT_ROM_TEXT=0
|
||||
83
target/linux/sunxi/cortexa53/config-5.15
Normal file
83
target/linux/sunxi/cortexa53/config-5.15
Normal file
@ -0,0 +1,83 @@
|
||||
CONFIG_64BIT=y
|
||||
CONFIG_ARCH_MMAP_RND_BITS=18
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MAX=24
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MIN=18
|
||||
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11
|
||||
CONFIG_ARCH_PROC_KCORE_TEXT=y
|
||||
CONFIG_ARCH_SPARSEMEM_DEFAULT=y
|
||||
CONFIG_ARCH_STACKWALK=y
|
||||
CONFIG_ARM64=y
|
||||
CONFIG_ARM64_4K_PAGES=y
|
||||
CONFIG_ARM64_PAGE_SHIFT=12
|
||||
CONFIG_ARM64_PA_BITS=48
|
||||
CONFIG_ARM64_PA_BITS_48=y
|
||||
# CONFIG_ARM64_PTR_AUTH is not set
|
||||
# CONFIG_ARM64_SVE is not set
|
||||
CONFIG_ARM64_TAGGED_ADDR_ABI=y
|
||||
CONFIG_ARM64_VA_BITS=39
|
||||
CONFIG_ARM64_VA_BITS_39=y
|
||||
CONFIG_ARM64_WORKAROUND_REPEAT_TLBI=y
|
||||
CONFIG_ARM64_WORKAROUND_SPECULATIVE_AT=y
|
||||
CONFIG_ARM_AMBA=y
|
||||
CONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y
|
||||
CONFIG_ARM_GIC_V3=y
|
||||
CONFIG_ARM_GIC_V3_ITS=y
|
||||
CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y
|
||||
CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y
|
||||
CONFIG_DMA_DIRECT_REMAP=y
|
||||
CONFIG_DWMAC_SUN8I=y
|
||||
CONFIG_EEPROM_AT24=y
|
||||
# CONFIG_FLATMEM_MANUAL is not set
|
||||
CONFIG_FRAME_POINTER=y
|
||||
CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
|
||||
CONFIG_GENERIC_CPU_VULNERABILITIES=y
|
||||
CONFIG_GENERIC_CSUM=y
|
||||
CONFIG_GENERIC_MSI_IRQ=y
|
||||
CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
|
||||
CONFIG_HOLES_IN_ZONE=y
|
||||
CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
|
||||
CONFIG_MDIO_BUS_MUX=y
|
||||
CONFIG_MICREL_PHY=y
|
||||
CONFIG_MODULES_USE_ELF_RELA=y
|
||||
CONFIG_MUSB_PIO_ONLY=y
|
||||
CONFIG_NEED_SG_DMA_LENGTH=y
|
||||
CONFIG_NOP_USB_XCEIV=y
|
||||
CONFIG_NO_IOPORT_MAP=y
|
||||
CONFIG_PARTITION_PERCPU=y
|
||||
CONFIG_PHY_SUN50I_USB3=y
|
||||
CONFIG_PINCTRL_SUN50I_A100=y
|
||||
CONFIG_PINCTRL_SUN50I_A100_R=y
|
||||
CONFIG_PINCTRL_SUN50I_A64=y
|
||||
CONFIG_PINCTRL_SUN50I_A64_R=y
|
||||
CONFIG_PINCTRL_SUN50I_H5=y
|
||||
CONFIG_PINCTRL_SUN50I_H6=y
|
||||
CONFIG_PINCTRL_SUN50I_H6_R=y
|
||||
CONFIG_QUEUED_RWLOCKS=y
|
||||
CONFIG_QUEUED_SPINLOCKS=y
|
||||
CONFIG_RODATA_FULL_DEFAULT_ENABLED=y
|
||||
CONFIG_RTC_DRV_SUN6I=y
|
||||
# CONFIG_SND_SUN50I_CODEC_ANALOG is not set
|
||||
CONFIG_SOUND_OSS_CORE_PRECLAIM=y
|
||||
CONFIG_SPARSEMEM=y
|
||||
CONFIG_SPARSEMEM_EXTREME=y
|
||||
CONFIG_SPARSEMEM_MANUAL=y
|
||||
CONFIG_SPARSEMEM_VMEMMAP=y
|
||||
CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
|
||||
CONFIG_SUN50I_A100_CCU=y
|
||||
CONFIG_SUN50I_A100_R_CCU=y
|
||||
CONFIG_SUN50I_A64_CCU=y
|
||||
CONFIG_SUN50I_DE2_BUS=y
|
||||
CONFIG_SUN50I_ERRATUM_UNKNOWN1=y
|
||||
CONFIG_SUN50I_H6_CCU=y
|
||||
CONFIG_SUN50I_H6_R_CCU=y
|
||||
CONFIG_SYSCTL_EXCEPTION_TRACE=y
|
||||
CONFIG_THREAD_INFO_IN_TASK=y
|
||||
CONFIG_UNMAP_KERNEL_AT_EL0=y
|
||||
CONFIG_USB_MUSB_DUAL_ROLE=y
|
||||
# CONFIG_USB_MUSB_GADGET is not set
|
||||
CONFIG_USB_MUSB_HDRC=y
|
||||
# CONFIG_USB_MUSB_HOST is not set
|
||||
CONFIG_USB_MUSB_SUNXI=y
|
||||
CONFIG_USB_PHY=y
|
||||
CONFIG_VMAP_STACK=y
|
||||
CONFIG_ZONE_DMA32=y
|
||||
24
target/linux/sunxi/cortexa7/config-5.15
Normal file
24
target/linux/sunxi/cortexa7/config-5.15
Normal file
@ -0,0 +1,24 @@
|
||||
CONFIG_B53=y
|
||||
CONFIG_B53_MDIO_DRIVER=y
|
||||
CONFIG_DWMAC_SUN8I=y
|
||||
CONFIG_GRO_CELLS=y
|
||||
# CONFIG_MACH_SUN4I is not set
|
||||
# CONFIG_MACH_SUN5I is not set
|
||||
CONFIG_MDIO_BUS_MUX=y
|
||||
CONFIG_MICREL_PHY=y
|
||||
CONFIG_MUSB_PIO_ONLY=y
|
||||
CONFIG_NET_DEVLINK=y
|
||||
CONFIG_NET_DSA=y
|
||||
CONFIG_NET_DSA_TAG_BRCM=y
|
||||
CONFIG_NET_DSA_TAG_BRCM_COMMON=y
|
||||
CONFIG_NET_DSA_TAG_BRCM_LEGACY=y
|
||||
CONFIG_NET_DSA_TAG_BRCM_PREPEND=y
|
||||
CONFIG_NET_SWITCHDEV=y
|
||||
CONFIG_NOP_USB_XCEIV=y
|
||||
CONFIG_RTC_DRV_SUN6I=y
|
||||
CONFIG_USB_MUSB_DUAL_ROLE=y
|
||||
# CONFIG_USB_MUSB_GADGET is not set
|
||||
CONFIG_USB_MUSB_HDRC=y
|
||||
# CONFIG_USB_MUSB_HOST is not set
|
||||
CONFIG_USB_MUSB_SUNXI=y
|
||||
CONFIG_USB_PHY=y
|
||||
10
target/linux/sunxi/cortexa8/config-5.15
Normal file
10
target/linux/sunxi/cortexa8/config-5.15
Normal file
@ -0,0 +1,10 @@
|
||||
# CONFIG_ARM_LPAE is not set
|
||||
# CONFIG_MACH_SUN6I is not set
|
||||
# CONFIG_MACH_SUN7I is not set
|
||||
# CONFIG_MACH_SUN8I is not set
|
||||
# CONFIG_MACH_SUN9I is not set
|
||||
CONFIG_PGTABLE_LEVELS=2
|
||||
# CONFIG_PHY_SUN9I_USB is not set
|
||||
# CONFIG_SPI_SUN6I is not set
|
||||
# CONFIG_SUN8I_A83T_CCU is not set
|
||||
# CONFIG_SUN8I_THERMAL is not set
|
||||
@ -0,0 +1,30 @@
|
||||
From a896bc1d79e3c00f0aacfe225499d811775616f3 Mon Sep 17 00:00:00 2001
|
||||
From: Chukun Pan <amadeus@jmu.edu.cn>
|
||||
Date: Sun, 10 Oct 2021 21:50:17 +0800
|
||||
Subject: [PATCH] arm64: allwinner: add OF node for USB eth on NanoPi R1S H5
|
||||
|
||||
This adds the OF node for the USB3 ethernet adapter on the FriendlyARM
|
||||
NanoPi R1S H5. Add the correct value for the RTL8153 LED configuration
|
||||
register to match the blink behavior of the other port on the device.
|
||||
|
||||
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
|
||||
---
|
||||
arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts
|
||||
@@ -116,6 +116,13 @@
|
||||
|
||||
&ehci1 {
|
||||
status = "okay";
|
||||
+
|
||||
+ usb-eth@1 {
|
||||
+ compatible = "realtek,rtl8153";
|
||||
+ reg = <1>;
|
||||
+
|
||||
+ realtek,led-data = <0x78>;
|
||||
+ };
|
||||
};
|
||||
|
||||
&ehci2 {
|
||||
@ -0,0 +1,20 @@
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
sw4 {
|
||||
label = "sw4";
|
||||
- linux,code = <BTN_0>;
|
||||
+ linux,code = <KEY_POWER>;
|
||||
gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
|
||||
wakeup-source;
|
||||
};
|
||||
@@ -220,7 +220,7 @@
|
||||
};
|
||||
|
||||
&usb_otg {
|
||||
- dr_mode = "otg";
|
||||
+ dr_mode = "host";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user