From: plagnioj@jcrosoft.com (Jean-Christophe PLAGNIOL-VILLARD)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 09/14] at91: switch pit timer to early platform devices
Date: Sat, 30 Apr 2011 03:36:58 +0200 [thread overview]
Message-ID: <20110430013658.GC1212@game.jcrosoft.org> (raw)
In-Reply-To: <20110429092812.GA17290@n2100.arm.linux.org.uk>
On 10:28 Fri 29 Apr , Russell King - ARM Linux wrote:
> On Fri, Apr 29, 2011 at 01:38:23AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 22:46 Thu 28 Apr , Russell King - ARM Linux wrote:
> > > On Thu, Apr 28, 2011 at 10:47:37PM +0200, Andrew Victor wrote:
> > > > hi Russell,
> > > >
> > > > >> I think it would be cleaner still if the "struct sys_timer" could
> > > > >> include a register-base-address field. ?Russell?
> > > > >
> > > > > That's not really what all platforms want, and with the advent of
> > > > > clocksources and clock events, I think the sys_timer thing is mostly
> > > > > dead.
> > > >
> > > > How would those systems initialize the system-timer?
> > > > An "init_timer" method in the machine-description?
> > >
> > > I was thinking of an init_timekeeping() callback in the machine record
> > > rather than having platforms provide a useless sys_timer structure, and
> > > maybe having an ARM generic init_legacy_timekeeping() function for those
> > > platforms which still use sys_timer() to put into the init_timekeeping()
> > > hook.
> > >
> > > I've not really firmed up the idea yet though.
> > >
> > > Alternatively, if someone wants to come up with a better way to initialize
> > > the clocksource and clock event stuff across all platforms...
> >
> > I propose we use early device as I did and Magnus did on SH-Mobile
> >
> > we will have a common early param "earlytimer"
> >
> > then we register the drivers like this
> >
> > early_platform_init("earlytimer", &time_device_driver);
> >
> > and in the arm init we just have to do
> > early_platform_driver_register_all("earlytimer");
> > and call
> > early_platform_driver_probe("earlytimer", 1 , 0);
> > or let the platform do so as some of them may have more than 1 timer to
> > register example on shmobile
> >
> > We could also have two init one for soc one for machine
> > if (machine_time_init)
> > machine_time_init()
> > else
> > soc_time_init()
> >
> > as the timer is not really is ofen not machine specific but platform specific.
> > I see that on shmobile, at91 (3 timers sam9, rm9200, x40), nomadok, and other
> >
> > This will simplify timer sharing across architecture such shmobile arm and sh
> > for renesas but other vendor get the same issue when they soc on different
> > architecture
>
> It doesn't sound like this eliminates anything - it just makes things
> more complex. It seems we _still_ need a callback into the platform
> code to execute some kind of initialization, eg calling
> early_platform_driver_* with appropriate arguments. So I'm not sure
> what we're saving by effectively breaking the initialization function
> out into two separate functions and an early platform driver thing.
>
> It all sounds much more complex to me with very little benefit for the
> majority of platforms, and it doesn't seem to change what's required
> from core code at all - we still need to provide an initialization
> call into platform code at the appropriate time.
yes we still need a calback to call the early probe
but just a callback for the init no resume, suspend
if we want multiple timer early which I do not think is necessarly
for really early one timer is enough if you need more you can initialise them
later
so if we keep this constrain
in the arm timer init
early_platform_driver_register_all("earlytimer");
early_platform_driver_probe("earlytimer", 1 , 0);
and in the init_early you just need to do
early_platform_add_devices(devices, nb);
so it's more generic
Best Regards,
J.
next prev parent reply other threads:[~2011-04-30 1:36 UTC|newest]
Thread overview: 85+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-25 18:08 [PATCH 0/14] at91: factorize soc init and switch to early platform Jean-Christophe PLAGNIOL-VILLARD
2011-04-25 18:31 ` [PATCH 01/14] at91rm9200: introduce at91rm9200_set_type to specficy cpu package Jean-Christophe PLAGNIOL-VILLARD
2011-04-25 18:31 ` [PATCH 02/14] at91: introduce commom AT91_BASE_SYS Jean-Christophe PLAGNIOL-VILLARD
2011-04-25 21:48 ` Ryan Mallon
2011-04-26 4:27 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-25 18:31 ` [PATCH 03/14] at91: factorize at91 interrupts init to soc Jean-Christophe PLAGNIOL-VILLARD
2011-04-25 21:52 ` Ryan Mallon
2011-04-25 22:11 ` H Hartley Sweeten
2011-04-26 17:29 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-26 22:04 ` Andrew Victor
2011-04-26 23:39 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-28 11:43 ` Russell King - ARM Linux
2011-04-25 18:31 ` [PATCH 04/14 v2] at91: merge board usb-a9260 and usb-a9263 together Jean-Christophe PLAGNIOL-VILLARD
2011-04-25 18:31 ` [PATCH 05/14] at91: use structure to store the current soc Jean-Christophe PLAGNIOL-VILLARD
2011-04-25 22:08 ` Ryan Mallon
2011-04-26 4:21 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-26 4:44 ` Ryan Mallon
2011-04-26 6:42 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-26 20:22 ` Ryan Mallon
2011-04-26 23:45 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-27 0:13 ` Ryan Mallon
2011-04-27 1:27 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-27 1:47 ` Ryan Mallon
2011-04-27 3:18 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-27 3:41 ` Ryan Mallon
2011-04-28 14:04 ` Andrew Victor
2011-04-28 14:10 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-28 20:20 ` Ryan Mallon
2011-04-28 23:06 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-28 23:24 ` Ryan Mallon
2011-04-29 2:10 ` Ryan Mallon
2011-04-29 8:32 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-29 8:35 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-29 8:50 ` Ryan Mallon
2011-05-02 15:38 ` Jean-Christophe PLAGNIOL-VILLARD
2011-05-02 20:25 ` Ryan Mallon
2011-05-02 20:24 ` Jean-Christophe PLAGNIOL-VILLARD
2011-05-02 20:38 ` Ryan Mallon
2011-05-02 20:51 ` Jean-Christophe PLAGNIOL-VILLARD
2011-05-02 21:27 ` Ryan Mallon
2011-05-02 21:29 ` Jean-Christophe PLAGNIOL-VILLARD
2011-05-02 22:05 ` Ryan Mallon
2011-05-02 22:06 ` Jean-Christophe PLAGNIOL-VILLARD
2011-05-02 22:32 ` Ryan Mallon
2011-05-02 22:41 ` Jean-Christophe PLAGNIOL-VILLARD
2011-05-02 23:16 ` Russell King - ARM Linux
2011-05-02 23:16 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-25 18:31 ` [PATCH 06/14 v3] at91: switch to CLKDEV_LOOKUP Jean-Christophe PLAGNIOL-VILLARD
2011-04-25 18:31 ` [PATCH 07/14] at91: switch gpio to early platfrom device Jean-Christophe PLAGNIOL-VILLARD
2011-04-25 22:51 ` Ryan Mallon
2011-04-26 4:11 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-25 18:31 ` [PATCH 08/14] at91: move gpio to drivers/gpio Jean-Christophe PLAGNIOL-VILLARD
2011-04-25 18:31 ` [PATCH 09/14] at91: switch pit timer to early platform devices Jean-Christophe PLAGNIOL-VILLARD
2011-04-28 5:07 ` Ryan Mallon
2011-04-28 11:23 ` Andrew Victor
2011-04-28 11:34 ` Russell King - ARM Linux
2011-04-28 13:15 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-28 16:56 ` Andrew Victor
2011-04-28 17:33 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-28 18:15 ` Russell King - ARM Linux
2011-04-28 20:47 ` Andrew Victor
2011-04-28 21:46 ` Russell King - ARM Linux
2011-04-28 23:38 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-29 9:28 ` Russell King - ARM Linux
2011-04-30 1:36 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2011-05-08 10:08 ` Russell King - ARM Linux
2011-05-08 10:44 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-29 7:55 ` Greg Ungerer
2011-04-29 6:08 ` Tony Lindgren
2011-04-29 8:31 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-25 18:31 ` [PATCH 10/14] at91: switch st " Jean-Christophe PLAGNIOL-VILLARD
2011-04-25 18:40 ` [PATCH 11/14] at91: move pit timer to drivers/clocksource Jean-Christophe PLAGNIOL-VILLARD
2011-04-25 19:14 ` [PATCH 12/14] at91: move st " Jean-Christophe PLAGNIOL-VILLARD
2011-04-26 1:11 ` [PATCH 13/14] at91: move register clocks to soc generic init Jean-Christophe PLAGNIOL-VILLARD
2011-04-26 3:13 ` Ryan Mallon
2011-04-26 1:11 ` [PATCH 14/14] at91: move clock subsystem init " Jean-Christophe PLAGNIOL-VILLARD
2011-04-26 3:13 ` Ryan Mallon
2011-04-26 4:13 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-26 4:32 ` Ryan Mallon
2011-04-26 4:32 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-27 21:13 ` [PATCH 0/14] at91: factorize soc init and switch to early platform Ryan Mallon
2011-04-28 2:26 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-28 2:41 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-28 3:59 ` Ryan Mallon
2011-04-28 4:14 ` Jean-Christophe PLAGNIOL-VILLARD
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=20110430013658.GC1212@game.jcrosoft.org \
--to=plagnioj@jcrosoft.com \
--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.