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