aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2023-03-16 19:16:11 +0100
committerÁlvaro Fernández Rojas <noltari@gmail.com>2023-03-16 20:49:47 +0100
commit8d0c2546519561aa538004da882304c1cd758cfd (patch)
tree5c0f2ab232cc7e15b507e64d41c50aab13dd2749 /target
parentf08190e743cc92aaca9f280071aad71bbff83b37 (diff)
downloadupstream-8d0c2546519561aa538004da882304c1cd758cfd.tar.gz
upstream-8d0c2546519561aa538004da882304c1cd758cfd.tar.bz2
upstream-8d0c2546519561aa538004da882304c1cd758cfd.zip
bmips: update patches sent upstream
Update bmips patches with the latest version sent upstream Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target')
-rw-r--r--target/linux/bmips/patches-5.15/202-mips-bmips-BCM6358-disable-ARCH_HAS_SYNC_DMA_FOR_CPU_ALL.patch44
-rw-r--r--target/linux/bmips/patches-5.15/501-net-dsa-b53-mmap-fix-enabled_ports.patch18
2 files changed, 42 insertions, 20 deletions
diff --git a/target/linux/bmips/patches-5.15/202-mips-bmips-BCM6358-disable-ARCH_HAS_SYNC_DMA_FOR_CPU_ALL.patch b/target/linux/bmips/patches-5.15/202-mips-bmips-BCM6358-disable-ARCH_HAS_SYNC_DMA_FOR_CPU_ALL.patch
index 0ed2353a50..3c5501209b 100644
--- a/target/linux/bmips/patches-5.15/202-mips-bmips-BCM6358-disable-ARCH_HAS_SYNC_DMA_FOR_CPU_ALL.patch
+++ b/target/linux/bmips/patches-5.15/202-mips-bmips-BCM6358-disable-ARCH_HAS_SYNC_DMA_FOR_CPU_ALL.patch
@@ -1,12 +1,13 @@
-From 84c06b4a1dfa3e021fdbcafaff8cebfdec462402 Mon Sep 17 00:00:00 2001
+From f48c93e4c4b5dbad1c0fbd623fd68f55f1667527 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
-Date: Tue, 23 Feb 2021 10:39:48 +0100
-Subject: [PATCH] mips: bmips: BCM6358: disable ARCH_HAS_SYNC_DMA_FOR_CPU_ALL
+Date: Fri, 10 Mar 2023 13:05:10 +0100
+Subject: [PATCH] mips: bmips: BCM6358: disable arch_sync_dma_for_cpu_all() for
+ TP1
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
-Enabling this option causes kernel panics on BCM6358 with EHCI/OHCI:
+arch_sync_dma_for_cpu_all() causes kernel panics on BCM6358 with EHCI/OHCI:
[ 3.881739] usb 1-1: new high-speed USB device number 2 using ehci-platform
[ 3.895011] Reserved instruction in kernel code[#1]:
[ 3.900113] CPU: 0 PID: 1 Comm: init Not tainted 5.10.16 #0
@@ -45,27 +46,28 @@ Enabling this option causes kernel panics on BCM6358 with EHCI/OHCI:
[ 4.087374] Kernel panic - not syncing: Fatal exception
[ 4.092753] Rebooting in 1 seconds..
+This only happens when booting from TP1 instead of TP0.
+
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
- arch/mips/bmips/dma.c
- arch/mips/bmips/setup.c
+ arch/mips/bmips/dma.c | 5 +++++
+ arch/mips/bmips/setup.c | 9 +++++++++
+ 2 files changed, 14 insertions(+)
--- a/arch/mips/bmips/dma.c
+++ b/arch/mips/bmips/dma.c
-@@ -19,6 +19,8 @@
- #include <linux/types.h>
- #include <asm/bmips.h>
+@@ -64,11 +64,16 @@ phys_addr_t dma_to_phys(struct device *d
+ return dma_addr;
+ }
-+int bmips_dma_sync_enabled = 1;
++int bmips_dma_sync_disable = 0;
+
- /*
- * BCM338x has configurable address translation windows which allow the
- * peripherals' DMA addresses to be different from the Zephyr-visible
-@@ -69,6 +71,9 @@ void arch_sync_dma_for_cpu_all(void)
+ void arch_sync_dma_for_cpu_all(void)
+ {
void __iomem *cbr = BMIPS_GET_CBR();
u32 cfg;
-+ if (!bmips_dma_sync_enabled)
++ if (bmips_dma_sync_disable)
+ return;
+
if (boot_cpu_type() != CPU_BMIPS3300 &&
@@ -77,18 +79,22 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
#define DDR_CSEND_REG 0x8
-+extern int bmips_dma_sync_enabled;
++extern int bmips_dma_sync_disable;
+
static const unsigned long kbase = VMLINUX_LOAD_ADDRESS & 0xfff00000;
struct bmips_cpufreq {
-@@ -168,6 +170,9 @@ static void bcm6358_quirks(void)
+@@ -168,6 +170,13 @@ static void bcm6358_quirks(void)
* disable SMP for now
*/
bmips_smp_enabled = 0;
+
-+ /* ARCH_HAS_SYNC_DMA_FOR_CPU_ALL causes kernel panics on BCM6358 */
-+ bmips_dma_sync_enabled = 0;
++ /*
++ * ARCH_HAS_SYNC_DMA_FOR_CPU_ALL causes kernel panics on BCM6358 when
++ * booting from TP1
++ */
++ if (read_c0_brcm_cmt_local() & (1 << 31))
++ bmips_dma_sync_disable = 1;
}
static void bcm6368_quirks(void)
diff --git a/target/linux/bmips/patches-5.15/501-net-dsa-b53-mmap-fix-enabled_ports.patch b/target/linux/bmips/patches-5.15/501-net-dsa-b53-mmap-fix-enabled_ports.patch
index 7d1fb7105d..375f391ba8 100644
--- a/target/linux/bmips/patches-5.15/501-net-dsa-b53-mmap-fix-enabled_ports.patch
+++ b/target/linux/bmips/patches-5.15/501-net-dsa-b53-mmap-fix-enabled_ports.patch
@@ -1,3 +1,19 @@
+From dadd7a1aa1eaebd5a03dee933c9051eae3724f00 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
+Date: Thu, 9 Mar 2023 19:18:07 +0100
+Subject: [PATCH] net: dsa: b53: mmap: fix device tree support
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+CPU port should also be enabled in order to get a working switch.
+
+Fixes: a5538a777b73 ("net: dsa: b53: mmap: Add device tree support")
+Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
+---
+ drivers/net/dsa/b53/b53_mmap.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
--- a/drivers/net/dsa/b53/b53_mmap.c
+++ b/drivers/net/dsa/b53/b53_mmap.c
@@ -263,7 +263,7 @@ static int b53_mmap_probe_of(struct plat
@@ -5,7 +21,7 @@
continue;
- if (reg < B53_CPU_PORT)
-+ if (reg <= B53_CPU_PORT)
++ if (reg < B53_N_PORTS)
pdata->enabled_ports |= BIT(reg);
}