linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Device tree and IO map_desc.
@ 2012-03-20 16:52 jonsmirl at gmail.com
  2012-03-21 13:09 ` Rob Herring
  0 siblings, 1 reply; 4+ messages in thread
From: jonsmirl at gmail.com @ 2012-03-20 16:52 UTC (permalink / raw)
  To: linux-arm-kernel

Is there a helper for building the IO map_desc from the device tree?

For example on Versatile. All of this map_io data is already in the
device tree, it is just repeated here.


DT_MACHINE_START(VERSATILE_PB, "ARM-Versatile (Device Tree Support)")
	.map_io		= versatile_map_io,
	.init_early	= versatile_init_early,
....
MACHINE_END

void __init versatile_map_io(void)
{
	iotable_init(versatile_io_desc, ARRAY_SIZE(versatile_io_desc));
}

static struct map_desc versatile_io_desc[] __initdata = {
	{
		.virtual	=  IO_ADDRESS(VERSATILE_SYS_BASE),
		.pfn		= __phys_to_pfn(VERSATILE_SYS_BASE),
		.length		= SZ_4K,
		.type		= MT_DEVICE
	}, {
		.virtual	=  IO_ADDRESS(VERSATILE_SIC_BASE),
		.pfn		= __phys_to_pfn(VERSATILE_SIC_BASE),
		.length		= SZ_4K,
		.type		= MT_DEVICE
	}, {
		.virtual	=  IO_ADDRESS(VERSATILE_VIC_BASE),
		.pfn		= __phys_to_pfn(VERSATILE_VIC_BASE),
		.length		= SZ_4K,
		.type		= MT_DEVICE
	}, {
...

-- 
Jon Smirl
jonsmirl at gmail.com

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

end of thread, other threads:[~2012-03-21 14:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-20 16:52 Device tree and IO map_desc jonsmirl at gmail.com
2012-03-21 13:09 ` Rob Herring
2012-03-21 14:23   ` jonsmirl at gmail.com
2012-03-21 14:37     ` Rob Herring

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).