aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorNick Hainke <vincent@systemli.org>2022-09-28 11:23:24 +0200
committerChristian Marangi <ansuelsmth@gmail.com>2023-05-12 13:02:42 +0200
commit975b436cdf05e53e4792f14f9f601759416761fb (patch)
tree063a9df5315531c29aafc1374074cbaffdad47be /target
parentd7ab4d76b12ce01c792b3e51974e20463185d4ca (diff)
downloadupstream-975b436cdf05e53e4792f14f9f601759416761fb.tar.gz
upstream-975b436cdf05e53e4792f14f9f601759416761fb.tar.bz2
upstream-975b436cdf05e53e4792f14f9f601759416761fb.zip
ath25: 5.15: enable 5.15 testing kernel
Manually refreshed: - 140-redboot_boardconfig.patch - 141-redboot_partition_scan.patch - 142-redboot_various_erase_size_fix.patch Automatically refreshed: - 107-ar5312_gpio.patch - 108-ar2315_gpio.patch - 110-ar2313_ethernet.patch - 120-spiflash.patch - 130-watchdog.patch - 330-board_leds.patch Use "make kernel_oldconfig" to refresh the new kernel config. The Ubiquiti Nanostation 2 (XS2) and Ubiquiti Nanostation 5 (XS5) should be marked as broken when switching to 5.15 by default. The new kernel does not fit anymore into the partition. Signed-off-by: Nick Hainke <vincent@systemli.org>
Diffstat (limited to 'target')
-rw-r--r--target/linux/ath25/Makefile2
-rw-r--r--target/linux/ath25/config-5.156
-rw-r--r--target/linux/ath25/patches-5.15/107-ar5312_gpio.patch8
-rw-r--r--target/linux/ath25/patches-5.15/108-ar2315_gpio.patch2
-rw-r--r--target/linux/ath25/patches-5.15/110-ar2313_ethernet.patch12
-rw-r--r--target/linux/ath25/patches-5.15/120-spiflash.patch6
-rw-r--r--target/linux/ath25/patches-5.15/130-watchdog.patch6
-rw-r--r--target/linux/ath25/patches-5.15/140-redboot_boardconfig.patch18
-rw-r--r--target/linux/ath25/patches-5.15/141-redboot_partition_scan.patch20
-rw-r--r--target/linux/ath25/patches-5.15/142-redboot_various_erase_size_fix.patch23
-rw-r--r--target/linux/ath25/patches-5.15/330-board_leds.patch4
11 files changed, 61 insertions, 46 deletions
diff --git a/target/linux/ath25/Makefile b/target/linux/ath25/Makefile
index 76dd346628..ea90c803fd 100644
--- a/target/linux/ath25/Makefile
+++ b/target/linux/ath25/Makefile
@@ -11,7 +11,7 @@ FEATURES:=squashfs low_mem small_flash source-only
SUBTARGETS:=generic
KERNEL_PATCHVER:=5.10
-KERNEL_TESTING_PATCHVER:=5.10
+KERNEL_TESTING_PATCHVER:=5.15
define Target/Description
Build firmware images for Atheros SoC boards
diff --git a/target/linux/ath25/config-5.15 b/target/linux/ath25/config-5.15
index ef764820e4..a27ad4980f 100644
--- a/target/linux/ath25/config-5.15
+++ b/target/linux/ath25/config-5.15
@@ -3,6 +3,7 @@ CONFIG_AR2315_WDT=y
CONFIG_AR8216_PHY=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
@@ -26,7 +27,6 @@ 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_CRYPTO_BLAKE2S=y
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
CONFIG_CRYPTO_RNG2=y
@@ -40,6 +40,7 @@ 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
@@ -56,6 +57,7 @@ CONFIG_GENERIC_SMP_IDLE_THREAD=y
CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_GPIO_AR2315=y
CONFIG_GPIO_AR5312=y
+CONFIG_GPIO_CDEV=y
CONFIG_HANDLE_DOMAIN_IRQ=y
CONFIG_HARDWARE_WATCHPOINTS=y
CONFIG_HAS_DMA=y
@@ -98,6 +100,7 @@ CONFIG_MVSWITCH_PHY=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEED_PER_CPU_KM=y
CONFIG_NET_AR231X=y
+CONFIG_NET_SELFTESTS=y
CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
# CONFIG_OF is not set
CONFIG_PCI=y
@@ -108,6 +111,7 @@ CONFIG_PCI_DRIVERS_LEGACY=y
CONFIG_PERF_USE_VMALLOC=y
CONFIG_PGTABLE_LEVELS=2
CONFIG_PHYLIB=y
+CONFIG_PTP_1588_CLOCK_OPTIONAL=y
CONFIG_SERIAL_8250_NR_UARTS=1
CONFIG_SERIAL_8250_RUNTIME_UARTS=1
CONFIG_SERIAL_MCTRL_GPIO=y
diff --git a/target/linux/ath25/patches-5.15/107-ar5312_gpio.patch b/target/linux/ath25/patches-5.15/107-ar5312_gpio.patch
index a1efdbeeae..4ad1d40fac 100644
--- a/target/linux/ath25/patches-5.15/107-ar5312_gpio.patch
+++ b/target/linux/ath25/patches-5.15/107-ar5312_gpio.patch
@@ -18,7 +18,7 @@
#include <asm/bootinfo.h>
#include <asm/reboot.h>
#include <asm/time.h>
-@@ -178,6 +179,22 @@ static struct platform_device ar5312_phy
+@@ -177,6 +178,22 @@ static struct platform_device ar5312_phy
.num_resources = 1,
};
@@ -41,7 +41,7 @@
static void __init ar5312_flash_init(void)
{
void __iomem *flashctl_base;
-@@ -245,6 +262,8 @@ void __init ar5312_init_devices(void)
+@@ -244,6 +261,8 @@ void __init ar5312_init_devices(void)
platform_device_register(&ar5312_physmap_flash);
@@ -52,7 +52,7 @@
if (!ath25_board.radio)
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
-@@ -142,6 +142,13 @@ config GPIO_AMDPT
+@@ -143,6 +143,13 @@ config GPIO_AMDPT
driver for GPIO functionality on Promontory IOHub
Require ACPI ASL code to enumerate as a platform device.
@@ -202,7 +202,7 @@
+subsys_initcall(ar5312_gpio_init);
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
-@@ -219,6 +219,7 @@ config ATH25
+@@ -230,6 +230,7 @@ config ATH25
select CEVT_R4K
select CSRC_R4K
select DMA_NONCOHERENT
diff --git a/target/linux/ath25/patches-5.15/108-ar2315_gpio.patch b/target/linux/ath25/patches-5.15/108-ar2315_gpio.patch
index 10289086e8..f2e1e4a9a3 100644
--- a/target/linux/ath25/patches-5.15/108-ar2315_gpio.patch
+++ b/target/linux/ath25/patches-5.15/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
-@@ -142,6 +142,13 @@ config GPIO_AMDPT
+@@ -143,6 +143,13 @@ config GPIO_AMDPT
driver for GPIO functionality on Promontory IOHub
Require ACPI ASL code to enumerate as a platform device.
diff --git a/target/linux/ath25/patches-5.15/110-ar2313_ethernet.patch b/target/linux/ath25/patches-5.15/110-ar2313_ethernet.patch
index 72b8660baa..bd998b1427 100644
--- a/target/linux/ath25/patches-5.15/110-ar2313_ethernet.patch
+++ b/target/linux/ath25/patches-5.15/110-ar2313_ethernet.patch
@@ -16,7 +16,7 @@
help
If you have a network (Ethernet) card belonging to this class, say Y.
-@@ -87,4 +87,10 @@ config ALX
+@@ -88,4 +88,10 @@ config ALX
To compile this driver as a module, choose M here. The module
will be called alx.
@@ -1518,7 +1518,7 @@
--- a/arch/mips/ath25/ar5312.c
+++ b/arch/mips/ath25/ar5312.c
-@@ -128,6 +128,10 @@ static void ar5312_irq_dispatch(void)
+@@ -127,6 +127,10 @@ static void ar5312_irq_dispatch(void)
if (pending & CAUSEF_IP2)
do_IRQ(AR5312_IRQ_WLAN0);
@@ -1529,7 +1529,7 @@
else if (pending & CAUSEF_IP5)
do_IRQ(AR5312_IRQ_WLAN1);
else if (pending & CAUSEF_IP6)
-@@ -161,6 +165,36 @@ void __init ar5312_arch_init_irq(void)
+@@ -160,6 +164,36 @@ void __init ar5312_arch_init_irq(void)
ar5312_misc_irq_domain = domain;
}
@@ -1566,7 +1566,7 @@
static struct physmap_flash_data ar5312_flash_data = {
.width = 2,
};
-@@ -241,6 +275,7 @@ static void __init ar5312_flash_init(voi
+@@ -240,6 +274,7 @@ static void __init ar5312_flash_init(voi
void __init ar5312_init_devices(void)
{
struct ath25_boarddata *config;
@@ -1574,7 +1574,7 @@
ar5312_flash_init();
-@@ -264,8 +299,30 @@ void __init ar5312_init_devices(void)
+@@ -263,8 +298,30 @@ void __init ar5312_init_devices(void)
platform_device_register(&ar5312_gpio);
@@ -1605,7 +1605,7 @@
if (!ath25_board.radio)
return;
-@@ -274,8 +331,18 @@ void __init ar5312_init_devices(void)
+@@ -273,8 +330,18 @@ void __init ar5312_init_devices(void)
ath25_add_wmac(0, AR5312_WLAN0_BASE, AR5312_IRQ_WLAN0);
break;
diff --git a/target/linux/ath25/patches-5.15/120-spiflash.patch b/target/linux/ath25/patches-5.15/120-spiflash.patch
index 6b869d9fcd..c0f4fa6204 100644
--- a/target/linux/ath25/patches-5.15/120-spiflash.patch
+++ b/target/linux/ath25/patches-5.15/120-spiflash.patch
@@ -1,6 +1,6 @@
--- a/drivers/mtd/devices/Kconfig
+++ b/drivers/mtd/devices/Kconfig
-@@ -114,6 +114,10 @@ config MTD_BCM47XXSFLASH
+@@ -120,6 +120,10 @@ config MTD_BCM47XXSFLASH
registered by bcma as platform devices. This enables driver for
serial flash memories.
@@ -13,8 +13,8 @@
help
--- a/drivers/mtd/devices/Makefile
+++ b/drivers/mtd/devices/Makefile
-@@ -15,6 +15,7 @@ obj-$(CONFIG_MTD_DATAFLASH) += mtd_dataf
- obj-$(CONFIG_MTD_MCHP23K256) += mchp23k256.o
+@@ -16,6 +16,7 @@ obj-$(CONFIG_MTD_MCHP23K256) += mchp23k2
+ obj-$(CONFIG_MTD_MCHP48L640) += mchp48l640.o
obj-$(CONFIG_MTD_SPEAR_SMI) += spear_smi.o
obj-$(CONFIG_MTD_SST25L) += sst25l.o
+obj-$(CONFIG_MTD_AR2315) += ar2315.o
diff --git a/target/linux/ath25/patches-5.15/130-watchdog.patch b/target/linux/ath25/patches-5.15/130-watchdog.patch
index 1c8c9a9677..eb0bc5630d 100644
--- a/target/linux/ath25/patches-5.15/130-watchdog.patch
+++ b/target/linux/ath25/patches-5.15/130-watchdog.patch
@@ -212,7 +212,7 @@
+MODULE_ALIAS("platform:" DRIVER_NAME);
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
-@@ -1873,6 +1873,13 @@ config PIC32_DMT
+@@ -1829,6 +1829,13 @@ config PIC32_DMT
To compile this driver as a loadable module, choose M here.
The module will be called pic32-dmt.
@@ -228,8 +228,8 @@
# POWERPC Architecture
--- a/drivers/watchdog/Makefile
+++ b/drivers/watchdog/Makefile
-@@ -164,6 +164,7 @@ obj-$(CONFIG_WDT_MTX1) += mtx-1_wdt.o
- obj-$(CONFIG_PNX833X_WDT) += pnx833x_wdt.o
+@@ -161,6 +161,7 @@ obj-$(CONFIG_JZ4740_WDT) += jz4740_wdt.o
+ obj-$(CONFIG_WDT_MTX1) += mtx-1_wdt.o
obj-$(CONFIG_SIBYTE_WDOG) += sb_wdog.o
obj-$(CONFIG_AR7_WDT) += ar7_wdt.o
+obj-$(CONFIG_AR2315_WDT) += ar2315-wtd.o
diff --git a/target/linux/ath25/patches-5.15/140-redboot_boardconfig.patch b/target/linux/ath25/patches-5.15/140-redboot_boardconfig.patch
index 07d75b9fba..5f506aaa3a 100644
--- a/target/linux/ath25/patches-5.15/140-redboot_boardconfig.patch
+++ b/target/linux/ath25/patches-5.15/140-redboot_boardconfig.patch
@@ -7,8 +7,8 @@
+#define BOARD_CONFIG_PART "boardconfig"
+
struct fis_image_desc {
- unsigned char name[16]; // Null terminated name
- uint32_t flash_base; // Address within FLASH of image
+ unsigned char name[16]; // Null terminated name
+ u32 flash_base; // Address within FLASH of image
@@ -73,6 +75,7 @@ static int parse_redboot_partitions(stru
const struct mtd_partition **pparts,
struct mtd_part_parser_data *data)
@@ -17,11 +17,11 @@
int nrparts = 0;
struct fis_image_desc *buf;
struct mtd_partition *parts;
-@@ -240,14 +243,15 @@ static int parse_redboot_partitions(stru
+@@ -239,14 +242,15 @@ nogood:
}
}
#endif
-- parts = kzalloc(sizeof(*parts)*nrparts + nulllen + namelen, GFP_KERNEL);
+- parts = kzalloc(sizeof(*parts) * nrparts + nulllen + namelen, GFP_KERNEL);
+ parts = kzalloc(sizeof(*parts) * (nrparts + 1) + nulllen + namelen +
+ sizeof(BOARD_CONFIG_PART), GFP_KERNEL);
@@ -33,18 +33,18 @@
- nullname = (char *)&parts[nrparts];
+ nullname = (char *)&parts[nrparts + 1];
#ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
- if (nulllen > 0) {
+ if (nulllen > 0)
strcpy(nullname, nullstring);
-@@ -266,6 +270,8 @@ static int parse_redboot_partitions(stru
+@@ -264,6 +268,8 @@ nogood:
}
#endif
- for ( ; i<nrparts; i++) {
+ for ( ; i < nrparts; i++) {
+ if (max_offset < buf[i].flash_base + buf[i].size)
-+ max_offset = buf[i].flash_base + buf[i].size;
++ max_offset = buf[i].flash_base + buf[i].size;
parts[i].size = fl->img->size;
parts[i].offset = fl->img->flash_base;
parts[i].name = names;
-@@ -299,6 +305,13 @@ static int parse_redboot_partitions(stru
+@@ -297,6 +303,13 @@ nogood:
fl = fl->next;
kfree(tmp_fl);
}
diff --git a/target/linux/ath25/patches-5.15/141-redboot_partition_scan.patch b/target/linux/ath25/patches-5.15/141-redboot_partition_scan.patch
index 68019f90ea..f9c98c9a37 100644
--- a/target/linux/ath25/patches-5.15/141-redboot_partition_scan.patch
+++ b/target/linux/ath25/patches-5.15/141-redboot_partition_scan.patch
@@ -8,18 +8,18 @@
+ if (!buf)
+ return -ENOMEM;
+
-+ restart:
- if ( directory < 0 ) {
++restart:
+ if (directory < 0) {
offset = master->size + directory * master->erasesize;
while (mtd_block_isbad(master, offset)) {
if (!offset) {
- nogood:
- printk(KERN_NOTICE "Failed to find a non-bad block to check for RedBoot partition table\n");
+ nogood:
+ pr_notice("Failed to find a non-bad block to check for RedBoot partition table\n");
+ vfree(buf);
return -EIO;
}
offset -= master->erasesize;
-@@ -112,10 +118,6 @@ static int parse_redboot_partitions(stru
+@@ -112,10 +118,6 @@ nogood:
goto nogood;
}
}
@@ -28,9 +28,9 @@
- if (!buf)
- return -ENOMEM;
- printk(KERN_NOTICE "Searching for RedBoot partition table in %s at offset 0x%lx\n",
- master->name, offset);
-@@ -188,6 +190,11 @@ static int parse_redboot_partitions(stru
+ pr_notice("Searching for RedBoot partition table in %s at offset 0x%lx\n",
+ master->name, offset);
+@@ -187,6 +189,11 @@ nogood:
}
if (i == numslots) {
/* Didn't find it */
@@ -39,6 +39,6 @@
+ directory++;
+ goto restart;
+ }
- printk(KERN_NOTICE "No RedBoot partition table detected in %s\n",
- master->name);
+ pr_notice("No RedBoot partition table detected in %s\n",
+ master->name);
ret = 0;
diff --git a/target/linux/ath25/patches-5.15/142-redboot_various_erase_size_fix.patch b/target/linux/ath25/patches-5.15/142-redboot_various_erase_size_fix.patch
index c3b73eabe9..ca9e686177 100644
--- a/target/linux/ath25/patches-5.15/142-redboot_various_erase_size_fix.patch
+++ b/target/linux/ath25/patches-5.15/142-redboot_various_erase_size_fix.patch
@@ -31,7 +31,18 @@
unsigned long offset;
#ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
static char nullstring[] = "unallocated";
-@@ -201,7 +218,10 @@ static int parse_redboot_partitions(stru
+@@ -134,7 +151,9 @@ nogood:
+ }
+
+ numslots = (master->erasesize / sizeof(struct fis_image_desc));
+- for (i = 0; i < numslots; i++) {
++ first_slot = (buf[i].flash_base & (master->erasesize - 1)) /
++ sizeof(struct fis_image_desc);
++ for (i = first_slot; i < first_slot + numslots; i++) {
+ if (!memcmp(buf[i].name, "FIS directory", 14)) {
+ /* This is apparently the FIS directory entry for the
+ * FIS directory itself. The FIS directory size is
+@@ -200,7 +219,10 @@ nogood:
goto out;
}
@@ -43,23 +54,23 @@
struct fis_list *new_fl, **prev;
if (buf[i].name[0] == 0xff) {
-@@ -277,12 +297,13 @@ static int parse_redboot_partitions(stru
+@@ -275,12 +297,13 @@ nogood:
}
#endif
- for ( ; i<nrparts; i++) {
+ for ( ; i < nrparts; i++) {
- if (max_offset < buf[i].flash_base + buf[i].size)
-- max_offset = buf[i].flash_base + buf[i].size;
+- max_offset = buf[i].flash_base + buf[i].size;
parts[i].size = fl->img->size;
parts[i].offset = fl->img->flash_base;
parts[i].name = names;
+ if (max_offset < parts[i].offset + parts[i].size)
-+ max_offset = parts[i].offset + parts[i].size;
++ max_offset = parts[i].offset + parts[i].size;
+
strcpy(names, fl->img->name);
#ifdef CONFIG_MTD_REDBOOT_PARTS_READONLY
if (!memcmp(names, "RedBoot", 8) ||
-@@ -312,7 +333,9 @@ static int parse_redboot_partitions(stru
+@@ -310,7 +333,9 @@ nogood:
fl = fl->next;
kfree(tmp_fl);
}
diff --git a/target/linux/ath25/patches-5.15/330-board_leds.patch b/target/linux/ath25/patches-5.15/330-board_leds.patch
index a683d01111..3d762db80e 100644
--- a/target/linux/ath25/patches-5.15/330-board_leds.patch
+++ b/target/linux/ath25/patches-5.15/330-board_leds.patch
@@ -78,7 +78,7 @@
#include <asm/bootinfo.h>
#include <asm/reboot.h>
#include <asm/time.h>
-@@ -229,6 +230,23 @@ static struct platform_device ar5312_gpi
+@@ -228,6 +229,23 @@ static struct platform_device ar5312_gpi
.num_resources = ARRAY_SIZE(ar5312_gpio_res),
};
@@ -102,7 +102,7 @@
static void __init ar5312_flash_init(void)
{
void __iomem *flashctl_base;
-@@ -299,6 +317,11 @@ void __init ar5312_init_devices(void)
+@@ -298,6 +316,11 @@ void __init ar5312_init_devices(void)
platform_device_register(&ar5312_gpio);