[RFC PATCHv1 2/2] ARM: socfpga: Add board support for Altera's SOCFPGA Cyclone 5 HW

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Wed Jun 27 18:19:46 EDT 2012


Le Wed, 27 Jun 2012 23:06:00 +0200,
Pavel Machek <pavel at denx.de> a écrit :

> > Just like the IRQ numbers, those defines for I/O registers are no
> > longer needed with the device tree.
> 
> Yep. It shows we have more DT-ization to do.
> 
> arch/arm/mach-socfpga/include/mach/uncompress.h needs UART0
> base... but device tree is not easily accessible at that point, right?

Yes, for those you still need fixed addresses, defined by #define, as
the DT is not accessible yet.

> > > +	}, {
> > > +		.virtual	= IO_ADDRESS(SOCFPGA_CLKMGR_BASE),
> > > +		.pfn		= __phys_to_pfn(SOCFPGA_CLKMGR_BASE),
> > > +		.length		= SZ_4K,
> > > +		.type		= MT_DEVICE,
> > > +	},
> > > +};
> > 
> > Most of those static mappings should instead be turned into dynamic
> > mappings created with ioremap(), at least for the timers.
> 
> Dynamic mappings so that we can use device tree -- not constants?

Yes, that's at least one of the reason. I think there are others, but
last time there was a discussion about static vs. dynamic mappings, I'm
not sure I understood exactly the arguments on which ones should be
used in which situation.

> Thanks for great review,

You're welcome!

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com



More information about the linux-arm-kernel mailing list