From patchwork Fri Sep 4 23:51:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Ryazanov X-Patchwork-Id: 1357883 X-Patchwork-Delegate: freifunk@adrianschmutzler.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=Vqz+79MW; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=P4MPpM53; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BjvdV08x4z9sSn for ; Sat, 5 Sep 2020 09:53:34 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=en8jU8rDkWhXhCsyonO00BQAsxXd3H5tCf2G/qDIiWc=; b=Vqz+79MWeUbSC0QkyTpo8NAbD WSFbQMPPbi69gvNjQFON2dI7HAI6kWr8cCX9Q4Eb0Gx5oDxLfvaHy6kiPcnS6sv0HQEdDUYaUXKpL Lvn4c+F1/KLZR27POWtH78IMWFwiHre9cnbyWr9JF0XkaugpkL+BR3FXFahrFr6MHJgBPk/Vn1rcR AwiFMRcr9lagV2rd2KKSIijgXQeb0Rmy7BHZ+sQLRdw3sXkGdpgseix83lYR3xEJsnvQdUATrku5o dsvbtGszY4qdfu9l0iWkXWdV+rUuVY6xJMWxtF3k0riMHfby/kNJykX5/LRFJxgTjA5swogHbVwyT tL2ovyEUg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kELUV-0000e0-91; Fri, 04 Sep 2020 23:51:35 +0000 Received: from mail-lj1-x242.google.com ([2a00:1450:4864:20::242]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kELUR-0000ch-5c for openwrt-devel@lists.openwrt.org; Fri, 04 Sep 2020 23:51:32 +0000 Received: by mail-lj1-x242.google.com with SMTP id e11so9891511ljn.6 for ; Fri, 04 Sep 2020 16:51:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Fb02kq2Vh9Ofh9t9dJNO1p7PwXZgfjCBCCj2xIwzcg8=; b=P4MPpM53hQ3PYaqE+0n6HisqtNeJF1B0lSyrrAAdP3ElvDMQH62No2a6EkFEIPoCGr 1kvcaVgqBMV8oqzCmhFjxQbieZcr8mxHhXHS+z0evjXftVVVnq6DTKh83w8goZBBsXhs jlkrdYPe+QBBoTm70M6zBHCQ+g2F+3eqSINCy0B0W+Y39NOw9rBlhXP25ZI2t16pJQGA ftlCvjxG8JmBgT94DdbV7nQ+gSyXThZ6TJlWsTlr0EDiwvvmPM4irUwsw/7BBC3ZMUaK hXzNWc6blABBndR3sl603KoZKK3FtByqhlgBRfwKrQB53E9c+AdTXYBfwd6oE6XEMFDb wqpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Fb02kq2Vh9Ofh9t9dJNO1p7PwXZgfjCBCCj2xIwzcg8=; b=SuXkARotORUGnijxklrJOh24u5frQZA6oZgyRr2N5TU6xTsdnjZSYHdLlbFL4TlnEh QHffNsmfJj4P9UdC83F/EfTAunQ0dWSr+8tX3N4iZoREe4JLAQ+7T5t4syz78Dj5JRUv N4BxxgYbT8Pw/Rg2lLCqUtcLHO8KASm7agRFsPhJH88jHwZ8gNZGWKJ8nWz3Sll8J5f1 JMCiWjrn8wheK+FUvU/QQo8MeUt8PZGiX7KHskvvK1+/4U5rK04T/imit2NqaR7t9Xcb UG10siu6unh1lgnI0Ymw+NpEN8PWRo7OAodlp4FSFRQtx9mXEmk/apD8CI4/cml/nWaD tpQA== X-Gm-Message-State: AOAM531kTMaLH/BrT05jEg2jg6xWvKo2jXJiedJPR5BA1I8EtcF9NapT pgrHGEmGxkJoYAA8VCTPpQzrPC2cAUkAJA== X-Google-Smtp-Source: ABdhPJw+aimIkPl8rh6/xT97CprPtJO7KkpedbCEkFmIh2HW335MpcpNiaXSKLzmjrDDOnyJll3q5g== X-Received: by 2002:a2e:80d2:: with SMTP id r18mr5061626ljg.98.1599263489033; Fri, 04 Sep 2020 16:51:29 -0700 (PDT) Received: from rsa-laptop.internal.lan ([217.25.229.52]) by smtp.gmail.com with ESMTPSA id r7sm1538994lfn.84.2020.09.04.16.51.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Sep 2020 16:51:28 -0700 (PDT) From: Sergey Ryazanov To: OpenWrt Development List Subject: [PATCH 2/5] ath25: add kernel 5.4 support Date: Sat, 5 Sep 2020 02:51:30 +0300 Message-Id: <20200904235133.27813-3-ryazanov.s.a@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200904235133.27813-1-ryazanov.s.a@gmail.com> References: <20200904235133.27813-1-ryazanov.s.a@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200904_195131_239643_837454FD X-CRM114-Status: GOOD ( 17.30 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:242 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [ryazanov.s.a[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Adrian Schmutzler , Zoltan HERPAI Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Copy and refresh patches and config from 4.14. The only couple of fixes required to make kernel buildable: * rework ethernet supported link modes to linkmode bitmask; * drop erase callback invocation from AR2315 MTD driver. Signed-off-by: Sergey Ryazanov --- target/linux/ath25/Makefile | 1 + .../linux/ath25/{config-4.14 => config-5.4} | 73 +++++++++++-------- .../107-ar5312_gpio.patch | 20 ++--- .../108-ar2315_gpio.patch | 18 ++--- .../110-ar2313_ethernet.patch | 30 ++++---- .../120-spiflash.patch | 9 +-- .../130-watchdog.patch | 4 +- .../140-redboot_boardconfig.patch | 14 ++-- .../141-redboot_partition_scan.patch} | 8 +- .../142-redboot_various_erase_size_fix.patch | 16 ++-- .../210-reset_button.patch | 0 .../220-enet_micrel_workaround.patch | 0 .../330-board_leds.patch | 0 13 files changed, 101 insertions(+), 92 deletions(-) copy target/linux/ath25/{config-4.14 => config-5.4} (76%) copy target/linux/ath25/{patches-4.14 => patches-5.4}/107-ar5312_gpio.patch (92%) copy target/linux/ath25/{patches-4.14 => patches-5.4}/108-ar2315_gpio.patch (95%) copy target/linux/ath25/{patches-4.14 => patches-5.4}/110-ar2313_ethernet.patch (98%) copy target/linux/ath25/{patches-4.14 => patches-5.4}/120-spiflash.patch (98%) copy target/linux/ath25/{patches-4.14 => patches-5.4}/130-watchdog.patch (98%) copy target/linux/ath25/{patches-4.14 => patches-5.4}/140-redboot_boardconfig.patch (81%) copy target/linux/{ath79/patches-5.4/408-mtd-redboot_partition_scan.patch => ath25/patches-5.4/141-redboot_partition_scan.patch} (79%) copy target/linux/ath25/{patches-4.14 => patches-5.4}/142-redboot_various_erase_size_fix.patch (81%) copy target/linux/ath25/{patches-4.14 => patches-5.4}/210-reset_button.patch (100%) copy target/linux/ath25/{patches-4.14 => patches-5.4}/220-enet_micrel_workaround.patch (100%) copy target/linux/ath25/{patches-4.14 => patches-5.4}/330-board_leds.patch (100%) diff --git a/target/linux/ath25/Makefile b/target/linux/ath25/Makefile index f885112460..0ed40bd54b 100644 --- a/target/linux/ath25/Makefile +++ b/target/linux/ath25/Makefile @@ -12,6 +12,7 @@ BOARDNAME:=Atheros AR231x/AR5312 FEATURES:=squashfs low_mem small_flash KERNEL_PATCHVER:=4.14 +KERNEL_TESTING_PATCHVER:=5.4 define Target/Description Build firmware images for Atheros SoC boards diff --git a/target/linux/ath25/config-4.14 b/target/linux/ath25/config-5.4 similarity index 76% copy from target/linux/ath25/config-4.14 copy to target/linux/ath25/config-5.4 index 734f598cd0..f59f48f655 100644 --- a/target/linux/ath25/config-4.14 +++ b/target/linux/ath25/config-5.4 @@ -1,26 +1,26 @@ CONFIG_ADM6996_PHY=y CONFIG_AR2315_WDT=y CONFIG_AR8216_PHY=y -CONFIG_ARCH_BINFMT_ELF_STATE=y +CONFIG_ARCH_32BIT_OFF_T=y CONFIG_ARCH_CLOCKSOURCE_DATA=y -CONFIG_ARCH_DISCARD_MEMBLOCK=y +CONFIG_ARCH_HAS_DMA_COHERENT_TO_PFN=y +CONFIG_ARCH_HAS_DMA_PREP_COHERENT=y +CONFIG_ARCH_HAS_DMA_WRITE_COMBINE=y CONFIG_ARCH_HAS_ELF_RANDOMIZE=y -# CONFIG_ARCH_HAS_GCOV_PROFILE_ALL is not set -# CONFIG_ARCH_HAS_SG_CHAIN is not set -# CONFIG_ARCH_HAS_STRICT_KERNEL_RWX is not set -# CONFIG_ARCH_HAS_STRICT_MODULE_RWX is not set +CONFIG_ARCH_HAS_PHYS_TO_DMA=y +CONFIG_ARCH_HAS_PTE_SPECIAL=y +CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE=y +CONFIG_ARCH_HAS_UNCACHED_SEGMENT=y CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y -CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y CONFIG_ARCH_MMAP_RND_BITS_MAX=15 CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15 -# CONFIG_ARCH_OPTIONAL_KERNEL_RWX is not set -# CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT is not set CONFIG_ARCH_SUPPORTS_UPROBES=y CONFIG_ARCH_SUSPEND_POSSIBLE=y CONFIG_ARCH_USE_BUILTIN_BSWAP=y +CONFIG_ARCH_USE_MEMREMAP_PROT=y CONFIG_ARCH_USE_QUEUED_RWLOCKS=y CONFIG_ARCH_USE_QUEUED_SPINLOCKS=y +CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y CONFIG_ATH25=y CONFIG_BLK_MQ_PCI=y @@ -29,8 +29,10 @@ CONFIG_CLONE_BACKWARDS=y CONFIG_CMDLINE="console=ttyS0,9600 rootfstype=squashfs,jffs2" CONFIG_CMDLINE_BOOL=y # CONFIG_CMDLINE_OVERRIDE is not set +CONFIG_COMPAT_32BIT_TIME=y CONFIG_CPU_BIG_ENDIAN=y CONFIG_CPU_GENERIC_DUMP_TLB=y +CONFIG_CPU_HAS_LOAD_STORE_LR=y CONFIG_CPU_HAS_PREFETCH=y CONFIG_CPU_HAS_SYNC=y CONFIG_CPU_MIPS32=y @@ -38,23 +40,34 @@ CONFIG_CPU_MIPS32_R1=y CONFIG_CPU_MIPSR1=y CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y CONFIG_CPU_R4K_CACHE_TLB=y -CONFIG_CPU_R4K_FPU=y CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y CONFIG_CPU_SUPPORTS_HIGHMEM=y CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_WORKQUEUE=y CONFIG_CSRC_R4K=y CONFIG_DMA_NONCOHERENT=y +CONFIG_DMA_NONCOHERENT_CACHE_SYNC=y CONFIG_EARLY_PRINTK=y +CONFIG_EFI_EARLYCON=y CONFIG_ETHERNET_PACKET_MANGLE=y +CONFIG_FONT_8x16=y +CONFIG_FONT_AUTOSELECT=y +CONFIG_FONT_SUPPORT=y +CONFIG_FORCE_PCI=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_IO=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_SCHED_CLOCK=y CONFIG_GENERIC_SMP_IDLE_THREAD=y @@ -62,48 +75,48 @@ CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GPIOLIB=y CONFIG_GPIO_AR2315=y CONFIG_GPIO_AR5312=y -# CONFIG_GRO_CELLS 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_HAVE_64BIT_ALIGNED_ACCESS is not set -# CONFIG_HAVE_ARCH_BITREVERSE is not set +CONFIG_HAVE_ARCH_COMPILER_H=y CONFIG_HAVE_ARCH_JUMP_LABEL=y CONFIG_HAVE_ARCH_KGDB=y CONFIG_HAVE_ARCH_SECCOMP_FILTER=y CONFIG_HAVE_ARCH_TRACEHOOK=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set +CONFIG_HAVE_ASM_MODVERSIONS=y CONFIG_HAVE_CBPF_JIT=y -CONFIG_HAVE_CC_STACKPROTECTOR=y CONFIG_HAVE_CONTEXT_TRACKING=y CONFIG_HAVE_COPY_THREAD_TLS=y CONFIG_HAVE_C_RECORDMCOUNT=y CONFIG_HAVE_DEBUG_KMEMLEAK=y CONFIG_HAVE_DEBUG_STACKOVERFLOW=y -CONFIG_HAVE_DMA_API_DEBUG=y CONFIG_HAVE_DMA_CONTIGUOUS=y CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_FAST_GUP=y CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_HAVE_GENERIC_VDSO=y CONFIG_HAVE_IDE=y +CONFIG_HAVE_IOREMAP_PROT=y CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=y CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -CONFIG_HAVE_LATENCYTOP_SUPPORT=y -CONFIG_HAVE_MEMBLOCK=y +CONFIG_HAVE_LD_DEAD_CODE_DATA_ELIMINATION=y CONFIG_HAVE_MEMBLOCK_NODE_MAP=y CONFIG_HAVE_MOD_ARCH_SPECIFIC=y CONFIG_HAVE_NET_DSA=y CONFIG_HAVE_OPROFILE=y +CONFIG_HAVE_PCI=y CONFIG_HAVE_PERF_EVENTS=y CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_RSEQ=y CONFIG_HAVE_SYSCALL_TRACEPOINTS=y CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y -CONFIG_HW_HAS_PCI=y CONFIG_HW_RANDOM=y +CONFIG_HZ=250 +CONFIG_HZ_250=y CONFIG_HZ_PERIODIC=y CONFIG_INITRAMFS_SOURCE="" CONFIG_IP17XX_PHY=y @@ -112,17 +125,19 @@ CONFIG_IRQ_FORCED_THREADING=y CONFIG_IRQ_MIPS_CPU=y CONFIG_IRQ_WORK=y CONFIG_LEDS_GPIO=y +CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y +CONFIG_MEMFD_CREATE=y +CONFIG_MIGRATION=y CONFIG_MIPS=y CONFIG_MIPS_ASID_BITS=8 CONFIG_MIPS_ASID_SHIFT=0 +CONFIG_MIPS_CBPF_JIT=y CONFIG_MIPS_CLOCK_VSYSCALL=y # CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND is not set CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER=y -# CONFIG_MIPS_HUGE_TLB_SUPPORT is not set CONFIG_MIPS_L1_CACHE_SHIFT=5 -# CONFIG_MIPS_MACHINE is not set CONFIG_MODULES_USE_ELF_REL=y CONFIG_MTD_AR2315=y CONFIG_MTD_CFI_ADV_OPTIONS=y @@ -137,7 +152,6 @@ CONFIG_NEED_DMA_MAP_STATE=y CONFIG_NEED_PER_CPU_KM=y CONFIG_NET_AR231X=y CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y -# CONFIG_NO_IOPORT_MAP is not set # CONFIG_OF is not set CONFIG_PCI=y CONFIG_PCI_AR2315=y @@ -147,13 +161,9 @@ CONFIG_PCI_DRIVERS_LEGACY=y CONFIG_PERF_USE_VMALLOC=y CONFIG_PGTABLE_LEVELS=2 CONFIG_PHYLIB=y -# CONFIG_RCU_NEED_SEGCBLIST is not set -# CONFIG_RCU_STALL_COMMON is not set -# CONFIG_SCHED_INFO is not set -# CONFIG_SCSI_DMA is not set -# CONFIG_SERIAL_8250_FSL is not set CONFIG_SERIAL_8250_NR_UARTS=1 CONFIG_SERIAL_8250_RUNTIME_UARTS=1 +CONFIG_SERIAL_MCTRL_GPIO=y CONFIG_SOC_AR2315=y CONFIG_SOC_AR5312=y CONFIG_SRCU=y @@ -165,6 +175,7 @@ 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_TARGET_ISA_REV=1 CONFIG_TICK_CPU_ACCOUNTING=y CONFIG_TINY_SRCU=y CONFIG_USB_SUPPORT=y diff --git a/target/linux/ath25/patches-4.14/107-ar5312_gpio.patch b/target/linux/ath25/patches-5.4/107-ar5312_gpio.patch similarity index 92% copy from target/linux/ath25/patches-4.14/107-ar5312_gpio.patch copy to target/linux/ath25/patches-5.4/107-ar5312_gpio.patch index e74e20b05a..cd7b27d636 100644 --- a/target/linux/ath25/patches-4.14/107-ar5312_gpio.patch +++ b/target/linux/ath25/patches-5.4/107-ar5312_gpio.patch @@ -52,7 +52,7 @@ if (!ath25_board.radio) --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig -@@ -105,6 +105,13 @@ config GPIO_AMDPT +@@ -113,6 +113,13 @@ config GPIO_AMDPT driver for GPIO functionality on Promontory IOHub Require ACPI ASL code to enumerate as a platform device. @@ -68,14 +68,14 @@ depends on (ARCH_ASPEED || COMPILE_TEST) && OF_GPIO --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile -@@ -29,6 +29,7 @@ obj-$(CONFIG_GPIO_ALTERA) += gpio-alte - obj-$(CONFIG_GPIO_ALTERA_A10SR) += gpio-altera-a10sr.o - obj-$(CONFIG_GPIO_AMD8111) += gpio-amd8111.o - obj-$(CONFIG_GPIO_AMDPT) += gpio-amdpt.o -+obj-$(CONFIG_GPIO_AR5312) += gpio-ar5312.o - obj-$(CONFIG_GPIO_ARIZONA) += gpio-arizona.o - obj-$(CONFIG_GPIO_ATH79) += gpio-ath79.o - obj-$(CONFIG_GPIO_ASPEED) += gpio-aspeed.o +@@ -30,6 +30,7 @@ obj-$(CONFIG_GPIO_ALTERA) += gpio-alt + obj-$(CONFIG_GPIO_AMD8111) += gpio-amd8111.o + obj-$(CONFIG_GPIO_AMD_FCH) += gpio-amd-fch.o + obj-$(CONFIG_GPIO_AMDPT) += gpio-amdpt.o ++obj-$(CONFIG_GPIO_AR5312) += gpio-ar5312.o + obj-$(CONFIG_GPIO_ARIZONA) += gpio-arizona.o + obj-$(CONFIG_GPIO_ASPEED) += gpio-aspeed.o + obj-$(CONFIG_GPIO_ATH79) += gpio-ath79.o --- /dev/null +++ b/drivers/gpio/gpio-ar5312.c @@ -0,0 +1,121 @@ @@ -202,7 +202,7 @@ +subsys_initcall(ar5312_gpio_init); --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig -@@ -175,6 +175,7 @@ config ATH25 +@@ -189,6 +189,7 @@ config ATH25 select CEVT_R4K select CSRC_R4K select DMA_NONCOHERENT diff --git a/target/linux/ath25/patches-4.14/108-ar2315_gpio.patch b/target/linux/ath25/patches-5.4/108-ar2315_gpio.patch similarity index 95% copy from target/linux/ath25/patches-4.14/108-ar2315_gpio.patch copy to target/linux/ath25/patches-5.4/108-ar2315_gpio.patch index 749b308b89..e198cecf15 100644 --- a/target/linux/ath25/patches-4.14/108-ar2315_gpio.patch +++ b/target/linux/ath25/patches-5.4/108-ar2315_gpio.patch @@ -75,7 +75,7 @@ * workaround. Attempt to jump to the mips reset location - --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig -@@ -105,6 +105,13 @@ config GPIO_AMDPT +@@ -113,6 +113,13 @@ config GPIO_AMDPT driver for GPIO functionality on Promontory IOHub Require ACPI ASL code to enumerate as a platform device. @@ -91,14 +91,14 @@ default y if SOC_AR5312 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile -@@ -29,6 +29,7 @@ obj-$(CONFIG_GPIO_ALTERA) += gpio-alte - obj-$(CONFIG_GPIO_ALTERA_A10SR) += gpio-altera-a10sr.o - obj-$(CONFIG_GPIO_AMD8111) += gpio-amd8111.o - obj-$(CONFIG_GPIO_AMDPT) += gpio-amdpt.o -+obj-$(CONFIG_GPIO_AR2315) += gpio-ar2315.o - obj-$(CONFIG_GPIO_AR5312) += gpio-ar5312.o - obj-$(CONFIG_GPIO_ARIZONA) += gpio-arizona.o - obj-$(CONFIG_GPIO_ATH79) += gpio-ath79.o +@@ -30,6 +30,7 @@ obj-$(CONFIG_GPIO_ALTERA) += gpio-alt + obj-$(CONFIG_GPIO_AMD8111) += gpio-amd8111.o + obj-$(CONFIG_GPIO_AMD_FCH) += gpio-amd-fch.o + obj-$(CONFIG_GPIO_AMDPT) += gpio-amdpt.o ++obj-$(CONFIG_GPIO_AR2315) += gpio-ar2315.o + obj-$(CONFIG_GPIO_AR5312) += gpio-ar5312.o + obj-$(CONFIG_GPIO_ARIZONA) += gpio-arizona.o + obj-$(CONFIG_GPIO_ASPEED) += gpio-aspeed.o --- /dev/null +++ b/drivers/gpio/gpio-ar2315.c @@ -0,0 +1,233 @@ diff --git a/target/linux/ath25/patches-4.14/110-ar2313_ethernet.patch b/target/linux/ath25/patches-5.4/110-ar2313_ethernet.patch similarity index 98% copy from target/linux/ath25/patches-4.14/110-ar2313_ethernet.patch copy to target/linux/ath25/patches-5.4/110-ar2313_ethernet.patch index a2b1492250..e4f5fa8d2e 100644 --- a/target/linux/ath25/patches-4.14/110-ar2313_ethernet.patch +++ b/target/linux/ath25/patches-5.4/110-ar2313_ethernet.patch @@ -1,22 +1,22 @@ --- a/drivers/net/ethernet/atheros/Makefile +++ b/drivers/net/ethernet/atheros/Makefile -@@ -8,3 +8,4 @@ obj-$(CONFIG_ATL2) += atlx/ +@@ -9,3 +9,4 @@ obj-$(CONFIG_ATL2) += atlx/ obj-$(CONFIG_ATL1E) += atl1e/ obj-$(CONFIG_ATL1C) += atl1c/ obj-$(CONFIG_ALX) += alx/ +obj-$(CONFIG_NET_AR231X) += ar231x/ --- a/drivers/net/ethernet/atheros/Kconfig +++ b/drivers/net/ethernet/atheros/Kconfig -@@ -5,7 +5,7 @@ +@@ -6,7 +6,7 @@ config NET_VENDOR_ATHEROS bool "Atheros devices" default y -- depends on PCI -+ depends on (PCI || ATH25) +- depends on (PCI || ATH79) ++ depends on (PCI || ATH25 || ATH79) ---help--- If you have a network (Ethernet) card belonging to this class, say Y. -@@ -78,4 +78,10 @@ config ALX +@@ -87,4 +87,10 @@ config ALX To compile this driver as a module, choose M here. The module will be called alx. @@ -1113,6 +1113,7 @@ + +static int ar231x_mdiobus_probe(struct net_device *dev) +{ ++ __ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, }; + struct ar231x_private *const sp = netdev_priv(dev); + struct phy_device *phydev = NULL; + @@ -1134,16 +1135,15 @@ + } + + /* mask with MAC supported features */ -+ phydev->supported &= (SUPPORTED_10baseT_Half -+ | SUPPORTED_10baseT_Full -+ | SUPPORTED_100baseT_Half -+ | SUPPORTED_100baseT_Full -+ | SUPPORTED_Autoneg -+ /* | SUPPORTED_Pause | SUPPORTED_Asym_Pause */ -+ | SUPPORTED_MII -+ | SUPPORTED_TP); ++ linkmode_set_bit_array(phy_10_100_features_array, ++ ARRAY_SIZE(phy_10_100_features_array), ++ mask); ++ linkmode_set_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, mask); ++ linkmode_set_bit(ETHTOOL_LINK_MODE_MII_BIT, mask); ++ linkmode_set_bit(ETHTOOL_LINK_MODE_TP_BIT, mask); + -+ phydev->advertising = phydev->supported; ++ linkmode_and(phydev->supported, phydev->supported, mask); ++ linkmode_copy(phydev->advertising, phydev->supported); + + sp->phy_dev = phydev; + @@ -1713,7 +1713,7 @@ + void __init ath25_serial_setup(u32 mapbase, int irq, unsigned int uartclk) { - struct uart_port s; + #ifdef CONFIG_SERIAL_8250_CONSOLE --- a/arch/mips/include/asm/mach-ath25/ath25_platform.h +++ b/arch/mips/include/asm/mach-ath25/ath25_platform.h @@ -71,4 +71,15 @@ struct ar231x_board_config { diff --git a/target/linux/ath25/patches-4.14/120-spiflash.patch b/target/linux/ath25/patches-5.4/120-spiflash.patch similarity index 98% copy from target/linux/ath25/patches-4.14/120-spiflash.patch copy to target/linux/ath25/patches-5.4/120-spiflash.patch index 0a2161fb7e..52460f89dd 100644 --- a/target/linux/ath25/patches-4.14/120-spiflash.patch +++ b/target/linux/ath25/patches-5.4/120-spiflash.patch @@ -1,6 +1,6 @@ --- a/drivers/mtd/devices/Kconfig +++ b/drivers/mtd/devices/Kconfig -@@ -130,6 +130,10 @@ config MTD_BCM47XXSFLASH +@@ -114,6 +114,10 @@ config MTD_BCM47XXSFLASH registered by bcma as platform devices. This enables driver for serial flash memories. @@ -13,7 +13,7 @@ help --- a/drivers/mtd/devices/Makefile +++ b/drivers/mtd/devices/Makefile -@@ -16,6 +16,7 @@ obj-$(CONFIG_MTD_M25P80) += m25p80.o +@@ -15,6 +15,7 @@ obj-$(CONFIG_MTD_DATAFLASH) += mtd_dataf obj-$(CONFIG_MTD_MCHP23K256) += mchp23k256.o obj-$(CONFIG_MTD_SPEAR_SMI) += spear_smi.o obj-$(CONFIG_MTD_SST25L) += sst25l.o @@ -23,7 +23,7 @@ obj-$(CONFIG_MTD_POWERNV_FLASH) += powernv_flash.o --- /dev/null +++ b/drivers/mtd/devices/ar2315.c -@@ -0,0 +1,459 @@ +@@ -0,0 +1,456 @@ + +/* + * MTD driver for the SPI Flash Memory support on Atheros AR2315 @@ -284,9 +284,6 @@ + + mutex_unlock(&priv->lock); + -+ instr->state = MTD_ERASE_DONE; -+ mtd_erase_callback(instr); -+ + return 0; +} + diff --git a/target/linux/ath25/patches-4.14/130-watchdog.patch b/target/linux/ath25/patches-5.4/130-watchdog.patch similarity index 98% copy from target/linux/ath25/patches-4.14/130-watchdog.patch copy to target/linux/ath25/patches-5.4/130-watchdog.patch index 01904d69a5..8a5bd83418 100644 --- a/target/linux/ath25/patches-4.14/130-watchdog.patch +++ b/target/linux/ath25/patches-5.4/130-watchdog.patch @@ -212,7 +212,7 @@ +MODULE_ALIAS("platform:" DRIVER_NAME); --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig -@@ -1647,6 +1647,13 @@ config PIC32_DMT +@@ -1830,6 +1830,13 @@ config PIC32_DMT To compile this driver as a loadable module, choose M here. The module will be called pic32-dmt. @@ -228,7 +228,7 @@ # POWERPC Architecture --- a/drivers/watchdog/Makefile +++ b/drivers/watchdog/Makefile -@@ -166,6 +166,7 @@ obj-$(CONFIG_WDT_MTX1) += mtx-1_wdt.o +@@ -161,6 +161,7 @@ obj-$(CONFIG_WDT_MTX1) += mtx-1_wdt.o obj-$(CONFIG_PNX833X_WDT) += pnx833x_wdt.o obj-$(CONFIG_SIBYTE_WDOG) += sb_wdog.o obj-$(CONFIG_AR7_WDT) += ar7_wdt.o diff --git a/target/linux/ath25/patches-4.14/140-redboot_boardconfig.patch b/target/linux/ath25/patches-5.4/140-redboot_boardconfig.patch similarity index 81% copy from target/linux/ath25/patches-4.14/140-redboot_boardconfig.patch copy to target/linux/ath25/patches-5.4/140-redboot_boardconfig.patch index 6aad761cb1..0ffa12eec0 100644 --- a/target/linux/ath25/patches-4.14/140-redboot_boardconfig.patch +++ b/target/linux/ath25/patches-5.4/140-redboot_boardconfig.patch @@ -1,6 +1,6 @@ ---- a/drivers/mtd/redboot.c -+++ b/drivers/mtd/redboot.c -@@ -30,6 +30,8 @@ +--- a/drivers/mtd/parsers/redboot.c ++++ b/drivers/mtd/parsers/redboot.c +@@ -16,6 +16,8 @@ #include #include @@ -9,7 +9,7 @@ struct fis_image_desc { unsigned char name[16]; // Null terminated name uint32_t flash_base; // Address within FLASH of image -@@ -60,6 +62,7 @@ static int parse_redboot_partitions(stru +@@ -67,6 +69,7 @@ static int parse_redboot_partitions(stru const struct mtd_partition **pparts, struct mtd_part_parser_data *data) { @@ -17,7 +17,7 @@ int nrparts = 0; struct fis_image_desc *buf; struct mtd_partition *parts; -@@ -225,14 +228,15 @@ static int parse_redboot_partitions(stru +@@ -234,14 +237,15 @@ static int parse_redboot_partitions(stru } } #endif @@ -35,7 +35,7 @@ #ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED if (nulllen > 0) { strcpy(nullname, nullstring); -@@ -251,6 +255,8 @@ static int parse_redboot_partitions(stru +@@ -260,6 +264,8 @@ static int parse_redboot_partitions(stru } #endif for ( ; iimg->size; parts[i].offset = fl->img->flash_base; parts[i].name = names; -@@ -284,6 +290,13 @@ static int parse_redboot_partitions(stru +@@ -293,6 +299,13 @@ static int parse_redboot_partitions(stru fl = fl->next; kfree(tmp_fl); } diff --git a/target/linux/ath79/patches-5.4/408-mtd-redboot_partition_scan.patch b/target/linux/ath25/patches-5.4/141-redboot_partition_scan.patch similarity index 79% copy from target/linux/ath79/patches-5.4/408-mtd-redboot_partition_scan.patch copy to target/linux/ath25/patches-5.4/141-redboot_partition_scan.patch index 8f3ee32f57..3302d6d247 100644 --- a/target/linux/ath79/patches-5.4/408-mtd-redboot_partition_scan.patch +++ b/target/linux/ath25/patches-5.4/141-redboot_partition_scan.patch @@ -1,6 +1,6 @@ --- a/drivers/mtd/parsers/redboot.c +++ b/drivers/mtd/parsers/redboot.c -@@ -85,12 +85,18 @@ static int parse_redboot_partitions(stru +@@ -88,12 +88,18 @@ static int parse_redboot_partitions(stru parse_redboot_of(master); @@ -19,7 +19,7 @@ return -EIO; } offset -= master->erasesize; -@@ -103,10 +109,6 @@ static int parse_redboot_partitions(stru +@@ -106,10 +112,6 @@ static int parse_redboot_partitions(stru goto nogood; } } @@ -30,12 +30,12 @@ printk(KERN_NOTICE "Searching for RedBoot partition table in %s at offset 0x%lx\n", master->name, offset); -@@ -179,6 +181,11 @@ static int parse_redboot_partitions(stru +@@ -182,6 +184,11 @@ static int parse_redboot_partitions(stru } if (i == numslots) { /* Didn't find it */ + if (offset + master->erasesize < master->size) { -+ /* not at the end of the flash yet, maybe next block :) */ ++ /* not at the end of the flash yet, maybe next block */ + directory++; + goto restart; + } diff --git a/target/linux/ath25/patches-4.14/142-redboot_various_erase_size_fix.patch b/target/linux/ath25/patches-5.4/142-redboot_various_erase_size_fix.patch similarity index 81% copy from target/linux/ath25/patches-4.14/142-redboot_various_erase_size_fix.patch copy to target/linux/ath25/patches-5.4/142-redboot_various_erase_size_fix.patch index ce039df9f1..2ac0eb92bf 100644 --- a/target/linux/ath25/patches-4.14/142-redboot_various_erase_size_fix.patch +++ b/target/linux/ath25/patches-5.4/142-redboot_various_erase_size_fix.patch @@ -1,7 +1,7 @@ ---- a/drivers/mtd/redboot.c -+++ b/drivers/mtd/redboot.c -@@ -58,6 +58,22 @@ static inline int redboot_checksum(struc - return 1; +--- a/drivers/mtd/parsers/redboot.c ++++ b/drivers/mtd/parsers/redboot.c +@@ -65,6 +65,22 @@ static void parse_redboot_of(struct mtd_ + directory = dirblock; } +static uint32_t mtd_get_offset_erasesize(struct mtd_info *mtd, uint64_t offset) @@ -23,7 +23,7 @@ static int parse_redboot_partitions(struct mtd_info *master, const struct mtd_partition **pparts, struct mtd_part_parser_data *data) -@@ -74,6 +90,7 @@ static int parse_redboot_partitions(stru +@@ -81,6 +97,7 @@ static int parse_redboot_partitions(stru int namelen = 0; int nulllen = 0; int numslots; @@ -31,7 +31,7 @@ unsigned long offset; #ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED static char nullstring[] = "unallocated"; -@@ -186,7 +203,10 @@ static int parse_redboot_partitions(stru +@@ -195,7 +212,10 @@ static int parse_redboot_partitions(stru goto out; } @@ -43,7 +43,7 @@ struct fis_list *new_fl, **prev; if (buf[i].name[0] == 0xff) { -@@ -262,12 +282,13 @@ static int parse_redboot_partitions(stru +@@ -271,12 +291,13 @@ static int parse_redboot_partitions(stru } #endif for ( ; iimg->name); #ifdef CONFIG_MTD_REDBOOT_PARTS_READONLY if (!memcmp(names, "RedBoot", 8) || -@@ -297,7 +318,9 @@ static int parse_redboot_partitions(stru +@@ -306,7 +327,9 @@ static int parse_redboot_partitions(stru fl = fl->next; kfree(tmp_fl); } diff --git a/target/linux/ath25/patches-4.14/210-reset_button.patch b/target/linux/ath25/patches-5.4/210-reset_button.patch similarity index 100% copy from target/linux/ath25/patches-4.14/210-reset_button.patch copy to target/linux/ath25/patches-5.4/210-reset_button.patch diff --git a/target/linux/ath25/patches-4.14/220-enet_micrel_workaround.patch b/target/linux/ath25/patches-5.4/220-enet_micrel_workaround.patch similarity index 100% copy from target/linux/ath25/patches-4.14/220-enet_micrel_workaround.patch copy to target/linux/ath25/patches-5.4/220-enet_micrel_workaround.patch diff --git a/target/linux/ath25/patches-4.14/330-board_leds.patch b/target/linux/ath25/patches-5.4/330-board_leds.patch similarity index 100% copy from target/linux/ath25/patches-4.14/330-board_leds.patch copy to target/linux/ath25/patches-5.4/330-board_leds.patch