devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* machine_is_dt() ?
@ 2013-01-06 13:18 Andrew Lunn
       [not found] ` <20130106131805.GQ17242-g2DYL2Zd6BY@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Lunn @ 2013-01-06 13:18 UTC (permalink / raw)
  To: linux ARM, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

Hi Folks

I'm moving the cpuidle code for Kirkwood into drivers/cpuidle. I'm
following the way cpuidle-calxeda.c instantiates the driver, it uses
module_init(calxeda_cpuidle_init) and calxeda_cpuidle_init() uses
of_machine_is_compatible("calxeda,highbank") so only loading the
driver in a ARCH_MULTIPLATFORM kernel when needed.

I can follow this model for when kirkwood is booted using device
tree. However, i would also like to use the driver for those boards
which are not yet converted to DT. In that situation, we have a kernel
dedicate to kirkwood and the cpuidle driver is always relevant.

Thus i need to code something like:

(of_machine_is_compatible("marvell, kirkwood") ||
 !machine_is_dt())

However, there is no macro machine_is_dt().

Is there a way to tell if a machine has been booted using a machine
number as opposed to DT?

Thanks
       Andrew

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-01-08  0:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-06 13:18 machine_is_dt() ? Andrew Lunn
     [not found] ` <20130106131805.GQ17242-g2DYL2Zd6BY@public.gmane.org>
2013-01-06 13:41   ` Russell King - ARM Linux
     [not found]     ` <20130106134113.GD2631-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2013-01-06 14:08       ` Andrew Lunn
     [not found]         ` <20130106140821.GR17242-g2DYL2Zd6BY@public.gmane.org>
2013-01-07 14:59           ` Rob Herring
     [not found]             ` <50EAE2DD.805-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-01-07 23:14               ` Linus Walleij
2013-01-08  0:48   ` Shawn Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).