From: "tip-bot2 for Lubomir Rintel" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Lubomir Rintel <lkundrak@v3.sk>, Marc Zyngier <maz@kernel.org>,
Pavel Machek <pavel@ucw.cz>, Ingo Molnar <mingo@kernel.org>,
Borislav Petkov <bp@alien8.de>,
linux-kernel@vger.kernel.org
Subject: [tip: irq/core] irqchip/mmp: Do not use of_address_to_resource() to get mux regs
Date: Fri, 06 Sep 2019 11:08:14 -0000 [thread overview]
Message-ID: <156776809499.24167.7572723147707304063.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20190822092643.593488-7-lkundrak@v3.sk>
The following commit has been merged into the irq/core branch of tip:
Commit-ID: d6a95280ba169c3a3d632d983cc6977c544a06e8
Gitweb: https://git.kernel.org/tip/d6a95280ba169c3a3d632d983cc6977c544a06e8
Author: Lubomir Rintel <lkundrak@v3.sk>
AuthorDate: Thu, 22 Aug 2019 11:26:29 +02:00
Committer: Marc Zyngier <maz@kernel.org>
CommitterDate: Fri, 30 Aug 2019 15:23:30 +01:00
irqchip/mmp: Do not use of_address_to_resource() to get mux regs
The "regs" property of the "mrvl,mmp2-mux-intc" devices are silly. They
are offsets from intc's base, not addresses on the parent bus. At this
point it probably can't be fixed.
On an OLPC XO-1.75 machine, the muxes are children of the intc, not the
axi bus, and thus of_address_to_resource() won't work. We should treat
the values as mere integers as opposed to bus addresses.
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Pavel Machek <pavel@ucw.cz>
Link: https://lore.kernel.org/r/20190822092643.593488-7-lkundrak@v3.sk
---
drivers/irqchip/irq-mmp.c | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/drivers/irqchip/irq-mmp.c b/drivers/irqchip/irq-mmp.c
index 0671c3b..f60e52b 100644
--- a/drivers/irqchip/irq-mmp.c
+++ b/drivers/irqchip/irq-mmp.c
@@ -422,9 +422,9 @@ IRQCHIP_DECLARE(mmp2_intc, "mrvl,mmp2-intc", mmp2_of_init);
static int __init mmp2_mux_of_init(struct device_node *node,
struct device_node *parent)
{
- struct resource res;
int i, ret, irq, j = 0;
u32 nr_irqs, mfp_irq;
+ u32 reg[4];
if (!parent)
return -ENODEV;
@@ -436,18 +436,22 @@ static int __init mmp2_mux_of_init(struct device_node *node,
pr_err("Not found mrvl,intc-nr-irqs property\n");
return -EINVAL;
}
- ret = of_address_to_resource(node, 0, &res);
- if (ret < 0) {
- pr_err("Not found reg property\n");
- return -EINVAL;
- }
- icu_data[i].reg_status = mmp_icu_base + res.start;
- ret = of_address_to_resource(node, 1, &res);
+
+ /*
+ * For historical reasons, the "regs" property of the
+ * mrvl,mmp2-mux-intc is not a regular "regs" property containing
+ * addresses on the parent bus, but offsets from the intc's base.
+ * That is why we can't use of_address_to_resource() here.
+ */
+ ret = of_property_read_variable_u32_array(node, "reg", reg,
+ ARRAY_SIZE(reg),
+ ARRAY_SIZE(reg));
if (ret < 0) {
pr_err("Not found reg property\n");
return -EINVAL;
}
- icu_data[i].reg_mask = mmp_icu_base + res.start;
+ icu_data[i].reg_status = mmp_icu_base + reg[0];
+ icu_data[i].reg_mask = mmp_icu_base + reg[2];
icu_data[i].cascade_irq = irq_of_parse_and_map(node, 0);
if (!icu_data[i].cascade_irq)
return -EINVAL;
next prev parent reply other threads:[~2019-09-06 11:10 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-22 9:26 [PATCH v2 00/20] Initial support for Marvell MMP3 SoC Lubomir Rintel
2019-08-22 9:26 ` [PATCH v2 01/20] dt-bindings: arm: cpu: Add Marvell MMP3 SMP enable method Lubomir Rintel
2019-08-22 9:26 ` [PATCH v2 02/20] dt-bindings: arm: Convert Marvell MMP board/soc bindings to json-schema Lubomir Rintel
2019-08-27 11:59 ` Rob Herring
2019-08-27 13:23 ` Lubomir Rintel
2019-08-27 13:36 ` Rob Herring
2019-08-22 9:26 ` [PATCH v2 03/20] dt-bindings: arm: mrvl: Document MMP3 compatible string Lubomir Rintel
2019-08-27 12:00 ` Rob Herring
2019-08-22 9:26 ` [PATCH v2 04/20] dt-bindings: mrvl,intc: Add a MMP3 interrupt controller Lubomir Rintel
2019-08-27 22:23 ` Rob Herring
2019-08-22 9:26 ` [PATCH v2 05/20] dt-bindings: phy-mmp3-usb: Add bindings Lubomir Rintel
2019-08-27 22:24 ` Rob Herring
2019-08-22 9:26 ` [PATCH v2 06/20] irqchip/mmp: do not use of_address_to_resource() to get mux regs Lubomir Rintel
2019-09-06 11:08 ` tip-bot2 for Lubomir Rintel [this message]
2020-03-09 16:25 ` Rob Herring
2020-03-09 16:28 ` Rob Herring
2019-08-22 9:26 ` [PATCH v2 07/20] irqchip/mmp: add missing chained_irq_{enter,exit}() Lubomir Rintel
2019-09-06 11:08 ` [tip: irq/core] irqchip/mmp: Add " tip-bot2 for Lubomir Rintel
2019-08-22 9:26 ` [PATCH v2 08/20] irqchip/mmp: mask off interrupts from other cores Lubomir Rintel
2019-09-06 11:08 ` [tip: irq/core] irqchip/mmp: Mask " tip-bot2 for Andres Salomon
2019-08-22 9:26 ` [PATCH v2 09/20] irqchip/mmp: coexist with GIC root IRQ controller Lubomir Rintel
2019-09-06 11:08 ` [tip: irq/core] irqchip/mmp: Coexist " tip-bot2 for Lubomir Rintel
2019-08-22 9:26 ` [PATCH v2 10/20] ARM: l2c: add definition for FWA in PL310 aux register Lubomir Rintel
2019-08-22 9:26 ` [PATCH v2 11/20] ARM: mmp: don't select CACHE_TAUROS2 on all ARCH_MMP Lubomir Rintel
2019-08-22 9:26 ` [PATCH v2 12/20] ARM: mmp: map the PGU as well Lubomir Rintel
2019-08-22 9:26 ` [PATCH v2 13/20] ARM: mmp: DT: convert timer driver to use TIMER_OF_DECLARE Lubomir Rintel
2019-08-22 9:26 ` [PATCH v2 14/20] ARM: mmp: define MMP_CHIPID by the means of CIU_REG() Lubomir Rintel
2019-08-22 9:26 ` [PATCH v2 15/20] ARM: mmp: add support for MMP3 SoC Lubomir Rintel
2019-08-22 9:26 ` [PATCH v2 16/20] ARM: mmp: add SMP support Lubomir Rintel
2019-08-22 16:36 ` Florian Fainelli
2019-08-23 7:13 ` Lubomir Rintel
2019-08-22 9:26 ` [PATCH v2 17/20] ARM: mmp: move cputype.h to include/linux/soc/ Lubomir Rintel
2019-08-22 9:26 ` [PATCH v2 18/20] ARM: mmp: remove MMP3 USB PHY registers from regs-usb.h Lubomir Rintel
2019-08-22 9:26 ` [PATCH v2 19/20] phy: phy-mmp3-usb: add a new driver Lubomir Rintel
2019-08-22 9:26 ` [PATCH v2 20/20] ARM: dts: mmp3: Add MMP3 SoC dts file Lubomir Rintel
2019-08-22 10:31 ` [PATCH v2 00/20] Initial support for Marvell MMP3 SoC Marc Zyngier
2019-08-22 16:23 ` Olof Johansson
2019-08-23 7:21 ` Lubomir Rintel
2019-08-23 9:42 ` Marc Zyngier
2019-08-26 11:59 ` Lubomir Rintel
2019-08-30 14:26 ` Marc Zyngier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=156776809499.24167.7572723147707304063.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=lkundrak@v3.sk \
--cc=maz@kernel.org \
--cc=mingo@kernel.org \
--cc=pavel@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).