[Top] [All Lists]

Re: [PATCH] MIPS: add proper set_mode() to cevt-r4k

To: Florian Fainelli <>
Subject: Re: [PATCH] MIPS: add proper set_mode() to cevt-r4k
From: David Daney <>
Date: Wed, 31 Jul 2013 12:22:15 -0700
Cc: John Crispin <>, Linux-MIPS <>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=/LsFLiozx6360zatOgzF73MkInT4FcrZfMgBxH8VIhg=; b=Jh1W1cXOYdZuH0c8bOuC/VwAhRd0o8Igs3vbVioA8xskA6Uyp2riqc+J7jTrfvXkCk up8H7XMpR08DqLtDzBxxziXxS3pBGZvFqzqVKhF0DJ0vjOQ8k3azp/hc7oxWn9UM5cah BnG/1A6oW74zxmW6u7vvJ7EJhjSgns8zb4vmQMWKhmcYw+QlZl5Qg0x2pSmOyf0SXpVU cPQGJT9EFXjLjZVofglJoWe27fHAIhQmnpJcVRzR1sAtoNS9x4cs/9M5zLsVhTELFM14 iASCfCl1YAEandeTxY4RKcJyqWJYD+ioRzopOKTf4KAXP9OT7fcEF5d2QTUpel/0Sm0a AAaw==
In-reply-to: <>
List-archive: <>
List-help: <>
List-id: linux-mips <>
List-owner: <>
List-post: <>
List-software: Ecartis version 1.0.0
List-subscribe: <>
List-unsubscribe: <>
Original-recipient: rfc822;
References: <> <> <> <>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7
On 07/29/2013 04:14 AM, Florian Fainelli wrote:
2013/7/29 John Crispin <>:

It looks to me like you are moving the irq setup later just to ensure
that your ralink clockevent device has been registered before and has
set cp0_timer_irq_installed when the set_mode() r4k clockevent device
runs, such that it won't register the same IRQ that your platforms
uses. If that it the case, cannot you just ensure that you run your
cevt device registration before mips_clockevent_init() is called?

i dont like relying on the order in which the modules get loaded.

plat_time_init() runs before mips_clockevent_init() and the ordering
is explicit, would not that work for what you are trying to do?

the actual problem is not the irq sharing but that the cevt-r4k registers
the irq when the cevt is registered and not when it is activated. i believe
that the patch fixes this problem

Your patch certainly does what you say it does, but that is kind of an
abuse of the set_mode() callback.

I might as add my $0.02...

There are many other clockevent drivers that do this type of thing aren't there? The clockevent framework uses this to install/remove/switch drivers, so why should cevt-r4k not be made to work like this?

David Daney

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