[PATCH 1/1] at91: add support for the at91sam9263ek board of Atmel

Sascha Hauer s.hauer at pengutronix.de
Thu Oct 29 03:43:27 EDT 2009


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.

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 |




More information about the u-boot-v2 mailing list