mirror of
				https://github.com/smaeul/u-boot.git
				synced 2025-11-03 21:48:15 +00:00 
			
		
		
		
	- In ARMv8 NXP Layerscape platforms we also need to make use of CONFIG_SYS_RELOC_GD_ENV_ADDR now, do so. - On ENV_IS_IN_REMOTE, CONFIG_ENV_OFFSET is never used, drop the define to 0. - Add Kconfig entry for ENV_ADDR. - Make ENV_ADDR / ENV_OFFSET depend on the env locations that use it. - Add ENV_xxx_REDUND options that depend on their primary option and SYS_REDUNDAND_ENVIRONMENT - On a number of PowerPC platforms, use SPL_ENV_ADDR not CONFIG_ENV_ADDR for the pre-main-U-Boot environment location. - On ENV_IS_IN_SPI_FLASH, check not for CONFIG_ENV_ADDR being set but rather it being non-zero, as it will now be zero by default. - Rework the env_offset absolute in env/embedded.o to not use CONFIG_ENV_OFFSET as it was the only use of ENV_OFFSET within ENV_IS_IN_FLASH. - Migrate all platforms. Cc: Wolfgang Denk <wd@denx.de> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Patrick Delaunay <patrick.delaunay@st.com> Cc: uboot-stm32@st-md-mailman.stormreply.com Signed-off-by: Tom Rini <trini@konsulko.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
		
			
				
	
	
		
			105 lines
		
	
	
		
			3.1 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			105 lines
		
	
	
		
			3.1 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
/* SPDX-License-Identifier: GPL-2.0+ */
 | 
						|
/*
 | 
						|
 * Configuration settings for the VInCo platform.
 | 
						|
 *
 | 
						|
 * Based on the settings for the SAMA5-EK board
 | 
						|
 * Copyright (C) 2014 Atmel
 | 
						|
 *		      Bo Shen <voice.shen@atmel.com>
 | 
						|
 * Copyright (C) 2015 Free Electrons
 | 
						|
 *		      Gregory CLEMENT gregory.clement@free-electrons.com
 | 
						|
 */
 | 
						|
 | 
						|
#ifndef __CONFIG_H
 | 
						|
#define __CONFIG_H
 | 
						|
 | 
						|
#include "at91-sama5_common.h"
 | 
						|
 | 
						|
/* The value in the common file is too far away for the VInCo platform */
 | 
						|
 | 
						|
/* serial console */
 | 
						|
#define CONFIG_ATMEL_USART
 | 
						|
#define CONFIG_USART_BASE		0xfc00c000
 | 
						|
#define CONFIG_USART_ID			30
 | 
						|
 | 
						|
/* Timer */
 | 
						|
#define CONFIG_SYS_TIMER_COUNTER	0xfc06863c
 | 
						|
 | 
						|
/* SDRAM */
 | 
						|
#define CONFIG_SYS_SDRAM_BASE           0x20000000
 | 
						|
#define CONFIG_SYS_SDRAM_SIZE		0x4000000
 | 
						|
 | 
						|
#define CONFIG_SYS_INIT_SP_ADDR \
 | 
						|
	(CONFIG_SYS_SDRAM_BASE + 4 * 1024 - GENERATED_GBL_DATA_SIZE)
 | 
						|
 | 
						|
#define CONFIG_SYS_LOAD_ADDR		0x22000000 /* load address */
 | 
						|
 | 
						|
/* SerialFlash */
 | 
						|
 | 
						|
#ifdef CONFIG_CMD_SF
 | 
						|
#define CONFIG_ATMEL_SPI0
 | 
						|
#define CONFIG_SPI_FLASH_STMICRO
 | 
						|
#endif
 | 
						|
 | 
						|
/* MMC */
 | 
						|
 | 
						|
#ifdef CONFIG_CMD_MMC
 | 
						|
#define CONFIG_GENERIC_ATMEL_MCI
 | 
						|
#define ATMEL_BASE_MMCI			0xfc000000
 | 
						|
#define CONFIG_SYS_MMC_CLK_OD		500000
 | 
						|
 | 
						|
/* For generating MMC partitions */
 | 
						|
 | 
						|
#endif
 | 
						|
 | 
						|
/* USB device */
 | 
						|
 | 
						|
/* Ethernet Hardware */
 | 
						|
#define CONFIG_PHY_SMSC
 | 
						|
#define CONFIG_MACB
 | 
						|
#define CONFIG_RMII
 | 
						|
#define CONFIG_NET_RETRY_COUNT		20
 | 
						|
#define CONFIG_MACB_SEARCH_PHY
 | 
						|
 | 
						|
#ifdef CONFIG_SPI_BOOT
 | 
						|
/* bootstrap + u-boot + env + linux in serial flash */
 | 
						|
/* Use our own mapping for the VInCo platform */
 | 
						|
 | 
						|
/* Update the bootcommand according to our mapping for the VInCo platform */
 | 
						|
#undef CONFIG_BOOTCOMMAND
 | 
						|
#define CONFIG_BOOTCOMMAND  "mmc dev 0 0;" \
 | 
						|
			    "mmc read ${loadaddr} ${k_offset} ${k_blksize};" \
 | 
						|
			    "mmc read ${oftaddr} ${dtb_offset} ${dtb_blksize};" \
 | 
						|
			    "bootz ${loadaddr} -  ${oftaddr}"
 | 
						|
 | 
						|
#define CONFIG_EXTRA_ENV_SETTINGS \
 | 
						|
	"kernel_start=0x20000\0" \
 | 
						|
	"kernel_size=0x800000\0" \
 | 
						|
	"mmcblksize=0x200\0" \
 | 
						|
	"oftaddr=0x21000000\0" \
 | 
						|
	"loadaddr=0x22000000\0" \
 | 
						|
	"update_uboot=tftp ${loadaddr} u-boot.bin;sf probe 0;" \
 | 
						|
	"sf erase 0x20000 0x4B000; sf write ${loadaddr} 0x20000 0x4B000\0" \
 | 
						|
	"create_partition=setexpr dtb_start ${kernel_start} + 0x400000;" \
 | 
						|
	"setexpr rootfs_start ${kernel_start} + ${kernel_size};" \
 | 
						|
	"setenv partitions 'name=kernel,size=${kernel_size}," \
 | 
						|
	"start=${kernel_start};name=rootfs,size=-';" \
 | 
						|
	"gpt write mmc 0 ${partitions} \0"\
 | 
						|
	"f2blk_size=setexpr fileblksize ${filesize} / ${mmcblksize};" \
 | 
						|
	"setexpr fileblksize ${fileblksize} + 1\0" \
 | 
						|
	"store_kernel=tftp ${loadaddr} zImage; run f2blk_size;" \
 | 
						|
	"setexpr k_blksize ${fileblksize};" \
 | 
						|
	"setexpr k_offset ${kernel_start} / ${mmcblksize};" \
 | 
						|
	"mmc write ${fileaddr} ${k_offset} ${fileblksize}\0" \
 | 
						|
	"store_dtb=tftp ${loadaddr} at91-vinco.dtb; run f2blk_size;" \
 | 
						|
	"setexpr dtb_blksize ${fileblksize};" \
 | 
						|
	"setexpr dtb_offset ${dtb_start} / ${mmcblksize};" \
 | 
						|
	"mmc write ${fileaddr} ${dtb_offset} ${fileblksize}\0" \
 | 
						|
	"store_rootfs=tftp ${loadaddr} vinco-gateway-image-vinco.ext4;" \
 | 
						|
	"setexpr rootfs_offset ${rootfs_start} / ${mmcblksize};" \
 | 
						|
	"mmc write ${fileaddr} ${rootfs_offset} ${fileblksize}\0" \
 | 
						|
	"bootdelay=0\0"
 | 
						|
 | 
						|
#endif
 | 
						|
 | 
						|
#endif
 |