mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-19 03:06:35 +00:00
ar7: update kernel to version 4.14
This adds support for kernel 4.14 to the target and directly make it the default kernel version to use. This patch is build-tested only, but has never been device-tested. It is only added to preserve the changes in Git history prior to removing this target. Use it with care. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> [rebased and extended commit message, refreshed patches for 4.14.162] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
parent
08ec23f8ea
commit
90740f52e9
@ -0,0 +1,51 @@
|
|||||||
|
--- a/tn7atm.c
|
||||||
|
+++ b/tn7atm.c
|
||||||
|
@@ -1149,7 +1149,7 @@ void tn7atm_close (struct atm_vcc *vcc)
|
||||||
|
Tn7AtmPrivate *priv;
|
||||||
|
int dmachan;
|
||||||
|
spinlock_t closeLock;
|
||||||
|
- unsigned int closeFlag;
|
||||||
|
+ unsigned long closeFlag;
|
||||||
|
int rc;
|
||||||
|
|
||||||
|
priv = (Tn7AtmPrivate *) vcc->dev->dev_data;
|
||||||
|
--- a/tn7dsl.c
|
||||||
|
+++ b/tn7dsl.c
|
||||||
|
@@ -620,7 +620,7 @@ unsigned int shim_osClockTick(void)
|
||||||
|
return jiffies;
|
||||||
|
}
|
||||||
|
|
||||||
|
-int flags;
|
||||||
|
+unsigned long flags;
|
||||||
|
spinlock_t shimLock;
|
||||||
|
|
||||||
|
void shim_osCriticalEnter(void)
|
||||||
|
@@ -3433,7 +3433,7 @@ struct ctl_table dslmod_table[] = {
|
||||||
|
.extra2 = (void *)DEV_DSLMOD,
|
||||||
|
}
|
||||||
|
,
|
||||||
|
- {0}
|
||||||
|
+ { }
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Make sure that /proc/sys/dev is there */
|
||||||
|
@@ -3447,7 +3447,7 @@ struct ctl_table dslmod_root_table[] = {
|
||||||
|
}
|
||||||
|
,
|
||||||
|
#endif /* CONFIG_PROC_FS */
|
||||||
|
- {0}
|
||||||
|
+ { }
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct ctl_table_header *dslmod_sysctl_header;
|
||||||
|
--- a/tn7sar.c
|
||||||
|
+++ b/tn7sar.c
|
||||||
|
@@ -1208,7 +1208,7 @@ int tn7sar_deactivate_vc(Tn7AtmPrivate *
|
||||||
|
HAL_FUNCTIONS *pHalFunc;
|
||||||
|
HAL_DEVICE *pHalDev;
|
||||||
|
int rc;
|
||||||
|
- int flags;
|
||||||
|
+ unsigned long flags;
|
||||||
|
|
||||||
|
//dgprintf(4, "tn7sar_deactivate_vc\n");
|
||||||
|
//printk("tn7sar_deactivate_vc entered\n");
|
@ -12,7 +12,7 @@ BOARDNAME:=TI AR7
|
|||||||
FEATURES:=squashfs atm low_mem
|
FEATURES:=squashfs atm low_mem
|
||||||
SUBTARGETS:=generic ac49x
|
SUBTARGETS:=generic ac49x
|
||||||
|
|
||||||
KERNEL_PATCHVER:=4.9
|
KERNEL_PATCHVER:=4.14
|
||||||
|
|
||||||
define Target/Description
|
define Target/Description
|
||||||
Build firmware images for TI AR7 based routers.
|
Build firmware images for TI AR7 based routers.
|
||||||
|
@ -10,16 +10,22 @@ CONFIG_ARCH_DISCARD_MEMBLOCK=y
|
|||||||
CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
|
CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
|
||||||
# CONFIG_ARCH_HAS_GCOV_PROFILE_ALL is not set
|
# CONFIG_ARCH_HAS_GCOV_PROFILE_ALL is not set
|
||||||
# CONFIG_ARCH_HAS_SG_CHAIN 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_HIBERNATION_POSSIBLE=y
|
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||||
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
|
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
|
||||||
CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=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_SUPPORTS_UPROBES=y
|
||||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||||
CONFIG_ARCH_USE_BUILTIN_BSWAP=y
|
CONFIG_ARCH_USE_BUILTIN_BSWAP=y
|
||||||
|
CONFIG_ARCH_USE_QUEUED_RWLOCKS=y
|
||||||
|
CONFIG_ARCH_USE_QUEUED_SPINLOCKS=y
|
||||||
CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
|
CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
|
||||||
CONFIG_BOOT_ELF32=y
|
CONFIG_BOOT_ELF32=y
|
||||||
CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y
|
|
||||||
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
|
||||||
CONFIG_CEVT_R4K=y
|
CONFIG_CEVT_R4K=y
|
||||||
CONFIG_CLONE_BACKWARDS=y
|
CONFIG_CLONE_BACKWARDS=y
|
||||||
CONFIG_CMDLINE="rootfstype=squashfs,jffs2"
|
CONFIG_CMDLINE="rootfstype=squashfs,jffs2"
|
||||||
@ -48,14 +54,17 @@ CONFIG_FIXED_PHY=y
|
|||||||
CONFIG_GENERIC_ATOMIC64=y
|
CONFIG_GENERIC_ATOMIC64=y
|
||||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||||
CONFIG_GENERIC_CMOS_UPDATE=y
|
CONFIG_GENERIC_CMOS_UPDATE=y
|
||||||
|
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||||
CONFIG_GENERIC_IO=y
|
CONFIG_GENERIC_IO=y
|
||||||
CONFIG_GENERIC_IRQ_CHIP=y
|
CONFIG_GENERIC_IRQ_CHIP=y
|
||||||
|
CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
|
||||||
CONFIG_GENERIC_IRQ_SHOW=y
|
CONFIG_GENERIC_IRQ_SHOW=y
|
||||||
CONFIG_GENERIC_PCI_IOMAP=y
|
CONFIG_GENERIC_PCI_IOMAP=y
|
||||||
CONFIG_GENERIC_SCHED_CLOCK=y
|
CONFIG_GENERIC_SCHED_CLOCK=y
|
||||||
CONFIG_GENERIC_SMP_IDLE_THREAD=y
|
CONFIG_GENERIC_SMP_IDLE_THREAD=y
|
||||||
CONFIG_GENERIC_TIME_VSYSCALL=y
|
CONFIG_GENERIC_TIME_VSYSCALL=y
|
||||||
CONFIG_GPIOLIB=y
|
CONFIG_GPIOLIB=y
|
||||||
|
# CONFIG_GRO_CELLS is not set
|
||||||
CONFIG_HANDLE_DOMAIN_IRQ=y
|
CONFIG_HANDLE_DOMAIN_IRQ=y
|
||||||
CONFIG_HARDWARE_WATCHPOINTS=y
|
CONFIG_HARDWARE_WATCHPOINTS=y
|
||||||
CONFIG_HAS_DMA=y
|
CONFIG_HAS_DMA=y
|
||||||
@ -63,6 +72,7 @@ CONFIG_HAS_IOMEM=y
|
|||||||
CONFIG_HAS_IOPORT_MAP=y
|
CONFIG_HAS_IOPORT_MAP=y
|
||||||
# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set
|
# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set
|
||||||
# CONFIG_HAVE_ARCH_BITREVERSE 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_JUMP_LABEL=y
|
||||||
CONFIG_HAVE_ARCH_KGDB=y
|
CONFIG_HAVE_ARCH_KGDB=y
|
||||||
CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
|
CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
|
||||||
@ -72,6 +82,7 @@ CONFIG_HAVE_CBPF_JIT=y
|
|||||||
CONFIG_HAVE_CC_STACKPROTECTOR=y
|
CONFIG_HAVE_CC_STACKPROTECTOR=y
|
||||||
CONFIG_HAVE_CLK=y
|
CONFIG_HAVE_CLK=y
|
||||||
CONFIG_HAVE_CONTEXT_TRACKING=y
|
CONFIG_HAVE_CONTEXT_TRACKING=y
|
||||||
|
CONFIG_HAVE_COPY_THREAD_TLS=y
|
||||||
CONFIG_HAVE_C_RECORDMCOUNT=y
|
CONFIG_HAVE_C_RECORDMCOUNT=y
|
||||||
CONFIG_HAVE_DEBUG_KMEMLEAK=y
|
CONFIG_HAVE_DEBUG_KMEMLEAK=y
|
||||||
CONFIG_HAVE_DEBUG_STACKOVERFLOW=y
|
CONFIG_HAVE_DEBUG_STACKOVERFLOW=y
|
||||||
@ -106,11 +117,13 @@ CONFIG_IRQ_WORK=y
|
|||||||
CONFIG_KALLSYMS=y
|
CONFIG_KALLSYMS=y
|
||||||
CONFIG_LEDS_GPIO=y
|
CONFIG_LEDS_GPIO=y
|
||||||
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
|
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
|
||||||
CONFIG_MDIO_BOARDINFO=y
|
CONFIG_MDIO_BUS=y
|
||||||
|
CONFIG_MDIO_DEVICE=y
|
||||||
CONFIG_MIGRATION=y
|
CONFIG_MIGRATION=y
|
||||||
CONFIG_MIPS=y
|
CONFIG_MIPS=y
|
||||||
CONFIG_MIPS_ASID_BITS=8
|
CONFIG_MIPS_ASID_BITS=8
|
||||||
CONFIG_MIPS_ASID_SHIFT=0
|
CONFIG_MIPS_ASID_SHIFT=0
|
||||||
|
CONFIG_MIPS_CBPF_JIT=y
|
||||||
CONFIG_MIPS_CLOCK_VSYSCALL=y
|
CONFIG_MIPS_CLOCK_VSYSCALL=y
|
||||||
# CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND is not set
|
# CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND is not set
|
||||||
CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER=y
|
CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER=y
|
||||||
@ -132,6 +145,7 @@ CONFIG_PCI_DRIVERS_LEGACY=y
|
|||||||
CONFIG_PERF_USE_VMALLOC=y
|
CONFIG_PERF_USE_VMALLOC=y
|
||||||
CONFIG_PGTABLE_LEVELS=2
|
CONFIG_PGTABLE_LEVELS=2
|
||||||
CONFIG_PHYLIB=y
|
CONFIG_PHYLIB=y
|
||||||
|
# CONFIG_RCU_NEED_SEGCBLIST is not set
|
||||||
# CONFIG_RCU_STALL_COMMON is not set
|
# CONFIG_RCU_STALL_COMMON is not set
|
||||||
# CONFIG_SCHED_INFO is not set
|
# CONFIG_SCHED_INFO is not set
|
||||||
# CONFIG_SCSI_DMA is not set
|
# CONFIG_SCSI_DMA is not set
|
||||||
@ -150,5 +164,6 @@ CONFIG_SYS_SUPPORTS_MIPS16=y
|
|||||||
CONFIG_SYS_SUPPORTS_ZBOOT=y
|
CONFIG_SYS_SUPPORTS_ZBOOT=y
|
||||||
CONFIG_SYS_SUPPORTS_ZBOOT_UART16550=y
|
CONFIG_SYS_SUPPORTS_ZBOOT_UART16550=y
|
||||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||||
|
CONFIG_TINY_SRCU=y
|
||||||
CONFIG_VLYNQ=y
|
CONFIG_VLYNQ=y
|
||||||
# CONFIG_VLYNQ_DEBUG is not set
|
# CONFIG_VLYNQ_DEBUG is not set
|
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/mtd/Makefile
|
--- a/drivers/mtd/Makefile
|
||||||
+++ b/drivers/mtd/Makefile
|
+++ b/drivers/mtd/Makefile
|
||||||
@@ -12,7 +12,7 @@ obj-$(CONFIG_MTD_OF_PARTS) += ofpart.o
|
@@ -13,7 +13,7 @@ obj-$(CONFIG_MTD_OF_PARTS) += ofpart.o
|
||||||
obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
|
obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
|
||||||
obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o
|
obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o
|
||||||
obj-$(CONFIG_MTD_AFS_PARTS) += afs.o
|
obj-$(CONFIG_MTD_AFS_PARTS) += afs.o
|
||||||
@ -11,7 +11,7 @@
|
|||||||
obj-$(CONFIG_MTD_MYLOADER_PARTS) += myloader.o
|
obj-$(CONFIG_MTD_MYLOADER_PARTS) += myloader.o
|
||||||
--- a/arch/mips/ar7/platform.c
|
--- a/arch/mips/ar7/platform.c
|
||||||
+++ b/arch/mips/ar7/platform.c
|
+++ b/arch/mips/ar7/platform.c
|
||||||
@@ -198,7 +198,7 @@ static struct resource physmap_flash_res
|
@@ -197,7 +197,7 @@ static struct resource physmap_flash_res
|
||||||
.name = "mem",
|
.name = "mem",
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
.start = 0x10000000,
|
.start = 0x10000000,
|
@ -1,6 +1,6 @@
|
|||||||
--- a/arch/mips/ar7/memory.c
|
--- a/arch/mips/ar7/memory.c
|
||||||
+++ b/arch/mips/ar7/memory.c
|
+++ b/arch/mips/ar7/memory.c
|
||||||
@@ -66,5 +66,11 @@ void __init prom_meminit(void)
|
@@ -65,5 +65,11 @@ void __init prom_meminit(void)
|
||||||
|
|
||||||
void __init prom_free_prom_memory(void)
|
void __init prom_free_prom_memory(void)
|
||||||
{
|
{
|
@ -37,7 +37,7 @@
|
|||||||
#define AR7_IRQ_UART0 15
|
#define AR7_IRQ_UART0 15
|
||||||
--- a/arch/mips/Kconfig
|
--- a/arch/mips/Kconfig
|
||||||
+++ b/arch/mips/Kconfig
|
+++ b/arch/mips/Kconfig
|
||||||
@@ -162,7 +162,7 @@ config AR7
|
@@ -168,7 +168,7 @@ config AR7
|
||||||
select HAVE_CLK
|
select HAVE_CLK
|
||||||
help
|
help
|
||||||
Support for the Texas Instruments AR7 System-on-a-Chip
|
Support for the Texas Instruments AR7 System-on-a-Chip
|
||||||
@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
config ATH25
|
config ATH25
|
||||||
bool "Atheros AR231x/AR531x SoC support"
|
bool "Atheros AR231x/AR531x SoC support"
|
||||||
@@ -1007,6 +1007,7 @@ config MIPS_PARAVIRT
|
@@ -1016,6 +1016,7 @@ config MIPS_PARAVIRT
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
source "arch/mips/alchemy/Kconfig"
|
source "arch/mips/alchemy/Kconfig"
|
@ -14,7 +14,7 @@
|
|||||||
---help---
|
---help---
|
||||||
--- a/drivers/mtd/Makefile
|
--- a/drivers/mtd/Makefile
|
||||||
+++ b/drivers/mtd/Makefile
|
+++ b/drivers/mtd/Makefile
|
||||||
@@ -11,6 +11,7 @@ obj-$(CONFIG_MTD_SPLIT) += mtdsplit/
|
@@ -12,6 +12,7 @@ obj-$(CONFIG_MTD_SPLIT) += mtdsplit/
|
||||||
obj-$(CONFIG_MTD_OF_PARTS) += ofpart.o
|
obj-$(CONFIG_MTD_OF_PARTS) += ofpart.o
|
||||||
obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
|
obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
|
||||||
obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o
|
obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o
|
||||||
@ -24,7 +24,7 @@
|
|||||||
obj-$(CONFIG_MTD_BCM63XX_PARTS) += bcm63xxpart.o
|
obj-$(CONFIG_MTD_BCM63XX_PARTS) += bcm63xxpart.o
|
||||||
--- a/arch/mips/ar7/platform.c
|
--- a/arch/mips/ar7/platform.c
|
||||||
+++ b/arch/mips/ar7/platform.c
|
+++ b/arch/mips/ar7/platform.c
|
||||||
@@ -201,7 +201,7 @@ static struct resource physmap_flash_res
|
@@ -200,7 +200,7 @@ static struct resource physmap_flash_res
|
||||||
.end = 0x11ffffff,
|
.end = 0x11ffffff,
|
||||||
};
|
};
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
--- a/arch/mips/ar7/platform.c
|
--- a/arch/mips/ar7/platform.c
|
||||||
+++ b/arch/mips/ar7/platform.c
|
+++ b/arch/mips/ar7/platform.c
|
||||||
@@ -460,31 +460,22 @@ static struct gpio_led fb_fon_leds[] = {
|
@@ -459,31 +459,22 @@ static struct gpio_led fb_fon_leds[] = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -35,7 +35,7 @@
|
|||||||
.default_trigger = "default-on",
|
.default_trigger = "default-on",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -492,6 +483,44 @@ static struct gpio_led gt701_leds[] = {
|
@@ -491,6 +482,44 @@ static struct gpio_led gt701_leds[] = {
|
||||||
.gpio = 10,
|
.gpio = 10,
|
||||||
.active_low = 1,
|
.active_low = 1,
|
||||||
},
|
},
|
||||||
@ -80,7 +80,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
static struct gpio_led_platform_data ar7_led_data;
|
static struct gpio_led_platform_data ar7_led_data;
|
||||||
@@ -535,9 +564,9 @@ static void __init detect_leds(void)
|
@@ -534,9 +563,9 @@ static void __init detect_leds(void)
|
||||||
} else if (strstr(prid, "CYWM") || strstr(prid, "CYWL")) {
|
} else if (strstr(prid, "CYWM") || strstr(prid, "CYWL")) {
|
||||||
ar7_led_data.num_leds = ARRAY_SIZE(titan_leds);
|
ar7_led_data.num_leds = ARRAY_SIZE(titan_leds);
|
||||||
ar7_led_data.leds = titan_leds;
|
ar7_led_data.leds = titan_leds;
|
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/net/ethernet/ti/cpmac.c
|
--- a/drivers/net/ethernet/ti/cpmac.c
|
||||||
+++ b/drivers/net/ethernet/ti/cpmac.c
|
+++ b/drivers/net/ethernet/ti/cpmac.c
|
||||||
@@ -1124,6 +1124,8 @@ static int cpmac_probe(struct platform_d
|
@@ -1123,6 +1123,8 @@ static int cpmac_probe(struct platform_d
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -9,7 +9,7 @@
|
|||||||
dev->irq = platform_get_irq_byname(pdev, "irq");
|
dev->irq = platform_get_irq_byname(pdev, "irq");
|
||||||
|
|
||||||
dev->netdev_ops = &cpmac_netdev_ops;
|
dev->netdev_ops = &cpmac_netdev_ops;
|
||||||
@@ -1203,7 +1205,7 @@ int cpmac_init(void)
|
@@ -1202,7 +1204,7 @@ int cpmac_init(void)
|
||||||
cpmac_mii->write = cpmac_mdio_write;
|
cpmac_mii->write = cpmac_mdio_write;
|
||||||
cpmac_mii->reset = cpmac_mdio_reset;
|
cpmac_mii->reset = cpmac_mdio_reset;
|
||||||
|
|
||||||
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
if (!cpmac_mii->priv) {
|
if (!cpmac_mii->priv) {
|
||||||
pr_err("Can't ioremap mdio registers\n");
|
pr_err("Can't ioremap mdio registers\n");
|
||||||
@@ -1214,10 +1216,16 @@ int cpmac_init(void)
|
@@ -1213,10 +1215,16 @@ int cpmac_init(void)
|
||||||
/* FIXME: unhardcode gpio&reset bits */
|
/* FIXME: unhardcode gpio&reset bits */
|
||||||
ar7_gpio_disable(26);
|
ar7_gpio_disable(26);
|
||||||
ar7_gpio_disable(27);
|
ar7_gpio_disable(27);
|
||||||
@ -37,7 +37,7 @@
|
|||||||
cpmac_mii->reset(cpmac_mii);
|
cpmac_mii->reset(cpmac_mii);
|
||||||
|
|
||||||
for (i = 0; i < 300; i++) {
|
for (i = 0; i < 300; i++) {
|
||||||
@@ -1234,7 +1242,11 @@ int cpmac_init(void)
|
@@ -1233,7 +1241,11 @@ int cpmac_init(void)
|
||||||
mask = 0;
|
mask = 0;
|
||||||
}
|
}
|
||||||
|
|
@ -1,45 +0,0 @@
|
|||||||
From patchwork Tue Jul 18 10:17:26 2017
|
|
||||||
Content-Type: text/plain; charset="utf-8"
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Transfer-Encoding: 7bit
|
|
||||||
Subject: [5/9] MIPS: AR7: allow NULL clock for clk_get_rate
|
|
||||||
X-Patchwork-Submitter: Jonas Gorski <jonas.gorski@gmail.com>
|
|
||||||
X-Patchwork-Id: 16775
|
|
||||||
Message-Id: <20170718101730.2541-6-jonas.gorski@gmail.com>
|
|
||||||
To: unlisted-recipients:; (no To-header on input)
|
|
||||||
Cc: Ralf Baechle <ralf@linux-mips.org>,
|
|
||||||
Paul Gortmaker <paul.gortmaker@windriver.com>,
|
|
||||||
James Hogan <james.hogan@imgtec.com>,
|
|
||||||
linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
|
|
||||||
Date: Tue, 18 Jul 2017 12:17:26 +0200
|
|
||||||
From: Jonas Gorski <jonas.gorski@gmail.com>
|
|
||||||
List-Id: linux-mips <linux-mips.eddie.linux-mips.org>
|
|
||||||
|
|
||||||
Make the behaviour of clk_get_rate consistent with common clk's
|
|
||||||
clk_get_rate by accepting NULL clocks as parameter. Some device
|
|
||||||
drivers rely on this, and will cause an OOPS otherwise.
|
|
||||||
|
|
||||||
Fixes: 780019ddf02f ("MIPS: AR7: Implement clock API")
|
|
||||||
Cc: Ralf Baechle <ralf@linux-mips.org>
|
|
||||||
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
|
|
||||||
Cc: James Hogan <james.hogan@imgtec.com>
|
|
||||||
Cc: linux-mips@linux-mips.org
|
|
||||||
Cc: linux-kernel@vger.kernel.org
|
|
||||||
Reported-by: Mathias Kresin <dev@kresin.me>
|
|
||||||
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
|
||||||
---
|
|
||||||
arch/mips/ar7/clock.c | 3 +++
|
|
||||||
1 file changed, 3 insertions(+)
|
|
||||||
|
|
||||||
--- a/arch/mips/ar7/clock.c
|
|
||||||
+++ b/arch/mips/ar7/clock.c
|
|
||||||
@@ -430,6 +430,9 @@ EXPORT_SYMBOL(clk_disable);
|
|
||||||
|
|
||||||
unsigned long clk_get_rate(struct clk *clk)
|
|
||||||
{
|
|
||||||
+ if (!clk)
|
|
||||||
+ return 0;
|
|
||||||
+
|
|
||||||
return clk->rate;
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(clk_get_rate);
|
|
Loading…
Reference in New Issue
Block a user