+1 for getting something common. On i.MX we currently use the barebox_loc environment variable. Not that I you should do the same for Atmel, but we should come up with something both i.MX and Atmel can be converted to. > + > + dev = add_generic_device_res("bootloc", DEVICE_ID_SINGLE, NULL, 0, NULL); I know you are concerned about performance when the single 'global' device has many variables. I think the performance can be greatly improved by making sure the global device is the first one to be registered. IMO adding a new device for every fart in the system does not improve the situation. > +enum at91_soc_boot_from { > + AT91_BOOT_FROM_UNKNOWN, > + AT91_BOOT_FROM_SPI, > + AT91_BOOT_FROM_MCI, > + AT91_BOOT_FROM_SMC, > + AT91_BOOT_FROM_TWD, > +}; > + > +enum at91_soc_boot_media { > + AT91_BOOT_MEDIA_UNKNOWN, > + AT91_BOOT_MEDIA_SD, > + AT91_BOOT_MEDIA_MMC, > + AT91_BOOT_MEDIA_EMMC, > + AT91_BOOT_MEDIA_AT45, > + AT91_BOOT_MEDIA_AT25, > + AT91_BOOT_MEDIA_NAND, > + AT91_BOOT_MEDIA_NOR, > +}; Hm. For NAND/NOR the first array does not contain useful information, for MCI the second array does not contain useful information. For I2C/SPI both arrays seem redundant. Why not merge them into one? 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