On Sun, Jan 27, 2013 at 03:54:35PM +0100, Alexander Aring wrote: > > +static void create_sections(unsigned long addr, int size_m, unsigned int flags) > > +{ > > + int i; > > + > > + addr >>= 20; > > + > > + for (i = size_m; i > 0; i--, addr++) > > + ttb[addr] = (addr << 20) | flags; > > +} > > + > > +static void map_cachable(unsigned long start, unsigned long size) > > +{ > > + start &= ~(SZ_1M - 1); > > + size = (size + (SZ_1M - 1)) & ~(SZ_1M - 1); > Maybe we can use ALIGN macro from common.h here? > Only a small change, but it's easier to understand code. > I can send a patch for this, if you like that idea. > > Similar we can create a macro ALIGN_DOWN for start. Good idea. I'll integrate this when redoing this series. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox