From: slash.tmp@free.fr (Mason)
To: linux-arm-kernel@lists.infradead.org
Subject: Steps to submit a new arch/arm port
Date: Mon, 28 Sep 2015 15:48:51 +0200 [thread overview]
Message-ID: <56094543.2040101@free.fr> (raw)
In-Reply-To: <144297172.JfjI0hNJ9J@wuerfel>
On 22/09/2015 16:51, Arnd Bergmann wrote:
> On Tuesday 22 September 2015 16:36:48 Mason wrote:
>
>> +void __init tangox_timer_init(void)
>> +{
>> + int err;
>> +
>> + clkgen_base = ioremap(CLKGEN_BASE, 0x100);
>
> Remove all hardcoded physical memory addresses.
>
>> + if (clkgen_base == NULL) return;
>> +
>> + register_current_timer_delay(&delay_timer);
>> + sched_clock_register(read_sched_clock, 32, XTAL_FREQ);
>> +
>> + err = clocksource_register_hz(&tangox_xtal, XTAL_FREQ);
>> + if (err) pi_alert("Failed to register tangox_xtal clocksource!\n");
>> +
>> + tangox_clock_tree_register();
>> +
>> + of_clk_init(NULL);
>> + clocksource_of_init();
>> +}
>
> CLK_OF_DECLARE() for the clk
>
> CLOCKSOURCE_OF_DECLARE() for the clocksource/clockevent
>
> Make these two drivers.
Hmmm, about that (splitting clock-tango.c in two drivers)
The "legacy" order of calls was:
register_current_timer_delay
sched_clock_register
clocksource_register_hz
/* Should the above 3 be called in a different order? */
then
tangox_clock_tree_register
then
of_clk_init
clocksource_of_init
/* To invoke the smp_twd OF init, after the clock tree is registered */
I moved the first three to a separate clocksource driver:
static void __init tango_timer_init(struct device_node *np)
{
clkgen_base = of_iomap(np, 0);
register_current_timer_delay(&delay_timer);
sched_clock_register(read_sched_clock, 32, XTAL_FREQ);
clocksource_register_hz(&tango_xtal, XTAL_FREQ);
}
CLOCKSOURCE_OF_DECLARE(tango, "sigma,tango-xtal", tango_timer_init);
But tango_timer_init() is not being called...
I updated my device tree with
tango-xtal at 10000 {
compatible = "sigma,tango-xtal";
reg = <0x10000 0x100>;
};
Shouldn't the kernel call tango_timer_init?
Regards.
next prev parent reply other threads:[~2015-09-28 13:48 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-21 15:00 Steps to submit a new arch/arm port Mason
2015-09-21 15:49 ` Arnd Bergmann
2015-09-22 14:36 ` Mason
2015-09-22 14:51 ` Arnd Bergmann
2015-09-22 14:56 ` Russell King - ARM Linux
2015-09-22 15:54 ` Mason
2015-09-22 16:29 ` Russell King - ARM Linux
2015-09-23 8:49 ` Mason
2015-09-23 9:13 ` Russell King - ARM Linux
2015-09-23 9:21 ` Mason
2015-09-23 9:26 ` Russell King - ARM Linux
2015-09-22 19:15 ` Arnd Bergmann
2015-09-23 9:26 ` Mason
2015-09-23 9:34 ` Arnd Bergmann
2015-09-25 13:06 ` Mason
2015-09-25 13:17 ` Arnd Bergmann
2015-09-25 13:35 ` Mason
2015-09-25 14:11 ` Arnd Bergmann
2015-09-25 15:28 ` Mason
2015-09-25 15:33 ` Mason
2015-09-25 15:49 ` Arnd Bergmann
2015-09-25 15:52 ` Arnd Bergmann
2015-09-25 16:09 ` Mason
2015-09-25 17:20 ` Arnd Bergmann
2015-09-28 13:48 ` Mason [this message]
2015-09-28 14:43 ` Måns Rullgård
2015-09-28 16:32 ` Mason
2015-09-28 17:29 ` Russell King - ARM Linux
2015-09-22 15:48 ` Måns Rullgård
2015-09-25 9:27 ` Mason
2015-09-25 9:46 ` Javier Martinez Canillas
2015-09-25 11:56 ` Arnd Bergmann
2015-09-25 12:06 ` Russell King - ARM Linux
2015-09-21 15:51 ` Måns Rullgård
2015-09-21 16:13 ` Russell King - ARM Linux
2015-09-22 16:08 ` Mason
2015-09-22 16:24 ` Russell King - ARM Linux
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=56094543.2040101@free.fr \
--to=slash.tmp@free.fr \
--cc=linux-arm-kernel@lists.infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.