aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm53xx/patches-4.9
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/bcm53xx/patches-4.9')
-rw-r--r--target/linux/bcm53xx/patches-4.9/031-ARM-BCM5301X-Add-back-handler-ignoring-external-impr.patch75
-rw-r--r--target/linux/bcm53xx/patches-4.9/033-0013-ARM-dts-BCM5301X-Correct-GIC_PPI-interrupt-flags.patch41
-rw-r--r--target/linux/bcm53xx/patches-4.9/089-PCI-iproc-Save-host-bridge-window-resource-in-struct.patch131
-rw-r--r--target/linux/bcm53xx/patches-4.9/180-usb-xhci-add-support-for-performing-fake-doorbell.patch12
-rw-r--r--target/linux/bcm53xx/patches-4.9/905-BCM53573-minor-hacks.patch2
5 files changed, 7 insertions, 254 deletions
diff --git a/target/linux/bcm53xx/patches-4.9/031-ARM-BCM5301X-Add-back-handler-ignoring-external-impr.patch b/target/linux/bcm53xx/patches-4.9/031-ARM-BCM5301X-Add-back-handler-ignoring-external-impr.patch
deleted file mode 100644
index a4f32f5c14..0000000000
--- a/target/linux/bcm53xx/patches-4.9/031-ARM-BCM5301X-Add-back-handler-ignoring-external-impr.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From 09f3510fb70a46c8921f2cf4a90dbcae460a6820 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
-Date: Sat, 29 Oct 2016 13:12:29 +0200
-Subject: [PATCH] ARM: BCM5301X: Add back handler ignoring external imprecise
- aborts
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Since early BCM5301X days we got abort handler that was removed by
-commit 937b12306ea79 ("ARM: BCM5301X: remove workaround imprecise abort
-fault handler"). It assumed we need to deal only with pending aborts
-left by the bootloader. Unfortunately this isn't true for BCM5301X.
-
-When probing PCI config space (device enumeration) it is expected to
-have master aborts on the PCI bus. Most bridges don't forward (or they
-allow disabling it) these errors onto the AXI/AMBA bus but not the
-Northstar (BCM5301X) one.
-
-iProc PCIe controller on Northstar seems to be some older one, without
-a control register for errors forwarding. It means we need to workaround
-this at platform level. All newer platforms are not affected by this
-issue.
-
-Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
-Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
----
- arch/arm/mach-bcm/bcm_5301x.c | 28 ++++++++++++++++++++++++++++
- 1 file changed, 28 insertions(+)
-
---- a/arch/arm/mach-bcm/bcm_5301x.c
-+++ b/arch/arm/mach-bcm/bcm_5301x.c
-@@ -9,14 +9,42 @@
- #include <asm/hardware/cache-l2x0.h>
-
- #include <asm/mach/arch.h>
-+#include <asm/siginfo.h>
-+#include <asm/signal.h>
-+
-+#define FSR_EXTERNAL (1 << 12)
-+#define FSR_READ (0 << 10)
-+#define FSR_IMPRECISE 0x0406
-
- static const char *const bcm5301x_dt_compat[] __initconst = {
- "brcm,bcm4708",
- NULL,
- };
-
-+static int bcm5301x_abort_handler(unsigned long addr, unsigned int fsr,
-+ struct pt_regs *regs)
-+{
-+ /*
-+ * We want to ignore aborts forwarded from the PCIe bus that are
-+ * expected and shouldn't really be passed by the PCIe controller.
-+ * The biggest disadvantage is the same FSR code may be reported when
-+ * reading non-existing APB register and we shouldn't ignore that.
-+ */
-+ if (fsr == (FSR_EXTERNAL | FSR_READ | FSR_IMPRECISE))
-+ return 0;
-+
-+ return 1;
-+}
-+
-+static void __init bcm5301x_init_early(void)
-+{
-+ hook_fault_code(16 + 6, bcm5301x_abort_handler, SIGBUS, BUS_OBJERR,
-+ "imprecise external abort");
-+}
-+
- DT_MACHINE_START(BCM5301X, "BCM5301X")
- .l2c_aux_val = 0,
- .l2c_aux_mask = ~0,
- .dt_compat = bcm5301x_dt_compat,
-+ .init_early = bcm5301x_init_early,
- MACHINE_END
diff --git a/target/linux/bcm53xx/patches-4.9/033-0013-ARM-dts-BCM5301X-Correct-GIC_PPI-interrupt-flags.patch b/target/linux/bcm53xx/patches-4.9/033-0013-ARM-dts-BCM5301X-Correct-GIC_PPI-interrupt-flags.patch
deleted file mode 100644
index 70df2013cc..0000000000
--- a/target/linux/bcm53xx/patches-4.9/033-0013-ARM-dts-BCM5301X-Correct-GIC_PPI-interrupt-flags.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 0e34079cd1f674449749aafe4be07336177de90d Mon Sep 17 00:00:00 2001
-From: Jon Mason <jon.mason@broadcom.com>
-Date: Thu, 2 Mar 2017 19:21:32 -0500
-Subject: [PATCH] ARM: dts: BCM5301X: Correct GIC_PPI interrupt flags
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-GIC_PPI flags were misconfigured for the timers, resulting in errors
-like:
-[ 0.000000] GIC: PPI11 is secure or misconfigured
-
-Changing them to being edge triggered corrects the issue
-
-Suggested-by: Rafał Miłecki <rafal@milecki.pl>
-Signed-off-by: Jon Mason <jon.mason@broadcom.com>
-Fixes: d27509f1 ("ARM: BCM5301X: add dts files for BCM4708 SoC")
-Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
----
- arch/arm/boot/dts/bcm5301x.dtsi | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/arch/arm/boot/dts/bcm5301x.dtsi
-+++ b/arch/arm/boot/dts/bcm5301x.dtsi
-@@ -66,14 +66,14 @@
- timer@20200 {
- compatible = "arm,cortex-a9-global-timer";
- reg = <0x20200 0x100>;
-- interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>;
-+ interrupts = <GIC_PPI 11 IRQ_TYPE_EDGE_RISING>;
- clocks = <&periph_clk>;
- };
-
- local-timer@20600 {
- compatible = "arm,cortex-a9-twd-timer";
- reg = <0x20600 0x100>;
-- interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>;
-+ interrupts = <GIC_PPI 13 IRQ_TYPE_EDGE_RISING>;
- clocks = <&periph_clk>;
- };
-
diff --git a/target/linux/bcm53xx/patches-4.9/089-PCI-iproc-Save-host-bridge-window-resource-in-struct.patch b/target/linux/bcm53xx/patches-4.9/089-PCI-iproc-Save-host-bridge-window-resource-in-struct.patch
deleted file mode 100644
index 3de4395348..0000000000
--- a/target/linux/bcm53xx/patches-4.9/089-PCI-iproc-Save-host-bridge-window-resource-in-struct.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-From 6e347b5e05ea2ac4ac467a5a1cfaebb2c7f06f80 Mon Sep 17 00:00:00 2001
-From: Bjorn Helgaas <bhelgaas@google.com>
-Date: Thu, 9 Mar 2017 11:27:07 -0600
-Subject: [PATCH] PCI: iproc: Save host bridge window resource in struct
- iproc_pcie
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The host bridge memory window resource is inserted into the iomem_resource
-tree and cannot be deallocated until the host bridge itself is removed.
-
-Previously, the window was on the stack, which meant the iomem_resource
-entry pointed into the stack and was corrupted as soon as the probe
-function returned, which caused memory corruption and errors like this:
-
- pcie_iproc_bcma bcma0:8: resource collision: [mem 0x40000000-0x47ffffff] conflicts with PCIe MEM space [mem 0x40000000-0x47ffffff]
-
-Move the memory window resource from the stack into struct iproc_pcie so
-its lifetime matches that of the host bridge.
-
-Fixes: c3245a566400 ("PCI: iproc: Request host bridge window resources")
-Reported-and-tested-by: Rafał Miłecki <zajec5@gmail.com>
-Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-CC: stable@vger.kernel.org # v4.8+
----
- drivers/pci/host/pcie-iproc-bcma.c | 24 ++++++++++++------------
- drivers/pci/host/pcie-iproc-platform.c | 19 ++++++++++---------
- drivers/pci/host/pcie-iproc.h | 1 +
- 3 files changed, 23 insertions(+), 21 deletions(-)
-
---- a/drivers/pci/host/pcie-iproc-bcma.c
-+++ b/drivers/pci/host/pcie-iproc-bcma.c
-@@ -44,8 +44,7 @@ static int iproc_pcie_bcma_probe(struct
- {
- struct device *dev = &bdev->dev;
- struct iproc_pcie *pcie;
-- LIST_HEAD(res);
-- struct resource res_mem;
-+ LIST_HEAD(resources);
- int ret;
-
- pcie = devm_kzalloc(dev, sizeof(*pcie), GFP_KERNEL);
-@@ -62,22 +61,23 @@ static int iproc_pcie_bcma_probe(struct
-
- pcie->base_addr = bdev->addr;
-
-- res_mem.start = bdev->addr_s[0];
-- res_mem.end = bdev->addr_s[0] + SZ_128M - 1;
-- res_mem.name = "PCIe MEM space";
-- res_mem.flags = IORESOURCE_MEM;
-- pci_add_resource(&res, &res_mem);
-+ pcie->mem.start = bdev->addr_s[0];
-+ pcie->mem.end = bdev->addr_s[0] + SZ_128M - 1;
-+ pcie->mem.name = "PCIe MEM space";
-+ pcie->mem.flags = IORESOURCE_MEM;
-+ pci_add_resource(&resources, &pcie->mem);
-
- pcie->map_irq = iproc_pcie_bcma_map_irq;
-
-- ret = iproc_pcie_setup(pcie, &res);
-- if (ret)
-+ ret = iproc_pcie_setup(pcie, &resources);
-+ if (ret) {
- dev_err(dev, "PCIe controller setup failed\n");
--
-- pci_free_resource_list(&res);
-+ pci_free_resource_list(&resources);
-+ return ret;
-+ }
-
- bcma_set_drvdata(bdev, pcie);
-- return ret;
-+ return 0;
- }
-
- static void iproc_pcie_bcma_remove(struct bcma_device *bdev)
---- a/drivers/pci/host/pcie-iproc-platform.c
-+++ b/drivers/pci/host/pcie-iproc-platform.c
-@@ -46,7 +46,7 @@ static int iproc_pcie_pltfm_probe(struct
- struct device_node *np = dev->of_node;
- struct resource reg;
- resource_size_t iobase = 0;
-- LIST_HEAD(res);
-+ LIST_HEAD(resources);
- int ret;
-
- of_id = of_match_device(iproc_pcie_of_match_table, dev);
-@@ -108,23 +108,24 @@ static int iproc_pcie_pltfm_probe(struct
- pcie->phy = NULL;
- }
-
-- ret = of_pci_get_host_bridge_resources(np, 0, 0xff, &res, &iobase);
-+ ret = of_pci_get_host_bridge_resources(np, 0, 0xff, &resources,
-+ &iobase);
- if (ret) {
-- dev_err(dev,
-- "unable to get PCI host bridge resources\n");
-+ dev_err(dev, "unable to get PCI host bridge resources\n");
- return ret;
- }
-
- pcie->map_irq = of_irq_parse_and_map_pci;
-
-- ret = iproc_pcie_setup(pcie, &res);
-- if (ret)
-+ ret = iproc_pcie_setup(pcie, &resources);
-+ if (ret) {
- dev_err(dev, "PCIe controller setup failed\n");
--
-- pci_free_resource_list(&res);
-+ pci_free_resource_list(&resources);
-+ return ret;
-+ }
-
- platform_set_drvdata(pdev, pcie);
-- return ret;
-+ return 0;
- }
-
- static int iproc_pcie_pltfm_remove(struct platform_device *pdev)
---- a/drivers/pci/host/pcie-iproc.h
-+++ b/drivers/pci/host/pcie-iproc.h
-@@ -68,6 +68,7 @@ struct iproc_pcie {
- #ifdef CONFIG_ARM
- struct pci_sys_data sysdata;
- #endif
-+ struct resource mem;
- struct pci_bus *root_bus;
- struct phy *phy;
- int (*map_irq)(const struct pci_dev *, u8, u8);
diff --git a/target/linux/bcm53xx/patches-4.9/180-usb-xhci-add-support-for-performing-fake-doorbell.patch b/target/linux/bcm53xx/patches-4.9/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
index 9e5bd83116..7c91161302 100644
--- a/target/linux/bcm53xx/patches-4.9/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
+++ b/target/linux/bcm53xx/patches-4.9/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
@@ -127,11 +127,11 @@ it on BCM4708 family.
/*
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
-@@ -1657,6 +1657,7 @@ struct xhci_hcd {
- #define XHCI_SSIC_PORT_UNUSED (1 << 22)
- #define XHCI_NO_64BIT_SUPPORT (1 << 23)
- #define XHCI_MISSING_CAS (1 << 24)
-+#define XHCI_FAKE_DOORBELL (1 << 25)
+@@ -1660,6 +1660,7 @@ struct xhci_hcd {
+ /* For controller with a broken Port Disable implementation */
+ #define XHCI_BROKEN_PORT_PED (1 << 25)
+ #define XHCI_LIMIT_ENDPOINT_INTERVAL_7 (1 << 26)
++#define XHCI_FAKE_DOORBELL (1 << 27)
+
unsigned int num_active_eps;
unsigned int limit_active_eps;
- /* There are two roothubs to keep track of bus suspend info for */
diff --git a/target/linux/bcm53xx/patches-4.9/905-BCM53573-minor-hacks.patch b/target/linux/bcm53xx/patches-4.9/905-BCM53573-minor-hacks.patch
index c7023906df..3245269c3e 100644
--- a/target/linux/bcm53xx/patches-4.9/905-BCM53573-minor-hacks.patch
+++ b/target/linux/bcm53xx/patches-4.9/905-BCM53573-minor-hacks.patch
@@ -69,7 +69,7 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
#include <linux/clockchips.h>
#include <linux/clocksource.h>
#include <linux/interrupt.h>
-@@ -513,6 +514,16 @@ arch_timer_detect_rate(void __iomem *cnt
+@@ -514,6 +515,16 @@ arch_timer_detect_rate(void __iomem *cnt
arch_timer_rate = arch_timer_get_cntfrq();
}