public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: linux@roeck-us•net (Guenter Roeck)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v3 04/15] watchdog: orion: Handle IRQ
Date: Tue, 21 Jan 2014 06:31:02 -0800	[thread overview]
Message-ID: <52DE84A6.6090909@roeck-us.net> (raw)
In-Reply-To: <1390310774-20781-5-git-send-email-ezequiel.garcia@free-electrons.com>

On 01/21/2014 05:26 AM, Ezequiel Garcia wrote:
> DT-enabled where an irqchip driver for the brigde interrupt controller is
> available can handle the watchdog IRQ properly. Therefore, we request
> the interruption and add a dummy handler that merely calls panic().
>
> This is done in order to have an initial 'ack' of the interruption,
> which clears the watchdog state.
>
> Furthermore, since some platforms don't have such IRQ, this commit
> makes the interruption specification optional.
>
> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons•com>
> ---
>   .../devicetree/bindings/watchdog/marvel.txt        |  2 ++
>   drivers/watchdog/orion_wdt.c                       | 22 +++++++++++++++++++++-
>   2 files changed, 23 insertions(+), 1 deletion(-)
>

[ ... ]

>   static int orion_wdt_probe(struct platform_device *pdev)
>   {
>   	struct resource *res;
> -	int ret;
> +	int ret, irq;
>
>   	clk = devm_clk_get(&pdev->dev, NULL);
>   	if (IS_ERR(clk)) {
> @@ -131,6 +138,19 @@ static int orion_wdt_probe(struct platform_device *pdev)
>   	if (!wdt_reg)
>   		return -ENOMEM;
>
> +	irq = platform_get_irq(pdev, 0);
> +	if (irq > 0) {

0 is a valid interrupt number, and platform_get_irq returns an error code on errors.
Should be >= 0.

Guenter

  reply	other threads:[~2014-01-21 14:31 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-21 13:25 [PATCH v3 00/15] Armada 370/XP watchdog support Ezequiel Garcia
2014-01-21 13:26 ` [PATCH v3 01/15] ARM: Introduce atomic MMIO modify Ezequiel Garcia
2014-01-21 13:26 ` [PATCH v3 02/15] clocksource: orion: Use atomic access for shared registers Ezequiel Garcia
2014-01-21 13:26 ` [PATCH v3 03/15] watchdog: " Ezequiel Garcia
2014-01-21 13:26 ` [PATCH v3 04/15] watchdog: orion: Handle IRQ Ezequiel Garcia
2014-01-21 14:31   ` Guenter Roeck [this message]
2014-01-21 14:35     ` Ezequiel Garcia
2014-01-27  6:30     ` Ezequiel Garcia
2014-01-27  6:42       ` Guenter Roeck
2014-01-27  7:18         ` Ezequiel Garcia
2014-01-21 13:26 ` [PATCH v3 05/15] watchdog: orion: Make RSTOUT register a separate resource Ezequiel Garcia
2014-01-21 13:26 ` [PATCH v3 06/15] watchdog: orion: Remove unneeded BRIDGE_CAUSE clear Ezequiel Garcia
2014-01-21 13:26 ` [PATCH v3 07/15] watchdog: orion: Introduce an orion_watchdog device structure Ezequiel Garcia
2014-01-21 13:26 ` [PATCH v3 08/15] watchdog: orion: Introduce per-compatible of_device_id data Ezequiel Garcia
2014-01-21 16:35   ` Guenter Roeck
2014-01-22 17:06     ` Ezequiel Garcia
2014-01-21 13:26 ` [PATCH v3 09/15] watchdog: orion: Add per-compatible clock initialization Ezequiel Garcia
2014-01-21 13:26 ` [PATCH v3 10/15] watchdog: orion: Add per-compatible watchdog start implementation Ezequiel Garcia
2014-01-21 13:26 ` [PATCH v3 11/15] watchdog: orion: Add support for Armada 370 and Armada XP SoC Ezequiel Garcia
2014-01-21 16:41   ` Guenter Roeck
2014-01-21 13:26 ` [PATCH v3 12/15] ARM: mvebu: Enable Armada 370/XP watchdog in the devicetree Ezequiel Garcia
2014-01-21 13:26 ` [PATCH v3 13/15] ARM: kirkwood: Add RSTOUT 'reg' entry to devicetree Ezequiel Garcia
2014-01-21 13:26 ` [PATCH v3 14/15] watchdog: orion: Enable the build on ARCH_MVEBU Ezequiel Garcia
2014-01-21 13:26 ` [PATCH v3 15/15] ARM: mvebu: Enable watchdog support in defconfig Ezequiel Garcia

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=52DE84A6.6090909@roeck-us.net \
    --to=linux@roeck-us$(echo .)net \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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