linux-mips
[Top] [All Lists]

Re: [PATCH 16/18] MIPS: ralink: add support for periodic timer irq

To: John Crispin <blogic@openwrt.org>
Subject: Re: [PATCH 16/18] MIPS: ralink: add support for periodic timer irq
From: Lars-Peter Clausen <lars@metafoo.de>
Date: Wed, 10 Apr 2013 15:41:24 +0200
Cc: Ralf Baechle <ralf@linux-mips.org>, Gabor Juhos <juhosg@openwrt.org>, linux-mips@linux-mips.org
In-reply-to: <1365594447-13068-17-git-send-email-blogic@openwrt.org>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1365594447-13068-1-git-send-email-blogic@openwrt.org> <1365594447-13068-17-git-send-email-blogic@openwrt.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12
On 04/10/2013 01:47 PM, John Crispin wrote:
> +
> +static int rt_timer_request(struct rt_timer *rt)
> +{
> +     int err = request_irq(rt->irq, rt_timer_irq, IRQF_DISABLED,

IRQF_DISABLED is deprecated and a no-op these dats since all interrupts run
with IRQs disabled, it shouldn't be used in new code.

> +                                             dev_name(rt->dev), rt);
> +     if (err) {
> +             dev_err(rt->dev, "failed to request irq\n");
> +     } else {
> +             u32 t = TMR0CTL_MODE_PERIODIC | TMR0CTL_PRESCALE_VAL;
> +             rt_timer_w32(rt, TIMER_REG_TMR0CTL, t);
> +     }
> +     return err;
> +}

<Prev in Thread] Current Thread [Next in Thread>