On 08:43 Thu 29 Oct , Sascha Hauer wrote: > Hi Jean, > > [snip] > > > +}; > > + > > +static int at91sam9263ek_devices_init(void) > > +{ > > + /* > > + * PB27 enables the 50MHz oscillator for Ethernet PHY > > + * 1 - enable > > + * 0 - disable > > + */ > > + at91_set_gpio_output(AT91_PIN_PB27, 1); > > + at91_set_gpio_value(AT91_PIN_PB27, 1); /* 1- enable, 0 - disable */ > > + > > + /* Enable clock */ > > + at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9263_ID_EMAC); > > + > > + at91_add_device_sdram(64 * 1024 * 1024); > > + ek_add_device_nand(); > > + at91_add_device_eth(&macb_pdata); > > + register_device(&cfi_dev); > > + > > +#if defined(CONFIG_DRIVER_CFI) || defined(CONFIG_DRIVER_CFI_OLD) > > + devfs_add_partition("nor0", 0x00000, 0x40000, PARTITION_FIXED, "self"); > > + devfs_add_partition("nor0", 0x40000, 0x20000, PARTITION_FIXED, "env0"); > > +#elif defined(CONFIG_NAND_ATMEL) > > + devfs_add_partition("nand0", 0x00000, 0x80000, PARTITION_FIXED, "self_raw"); > > + dev_add_bb_dev("self_raw", "self0"); > > + devfs_add_partition("nand0", 0x40000, 0x40000, PARTITION_FIXED, "env_raw"); > > + dev_add_bb_dev("env_raw", "env0"); > > +#endif > > What if both NAND and NOR drivers are selected? On our Freescale boards > we can detect from which device we actually booted and add these > partitions arcordingly. I don't know if that's possible here, but I > think the user wouldn't expect the environment in NOR if he is booting > from NAND. Unfortunatetly not on the AT91SAM9 soc of I'd do it dynamcly as you suggest maybe we could do it in the next generation ;-) Best Regards, J.