bmips: irq-bcm6345-l1: register memory region
authorÁlvaro Fernández Rojas <noltari@gmail.com>
Thu, 16 Mar 2023 18:20:23 +0000 (19:20 +0100)
committerÁlvaro Fernández Rojas <noltari@gmail.com>
Thu, 16 Mar 2023 19:49:47 +0000 (20:49 +0100)
Add new patch sent upstream for requesting the memory region in the bcm6345-l1
interrupt controller.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
target/linux/bmips/patches-5.15/210-irqchip-bcm-6345-l1-request-memory-region.patch [new file with mode: 0644]

diff --git a/target/linux/bmips/patches-5.15/210-irqchip-bcm-6345-l1-request-memory-region.patch b/target/linux/bmips/patches-5.15/210-irqchip-bcm-6345-l1-request-memory-region.patch
new file mode 100644 (file)
index 0000000..7db38f2
--- /dev/null
@@ -0,0 +1,38 @@
+From b5c07b7bceed9287647697408423acd08f97db73 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
+Date: Thu, 16 Mar 2023 18:42:41 +0100
+Subject: [PATCH] irqchip/bcm-6345-l1: request memory region
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Request memory region in order to display it in /proc/iomem.
+Also stop printing the MMIO address since it just displays (ptrval).
+
+Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
+---
+ drivers/irqchip/irq-bcm6345-l1.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/irqchip/irq-bcm6345-l1.c
++++ b/drivers/irqchip/irq-bcm6345-l1.c
+@@ -261,6 +261,9 @@ static int __init bcm6345_l1_init_one(st
+       if (!cpu->map_base)
+               return -ENOMEM;
++      if (!request_mem_region(res.start, sz, res.name))
++              pr_err("Failed to request intc memory");
++
+       for (i = 0; i < n_words; i++) {
+               cpu->enable_cache[i] = 0;
+               __raw_writel(0, cpu->map_base + reg_enable(intc, i));
+@@ -339,8 +342,7 @@ static int __init bcm6345_l1_of_init(str
+       for_each_cpu(idx, &intc->cpumask) {
+               struct bcm6345_l1_cpu *cpu = intc->cpus[idx];
+-              pr_info("  CPU%u at MMIO 0x%p (irq = %d)\n", idx,
+-                              cpu->map_base, cpu->parent_irq);
++              pr_info("  CPU%u (irq = %d)\n", idx, cpu->parent_irq);
+       }
+       return 0;