Belisko Marek wrote: > On Tue, Oct 19, 2010 at 10:28 AM, Juergen Beisert <jbe@xxxxxxxxxxxxxx> wrote: > > Marek Belisko wrote: > >> This work is mainly based on a9m2440 board implementation > >> from Juergen Beisert <jbe@xxxxxxxxxxxxxx>. Functionality > >> was tested only running barebox from ram. Loading to flash > >> and booting will not work because missing lowlevel_init > >> functionality (lack of jtag debugger on my side ;)). > > > > I have now access to a mini2440 at Pengutronix. I will add this feature > > soon. > > > >> [...] > >> +static int mini2440_devices_init(void) > >> +{ > >> + Â Â uint32_t reg; > >> + > >> + Â Â reg = readl(BWSCON); > >> + > >> + Â Â /* CS#4 to access the network controller */ > >> + Â Â reg &= ~0x000f0000; > >> + Â Â reg |= Â0x000d0000; Â Â /* 16 bit */ > >> + Â Â writel(0x1f4c, BANKCON4); > >> + > >> + Â Â writel(reg, BWSCON); > >> + > >> + Â Â /* release the reset signal to external devices */ > >> + Â Â reg = readl(MISCCR); > >> + Â Â reg |= 0x10000; > >> + Â Â writel(reg, MISCCR); > >> + > >> + Â Â register_device(&nand_dev); > >> + Â Â register_device(&sdram_dev); > >> + Â Â register_device(&dm9000_dev); > >> +#ifdef CONFIG_NAND > >> + Â Â /* ----------- add some vital partitions -------- */ > >> + Â Â devfs_del_partition("self_raw"); > >> + Â Â devfs_add_partition("nand0", 0x00000, 0x40000, PARTITION_FIXED, > >> "self_raw"); + Â Â Â Âdev_add_bb_dev("self_raw", NULL); > >> + > >> + Â Â devfs_del_partition("env_raw"); > >> + Â Â devfs_add_partition("nand0", 0x40000, 0x20000, PARTITION_FIXED, > >> "env_raw"); + dev_add_bb_dev("env_raw", NULL); > >> +#endif > >> + Â Â armlinux_add_dram(&sdram_dev); > >> + Â Â armlinux_set_bootparams((void *)sdram_dev.map_base + 0x100); > >> + Â Â armlinux_set_architecture(MACH_TYPE_MINI2440); > >> + > >> + Â Â return 0; > >> +} > > > > We need some kind of management here, because the mini2440 comes with NOR > > and NAND flash. And both can be configured to boot the system from: We > > need a location to store the environment. Maybe in NOR, when booting from > > NOR, and in NAND, when booting form NAND? Or only one single location > > where to store the environment, independent from the boot source? Ideas? > > AFAIK NOR flash with supervivi bootloader is used just for repair content > of NAND flash when something goes wrong. Do we really need to store > barebox to NOR flash? We do not need it. But maybe we want it ;-) Why supervivi, when barebox supports the mini2440 completely? (okay, okay, needs more work....) jbe -- Pengutronix e.K. | Juergen Beisert | Linux Solutions for Science and Industry | Phone: +49-8766-939 228 | Vertretung Sued/Muenchen, Germany | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de/ | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox