From: "Andreas Färber" <afaerber@suse.de>
To: linux-arm-kernel@lists.infradead.org,
linux-clk <linux-clk@vger.kernel.org>
Cc: "Thomas Gleixner" <tglx@linutronix.de>,
"Jason Cooper" <jason@lakedaemon.net>,
"Marc Zyngier" <marc.zyngier@arm.com>,
蒋丽琴 <jiang.liqin@geniatech.com>,
linux-kernel@vger.kernel.org, "Roc He" <hepeng@zidoo.tv>
Subject: Re: [RFC 3/3] irqchip: Add Realtek RTD1295 mux driver
Date: Sun, 20 Aug 2017 03:44:20 +0200 [thread overview]
Message-ID: <32b536aa-36df-33fc-36f0-da974e480fea@suse.de> (raw)
In-Reply-To: <20170817101140.32000-4-afaerber@suse.de>
Am 17.08.2017 um 12:11 schrieb Andreas Färber:
> This irq mux driver is derived from the RTD1295 vendor DT and assumes a linear
> mapping between intr_en and intr_status registers. Code for RTD119x indicates
> this may not always be the case (i2c_3).
>
> The register initialization was copied from QNAP's mach-rtk119x/rtk_irq_mux.c
> as a boot fix, without full insights into what exactly this is changing (TODO).
>
> Signed-off-by: Andreas Färber <afaerber@suse.de>
[...]
> diff --git a/drivers/irqchip/irq-rtd119x-mux.c b/drivers/irqchip/irq-rtd119x-mux.c
> new file mode 100644
> index 000000000000..c6c1ba126bf3
> --- /dev/null
> +++ b/drivers/irqchip/irq-rtd119x-mux.c
[...]
> +static int __init rtd119x_irq_mux_init(struct device_node *node,
> + struct device_node *parent,
> + const struct rtd119x_irq_mux_info *info)
> +{
> + struct rtd119x_irq_mux_data *data;
> + void __iomem *base;
> + u32 val;
[...]
> + /* TODO Investigate why these are necessary (from downstream rtk119x rtk_irq_mux.c) */
> + val = readl(data->intr_en);
> + val &= ~BIT(2);
> + writel(val, data->intr_en);
> +
> + writel(BIT(2), data->intr_status);
This intr_status write appears to be the fix. The register is 0x00000004
before, but oddly writing it again resolves the observed timer hang.
The intr_en register is 0xe0183924 before, and masking out bit 2 makes
no observable difference.
> +
> + irq_set_chained_handler_and_data(data->irq, rtd119x_mux_irq_handle, data);
> +
> + return 0;
> +}
[snip]
Regards,
Andreas
--
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
prev parent reply other threads:[~2017-08-20 1:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-17 10:11 [RFC 0/3] arm64: Realtek RTD1295 IRQ mux Andreas Färber
2017-08-17 10:11 ` [RFC 1/3] dt-bindings: interrupt-controller: Add Realtek RTD1295 Andreas Färber
2017-08-22 2:14 ` Rob Herring
2017-08-25 19:41 ` Andreas Färber
2017-08-17 10:11 ` [RFC 2/3] arm64: dts: realtek: Add irq mux to RTD1295 Andreas Färber
2017-08-17 10:11 ` [RFC 3/3] irqchip: Add Realtek RTD1295 mux driver Andreas Färber
2017-08-18 10:53 ` Marc Zyngier
2017-08-18 17:21 ` Andreas Färber
2017-08-18 17:47 ` Marc Zyngier
2017-08-20 1:44 ` Andreas Färber [this message]
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=32b536aa-36df-33fc-36f0-da974e480fea@suse.de \
--to=afaerber@suse.de \
--cc=hepeng@zidoo.tv \
--cc=jason@lakedaemon.net \
--cc=jiang.liqin@geniatech.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®