mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-11 13:56:30 +00:00
a09fea1d28
- 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>
117 lines
3.8 KiB
C
117 lines
3.8 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Config file for BuR BRPP2_IMX6 board
|
|
*
|
|
* Copyright (C) 2018
|
|
* B&R Industrial Automation GmbH - http://www.br-automation.com/
|
|
*/
|
|
#ifndef __CONFIG_BRPP2_IMX6_H
|
|
#define __CONFIG_BRPP2_IMX6_H
|
|
|
|
#include <configs/bur_cfg_common.h>
|
|
#include <asm/arch/imx-regs.h>
|
|
|
|
/* -- i.mx6 specifica -- */
|
|
#ifndef CONFIG_SYS_L2CACHE_OFF
|
|
#define CONFIG_SYS_L2_PL310
|
|
#define CONFIG_SYS_PL310_BASE L2_PL310_BASE
|
|
#endif /* !CONFIG_SYS_L2CACHE_OFF */
|
|
|
|
#define CONFIG_BOARD_POSTCLK_INIT
|
|
#define CONFIG_MXC_GPT_HCLK
|
|
|
|
#define CONFIG_LOADADDR 0x10700000
|
|
#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
|
|
|
|
/* MMC */
|
|
#define CONFIG_FSL_USDHC
|
|
|
|
/* Boot */
|
|
#define CONFIG_CMDLINE_TAG
|
|
#define CONFIG_SETUP_MEMORY_TAGS
|
|
#define CONFIG_INITRD_TAG
|
|
#define CONFIG_MACH_TYPE 0xFFFFFFFF
|
|
|
|
/* misc */
|
|
#define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024)
|
|
|
|
/* Environment */
|
|
#define CONFIG_ENV_OVERWRITE
|
|
|
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
|
BUR_COMMON_ENV \
|
|
"autoload=0\0" \
|
|
"cfgaddr=0x106F0000\0" \
|
|
"scraddr=0x10700000\0" \
|
|
"loadaddr=0x10800000\0" \
|
|
"dtbaddr=0x12000000\0" \
|
|
"ramaddr=0x12100000\0" \
|
|
"cfgscr=mw ${loadaddr} 0 128\0" \
|
|
"cfgscrl=fdt addr ${dtbaddr} &&"\
|
|
" sf probe; sf read ${cfgaddr} 0x40000 0x10000 && source ${cfgaddr}\0" \
|
|
"console=ttymxc0,115200n8 consoleblank=0 quiet\0" \
|
|
"t50args#0=setenv bootargs b_mode=${b_mode} console=${console} " \
|
|
" root=/dev/mmcblk0p2 rootfstype=ext4 rootwait panic=2 \0" \
|
|
"b_t50lgcy#0=" \
|
|
"load ${loaddev}:2 ${loadaddr} /boot/zImage && " \
|
|
"load ${loaddev}:2 ${dtbaddr} /boot/imx6dl-brppt50.dtb; " \
|
|
"run t50args#0; run cfgscrl; bootz ${loadaddr} - ${dtbaddr}\0" \
|
|
"t50args#1=setenv bootargs console=${console} b_mode=${b_mode}" \
|
|
" rootwait panic=2\0" \
|
|
"b_t50lgcy#1=" \
|
|
"load ${loaddev}:1 ${loadaddr} zImage && " \
|
|
"load ${loaddev}:1 ${dtbaddr} imx6dl-brppt50.dtb && " \
|
|
"load ${loaddev}:1 ${ramaddr} rootfsPPT50.uboot && " \
|
|
"run t50args#1; run cfgscrl; bootz ${loadaddr} ${ramaddr} ${dtbaddr}\0"\
|
|
"b_mmc0=load ${loaddev}:1 ${scraddr} bootscr.img && source ${scraddr}\0" \
|
|
"b_mmc1=load ${loaddev}:1 ${scraddr} /boot/bootscr.img && source ${scraddr}\0" \
|
|
"b_usb0=usb start && load usb 0 ${scraddr} bootscr.img && source ${scraddr}\0" \
|
|
"b_net=tftp ${scraddr} netscript.img && source ${scraddr}\0" \
|
|
"b_tgts_std=mmc0 mmc1 t50lgcy#0 t50lgcy#1 usb0 net\0" \
|
|
"b_tgts_rcy=t50lgcy#1 usb0 net\0" \
|
|
"b_tgts_pme=net usb0 mmc0 mmc1\0" \
|
|
"b_mode=4\0" \
|
|
"b_break=0\0" \
|
|
"b_deftgts=if test ${b_mode} = 12; then setenv b_tgts ${b_tgts_pme};" \
|
|
" elif test ${b_mode} = 0; then setenv b_tgts ${b_tgts_rcy};" \
|
|
" else setenv b_tgts ${b_tgts_std}; fi\0" \
|
|
"b_default=run b_deftgts; for target in ${b_tgts};"\
|
|
" do echo \"### booting ${target} ###\"; run b_${target};" \
|
|
" if test ${b_break} = 1; then; exit; fi; done\0" \
|
|
"loaddev=mmc 0\0" \
|
|
"altbootcmd=setenv b_mode 0; run b_default;\0" \
|
|
"bootlimit=1\0" \
|
|
"net2nor=sf probe && dhcp &&" \
|
|
" tftp ${loadaddr} SPL && sf erase 0 +${filesize} &&" \
|
|
" sf write ${loadaddr} 400 ${filesize} &&" \
|
|
" tftp ${loadaddr} u-boot-dtb.img && sf erase 0x100000 +${filesize} &&" \
|
|
" sf write ${loadaddr} 0x100000 ${filesize}\0"
|
|
|
|
/* RAM */
|
|
#define PHYS_SDRAM_1 MMDC0_ARB_BASE_ADDR
|
|
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
|
|
#define CONFIG_SYS_MEMTEST_START 0x10000000
|
|
#define CONFIG_SYS_MEMTEST_END 0x10010000
|
|
#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
|
|
#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
|
|
#define CONFIG_SYS_INIT_SP_OFFSET \
|
|
(CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
|
|
#define CONFIG_SYS_INIT_SP_ADDR \
|
|
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
|
|
|
|
/* Ethernet */
|
|
#define CONFIG_MII
|
|
#define CONFIG_FEC_XCV_TYPE RGMII
|
|
#define CONFIG_FEC_FIXED_SPEED _1000BASET
|
|
#define CONFIG_ARP_TIMEOUT 1500UL
|
|
|
|
/* USB Configs */
|
|
#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
|
|
#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
|
|
|
|
/* SPL */
|
|
#ifdef CONFIG_SPL
|
|
#include "imx6_spl.h"
|
|
|
|
#endif /* CONFIG_SPL */
|
|
#endif /* __CONFIG_BRPP2_IMX6_H */
|