mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 01:11:14 +00:00
f5919b65d4
Patch generation process: - rebase rpi/rpi-4.14.y on v4.14.89 from linux-stable - git format-patch v4.14.89 Patches skipped during rebase: - lan78xx: Read MAC address from DT if present - lan78xx: Enable LEDs and auto-negotiation - Revert "softirq: Let ksoftirqd do its job" - sc16is7xx: Fix for multi-channel stall - lan78xx: Ignore DT MAC address if already valid - lan78xx: Simple patch to prevent some crashes - tcp_write_queue_purge clears all the SKBs in the write queue - Revert "lan78xx: Simple patch to prevent some crashes" - lan78xx: Connect phy early - Arm: mm: ftrace: Only set text back to ro after kernel has been marked ro - Revert "Revert "softirq: Let ksoftirqd do its job"" - ASoC: cs4265: SOC_SINGLE register value error fix - Revert "ASoC: cs4265: SOC_SINGLE register value error fix" - Revert "net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends" - Revert "Revert "net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends"" Patches dropped after rebase: - net: Add non-mainline source for rtl8192cu wlan - net: Fix rtl8192cu build errors on other platforms - brcm: adds support for BCM43341 wifi - brcmfmac: Mute expected startup 'errors' - ARM64: Fix build break for RTL8187/RTL8192CU wifi - ARM64: Enable RTL8187/RTL8192CU wifi in build config - This is the driver for Sony CXD2880 DVB-T2/T tuner + demodulator - brcmfmac: add CLM download support - brcmfmac: request_firmware_direct is quieter - Sets the BCDC priority to constant 0 - brcmfmac: Disable ARP offloading when promiscuous - brcmfmac: Avoid possible out-of-bounds read - brcmfmac: Delete redundant length check - net: rtl8192cu: Normalize indentation - net: rtl8192cu: Fix implicit fallthrough warnings - Revert "Sets the BCDC priority to constant 0" - media: cxd2880: Bump to match 4.18.y version - media: cxd2880-spi: Bump to match 4.18.y version - Revert "mm: alloc_contig: re-allow CMA to compact FS pages" - Revert "Revert "mm: alloc_contig: re-allow CMA to compact FS pages"" - cxd2880: CXD2880_SPI_DRV should select DVB_CXD2880 with MEDIA_SUBDRV_AUTOSELECT - 950-0421-HID-hid-bigbenff-driver-for-BigBen-Interactive-PS3OF.patch - 950-0453-Add-hid-bigbenff-to-list-of-have_special_driver-for-.patch Make I2C built-in instead of modular as in upstream defconfig; also the easiest way to get MFD_ARIZONA enabled, which is required by kmod-sound-soc-rpi-cirrus. Add missing compatible strings from 4.9/960-add-rasbperrypi-compatible.patch, using upstream names for compute modules. Add extra patch to enable the LEDs on lan78xx. Compile-tested: bcm2708, bcm2709, bcm2710 (with CONFIG_ALL_KMODS=y) Runtime-tested: bcm2708, bcm2710 Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
143 lines
4.3 KiB
Diff
143 lines
4.3 KiB
Diff
From bb79a484a01f8f3645bd9b8fc6b15ea0ba961589 Mon Sep 17 00:00:00 2001
|
|
From: Phil Elwell <phil@raspberrypi.org>
|
|
Date: Tue, 23 Jan 2018 16:52:45 +0000
|
|
Subject: [PATCH 169/454] irqchip: irq-bcm2836: Remove regmap and syscon use
|
|
|
|
The syscon node defines a register range that duplicates that used by
|
|
the local_intc node on bcm2836/7. Since irq-bcm2835 and irq-bcm2836 are
|
|
built in and always present together (both drivers are enabled by
|
|
CONFIG_ARCH_BCM2835), it is possible to replace the syscon usage with a
|
|
global variable that simplifies the code. Doing so does lose the
|
|
locking provided by regmap, but as only one side is using the regmap
|
|
interface (irq-bcm2835 uses readl and write) there is no loss of
|
|
atomicity.
|
|
|
|
See: https://github.com/raspberrypi/firmware/issues/926
|
|
|
|
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
|
---
|
|
arch/arm/boot/dts/bcm2709.dtsi | 5 -----
|
|
arch/arm/boot/dts/bcm2710.dtsi | 5 -----
|
|
drivers/irqchip/irq-bcm2835.c | 32 ++++++++++++--------------------
|
|
drivers/irqchip/irq-bcm2836.c | 5 +++++
|
|
4 files changed, 17 insertions(+), 30 deletions(-)
|
|
|
|
--- a/arch/arm/boot/dts/bcm2709.dtsi
|
|
+++ b/arch/arm/boot/dts/bcm2709.dtsi
|
|
@@ -6,11 +6,6 @@
|
|
soc {
|
|
ranges = <0x7e000000 0x3f000000 0x01000000>,
|
|
<0x40000000 0x40000000 0x00040000>;
|
|
-
|
|
- syscon@40000000 {
|
|
- compatible = "brcm,bcm2836-arm-local", "syscon";
|
|
- reg = <0x40000000 0x100>;
|
|
- };
|
|
};
|
|
|
|
__overrides__ {
|
|
--- a/arch/arm/boot/dts/bcm2710.dtsi
|
|
+++ b/arch/arm/boot/dts/bcm2710.dtsi
|
|
@@ -16,11 +16,6 @@
|
|
interrupt-parent = <&local_intc>;
|
|
interrupts = <9>;
|
|
};
|
|
-
|
|
- syscon@40000000 {
|
|
- compatible = "brcm,bcm2836-arm-local", "syscon";
|
|
- reg = <0x40000000 0x100>;
|
|
- };
|
|
};
|
|
|
|
__overrides__ {
|
|
--- a/drivers/irqchip/irq-bcm2835.c
|
|
+++ b/drivers/irqchip/irq-bcm2835.c
|
|
@@ -50,8 +50,6 @@
|
|
#include <linux/of_irq.h>
|
|
#include <linux/irqchip.h>
|
|
#include <linux/irqdomain.h>
|
|
-#include <linux/mfd/syscon.h>
|
|
-#include <linux/regmap.h>
|
|
|
|
#include <asm/exception.h>
|
|
#ifndef CONFIG_ARM64
|
|
@@ -103,7 +101,7 @@ struct armctrl_ic {
|
|
void __iomem *enable[NR_BANKS];
|
|
void __iomem *disable[NR_BANKS];
|
|
struct irq_domain *domain;
|
|
- struct regmap *local_regmap;
|
|
+ void __iomem *local_base;
|
|
};
|
|
|
|
static struct armctrl_ic intc __read_mostly;
|
|
@@ -140,24 +138,20 @@ static void armctrl_unmask_irq(struct ir
|
|
if (d->hwirq >= NUMBER_IRQS) {
|
|
if (num_online_cpus() > 1) {
|
|
unsigned int data;
|
|
- int ret;
|
|
|
|
- if (!intc.local_regmap) {
|
|
- pr_err("FIQ is disabled due to missing regmap\n");
|
|
+ if (!intc.local_base) {
|
|
+ pr_err("FIQ is disabled due to missing arm_local_intc\n");
|
|
return;
|
|
}
|
|
|
|
- ret = regmap_read(intc.local_regmap,
|
|
- ARM_LOCAL_GPU_INT_ROUTING, &data);
|
|
- if (ret) {
|
|
- pr_err("Failed to read int routing %d\n", ret);
|
|
- return;
|
|
- }
|
|
+ data = readl_relaxed(intc.local_base +
|
|
+ ARM_LOCAL_GPU_INT_ROUTING);
|
|
|
|
data &= ~0xc;
|
|
data |= (1 << 2);
|
|
- regmap_write(intc.local_regmap,
|
|
- ARM_LOCAL_GPU_INT_ROUTING, data);
|
|
+ writel_relaxed(data,
|
|
+ intc.local_base +
|
|
+ ARM_LOCAL_GPU_INT_ROUTING);
|
|
}
|
|
|
|
writel_relaxed(REG_FIQ_ENABLE | hwirq_to_fiq(d->hwirq),
|
|
@@ -256,12 +250,10 @@ static int __init armctrl_of_init(struct
|
|
}
|
|
|
|
if (is_2836) {
|
|
- intc.local_regmap =
|
|
- syscon_regmap_lookup_by_compatible("brcm,bcm2836-arm-local");
|
|
- if (IS_ERR(intc.local_regmap)) {
|
|
- pr_err("Failed to get local register map. FIQ is disabled for cpus > 1\n");
|
|
- intc.local_regmap = NULL;
|
|
- }
|
|
+ extern void __iomem * __attribute__((weak)) arm_local_intc;
|
|
+ intc.local_base = arm_local_intc;
|
|
+ if (!intc.local_base)
|
|
+ pr_err("Failed to get local intc base. FIQ is disabled for cpus > 1\n");
|
|
}
|
|
|
|
/* Make a duplicate irq range which is used to enable FIQ */
|
|
--- a/drivers/irqchip/irq-bcm2836.c
|
|
+++ b/drivers/irqchip/irq-bcm2836.c
|
|
@@ -83,6 +83,9 @@ struct bcm2836_arm_irqchip_intc {
|
|
|
|
static struct bcm2836_arm_irqchip_intc intc __read_mostly;
|
|
|
|
+void __iomem *arm_local_intc;
|
|
+EXPORT_SYMBOL_GPL(arm_local_intc);
|
|
+
|
|
static void bcm2836_arm_irqchip_mask_per_cpu_irq(unsigned int reg_offset,
|
|
unsigned int bit,
|
|
int cpu)
|
|
@@ -310,6 +313,8 @@ static int __init bcm2836_arm_irqchip_l1
|
|
panic("%pOF: unable to map local interrupt registers\n", node);
|
|
}
|
|
|
|
+ arm_local_intc = intc.base;
|
|
+
|
|
bcm2835_init_local_timer_frequency();
|
|
|
|
intc.domain = irq_domain_add_linear(node, LAST_IRQ + 1,
|