[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1822564.TIKVDZSzqK@wuerfel>
Date:	Mon, 03 Jun 2013 12:26:49 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Heiko Stübner <heiko@...ech.de>
Cc:	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	John Stultz <john.stultz@...aro.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Mike Turquette <mturquette@...aro.org>,
	Seungwon Jeon <tgih.jun@...sung.com>,
	Jaehoon Chung <jh80.chung@...sung.com>,
	Chris Ball <cjb@...top.org>, linux-mmc@...r.kernel.org,
	Grant Likely <grant.likely@...aro.org>,
	Rob Herring <rob.herring@...xeda.com>,
	Linus Walleij <linus.walleij@...aro.org>,
	devicetree-discuss@...ts.ozlabs.org,
	Russell King <linux@....linux.org.uk>,
	Olof Johansson <olof@...om.net>
Subject: Re: [PATCH 10/10] arm: add basic support for Rockchip RK3066a boards
On Monday 03 June 2013 11:46:57 Heiko Stübner wrote:
> 
> The timers are of the same type and the clocksource driver just grabs the 
> first of them as clockevent and the second as clocksource, so I think two 
> CLOCKSOURCE_OF_DECLARE lines won't do.
Ok, got it. I was confused by the fact that the existing two sets of
"compatible" strings have separate sets of strings:
static const struct of_device_id sptimer_ids[] __initconst = {
        { .compatible = "picochip,pc3x2-rtc" },
        { .compatible = "snps,dw-apb-timer-sp" },
        { /* Sentinel */ },
};
static const struct of_device_id osctimer_ids[] __initconst = {
        { .compatible = "picochip,pc3x2-timer" },
        { .compatible = "snps,dw-apb-timer-osc" },
        {},
};
and thought they were for clocksource and clockevent respectively,
which is wrong.
> But I just looked at clocksource_of_init a bit more closely, which does a 
> for_each_matching_node_and_match over the nodes. So the init_func could grab 
> the device for the clockevent on the first call and the clocksource when it 
> gets called for the second matching node.
Yes, I think that should work. You just have to be careful about calling
init_sched_clock() only once.
	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists