[U-Boot] [PATCH 25/34] zynq: Add support to find bootmode

Tom Rini trini at ti.com
Tue Nov 5 20:47:33 CET 2013


On Tue, Nov 05, 2013 at 11:16:46PM +0530, Jagannadha Sutradharudu Teki wrote:

> Added support to find the bootmodes by reading
> slcr bootmode register. this can be helpful to
> autoboot the configurations w.r.t a specified bootmode.
> 
> Added this functionality on board_late_init as it's not
> needed for normal initializtion part.
> 
> Signed-off-by: Jagannadha Sutradharudu Teki <jaganna at xilinx.com>
[snip]
> +int board_late_init(void)
> +{
> +	switch ((zynq_slcr_get_boot_mode()) & BOOT_MODES_MASK) {
> +	case QSPI_MODE:
> +		setenv("modeboot", "qspiboot");
> +		break;
> +	case NAND_FLASH_MODE:
> +		setenv("modeboot", "nandboot");
> +		break;
> +	case NOR_FLASH_MODE:
> +		setenv("modeboot", "norboot");
> +		break;
> +	case SD_MODE:
> +		setenv("modeboot", "sdboot");
> +		break;
> +	case JTAG_MODE:
> +		setenv("modeboot", "jtagboot");
> +		break;
> +	default:
> +		setenv("modeboot", "");
> +		break;
> +	}

Please document this variable somewhere because I'd like to make use of
it on am335x/am43xx boards as well.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131105/a87a0ffd/attachment.pgp>


More information about the U-Boot mailing list