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
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
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
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_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
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
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
#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,
};
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);
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.
+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
* 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.
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.
--- 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);
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;
}
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;
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);
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;
--- 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.
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
+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.
# 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
+#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)
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);
- 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);
}
+ 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;
}
}
- 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 */
+ 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;
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;
}
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);
}
#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),
};
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);