History log of /u-boot/include/configs/ls1012afrwy.h
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 0613c36a 04-Dec-2022 Tom Rini <trini@konsulko.com>

global: Migrate CONFIG_EXTRA_ENV_SETTINGS to CFG

Perform a simple rename of CONFIG_EXTRA_ENV_SETTINGS to CFG_EXTRA_ENV_SETTINGS

Signed-off-by: Tom Rini <trini@konsulko.com>

# 6cc04547 28-Oct-2022 Tom Rini <trini@konsulko.com>

global: Migrate CONFIG_SYS_FSL* symbols to the CFG_SYS namespace

Migrate all of COFIG_SYS_FSL* to the CFG_SYS namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# f27bca4c 20-Jun-2022 Tom Rini <trini@konsulko.com>

Convert CONFIG_PCI_SCAN_SHOW to Kconfig

This converts the following to Kconfig:
CONFIG_PCI_SCAN_SHOW

Signed-off-by: Tom Rini <trini@konsulko.com>

# 3dc2987f 20-Jun-2022 Tom Rini <trini@konsulko.com>

Convert CONFIG_PCIE1 et al to Kconfig

This converts the following to Kconfig:
CONFIG_PCIE1
CONFIG_PCIE2
CONFIG_PCIE3
CONFIG_PCIE4
CONFIG_PCI1

Signed-off-by: Tom Rini <trini@konsulko.com>

# 910feb50 10-Jun-2022 Tom Rini <trini@konsulko.com>

Globally remove most CONFIG_SPL_BUILD tests from config headers

With the exception of how PowerPC handles SPL and TPL (which has its own
issues), we cannot safely hide options under CONFIG_SPL_BUILD. Largely
remove the places that have this test today.

Signed-off-by: Tom Rini <trini@konsulko.com>

# b416df33 22-Apr-2022 Hou Zhiqiang <Zhiqiang.Hou@nxp.com>

configs: Layerscape: Remove the 'fdt_addr' env

On Layerscape platforms, the DTB is loaded from boot filesystem,
per the fdt_addr description in doc/README.distro, it must be
removed.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# 388de0fa 30-Mar-2022 Tom Rini <trini@konsulko.com>

Convert CONFIG_DIMM_SLOTS_PER_CTLR to Kconfig

This converts the following to Kconfig:
CONFIG_DIMM_SLOTS_PER_CTLR

Signed-off-by: Tom Rini <trini@konsulko.com>

# f9147d63 25-Feb-2022 Tom Rini <trini@konsulko.com>

Convert CONFIG_CHIP_SELECTS_PER_CTRL to Kconfig

This converts the following to Kconfig:
CONFIG_CHIP_SELECTS_PER_CTRL

Cc: Alison Wang <alison.wang@nxp.com>
Cc: Pramod Kumar <pramod.kumar_1@nxp.com>
Cc: Priyanka Jain <priyanka.jain@nxp.com>
Cc: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Cc: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>

# f76750d1 11-Dec-2021 Tom Rini <trini@konsulko.com>

Convert CONFIG_CONS_INDEX et al to Kconfig

This converts the following to Kconfig:
CONFIG_CONS_INDEX
CONFIG_DEBUG_UART_CLOCK
CONFIG_FSL_TZPC_BP147
CONFIG_GENERIC_ATMEL_MCI
CONFIG_IDENT_STRING
CONFIG_LIBATA
CONFIG_LNX_KRNL_IMG_TEXT_OFFSET_BASE
CONFIG_LPC32XX_GPIO
CONFIG_MP
CONFIG_MPC8XXX_GPIO
CONFIG_MTD_PARTITIONS
CONFIG_MVGBE
CONFIG_MXC_GPIO
CONFIG_NR_DRAM_BANKS
CONFIG_OF_BOARD_SETUP
CONFIG_OF_STDOUT_VIA_ALIAS
CONFIG_OF_SYSTEM_SETUP
CONFIG_PREBOOT
CONFIG_ROCKCHIP_SERIAL
CONFIG_RTC_ENABLE_32KHZ_OUTPUT
CONFIG_RTC_MV
CONFIG_SCSI_AHCI
CONFIG_SF_DEFAULT_BUS
CONFIG_SF_DEFAULT_CS
CONFIG_SF_DEFAULT_SPEED
CONFIG_SOFT_SPI
CONFIG_SPI_FLASH_EON
CONFIG_SPI_FLASH_MACRONIX
CONFIG_SPI_FLASH_MTD
CONFIG_SPI_FLASH_SPANSION
CONFIG_SPI_FLASH_SST
CONFIG_SPI_FLASH_STMICRO
CONFIG_SUPPORT_RAW_INITRD
CONFIG_SYS_ARCH_TIMER
CONFIG_SYS_BOARD
CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
CONFIG_SYS_DCACHE_OFF
CONFIG_SYS_FDT_SAVE_ADDRESS
CONFIG_SYS_FLASH_CFI
CONFIG_SYS_FSL_ERRATUM_ESDHC135
CONFIG_SYS_HAS_SERDES
CONFIG_SYS_L2CACHE_OFF
CONFIG_SYS_LITTLE_ENDIAN
CONFIG_SYS_LOAD_ADDR
CONFIG_SYS_MMCSD_FS_BOOT_PARTITION
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
CONFIG_SYS_NS16550
CONFIG_SYS_PLLFIN
CONFIG_SYS_SPI_U_BOOT_OFFS
CONFIG_TIMER_SYS_TICK_CH
CONFIG_USB_EHCI_FSL
CONFIG_U_QE
CONFIG_VERSION_VARIABLE

Signed-off-by: Tom Rini <trini@konsulko.com>

# 970bf860 10-Nov-2021 Tom Rini <trini@konsulko.com>

Convert CONFIG_USE_BOOTCOMMAND et al to Kconfig

This converts the following to Kconfig:
CONFIG_USE_BOOTCOMMAND
CONFIG_BOOTCOMMAND
CONFIG_RAMBOOTCOMMAND
CONFIG_NFSBOOTCOMMAND

Signed-off-by: Tom Rini <trini@konsulko.com>

# 34f39ce8 02-Jun-2021 Yangbo Lu <yangbo.lu@nxp.com>

armv8: layerscape: drop CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33

Drop CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33. CONFIG_FSL_ESDHC_VS33_NOT_SUPPORT
is used instead.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Acked-by: Michael Walle <michael@walle.cc> [for kontron-sl28]
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 864c3dbc 13-Apr-2021 Mian Yousaf Kaukab <ykaukab@suse.de>

ls1012a: net: pfe: remove pfe stop from bootcmd

When using bootefi to boot a EFI binary, u-boot is supposed to
provide networking service for EFI application. Currently, 'pfe stop'
command is called from bootcmd before running bootefi. As a result
network stops working for EFI applications and console is flooded with
"Rx pkt not on expected port" messages.

Implement board_quiesce_devices() for ls1012a boards and call
pfe_command_stop() from it instead of calling 'pfe stop' from
*_bootcmd and bootcmd.

Tested-by: Anji Jagarlmudi <anji.jagarlmudi@nxp.com>
Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
[Fixed checkpatch space error]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# a9855023 30-Mar-2021 Mian Yousaf Kaukab <ykaukab@suse.de>

ls1012a: use default scan_dev_for_boot

scan_dev_for_efi is supposed to be called from scan_dev_for_boot.
However, this call is missing for ls1012a boards. As a result EFI
boot doesn’t work. Fix this issue by removing custom definition of
scan_dev_for_boot and use the default definition instead.

Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 3fba2311 08-Jun-2020 Udit Agarwal <udit.agarwal@nxp.com>

include/configs: ls1012a: Remove fdt_high env variable

Remove "fdt_high" environment variable to use the bootm_size
to safely contain a kernel, device tree and initrd for
relocation.

Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# e985eb14 26-May-2020 Tom Rini <trini@konsulko.com>

Convert CONFIG_CMD_ASKENV et al to Kconfig

This converts the following to Kconfig:
CONFIG_CMD_ASKENV
CONFIG_CMD_BMP
CONFIG_CMD_BOOTD
CONFIG_CMD_CACHE
CONFIG_CMD_CRC32
CONFIG_CMD_DHCP
CONFIG_CMD_ENV
CONFIG_CMD_EXPORTENV
CONFIG_CMD_EXT2
CONFIG_CMD_EXT4
CONFIG_CMD_FLASH
CONFIG_CMD_FS_GENERIC
CONFIG_CMD_FUSE
CONFIG_CMD_GPIO
CONFIG_CMD_GPT
CONFIG_CMD_GREPENV
CONFIG_CMD_I2C
CONFIG_CMD_IMLS
CONFIG_CMD_IMPORTENV
CONFIG_CMD_LOADB
CONFIG_CMD_LOADS
CONFIG_CMD_MEMINFO
CONFIG_CMD_MII
CONFIG_CMD_MTDPARTS
CONFIG_CMD_NAND
CONFIG_CMD_NAND_TRIMFFS
CONFIG_CMD_NFS
CONFIG_CMD_PCA953X
CONFIG_CMD_PCA953X_INFO
CONFIG_CMD_PCI
CONFIG_CMD_PING
CONFIG_CMD_READ
CONFIG_CMD_SF
CONFIG_CMD_SPI
CONFIG_CMD_SPL
CONFIG_CMD_SPL_WRITE_SIZE
CONFIG_CMD_TIME
CONFIG_CMD_TRACE
CONFIG_CMD_UBI
CONFIG_CMD_UBIFS
CONFIG_CMD_UNZIP
CONFIG_FS_EXT4

Signed-off-by: Tom Rini <trini@konsulko.com>

# c93ad777 11-May-2020 Kuldeep Singh <kuldeep.singh@nxp.com>

treewide: Remove unused FSL QSPI config options for Layerscape platforms

Some of these options are not used by the driver anymore and some of
them are obsolete as the information is gathered from the dt. Also
consolidating defines in common headers.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 702de89c 04-May-2020 Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>

treewide: mem: Move mtest related defines to Kconfig

Move below defines which are used by mtest utility to Kconfig.
CONFIG_SYS_MEMTEST_START
CONFIG_SYS_MEMTEST_END

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
[trini: Fix kmcoge5ne board, re-run migration as well]
Signed-off-by: Tom Rini <trini@konsulko.com>

# a389c9cd 04-May-2020 Michal Simek <michal.simek@amd.com>

treewide: mem: Enable MEMTEST via defconfig

There is no reason to enable MEMTEST from headers when was converted to
Kconfig already.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>

# a2c402cc 17-Apr-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: drop env qspi_bootcmd

Drop useless environment variable installer and qspi_bootcmd
for ls1012afrwy.
Only 2 MB nor flash in ls1012afrwy. So cannot get kernel(30 MB) from
the nor flash, then drop it.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# fad129f3 22-Apr-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: support dhcp boot

Add support of dhcp boot for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 5706b9b5 23-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: fix board name

Fix board name for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 1d0bb1b9 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: adjust env kernel_addr_r

Adjust environment kernel_addr_r from 0x96000000 to 0x92000000
to fix a bug that failed to boot kernel for ls1012afrwy with 512MiB RAM,
=> tftpboot $kernel_addr_r Image (Image size is 36 MiB)
TFTP error: trying to overwrite reserved memory...

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# c8a7cadc 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: fix wrong env of board

Fix wrong environment variable of board for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 095b6be4 12-Mar-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: fix load address of itb with bootm command

The old load address of itb will overwrite uboots reserved memory
on ls1012afrwy with 512 MiB ram

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# f0d4cd43 10-Jan-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: adjust kernel_addr_r

The linux kernel Image is growing quite quickly,
if kernel Image size grow beyond 36 MB then
kernel Image at load address 0x81000000
overlaps with the reserved memory region
at 0x83400000.

Adjust kernel load address(kernel_addr_r) from
0x81000000 to 0x96000000 to avoid kernel Image
overlapping with reserved memory region.

This change fixes the below U-Boot error while
booting uncompressed kernel Image through booti command,
ERROR: reserving fdt memory region failed (addr=83400000 size=c00000)

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a3c9805f 15-Nov-2019 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012a: add pfe stop command

This adds pfe stop command before boot linux kernel
to fix a problem that ethernet won't be workable
after enter linux. Because there is a h/w limitation
in LS1012A PFE, to re-initialize PFE it has to be
safe shutdown, these steps are done through PFE stop.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a09fea1d 18-Nov-2019 Tom Rini <trini@konsulko.com>

env: Finish migration of common ENV options

- 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>

# 6972c60f 29-Sep-2019 Kuldeep Singh <kuldeep.singh@nxp.com>

configs: ls1012afrwy: Add CONFIG_ENV_ADDR

This configuration enables picking the environment from flash before
DDR init.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# 60742bfb 20-Jun-2019 Yangbo Lu <yangbo.lu@nxp.com>

Move CONFIG_FSL_ESDHC to defconfig

Moved CONFIG_FSL_ESDHC from header files to defconfig files.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Martyn Welch <martyn.welch@collabora.com>
Acked-by: Jason Liu <Jason.hui.liu@nxp.com>

# 78c58082 22-Apr-2019 Vinitha V Pillai <vinitha.pillai@nxp.com>

armv8: Secure Boot: Modify boot_a_script definition

esbc_validate command will not be executed if “load” command for its
header fails and will further execute the source command for bootscript,
without its validation and boot process continues.

To halt the boot process in case secure boot header is not loaded
successfully, esbc_validate command is invoked separately after “load”
command. The secure boot validation of the bootscript header will fail
(if header is not loaded) and halts the boot process, which prevent source
command from execution.

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>

# 7f91b658 05-Nov-2018 Rajesh Bhagat <rajesh.bhagat@nxp.com>

armv8: ls1012afrx: Add TFABOOT support

TFABOOT support includes:
- ls1012a2g5rdb/ls1012afrdm/ls1012afrwy_tfa_defconfig to be
loaded by trusted firmware
- define BOOTCOMMAND for TFABOOT

Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
[YS: remove unnecessary braces]
Reviewed-by: York Sun <york.sun@nxp.com>

# 1deae0c4 13-Aug-2018 Pramod Kumar <pramod.kumar_1@nxp.com>

ls1012afrwy: Add ls1012afrwy revC board support.

LS1012AFRWY supports three board revisions.
Revision A and B board are collectively identified as revA/B,
Revision C board is identifies as revC.

Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
[York S: revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>

# 86cf1c82 16-Aug-2018 Tom Rini <trini@konsulko.com>

configs: Migrate CONFIG_NR_DRAM_BANKS

We have the following cases:
- CONFIG_NR_DRAM_BANKS was defined, migrate normally
- CONFIG_NR_DRAM_BANKS_MAX was defined and then used for
CONFIG_NR_DRAM_BANKS after a check, just migrate it over now.
- CONFIG_NR_DRAM_BANKS was very oddly defined on p2771-0000-* (to 1024 +
2), set this to 8.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 2d91b533 22-May-2018 Vinitha V Pillai <vinitha.pillai@nxp.com>

LS1012AFRWY: Add Secure Boot support

Added the following:
1. defconfig for LS1012AFRWY Secure boot
2. PfE Validation support

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>

# 9629ccdd 22-May-2018 Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>

board: ls1012a: FRWY-LS1012A board support

FRWY-LS1012A belongs to LS1012A family with features 2 1G SGMII PFE
MAC, Micro SD, USB 3.0, DDR, QuadSPI, Audio, UART.

Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
[yorks: rebase and fix SPDX tag]
[yorks: fix board/freescale/ls1012afrdm/Kconfig]
Reviewed-by: York Sun <york.sun@nxp.com>

# 6cc04547 28-Oct-2022 Tom Rini <trini@konsulko.com>

global: Migrate CONFIG_SYS_FSL* symbols to the CFG_SYS namespace

Migrate all of COFIG_SYS_FSL* to the CFG_SYS namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# f27bca4c 20-Jun-2022 Tom Rini <trini@konsulko.com>

Convert CONFIG_PCI_SCAN_SHOW to Kconfig

This converts the following to Kconfig:
CONFIG_PCI_SCAN_SHOW

Signed-off-by: Tom Rini <trini@konsulko.com>

# 3dc2987f 20-Jun-2022 Tom Rini <trini@konsulko.com>

Convert CONFIG_PCIE1 et al to Kconfig

This converts the following to Kconfig:
CONFIG_PCIE1
CONFIG_PCIE2
CONFIG_PCIE3
CONFIG_PCIE4
CONFIG_PCI1

Signed-off-by: Tom Rini <trini@konsulko.com>

# 910feb50 10-Jun-2022 Tom Rini <trini@konsulko.com>

Globally remove most CONFIG_SPL_BUILD tests from config headers

With the exception of how PowerPC handles SPL and TPL (which has its own
issues), we cannot safely hide options under CONFIG_SPL_BUILD. Largely
remove the places that have this test today.

Signed-off-by: Tom Rini <trini@konsulko.com>

# b416df33 22-Apr-2022 Hou Zhiqiang <Zhiqiang.Hou@nxp.com>

configs: Layerscape: Remove the 'fdt_addr' env

On Layerscape platforms, the DTB is loaded from boot filesystem,
per the fdt_addr description in doc/README.distro, it must be
removed.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# 388de0fa 30-Mar-2022 Tom Rini <trini@konsulko.com>

Convert CONFIG_DIMM_SLOTS_PER_CTLR to Kconfig

This converts the following to Kconfig:
CONFIG_DIMM_SLOTS_PER_CTLR

Signed-off-by: Tom Rini <trini@konsulko.com>

# f9147d63 25-Feb-2022 Tom Rini <trini@konsulko.com>

Convert CONFIG_CHIP_SELECTS_PER_CTRL to Kconfig

This converts the following to Kconfig:
CONFIG_CHIP_SELECTS_PER_CTRL

Cc: Alison Wang <alison.wang@nxp.com>
Cc: Pramod Kumar <pramod.kumar_1@nxp.com>
Cc: Priyanka Jain <priyanka.jain@nxp.com>
Cc: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Cc: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>

# f76750d1 11-Dec-2021 Tom Rini <trini@konsulko.com>

Convert CONFIG_CONS_INDEX et al to Kconfig

This converts the following to Kconfig:
CONFIG_CONS_INDEX
CONFIG_DEBUG_UART_CLOCK
CONFIG_FSL_TZPC_BP147
CONFIG_GENERIC_ATMEL_MCI
CONFIG_IDENT_STRING
CONFIG_LIBATA
CONFIG_LNX_KRNL_IMG_TEXT_OFFSET_BASE
CONFIG_LPC32XX_GPIO
CONFIG_MP
CONFIG_MPC8XXX_GPIO
CONFIG_MTD_PARTITIONS
CONFIG_MVGBE
CONFIG_MXC_GPIO
CONFIG_NR_DRAM_BANKS
CONFIG_OF_BOARD_SETUP
CONFIG_OF_STDOUT_VIA_ALIAS
CONFIG_OF_SYSTEM_SETUP
CONFIG_PREBOOT
CONFIG_ROCKCHIP_SERIAL
CONFIG_RTC_ENABLE_32KHZ_OUTPUT
CONFIG_RTC_MV
CONFIG_SCSI_AHCI
CONFIG_SF_DEFAULT_BUS
CONFIG_SF_DEFAULT_CS
CONFIG_SF_DEFAULT_SPEED
CONFIG_SOFT_SPI
CONFIG_SPI_FLASH_EON
CONFIG_SPI_FLASH_MACRONIX
CONFIG_SPI_FLASH_MTD
CONFIG_SPI_FLASH_SPANSION
CONFIG_SPI_FLASH_SST
CONFIG_SPI_FLASH_STMICRO
CONFIG_SUPPORT_RAW_INITRD
CONFIG_SYS_ARCH_TIMER
CONFIG_SYS_BOARD
CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
CONFIG_SYS_DCACHE_OFF
CONFIG_SYS_FDT_SAVE_ADDRESS
CONFIG_SYS_FLASH_CFI
CONFIG_SYS_FSL_ERRATUM_ESDHC135
CONFIG_SYS_HAS_SERDES
CONFIG_SYS_L2CACHE_OFF
CONFIG_SYS_LITTLE_ENDIAN
CONFIG_SYS_LOAD_ADDR
CONFIG_SYS_MMCSD_FS_BOOT_PARTITION
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
CONFIG_SYS_NS16550
CONFIG_SYS_PLLFIN
CONFIG_SYS_SPI_U_BOOT_OFFS
CONFIG_TIMER_SYS_TICK_CH
CONFIG_USB_EHCI_FSL
CONFIG_U_QE
CONFIG_VERSION_VARIABLE

Signed-off-by: Tom Rini <trini@konsulko.com>

# 970bf860 10-Nov-2021 Tom Rini <trini@konsulko.com>

Convert CONFIG_USE_BOOTCOMMAND et al to Kconfig

This converts the following to Kconfig:
CONFIG_USE_BOOTCOMMAND
CONFIG_BOOTCOMMAND
CONFIG_RAMBOOTCOMMAND
CONFIG_NFSBOOTCOMMAND

Signed-off-by: Tom Rini <trini@konsulko.com>

# 34f39ce8 02-Jun-2021 Yangbo Lu <yangbo.lu@nxp.com>

armv8: layerscape: drop CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33

Drop CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33. CONFIG_FSL_ESDHC_VS33_NOT_SUPPORT
is used instead.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Acked-by: Michael Walle <michael@walle.cc> [for kontron-sl28]
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 864c3dbc 13-Apr-2021 Mian Yousaf Kaukab <ykaukab@suse.de>

ls1012a: net: pfe: remove pfe stop from bootcmd

When using bootefi to boot a EFI binary, u-boot is supposed to
provide networking service for EFI application. Currently, 'pfe stop'
command is called from bootcmd before running bootefi. As a result
network stops working for EFI applications and console is flooded with
"Rx pkt not on expected port" messages.

Implement board_quiesce_devices() for ls1012a boards and call
pfe_command_stop() from it instead of calling 'pfe stop' from
*_bootcmd and bootcmd.

Tested-by: Anji Jagarlmudi <anji.jagarlmudi@nxp.com>
Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
[Fixed checkpatch space error]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# a9855023 30-Mar-2021 Mian Yousaf Kaukab <ykaukab@suse.de>

ls1012a: use default scan_dev_for_boot

scan_dev_for_efi is supposed to be called from scan_dev_for_boot.
However, this call is missing for ls1012a boards. As a result EFI
boot doesn’t work. Fix this issue by removing custom definition of
scan_dev_for_boot and use the default definition instead.

Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 3fba2311 08-Jun-2020 Udit Agarwal <udit.agarwal@nxp.com>

include/configs: ls1012a: Remove fdt_high env variable

Remove "fdt_high" environment variable to use the bootm_size
to safely contain a kernel, device tree and initrd for
relocation.

Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# e985eb14 26-May-2020 Tom Rini <trini@konsulko.com>

Convert CONFIG_CMD_ASKENV et al to Kconfig

This converts the following to Kconfig:
CONFIG_CMD_ASKENV
CONFIG_CMD_BMP
CONFIG_CMD_BOOTD
CONFIG_CMD_CACHE
CONFIG_CMD_CRC32
CONFIG_CMD_DHCP
CONFIG_CMD_ENV
CONFIG_CMD_EXPORTENV
CONFIG_CMD_EXT2
CONFIG_CMD_EXT4
CONFIG_CMD_FLASH
CONFIG_CMD_FS_GENERIC
CONFIG_CMD_FUSE
CONFIG_CMD_GPIO
CONFIG_CMD_GPT
CONFIG_CMD_GREPENV
CONFIG_CMD_I2C
CONFIG_CMD_IMLS
CONFIG_CMD_IMPORTENV
CONFIG_CMD_LOADB
CONFIG_CMD_LOADS
CONFIG_CMD_MEMINFO
CONFIG_CMD_MII
CONFIG_CMD_MTDPARTS
CONFIG_CMD_NAND
CONFIG_CMD_NAND_TRIMFFS
CONFIG_CMD_NFS
CONFIG_CMD_PCA953X
CONFIG_CMD_PCA953X_INFO
CONFIG_CMD_PCI
CONFIG_CMD_PING
CONFIG_CMD_READ
CONFIG_CMD_SF
CONFIG_CMD_SPI
CONFIG_CMD_SPL
CONFIG_CMD_SPL_WRITE_SIZE
CONFIG_CMD_TIME
CONFIG_CMD_TRACE
CONFIG_CMD_UBI
CONFIG_CMD_UBIFS
CONFIG_CMD_UNZIP
CONFIG_FS_EXT4

Signed-off-by: Tom Rini <trini@konsulko.com>

# c93ad777 11-May-2020 Kuldeep Singh <kuldeep.singh@nxp.com>

treewide: Remove unused FSL QSPI config options for Layerscape platforms

Some of these options are not used by the driver anymore and some of
them are obsolete as the information is gathered from the dt. Also
consolidating defines in common headers.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 702de89c 04-May-2020 Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>

treewide: mem: Move mtest related defines to Kconfig

Move below defines which are used by mtest utility to Kconfig.
CONFIG_SYS_MEMTEST_START
CONFIG_SYS_MEMTEST_END

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
[trini: Fix kmcoge5ne board, re-run migration as well]
Signed-off-by: Tom Rini <trini@konsulko.com>

# a389c9cd 04-May-2020 Michal Simek <michal.simek@amd.com>

treewide: mem: Enable MEMTEST via defconfig

There is no reason to enable MEMTEST from headers when was converted to
Kconfig already.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>

# a2c402cc 17-Apr-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: drop env qspi_bootcmd

Drop useless environment variable installer and qspi_bootcmd
for ls1012afrwy.
Only 2 MB nor flash in ls1012afrwy. So cannot get kernel(30 MB) from
the nor flash, then drop it.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# fad129f3 22-Apr-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: support dhcp boot

Add support of dhcp boot for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 5706b9b5 23-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: fix board name

Fix board name for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 1d0bb1b9 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: adjust env kernel_addr_r

Adjust environment kernel_addr_r from 0x96000000 to 0x92000000
to fix a bug that failed to boot kernel for ls1012afrwy with 512MiB RAM,
=> tftpboot $kernel_addr_r Image (Image size is 36 MiB)
TFTP error: trying to overwrite reserved memory...

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# c8a7cadc 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: fix wrong env of board

Fix wrong environment variable of board for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 095b6be4 12-Mar-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: fix load address of itb with bootm command

The old load address of itb will overwrite uboots reserved memory
on ls1012afrwy with 512 MiB ram

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# f0d4cd43 10-Jan-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: adjust kernel_addr_r

The linux kernel Image is growing quite quickly,
if kernel Image size grow beyond 36 MB then
kernel Image at load address 0x81000000
overlaps with the reserved memory region
at 0x83400000.

Adjust kernel load address(kernel_addr_r) from
0x81000000 to 0x96000000 to avoid kernel Image
overlapping with reserved memory region.

This change fixes the below U-Boot error while
booting uncompressed kernel Image through booti command,
ERROR: reserving fdt memory region failed (addr=83400000 size=c00000)

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a3c9805f 15-Nov-2019 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012a: add pfe stop command

This adds pfe stop command before boot linux kernel
to fix a problem that ethernet won't be workable
after enter linux. Because there is a h/w limitation
in LS1012A PFE, to re-initialize PFE it has to be
safe shutdown, these steps are done through PFE stop.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a09fea1d 18-Nov-2019 Tom Rini <trini@konsulko.com>

env: Finish migration of common ENV options

- 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>

# 6972c60f 29-Sep-2019 Kuldeep Singh <kuldeep.singh@nxp.com>

configs: ls1012afrwy: Add CONFIG_ENV_ADDR

This configuration enables picking the environment from flash before
DDR init.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# 60742bfb 20-Jun-2019 Yangbo Lu <yangbo.lu@nxp.com>

Move CONFIG_FSL_ESDHC to defconfig

Moved CONFIG_FSL_ESDHC from header files to defconfig files.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Martyn Welch <martyn.welch@collabora.com>
Acked-by: Jason Liu <Jason.hui.liu@nxp.com>

# 78c58082 22-Apr-2019 Vinitha V Pillai <vinitha.pillai@nxp.com>

armv8: Secure Boot: Modify boot_a_script definition

esbc_validate command will not be executed if “load” command for its
header fails and will further execute the source command for bootscript,
without its validation and boot process continues.

To halt the boot process in case secure boot header is not loaded
successfully, esbc_validate command is invoked separately after “load”
command. The secure boot validation of the bootscript header will fail
(if header is not loaded) and halts the boot process, which prevent source
command from execution.

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>

# 7f91b658 05-Nov-2018 Rajesh Bhagat <rajesh.bhagat@nxp.com>

armv8: ls1012afrx: Add TFABOOT support

TFABOOT support includes:
- ls1012a2g5rdb/ls1012afrdm/ls1012afrwy_tfa_defconfig to be
loaded by trusted firmware
- define BOOTCOMMAND for TFABOOT

Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
[YS: remove unnecessary braces]
Reviewed-by: York Sun <york.sun@nxp.com>

# 1deae0c4 13-Aug-2018 Pramod Kumar <pramod.kumar_1@nxp.com>

ls1012afrwy: Add ls1012afrwy revC board support.

LS1012AFRWY supports three board revisions.
Revision A and B board are collectively identified as revA/B,
Revision C board is identifies as revC.

Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
[York S: revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>

# 86cf1c82 16-Aug-2018 Tom Rini <trini@konsulko.com>

configs: Migrate CONFIG_NR_DRAM_BANKS

We have the following cases:
- CONFIG_NR_DRAM_BANKS was defined, migrate normally
- CONFIG_NR_DRAM_BANKS_MAX was defined and then used for
CONFIG_NR_DRAM_BANKS after a check, just migrate it over now.
- CONFIG_NR_DRAM_BANKS was very oddly defined on p2771-0000-* (to 1024 +
2), set this to 8.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 2d91b533 22-May-2018 Vinitha V Pillai <vinitha.pillai@nxp.com>

LS1012AFRWY: Add Secure Boot support

Added the following:
1. defconfig for LS1012AFRWY Secure boot
2. PfE Validation support

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>

# 9629ccdd 22-May-2018 Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>

board: ls1012a: FRWY-LS1012A board support

FRWY-LS1012A belongs to LS1012A family with features 2 1G SGMII PFE
MAC, Micro SD, USB 3.0, DDR, QuadSPI, Audio, UART.

Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
[yorks: rebase and fix SPDX tag]
[yorks: fix board/freescale/ls1012afrdm/Kconfig]
Reviewed-by: York Sun <york.sun@nxp.com>

# f27bca4c 20-Jun-2022 Tom Rini <trini@konsulko.com>

Convert CONFIG_PCI_SCAN_SHOW to Kconfig

This converts the following to Kconfig:
CONFIG_PCI_SCAN_SHOW

Signed-off-by: Tom Rini <trini@konsulko.com>

# 3dc2987f 20-Jun-2022 Tom Rini <trini@konsulko.com>

Convert CONFIG_PCIE1 et al to Kconfig

This converts the following to Kconfig:
CONFIG_PCIE1
CONFIG_PCIE2
CONFIG_PCIE3
CONFIG_PCIE4
CONFIG_PCI1

Signed-off-by: Tom Rini <trini@konsulko.com>

# 910feb50 10-Jun-2022 Tom Rini <trini@konsulko.com>

Globally remove most CONFIG_SPL_BUILD tests from config headers

With the exception of how PowerPC handles SPL and TPL (which has its own
issues), we cannot safely hide options under CONFIG_SPL_BUILD. Largely
remove the places that have this test today.

Signed-off-by: Tom Rini <trini@konsulko.com>

# b416df33 22-Apr-2022 Hou Zhiqiang <Zhiqiang.Hou@nxp.com>

configs: Layerscape: Remove the 'fdt_addr' env

On Layerscape platforms, the DTB is loaded from boot filesystem,
per the fdt_addr description in doc/README.distro, it must be
removed.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# 388de0fa 30-Mar-2022 Tom Rini <trini@konsulko.com>

Convert CONFIG_DIMM_SLOTS_PER_CTLR to Kconfig

This converts the following to Kconfig:
CONFIG_DIMM_SLOTS_PER_CTLR

Signed-off-by: Tom Rini <trini@konsulko.com>

# f9147d63 25-Feb-2022 Tom Rini <trini@konsulko.com>

Convert CONFIG_CHIP_SELECTS_PER_CTRL to Kconfig

This converts the following to Kconfig:
CONFIG_CHIP_SELECTS_PER_CTRL

Cc: Alison Wang <alison.wang@nxp.com>
Cc: Pramod Kumar <pramod.kumar_1@nxp.com>
Cc: Priyanka Jain <priyanka.jain@nxp.com>
Cc: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Cc: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>

# f76750d1 11-Dec-2021 Tom Rini <trini@konsulko.com>

Convert CONFIG_CONS_INDEX et al to Kconfig

This converts the following to Kconfig:
CONFIG_CONS_INDEX
CONFIG_DEBUG_UART_CLOCK
CONFIG_FSL_TZPC_BP147
CONFIG_GENERIC_ATMEL_MCI
CONFIG_IDENT_STRING
CONFIG_LIBATA
CONFIG_LNX_KRNL_IMG_TEXT_OFFSET_BASE
CONFIG_LPC32XX_GPIO
CONFIG_MP
CONFIG_MPC8XXX_GPIO
CONFIG_MTD_PARTITIONS
CONFIG_MVGBE
CONFIG_MXC_GPIO
CONFIG_NR_DRAM_BANKS
CONFIG_OF_BOARD_SETUP
CONFIG_OF_STDOUT_VIA_ALIAS
CONFIG_OF_SYSTEM_SETUP
CONFIG_PREBOOT
CONFIG_ROCKCHIP_SERIAL
CONFIG_RTC_ENABLE_32KHZ_OUTPUT
CONFIG_RTC_MV
CONFIG_SCSI_AHCI
CONFIG_SF_DEFAULT_BUS
CONFIG_SF_DEFAULT_CS
CONFIG_SF_DEFAULT_SPEED
CONFIG_SOFT_SPI
CONFIG_SPI_FLASH_EON
CONFIG_SPI_FLASH_MACRONIX
CONFIG_SPI_FLASH_MTD
CONFIG_SPI_FLASH_SPANSION
CONFIG_SPI_FLASH_SST
CONFIG_SPI_FLASH_STMICRO
CONFIG_SUPPORT_RAW_INITRD
CONFIG_SYS_ARCH_TIMER
CONFIG_SYS_BOARD
CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
CONFIG_SYS_DCACHE_OFF
CONFIG_SYS_FDT_SAVE_ADDRESS
CONFIG_SYS_FLASH_CFI
CONFIG_SYS_FSL_ERRATUM_ESDHC135
CONFIG_SYS_HAS_SERDES
CONFIG_SYS_L2CACHE_OFF
CONFIG_SYS_LITTLE_ENDIAN
CONFIG_SYS_LOAD_ADDR
CONFIG_SYS_MMCSD_FS_BOOT_PARTITION
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
CONFIG_SYS_NS16550
CONFIG_SYS_PLLFIN
CONFIG_SYS_SPI_U_BOOT_OFFS
CONFIG_TIMER_SYS_TICK_CH
CONFIG_USB_EHCI_FSL
CONFIG_U_QE
CONFIG_VERSION_VARIABLE

Signed-off-by: Tom Rini <trini@konsulko.com>

# 970bf860 10-Nov-2021 Tom Rini <trini@konsulko.com>

Convert CONFIG_USE_BOOTCOMMAND et al to Kconfig

This converts the following to Kconfig:
CONFIG_USE_BOOTCOMMAND
CONFIG_BOOTCOMMAND
CONFIG_RAMBOOTCOMMAND
CONFIG_NFSBOOTCOMMAND

Signed-off-by: Tom Rini <trini@konsulko.com>

# 34f39ce8 02-Jun-2021 Yangbo Lu <yangbo.lu@nxp.com>

armv8: layerscape: drop CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33

Drop CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33. CONFIG_FSL_ESDHC_VS33_NOT_SUPPORT
is used instead.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Acked-by: Michael Walle <michael@walle.cc> [for kontron-sl28]
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 864c3dbc 13-Apr-2021 Mian Yousaf Kaukab <ykaukab@suse.de>

ls1012a: net: pfe: remove pfe stop from bootcmd

When using bootefi to boot a EFI binary, u-boot is supposed to
provide networking service for EFI application. Currently, 'pfe stop'
command is called from bootcmd before running bootefi. As a result
network stops working for EFI applications and console is flooded with
"Rx pkt not on expected port" messages.

Implement board_quiesce_devices() for ls1012a boards and call
pfe_command_stop() from it instead of calling 'pfe stop' from
*_bootcmd and bootcmd.

Tested-by: Anji Jagarlmudi <anji.jagarlmudi@nxp.com>
Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
[Fixed checkpatch space error]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# a9855023 30-Mar-2021 Mian Yousaf Kaukab <ykaukab@suse.de>

ls1012a: use default scan_dev_for_boot

scan_dev_for_efi is supposed to be called from scan_dev_for_boot.
However, this call is missing for ls1012a boards. As a result EFI
boot doesn’t work. Fix this issue by removing custom definition of
scan_dev_for_boot and use the default definition instead.

Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 3fba2311 08-Jun-2020 Udit Agarwal <udit.agarwal@nxp.com>

include/configs: ls1012a: Remove fdt_high env variable

Remove "fdt_high" environment variable to use the bootm_size
to safely contain a kernel, device tree and initrd for
relocation.

Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# e985eb14 26-May-2020 Tom Rini <trini@konsulko.com>

Convert CONFIG_CMD_ASKENV et al to Kconfig

This converts the following to Kconfig:
CONFIG_CMD_ASKENV
CONFIG_CMD_BMP
CONFIG_CMD_BOOTD
CONFIG_CMD_CACHE
CONFIG_CMD_CRC32
CONFIG_CMD_DHCP
CONFIG_CMD_ENV
CONFIG_CMD_EXPORTENV
CONFIG_CMD_EXT2
CONFIG_CMD_EXT4
CONFIG_CMD_FLASH
CONFIG_CMD_FS_GENERIC
CONFIG_CMD_FUSE
CONFIG_CMD_GPIO
CONFIG_CMD_GPT
CONFIG_CMD_GREPENV
CONFIG_CMD_I2C
CONFIG_CMD_IMLS
CONFIG_CMD_IMPORTENV
CONFIG_CMD_LOADB
CONFIG_CMD_LOADS
CONFIG_CMD_MEMINFO
CONFIG_CMD_MII
CONFIG_CMD_MTDPARTS
CONFIG_CMD_NAND
CONFIG_CMD_NAND_TRIMFFS
CONFIG_CMD_NFS
CONFIG_CMD_PCA953X
CONFIG_CMD_PCA953X_INFO
CONFIG_CMD_PCI
CONFIG_CMD_PING
CONFIG_CMD_READ
CONFIG_CMD_SF
CONFIG_CMD_SPI
CONFIG_CMD_SPL
CONFIG_CMD_SPL_WRITE_SIZE
CONFIG_CMD_TIME
CONFIG_CMD_TRACE
CONFIG_CMD_UBI
CONFIG_CMD_UBIFS
CONFIG_CMD_UNZIP
CONFIG_FS_EXT4

Signed-off-by: Tom Rini <trini@konsulko.com>

# c93ad777 11-May-2020 Kuldeep Singh <kuldeep.singh@nxp.com>

treewide: Remove unused FSL QSPI config options for Layerscape platforms

Some of these options are not used by the driver anymore and some of
them are obsolete as the information is gathered from the dt. Also
consolidating defines in common headers.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 702de89c 04-May-2020 Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>

treewide: mem: Move mtest related defines to Kconfig

Move below defines which are used by mtest utility to Kconfig.
CONFIG_SYS_MEMTEST_START
CONFIG_SYS_MEMTEST_END

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
[trini: Fix kmcoge5ne board, re-run migration as well]
Signed-off-by: Tom Rini <trini@konsulko.com>

# a389c9cd 04-May-2020 Michal Simek <michal.simek@amd.com>

treewide: mem: Enable MEMTEST via defconfig

There is no reason to enable MEMTEST from headers when was converted to
Kconfig already.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>

# a2c402cc 17-Apr-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: drop env qspi_bootcmd

Drop useless environment variable installer and qspi_bootcmd
for ls1012afrwy.
Only 2 MB nor flash in ls1012afrwy. So cannot get kernel(30 MB) from
the nor flash, then drop it.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# fad129f3 22-Apr-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: support dhcp boot

Add support of dhcp boot for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 5706b9b5 23-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: fix board name

Fix board name for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 1d0bb1b9 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: adjust env kernel_addr_r

Adjust environment kernel_addr_r from 0x96000000 to 0x92000000
to fix a bug that failed to boot kernel for ls1012afrwy with 512MiB RAM,
=> tftpboot $kernel_addr_r Image (Image size is 36 MiB)
TFTP error: trying to overwrite reserved memory...

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# c8a7cadc 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: fix wrong env of board

Fix wrong environment variable of board for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 095b6be4 12-Mar-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: fix load address of itb with bootm command

The old load address of itb will overwrite uboots reserved memory
on ls1012afrwy with 512 MiB ram

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# f0d4cd43 10-Jan-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: adjust kernel_addr_r

The linux kernel Image is growing quite quickly,
if kernel Image size grow beyond 36 MB then
kernel Image at load address 0x81000000
overlaps with the reserved memory region
at 0x83400000.

Adjust kernel load address(kernel_addr_r) from
0x81000000 to 0x96000000 to avoid kernel Image
overlapping with reserved memory region.

This change fixes the below U-Boot error while
booting uncompressed kernel Image through booti command,
ERROR: reserving fdt memory region failed (addr=83400000 size=c00000)

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a3c9805f 15-Nov-2019 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012a: add pfe stop command

This adds pfe stop command before boot linux kernel
to fix a problem that ethernet won't be workable
after enter linux. Because there is a h/w limitation
in LS1012A PFE, to re-initialize PFE it has to be
safe shutdown, these steps are done through PFE stop.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a09fea1d 18-Nov-2019 Tom Rini <trini@konsulko.com>

env: Finish migration of common ENV options

- 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>

# 6972c60f 29-Sep-2019 Kuldeep Singh <kuldeep.singh@nxp.com>

configs: ls1012afrwy: Add CONFIG_ENV_ADDR

This configuration enables picking the environment from flash before
DDR init.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# 60742bfb 20-Jun-2019 Yangbo Lu <yangbo.lu@nxp.com>

Move CONFIG_FSL_ESDHC to defconfig

Moved CONFIG_FSL_ESDHC from header files to defconfig files.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Martyn Welch <martyn.welch@collabora.com>
Acked-by: Jason Liu <Jason.hui.liu@nxp.com>

# 78c58082 22-Apr-2019 Vinitha V Pillai <vinitha.pillai@nxp.com>

armv8: Secure Boot: Modify boot_a_script definition

esbc_validate command will not be executed if “load” command for its
header fails and will further execute the source command for bootscript,
without its validation and boot process continues.

To halt the boot process in case secure boot header is not loaded
successfully, esbc_validate command is invoked separately after “load”
command. The secure boot validation of the bootscript header will fail
(if header is not loaded) and halts the boot process, which prevent source
command from execution.

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>

# 7f91b658 05-Nov-2018 Rajesh Bhagat <rajesh.bhagat@nxp.com>

armv8: ls1012afrx: Add TFABOOT support

TFABOOT support includes:
- ls1012a2g5rdb/ls1012afrdm/ls1012afrwy_tfa_defconfig to be
loaded by trusted firmware
- define BOOTCOMMAND for TFABOOT

Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
[YS: remove unnecessary braces]
Reviewed-by: York Sun <york.sun@nxp.com>

# 1deae0c4 13-Aug-2018 Pramod Kumar <pramod.kumar_1@nxp.com>

ls1012afrwy: Add ls1012afrwy revC board support.

LS1012AFRWY supports three board revisions.
Revision A and B board are collectively identified as revA/B,
Revision C board is identifies as revC.

Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
[York S: revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>

# 86cf1c82 16-Aug-2018 Tom Rini <trini@konsulko.com>

configs: Migrate CONFIG_NR_DRAM_BANKS

We have the following cases:
- CONFIG_NR_DRAM_BANKS was defined, migrate normally
- CONFIG_NR_DRAM_BANKS_MAX was defined and then used for
CONFIG_NR_DRAM_BANKS after a check, just migrate it over now.
- CONFIG_NR_DRAM_BANKS was very oddly defined on p2771-0000-* (to 1024 +
2), set this to 8.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 2d91b533 22-May-2018 Vinitha V Pillai <vinitha.pillai@nxp.com>

LS1012AFRWY: Add Secure Boot support

Added the following:
1. defconfig for LS1012AFRWY Secure boot
2. PfE Validation support

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>

# 9629ccdd 22-May-2018 Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>

board: ls1012a: FRWY-LS1012A board support

FRWY-LS1012A belongs to LS1012A family with features 2 1G SGMII PFE
MAC, Micro SD, USB 3.0, DDR, QuadSPI, Audio, UART.

Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
[yorks: rebase and fix SPDX tag]
[yorks: fix board/freescale/ls1012afrdm/Kconfig]
Reviewed-by: York Sun <york.sun@nxp.com>

# b416df33 22-Apr-2022 Hou Zhiqiang <Zhiqiang.Hou@nxp.com>

configs: Layerscape: Remove the 'fdt_addr' env

On Layerscape platforms, the DTB is loaded from boot filesystem,
per the fdt_addr description in doc/README.distro, it must be
removed.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# 388de0fa 30-Mar-2022 Tom Rini <trini@konsulko.com>

Convert CONFIG_DIMM_SLOTS_PER_CTLR to Kconfig

This converts the following to Kconfig:
CONFIG_DIMM_SLOTS_PER_CTLR

Signed-off-by: Tom Rini <trini@konsulko.com>

# f9147d63 25-Feb-2022 Tom Rini <trini@konsulko.com>

Convert CONFIG_CHIP_SELECTS_PER_CTRL to Kconfig

This converts the following to Kconfig:
CONFIG_CHIP_SELECTS_PER_CTRL

Cc: Alison Wang <alison.wang@nxp.com>
Cc: Pramod Kumar <pramod.kumar_1@nxp.com>
Cc: Priyanka Jain <priyanka.jain@nxp.com>
Cc: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Cc: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>

# f76750d1 11-Dec-2021 Tom Rini <trini@konsulko.com>

Convert CONFIG_CONS_INDEX et al to Kconfig

This converts the following to Kconfig:
CONFIG_CONS_INDEX
CONFIG_DEBUG_UART_CLOCK
CONFIG_FSL_TZPC_BP147
CONFIG_GENERIC_ATMEL_MCI
CONFIG_IDENT_STRING
CONFIG_LIBATA
CONFIG_LNX_KRNL_IMG_TEXT_OFFSET_BASE
CONFIG_LPC32XX_GPIO
CONFIG_MP
CONFIG_MPC8XXX_GPIO
CONFIG_MTD_PARTITIONS
CONFIG_MVGBE
CONFIG_MXC_GPIO
CONFIG_NR_DRAM_BANKS
CONFIG_OF_BOARD_SETUP
CONFIG_OF_STDOUT_VIA_ALIAS
CONFIG_OF_SYSTEM_SETUP
CONFIG_PREBOOT
CONFIG_ROCKCHIP_SERIAL
CONFIG_RTC_ENABLE_32KHZ_OUTPUT
CONFIG_RTC_MV
CONFIG_SCSI_AHCI
CONFIG_SF_DEFAULT_BUS
CONFIG_SF_DEFAULT_CS
CONFIG_SF_DEFAULT_SPEED
CONFIG_SOFT_SPI
CONFIG_SPI_FLASH_EON
CONFIG_SPI_FLASH_MACRONIX
CONFIG_SPI_FLASH_MTD
CONFIG_SPI_FLASH_SPANSION
CONFIG_SPI_FLASH_SST
CONFIG_SPI_FLASH_STMICRO
CONFIG_SUPPORT_RAW_INITRD
CONFIG_SYS_ARCH_TIMER
CONFIG_SYS_BOARD
CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
CONFIG_SYS_DCACHE_OFF
CONFIG_SYS_FDT_SAVE_ADDRESS
CONFIG_SYS_FLASH_CFI
CONFIG_SYS_FSL_ERRATUM_ESDHC135
CONFIG_SYS_HAS_SERDES
CONFIG_SYS_L2CACHE_OFF
CONFIG_SYS_LITTLE_ENDIAN
CONFIG_SYS_LOAD_ADDR
CONFIG_SYS_MMCSD_FS_BOOT_PARTITION
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
CONFIG_SYS_NS16550
CONFIG_SYS_PLLFIN
CONFIG_SYS_SPI_U_BOOT_OFFS
CONFIG_TIMER_SYS_TICK_CH
CONFIG_USB_EHCI_FSL
CONFIG_U_QE
CONFIG_VERSION_VARIABLE

Signed-off-by: Tom Rini <trini@konsulko.com>

# 970bf860 10-Nov-2021 Tom Rini <trini@konsulko.com>

Convert CONFIG_USE_BOOTCOMMAND et al to Kconfig

This converts the following to Kconfig:
CONFIG_USE_BOOTCOMMAND
CONFIG_BOOTCOMMAND
CONFIG_RAMBOOTCOMMAND
CONFIG_NFSBOOTCOMMAND

Signed-off-by: Tom Rini <trini@konsulko.com>

# 34f39ce8 02-Jun-2021 Yangbo Lu <yangbo.lu@nxp.com>

armv8: layerscape: drop CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33

Drop CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33. CONFIG_FSL_ESDHC_VS33_NOT_SUPPORT
is used instead.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Acked-by: Michael Walle <michael@walle.cc> [for kontron-sl28]
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 864c3dbc 13-Apr-2021 Mian Yousaf Kaukab <ykaukab@suse.de>

ls1012a: net: pfe: remove pfe stop from bootcmd

When using bootefi to boot a EFI binary, u-boot is supposed to
provide networking service for EFI application. Currently, 'pfe stop'
command is called from bootcmd before running bootefi. As a result
network stops working for EFI applications and console is flooded with
"Rx pkt not on expected port" messages.

Implement board_quiesce_devices() for ls1012a boards and call
pfe_command_stop() from it instead of calling 'pfe stop' from
*_bootcmd and bootcmd.

Tested-by: Anji Jagarlmudi <anji.jagarlmudi@nxp.com>
Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
[Fixed checkpatch space error]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# a9855023 30-Mar-2021 Mian Yousaf Kaukab <ykaukab@suse.de>

ls1012a: use default scan_dev_for_boot

scan_dev_for_efi is supposed to be called from scan_dev_for_boot.
However, this call is missing for ls1012a boards. As a result EFI
boot doesn’t work. Fix this issue by removing custom definition of
scan_dev_for_boot and use the default definition instead.

Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 3fba2311 08-Jun-2020 Udit Agarwal <udit.agarwal@nxp.com>

include/configs: ls1012a: Remove fdt_high env variable

Remove "fdt_high" environment variable to use the bootm_size
to safely contain a kernel, device tree and initrd for
relocation.

Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# e985eb14 26-May-2020 Tom Rini <trini@konsulko.com>

Convert CONFIG_CMD_ASKENV et al to Kconfig

This converts the following to Kconfig:
CONFIG_CMD_ASKENV
CONFIG_CMD_BMP
CONFIG_CMD_BOOTD
CONFIG_CMD_CACHE
CONFIG_CMD_CRC32
CONFIG_CMD_DHCP
CONFIG_CMD_ENV
CONFIG_CMD_EXPORTENV
CONFIG_CMD_EXT2
CONFIG_CMD_EXT4
CONFIG_CMD_FLASH
CONFIG_CMD_FS_GENERIC
CONFIG_CMD_FUSE
CONFIG_CMD_GPIO
CONFIG_CMD_GPT
CONFIG_CMD_GREPENV
CONFIG_CMD_I2C
CONFIG_CMD_IMLS
CONFIG_CMD_IMPORTENV
CONFIG_CMD_LOADB
CONFIG_CMD_LOADS
CONFIG_CMD_MEMINFO
CONFIG_CMD_MII
CONFIG_CMD_MTDPARTS
CONFIG_CMD_NAND
CONFIG_CMD_NAND_TRIMFFS
CONFIG_CMD_NFS
CONFIG_CMD_PCA953X
CONFIG_CMD_PCA953X_INFO
CONFIG_CMD_PCI
CONFIG_CMD_PING
CONFIG_CMD_READ
CONFIG_CMD_SF
CONFIG_CMD_SPI
CONFIG_CMD_SPL
CONFIG_CMD_SPL_WRITE_SIZE
CONFIG_CMD_TIME
CONFIG_CMD_TRACE
CONFIG_CMD_UBI
CONFIG_CMD_UBIFS
CONFIG_CMD_UNZIP
CONFIG_FS_EXT4

Signed-off-by: Tom Rini <trini@konsulko.com>

# c93ad777 11-May-2020 Kuldeep Singh <kuldeep.singh@nxp.com>

treewide: Remove unused FSL QSPI config options for Layerscape platforms

Some of these options are not used by the driver anymore and some of
them are obsolete as the information is gathered from the dt. Also
consolidating defines in common headers.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 702de89c 04-May-2020 Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>

treewide: mem: Move mtest related defines to Kconfig

Move below defines which are used by mtest utility to Kconfig.
CONFIG_SYS_MEMTEST_START
CONFIG_SYS_MEMTEST_END

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
[trini: Fix kmcoge5ne board, re-run migration as well]
Signed-off-by: Tom Rini <trini@konsulko.com>

# a389c9cd 04-May-2020 Michal Simek <michal.simek@amd.com>

treewide: mem: Enable MEMTEST via defconfig

There is no reason to enable MEMTEST from headers when was converted to
Kconfig already.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>

# a2c402cc 17-Apr-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: drop env qspi_bootcmd

Drop useless environment variable installer and qspi_bootcmd
for ls1012afrwy.
Only 2 MB nor flash in ls1012afrwy. So cannot get kernel(30 MB) from
the nor flash, then drop it.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# fad129f3 22-Apr-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: support dhcp boot

Add support of dhcp boot for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 5706b9b5 23-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: fix board name

Fix board name for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 1d0bb1b9 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: adjust env kernel_addr_r

Adjust environment kernel_addr_r from 0x96000000 to 0x92000000
to fix a bug that failed to boot kernel for ls1012afrwy with 512MiB RAM,
=> tftpboot $kernel_addr_r Image (Image size is 36 MiB)
TFTP error: trying to overwrite reserved memory...

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# c8a7cadc 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: fix wrong env of board

Fix wrong environment variable of board for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 095b6be4 12-Mar-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: fix load address of itb with bootm command

The old load address of itb will overwrite uboots reserved memory
on ls1012afrwy with 512 MiB ram

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# f0d4cd43 10-Jan-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: adjust kernel_addr_r

The linux kernel Image is growing quite quickly,
if kernel Image size grow beyond 36 MB then
kernel Image at load address 0x81000000
overlaps with the reserved memory region
at 0x83400000.

Adjust kernel load address(kernel_addr_r) from
0x81000000 to 0x96000000 to avoid kernel Image
overlapping with reserved memory region.

This change fixes the below U-Boot error while
booting uncompressed kernel Image through booti command,
ERROR: reserving fdt memory region failed (addr=83400000 size=c00000)

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a3c9805f 15-Nov-2019 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012a: add pfe stop command

This adds pfe stop command before boot linux kernel
to fix a problem that ethernet won't be workable
after enter linux. Because there is a h/w limitation
in LS1012A PFE, to re-initialize PFE it has to be
safe shutdown, these steps are done through PFE stop.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a09fea1d 18-Nov-2019 Tom Rini <trini@konsulko.com>

env: Finish migration of common ENV options

- 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>

# 6972c60f 29-Sep-2019 Kuldeep Singh <kuldeep.singh@nxp.com>

configs: ls1012afrwy: Add CONFIG_ENV_ADDR

This configuration enables picking the environment from flash before
DDR init.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# 60742bfb 20-Jun-2019 Yangbo Lu <yangbo.lu@nxp.com>

Move CONFIG_FSL_ESDHC to defconfig

Moved CONFIG_FSL_ESDHC from header files to defconfig files.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Martyn Welch <martyn.welch@collabora.com>
Acked-by: Jason Liu <Jason.hui.liu@nxp.com>

# 78c58082 22-Apr-2019 Vinitha V Pillai <vinitha.pillai@nxp.com>

armv8: Secure Boot: Modify boot_a_script definition

esbc_validate command will not be executed if “load” command for its
header fails and will further execute the source command for bootscript,
without its validation and boot process continues.

To halt the boot process in case secure boot header is not loaded
successfully, esbc_validate command is invoked separately after “load”
command. The secure boot validation of the bootscript header will fail
(if header is not loaded) and halts the boot process, which prevent source
command from execution.

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>

# 7f91b658 05-Nov-2018 Rajesh Bhagat <rajesh.bhagat@nxp.com>

armv8: ls1012afrx: Add TFABOOT support

TFABOOT support includes:
- ls1012a2g5rdb/ls1012afrdm/ls1012afrwy_tfa_defconfig to be
loaded by trusted firmware
- define BOOTCOMMAND for TFABOOT

Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
[YS: remove unnecessary braces]
Reviewed-by: York Sun <york.sun@nxp.com>

# 1deae0c4 13-Aug-2018 Pramod Kumar <pramod.kumar_1@nxp.com>

ls1012afrwy: Add ls1012afrwy revC board support.

LS1012AFRWY supports three board revisions.
Revision A and B board are collectively identified as revA/B,
Revision C board is identifies as revC.

Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
[York S: revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>

# 86cf1c82 16-Aug-2018 Tom Rini <trini@konsulko.com>

configs: Migrate CONFIG_NR_DRAM_BANKS

We have the following cases:
- CONFIG_NR_DRAM_BANKS was defined, migrate normally
- CONFIG_NR_DRAM_BANKS_MAX was defined and then used for
CONFIG_NR_DRAM_BANKS after a check, just migrate it over now.
- CONFIG_NR_DRAM_BANKS was very oddly defined on p2771-0000-* (to 1024 +
2), set this to 8.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 2d91b533 22-May-2018 Vinitha V Pillai <vinitha.pillai@nxp.com>

LS1012AFRWY: Add Secure Boot support

Added the following:
1. defconfig for LS1012AFRWY Secure boot
2. PfE Validation support

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>

# 9629ccdd 22-May-2018 Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>

board: ls1012a: FRWY-LS1012A board support

FRWY-LS1012A belongs to LS1012A family with features 2 1G SGMII PFE
MAC, Micro SD, USB 3.0, DDR, QuadSPI, Audio, UART.

Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
[yorks: rebase and fix SPDX tag]
[yorks: fix board/freescale/ls1012afrdm/Kconfig]
Reviewed-by: York Sun <york.sun@nxp.com>

# 388de0fa 30-Mar-2022 Tom Rini <trini@konsulko.com>

Convert CONFIG_DIMM_SLOTS_PER_CTLR to Kconfig

This converts the following to Kconfig:
CONFIG_DIMM_SLOTS_PER_CTLR

Signed-off-by: Tom Rini <trini@konsulko.com>

# f9147d63 25-Feb-2022 Tom Rini <trini@konsulko.com>

Convert CONFIG_CHIP_SELECTS_PER_CTRL to Kconfig

This converts the following to Kconfig:
CONFIG_CHIP_SELECTS_PER_CTRL

Cc: Alison Wang <alison.wang@nxp.com>
Cc: Pramod Kumar <pramod.kumar_1@nxp.com>
Cc: Priyanka Jain <priyanka.jain@nxp.com>
Cc: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Cc: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>

# f76750d1 11-Dec-2021 Tom Rini <trini@konsulko.com>

Convert CONFIG_CONS_INDEX et al to Kconfig

This converts the following to Kconfig:
CONFIG_CONS_INDEX
CONFIG_DEBUG_UART_CLOCK
CONFIG_FSL_TZPC_BP147
CONFIG_GENERIC_ATMEL_MCI
CONFIG_IDENT_STRING
CONFIG_LIBATA
CONFIG_LNX_KRNL_IMG_TEXT_OFFSET_BASE
CONFIG_LPC32XX_GPIO
CONFIG_MP
CONFIG_MPC8XXX_GPIO
CONFIG_MTD_PARTITIONS
CONFIG_MVGBE
CONFIG_MXC_GPIO
CONFIG_NR_DRAM_BANKS
CONFIG_OF_BOARD_SETUP
CONFIG_OF_STDOUT_VIA_ALIAS
CONFIG_OF_SYSTEM_SETUP
CONFIG_PREBOOT
CONFIG_ROCKCHIP_SERIAL
CONFIG_RTC_ENABLE_32KHZ_OUTPUT
CONFIG_RTC_MV
CONFIG_SCSI_AHCI
CONFIG_SF_DEFAULT_BUS
CONFIG_SF_DEFAULT_CS
CONFIG_SF_DEFAULT_SPEED
CONFIG_SOFT_SPI
CONFIG_SPI_FLASH_EON
CONFIG_SPI_FLASH_MACRONIX
CONFIG_SPI_FLASH_MTD
CONFIG_SPI_FLASH_SPANSION
CONFIG_SPI_FLASH_SST
CONFIG_SPI_FLASH_STMICRO
CONFIG_SUPPORT_RAW_INITRD
CONFIG_SYS_ARCH_TIMER
CONFIG_SYS_BOARD
CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
CONFIG_SYS_DCACHE_OFF
CONFIG_SYS_FDT_SAVE_ADDRESS
CONFIG_SYS_FLASH_CFI
CONFIG_SYS_FSL_ERRATUM_ESDHC135
CONFIG_SYS_HAS_SERDES
CONFIG_SYS_L2CACHE_OFF
CONFIG_SYS_LITTLE_ENDIAN
CONFIG_SYS_LOAD_ADDR
CONFIG_SYS_MMCSD_FS_BOOT_PARTITION
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
CONFIG_SYS_NS16550
CONFIG_SYS_PLLFIN
CONFIG_SYS_SPI_U_BOOT_OFFS
CONFIG_TIMER_SYS_TICK_CH
CONFIG_USB_EHCI_FSL
CONFIG_U_QE
CONFIG_VERSION_VARIABLE

Signed-off-by: Tom Rini <trini@konsulko.com>

# 970bf860 10-Nov-2021 Tom Rini <trini@konsulko.com>

Convert CONFIG_USE_BOOTCOMMAND et al to Kconfig

This converts the following to Kconfig:
CONFIG_USE_BOOTCOMMAND
CONFIG_BOOTCOMMAND
CONFIG_RAMBOOTCOMMAND
CONFIG_NFSBOOTCOMMAND

Signed-off-by: Tom Rini <trini@konsulko.com>

# 34f39ce8 02-Jun-2021 Yangbo Lu <yangbo.lu@nxp.com>

armv8: layerscape: drop CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33

Drop CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33. CONFIG_FSL_ESDHC_VS33_NOT_SUPPORT
is used instead.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Acked-by: Michael Walle <michael@walle.cc> [for kontron-sl28]
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 864c3dbc 13-Apr-2021 Mian Yousaf Kaukab <ykaukab@suse.de>

ls1012a: net: pfe: remove pfe stop from bootcmd

When using bootefi to boot a EFI binary, u-boot is supposed to
provide networking service for EFI application. Currently, 'pfe stop'
command is called from bootcmd before running bootefi. As a result
network stops working for EFI applications and console is flooded with
"Rx pkt not on expected port" messages.

Implement board_quiesce_devices() for ls1012a boards and call
pfe_command_stop() from it instead of calling 'pfe stop' from
*_bootcmd and bootcmd.

Tested-by: Anji Jagarlmudi <anji.jagarlmudi@nxp.com>
Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
[Fixed checkpatch space error]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# a9855023 30-Mar-2021 Mian Yousaf Kaukab <ykaukab@suse.de>

ls1012a: use default scan_dev_for_boot

scan_dev_for_efi is supposed to be called from scan_dev_for_boot.
However, this call is missing for ls1012a boards. As a result EFI
boot doesn’t work. Fix this issue by removing custom definition of
scan_dev_for_boot and use the default definition instead.

Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 3fba2311 08-Jun-2020 Udit Agarwal <udit.agarwal@nxp.com>

include/configs: ls1012a: Remove fdt_high env variable

Remove "fdt_high" environment variable to use the bootm_size
to safely contain a kernel, device tree and initrd for
relocation.

Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# e985eb14 26-May-2020 Tom Rini <trini@konsulko.com>

Convert CONFIG_CMD_ASKENV et al to Kconfig

This converts the following to Kconfig:
CONFIG_CMD_ASKENV
CONFIG_CMD_BMP
CONFIG_CMD_BOOTD
CONFIG_CMD_CACHE
CONFIG_CMD_CRC32
CONFIG_CMD_DHCP
CONFIG_CMD_ENV
CONFIG_CMD_EXPORTENV
CONFIG_CMD_EXT2
CONFIG_CMD_EXT4
CONFIG_CMD_FLASH
CONFIG_CMD_FS_GENERIC
CONFIG_CMD_FUSE
CONFIG_CMD_GPIO
CONFIG_CMD_GPT
CONFIG_CMD_GREPENV
CONFIG_CMD_I2C
CONFIG_CMD_IMLS
CONFIG_CMD_IMPORTENV
CONFIG_CMD_LOADB
CONFIG_CMD_LOADS
CONFIG_CMD_MEMINFO
CONFIG_CMD_MII
CONFIG_CMD_MTDPARTS
CONFIG_CMD_NAND
CONFIG_CMD_NAND_TRIMFFS
CONFIG_CMD_NFS
CONFIG_CMD_PCA953X
CONFIG_CMD_PCA953X_INFO
CONFIG_CMD_PCI
CONFIG_CMD_PING
CONFIG_CMD_READ
CONFIG_CMD_SF
CONFIG_CMD_SPI
CONFIG_CMD_SPL
CONFIG_CMD_SPL_WRITE_SIZE
CONFIG_CMD_TIME
CONFIG_CMD_TRACE
CONFIG_CMD_UBI
CONFIG_CMD_UBIFS
CONFIG_CMD_UNZIP
CONFIG_FS_EXT4

Signed-off-by: Tom Rini <trini@konsulko.com>

# c93ad777 11-May-2020 Kuldeep Singh <kuldeep.singh@nxp.com>

treewide: Remove unused FSL QSPI config options for Layerscape platforms

Some of these options are not used by the driver anymore and some of
them are obsolete as the information is gathered from the dt. Also
consolidating defines in common headers.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 702de89c 04-May-2020 Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>

treewide: mem: Move mtest related defines to Kconfig

Move below defines which are used by mtest utility to Kconfig.
CONFIG_SYS_MEMTEST_START
CONFIG_SYS_MEMTEST_END

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
[trini: Fix kmcoge5ne board, re-run migration as well]
Signed-off-by: Tom Rini <trini@konsulko.com>

# a389c9cd 04-May-2020 Michal Simek <michal.simek@xilinx.com>

treewide: mem: Enable MEMTEST via defconfig

There is no reason to enable MEMTEST from headers when was converted to
Kconfig already.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>

# a2c402cc 17-Apr-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: drop env qspi_bootcmd

Drop useless environment variable installer and qspi_bootcmd
for ls1012afrwy.
Only 2 MB nor flash in ls1012afrwy. So cannot get kernel(30 MB) from
the nor flash, then drop it.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# fad129f3 22-Apr-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: support dhcp boot

Add support of dhcp boot for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 5706b9b5 23-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: fix board name

Fix board name for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 1d0bb1b9 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: adjust env kernel_addr_r

Adjust environment kernel_addr_r from 0x96000000 to 0x92000000
to fix a bug that failed to boot kernel for ls1012afrwy with 512MiB RAM,
=> tftpboot $kernel_addr_r Image (Image size is 36 MiB)
TFTP error: trying to overwrite reserved memory...

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# c8a7cadc 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: fix wrong env of board

Fix wrong environment variable of board for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 095b6be4 12-Mar-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: fix load address of itb with bootm command

The old load address of itb will overwrite uboots reserved memory
on ls1012afrwy with 512 MiB ram

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# f0d4cd43 10-Jan-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: adjust kernel_addr_r

The linux kernel Image is growing quite quickly,
if kernel Image size grow beyond 36 MB then
kernel Image at load address 0x81000000
overlaps with the reserved memory region
at 0x83400000.

Adjust kernel load address(kernel_addr_r) from
0x81000000 to 0x96000000 to avoid kernel Image
overlapping with reserved memory region.

This change fixes the below U-Boot error while
booting uncompressed kernel Image through booti command,
ERROR: reserving fdt memory region failed (addr=83400000 size=c00000)

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a3c9805f 15-Nov-2019 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012a: add pfe stop command

This adds pfe stop command before boot linux kernel
to fix a problem that ethernet won't be workable
after enter linux. Because there is a h/w limitation
in LS1012A PFE, to re-initialize PFE it has to be
safe shutdown, these steps are done through PFE stop.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a09fea1d 18-Nov-2019 Tom Rini <trini@konsulko.com>

env: Finish migration of common ENV options

- 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>

# 6972c60f 29-Sep-2019 Kuldeep Singh <kuldeep.singh@nxp.com>

configs: ls1012afrwy: Add CONFIG_ENV_ADDR

This configuration enables picking the environment from flash before
DDR init.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# 60742bfb 20-Jun-2019 Yangbo Lu <yangbo.lu@nxp.com>

Move CONFIG_FSL_ESDHC to defconfig

Moved CONFIG_FSL_ESDHC from header files to defconfig files.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Martyn Welch <martyn.welch@collabora.com>
Acked-by: Jason Liu <Jason.hui.liu@nxp.com>

# 78c58082 22-Apr-2019 Vinitha V Pillai <vinitha.pillai@nxp.com>

armv8: Secure Boot: Modify boot_a_script definition

esbc_validate command will not be executed if “load” command for its
header fails and will further execute the source command for bootscript,
without its validation and boot process continues.

To halt the boot process in case secure boot header is not loaded
successfully, esbc_validate command is invoked separately after “load”
command. The secure boot validation of the bootscript header will fail
(if header is not loaded) and halts the boot process, which prevent source
command from execution.

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>

# 7f91b658 05-Nov-2018 Rajesh Bhagat <rajesh.bhagat@nxp.com>

armv8: ls1012afrx: Add TFABOOT support

TFABOOT support includes:
- ls1012a2g5rdb/ls1012afrdm/ls1012afrwy_tfa_defconfig to be
loaded by trusted firmware
- define BOOTCOMMAND for TFABOOT

Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
[YS: remove unnecessary braces]
Reviewed-by: York Sun <york.sun@nxp.com>

# 1deae0c4 13-Aug-2018 Pramod Kumar <pramod.kumar_1@nxp.com>

ls1012afrwy: Add ls1012afrwy revC board support.

LS1012AFRWY supports three board revisions.
Revision A and B board are collectively identified as revA/B,
Revision C board is identifies as revC.

Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
[York S: revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>

# 86cf1c82 16-Aug-2018 Tom Rini <trini@konsulko.com>

configs: Migrate CONFIG_NR_DRAM_BANKS

We have the following cases:
- CONFIG_NR_DRAM_BANKS was defined, migrate normally
- CONFIG_NR_DRAM_BANKS_MAX was defined and then used for
CONFIG_NR_DRAM_BANKS after a check, just migrate it over now.
- CONFIG_NR_DRAM_BANKS was very oddly defined on p2771-0000-* (to 1024 +
2), set this to 8.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 2d91b533 22-May-2018 Vinitha V Pillai <vinitha.pillai@nxp.com>

LS1012AFRWY: Add Secure Boot support

Added the following:
1. defconfig for LS1012AFRWY Secure boot
2. PfE Validation support

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>

# 9629ccdd 22-May-2018 Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>

board: ls1012a: FRWY-LS1012A board support

FRWY-LS1012A belongs to LS1012A family with features 2 1G SGMII PFE
MAC, Micro SD, USB 3.0, DDR, QuadSPI, Audio, UART.

Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
[yorks: rebase and fix SPDX tag]
[yorks: fix board/freescale/ls1012afrdm/Kconfig]
Reviewed-by: York Sun <york.sun@nxp.com>

# f9147d63 25-Feb-2022 Tom Rini <trini@konsulko.com>

Convert CONFIG_CHIP_SELECTS_PER_CTRL to Kconfig

This converts the following to Kconfig:
CONFIG_CHIP_SELECTS_PER_CTRL

Cc: Alison Wang <alison.wang@nxp.com>
Cc: Pramod Kumar <pramod.kumar_1@nxp.com>
Cc: Priyanka Jain <priyanka.jain@nxp.com>
Cc: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Cc: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>

# f76750d1 11-Dec-2021 Tom Rini <trini@konsulko.com>

Convert CONFIG_CONS_INDEX et al to Kconfig

This converts the following to Kconfig:
CONFIG_CONS_INDEX
CONFIG_DEBUG_UART_CLOCK
CONFIG_FSL_TZPC_BP147
CONFIG_GENERIC_ATMEL_MCI
CONFIG_IDENT_STRING
CONFIG_LIBATA
CONFIG_LNX_KRNL_IMG_TEXT_OFFSET_BASE
CONFIG_LPC32XX_GPIO
CONFIG_MP
CONFIG_MPC8XXX_GPIO
CONFIG_MTD_PARTITIONS
CONFIG_MVGBE
CONFIG_MXC_GPIO
CONFIG_NR_DRAM_BANKS
CONFIG_OF_BOARD_SETUP
CONFIG_OF_STDOUT_VIA_ALIAS
CONFIG_OF_SYSTEM_SETUP
CONFIG_PREBOOT
CONFIG_ROCKCHIP_SERIAL
CONFIG_RTC_ENABLE_32KHZ_OUTPUT
CONFIG_RTC_MV
CONFIG_SCSI_AHCI
CONFIG_SF_DEFAULT_BUS
CONFIG_SF_DEFAULT_CS
CONFIG_SF_DEFAULT_SPEED
CONFIG_SOFT_SPI
CONFIG_SPI_FLASH_EON
CONFIG_SPI_FLASH_MACRONIX
CONFIG_SPI_FLASH_MTD
CONFIG_SPI_FLASH_SPANSION
CONFIG_SPI_FLASH_SST
CONFIG_SPI_FLASH_STMICRO
CONFIG_SUPPORT_RAW_INITRD
CONFIG_SYS_ARCH_TIMER
CONFIG_SYS_BOARD
CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
CONFIG_SYS_DCACHE_OFF
CONFIG_SYS_FDT_SAVE_ADDRESS
CONFIG_SYS_FLASH_CFI
CONFIG_SYS_FSL_ERRATUM_ESDHC135
CONFIG_SYS_HAS_SERDES
CONFIG_SYS_L2CACHE_OFF
CONFIG_SYS_LITTLE_ENDIAN
CONFIG_SYS_LOAD_ADDR
CONFIG_SYS_MMCSD_FS_BOOT_PARTITION
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
CONFIG_SYS_NS16550
CONFIG_SYS_PLLFIN
CONFIG_SYS_SPI_U_BOOT_OFFS
CONFIG_TIMER_SYS_TICK_CH
CONFIG_USB_EHCI_FSL
CONFIG_U_QE
CONFIG_VERSION_VARIABLE

Signed-off-by: Tom Rini <trini@konsulko.com>

# 970bf860 10-Nov-2021 Tom Rini <trini@konsulko.com>

Convert CONFIG_USE_BOOTCOMMAND et al to Kconfig

This converts the following to Kconfig:
CONFIG_USE_BOOTCOMMAND
CONFIG_BOOTCOMMAND
CONFIG_RAMBOOTCOMMAND
CONFIG_NFSBOOTCOMMAND

Signed-off-by: Tom Rini <trini@konsulko.com>

# 34f39ce8 02-Jun-2021 Yangbo Lu <yangbo.lu@nxp.com>

armv8: layerscape: drop CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33

Drop CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33. CONFIG_FSL_ESDHC_VS33_NOT_SUPPORT
is used instead.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Acked-by: Michael Walle <michael@walle.cc> [for kontron-sl28]
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 864c3dbc 13-Apr-2021 Mian Yousaf Kaukab <ykaukab@suse.de>

ls1012a: net: pfe: remove pfe stop from bootcmd

When using bootefi to boot a EFI binary, u-boot is supposed to
provide networking service for EFI application. Currently, 'pfe stop'
command is called from bootcmd before running bootefi. As a result
network stops working for EFI applications and console is flooded with
"Rx pkt not on expected port" messages.

Implement board_quiesce_devices() for ls1012a boards and call
pfe_command_stop() from it instead of calling 'pfe stop' from
*_bootcmd and bootcmd.

Tested-by: Anji Jagarlmudi <anji.jagarlmudi@nxp.com>
Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
[Fixed checkpatch space error]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# a9855023 30-Mar-2021 Mian Yousaf Kaukab <ykaukab@suse.de>

ls1012a: use default scan_dev_for_boot

scan_dev_for_efi is supposed to be called from scan_dev_for_boot.
However, this call is missing for ls1012a boards. As a result EFI
boot doesn’t work. Fix this issue by removing custom definition of
scan_dev_for_boot and use the default definition instead.

Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 3fba2311 08-Jun-2020 Udit Agarwal <udit.agarwal@nxp.com>

include/configs: ls1012a: Remove fdt_high env variable

Remove "fdt_high" environment variable to use the bootm_size
to safely contain a kernel, device tree and initrd for
relocation.

Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# e985eb14 26-May-2020 Tom Rini <trini@konsulko.com>

Convert CONFIG_CMD_ASKENV et al to Kconfig

This converts the following to Kconfig:
CONFIG_CMD_ASKENV
CONFIG_CMD_BMP
CONFIG_CMD_BOOTD
CONFIG_CMD_CACHE
CONFIG_CMD_CRC32
CONFIG_CMD_DHCP
CONFIG_CMD_ENV
CONFIG_CMD_EXPORTENV
CONFIG_CMD_EXT2
CONFIG_CMD_EXT4
CONFIG_CMD_FLASH
CONFIG_CMD_FS_GENERIC
CONFIG_CMD_FUSE
CONFIG_CMD_GPIO
CONFIG_CMD_GPT
CONFIG_CMD_GREPENV
CONFIG_CMD_I2C
CONFIG_CMD_IMLS
CONFIG_CMD_IMPORTENV
CONFIG_CMD_LOADB
CONFIG_CMD_LOADS
CONFIG_CMD_MEMINFO
CONFIG_CMD_MII
CONFIG_CMD_MTDPARTS
CONFIG_CMD_NAND
CONFIG_CMD_NAND_TRIMFFS
CONFIG_CMD_NFS
CONFIG_CMD_PCA953X
CONFIG_CMD_PCA953X_INFO
CONFIG_CMD_PCI
CONFIG_CMD_PING
CONFIG_CMD_READ
CONFIG_CMD_SF
CONFIG_CMD_SPI
CONFIG_CMD_SPL
CONFIG_CMD_SPL_WRITE_SIZE
CONFIG_CMD_TIME
CONFIG_CMD_TRACE
CONFIG_CMD_UBI
CONFIG_CMD_UBIFS
CONFIG_CMD_UNZIP
CONFIG_FS_EXT4

Signed-off-by: Tom Rini <trini@konsulko.com>

# c93ad777 11-May-2020 Kuldeep Singh <kuldeep.singh@nxp.com>

treewide: Remove unused FSL QSPI config options for Layerscape platforms

Some of these options are not used by the driver anymore and some of
them are obsolete as the information is gathered from the dt. Also
consolidating defines in common headers.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 702de89c 04-May-2020 Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>

treewide: mem: Move mtest related defines to Kconfig

Move below defines which are used by mtest utility to Kconfig.
CONFIG_SYS_MEMTEST_START
CONFIG_SYS_MEMTEST_END

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
[trini: Fix kmcoge5ne board, re-run migration as well]
Signed-off-by: Tom Rini <trini@konsulko.com>

# a389c9cd 04-May-2020 Michal Simek <michal.simek@xilinx.com>

treewide: mem: Enable MEMTEST via defconfig

There is no reason to enable MEMTEST from headers when was converted to
Kconfig already.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>

# a2c402cc 17-Apr-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: drop env qspi_bootcmd

Drop useless environment variable installer and qspi_bootcmd
for ls1012afrwy.
Only 2 MB nor flash in ls1012afrwy. So cannot get kernel(30 MB) from
the nor flash, then drop it.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# fad129f3 22-Apr-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: support dhcp boot

Add support of dhcp boot for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 5706b9b5 23-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: fix board name

Fix board name for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 1d0bb1b9 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: adjust env kernel_addr_r

Adjust environment kernel_addr_r from 0x96000000 to 0x92000000
to fix a bug that failed to boot kernel for ls1012afrwy with 512MiB RAM,
=> tftpboot $kernel_addr_r Image (Image size is 36 MiB)
TFTP error: trying to overwrite reserved memory...

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# c8a7cadc 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: fix wrong env of board

Fix wrong environment variable of board for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 095b6be4 12-Mar-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: fix load address of itb with bootm command

The old load address of itb will overwrite uboots reserved memory
on ls1012afrwy with 512 MiB ram

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# f0d4cd43 10-Jan-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: adjust kernel_addr_r

The linux kernel Image is growing quite quickly,
if kernel Image size grow beyond 36 MB then
kernel Image at load address 0x81000000
overlaps with the reserved memory region
at 0x83400000.

Adjust kernel load address(kernel_addr_r) from
0x81000000 to 0x96000000 to avoid kernel Image
overlapping with reserved memory region.

This change fixes the below U-Boot error while
booting uncompressed kernel Image through booti command,
ERROR: reserving fdt memory region failed (addr=83400000 size=c00000)

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a3c9805f 15-Nov-2019 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012a: add pfe stop command

This adds pfe stop command before boot linux kernel
to fix a problem that ethernet won't be workable
after enter linux. Because there is a h/w limitation
in LS1012A PFE, to re-initialize PFE it has to be
safe shutdown, these steps are done through PFE stop.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a09fea1d 18-Nov-2019 Tom Rini <trini@konsulko.com>

env: Finish migration of common ENV options

- 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>

# 6972c60f 29-Sep-2019 Kuldeep Singh <kuldeep.singh@nxp.com>

configs: ls1012afrwy: Add CONFIG_ENV_ADDR

This configuration enables picking the environment from flash before
DDR init.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# 60742bfb 20-Jun-2019 Yangbo Lu <yangbo.lu@nxp.com>

Move CONFIG_FSL_ESDHC to defconfig

Moved CONFIG_FSL_ESDHC from header files to defconfig files.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Martyn Welch <martyn.welch@collabora.com>
Acked-by: Jason Liu <Jason.hui.liu@nxp.com>

# 78c58082 22-Apr-2019 Vinitha V Pillai <vinitha.pillai@nxp.com>

armv8: Secure Boot: Modify boot_a_script definition

esbc_validate command will not be executed if “load” command for its
header fails and will further execute the source command for bootscript,
without its validation and boot process continues.

To halt the boot process in case secure boot header is not loaded
successfully, esbc_validate command is invoked separately after “load”
command. The secure boot validation of the bootscript header will fail
(if header is not loaded) and halts the boot process, which prevent source
command from execution.

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>

# 7f91b658 05-Nov-2018 Rajesh Bhagat <rajesh.bhagat@nxp.com>

armv8: ls1012afrx: Add TFABOOT support

TFABOOT support includes:
- ls1012a2g5rdb/ls1012afrdm/ls1012afrwy_tfa_defconfig to be
loaded by trusted firmware
- define BOOTCOMMAND for TFABOOT

Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
[YS: remove unnecessary braces]
Reviewed-by: York Sun <york.sun@nxp.com>

# 1deae0c4 13-Aug-2018 Pramod Kumar <pramod.kumar_1@nxp.com>

ls1012afrwy: Add ls1012afrwy revC board support.

LS1012AFRWY supports three board revisions.
Revision A and B board are collectively identified as revA/B,
Revision C board is identifies as revC.

Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
[York S: revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>

# 86cf1c82 16-Aug-2018 Tom Rini <trini@konsulko.com>

configs: Migrate CONFIG_NR_DRAM_BANKS

We have the following cases:
- CONFIG_NR_DRAM_BANKS was defined, migrate normally
- CONFIG_NR_DRAM_BANKS_MAX was defined and then used for
CONFIG_NR_DRAM_BANKS after a check, just migrate it over now.
- CONFIG_NR_DRAM_BANKS was very oddly defined on p2771-0000-* (to 1024 +
2), set this to 8.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 2d91b533 22-May-2018 Vinitha V Pillai <vinitha.pillai@nxp.com>

LS1012AFRWY: Add Secure Boot support

Added the following:
1. defconfig for LS1012AFRWY Secure boot
2. PfE Validation support

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>

# 9629ccdd 22-May-2018 Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>

board: ls1012a: FRWY-LS1012A board support

FRWY-LS1012A belongs to LS1012A family with features 2 1G SGMII PFE
MAC, Micro SD, USB 3.0, DDR, QuadSPI, Audio, UART.

Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
[yorks: rebase and fix SPDX tag]
[yorks: fix board/freescale/ls1012afrdm/Kconfig]
Reviewed-by: York Sun <york.sun@nxp.com>

# f76750d1 11-Dec-2021 Tom Rini <trini@konsulko.com>

Convert CONFIG_CONS_INDEX et al to Kconfig

This converts the following to Kconfig:
CONFIG_CONS_INDEX
CONFIG_DEBUG_UART_CLOCK
CONFIG_FSL_TZPC_BP147
CONFIG_GENERIC_ATMEL_MCI
CONFIG_IDENT_STRING
CONFIG_LIBATA
CONFIG_LNX_KRNL_IMG_TEXT_OFFSET_BASE
CONFIG_LPC32XX_GPIO
CONFIG_MP
CONFIG_MPC8XXX_GPIO
CONFIG_MTD_PARTITIONS
CONFIG_MVGBE
CONFIG_MXC_GPIO
CONFIG_NR_DRAM_BANKS
CONFIG_OF_BOARD_SETUP
CONFIG_OF_STDOUT_VIA_ALIAS
CONFIG_OF_SYSTEM_SETUP
CONFIG_PREBOOT
CONFIG_ROCKCHIP_SERIAL
CONFIG_RTC_ENABLE_32KHZ_OUTPUT
CONFIG_RTC_MV
CONFIG_SCSI_AHCI
CONFIG_SF_DEFAULT_BUS
CONFIG_SF_DEFAULT_CS
CONFIG_SF_DEFAULT_SPEED
CONFIG_SOFT_SPI
CONFIG_SPI_FLASH_EON
CONFIG_SPI_FLASH_MACRONIX
CONFIG_SPI_FLASH_MTD
CONFIG_SPI_FLASH_SPANSION
CONFIG_SPI_FLASH_SST
CONFIG_SPI_FLASH_STMICRO
CONFIG_SUPPORT_RAW_INITRD
CONFIG_SYS_ARCH_TIMER
CONFIG_SYS_BOARD
CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
CONFIG_SYS_DCACHE_OFF
CONFIG_SYS_FDT_SAVE_ADDRESS
CONFIG_SYS_FLASH_CFI
CONFIG_SYS_FSL_ERRATUM_ESDHC135
CONFIG_SYS_HAS_SERDES
CONFIG_SYS_L2CACHE_OFF
CONFIG_SYS_LITTLE_ENDIAN
CONFIG_SYS_LOAD_ADDR
CONFIG_SYS_MMCSD_FS_BOOT_PARTITION
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
CONFIG_SYS_NS16550
CONFIG_SYS_PLLFIN
CONFIG_SYS_SPI_U_BOOT_OFFS
CONFIG_TIMER_SYS_TICK_CH
CONFIG_USB_EHCI_FSL
CONFIG_U_QE
CONFIG_VERSION_VARIABLE

Signed-off-by: Tom Rini <trini@konsulko.com>

# 970bf860 10-Nov-2021 Tom Rini <trini@konsulko.com>

Convert CONFIG_USE_BOOTCOMMAND et al to Kconfig

This converts the following to Kconfig:
CONFIG_USE_BOOTCOMMAND
CONFIG_BOOTCOMMAND
CONFIG_RAMBOOTCOMMAND
CONFIG_NFSBOOTCOMMAND

Signed-off-by: Tom Rini <trini@konsulko.com>

# 34f39ce8 02-Jun-2021 Yangbo Lu <yangbo.lu@nxp.com>

armv8: layerscape: drop CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33

Drop CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33. CONFIG_FSL_ESDHC_VS33_NOT_SUPPORT
is used instead.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Acked-by: Michael Walle <michael@walle.cc> [for kontron-sl28]
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 864c3dbc 13-Apr-2021 Mian Yousaf Kaukab <ykaukab@suse.de>

ls1012a: net: pfe: remove pfe stop from bootcmd

When using bootefi to boot a EFI binary, u-boot is supposed to
provide networking service for EFI application. Currently, 'pfe stop'
command is called from bootcmd before running bootefi. As a result
network stops working for EFI applications and console is flooded with
"Rx pkt not on expected port" messages.

Implement board_quiesce_devices() for ls1012a boards and call
pfe_command_stop() from it instead of calling 'pfe stop' from
*_bootcmd and bootcmd.

Tested-by: Anji Jagarlmudi <anji.jagarlmudi@nxp.com>
Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
[Fixed checkpatch space error]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# a9855023 30-Mar-2021 Mian Yousaf Kaukab <ykaukab@suse.de>

ls1012a: use default scan_dev_for_boot

scan_dev_for_efi is supposed to be called from scan_dev_for_boot.
However, this call is missing for ls1012a boards. As a result EFI
boot doesn’t work. Fix this issue by removing custom definition of
scan_dev_for_boot and use the default definition instead.

Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 3fba2311 08-Jun-2020 Udit Agarwal <udit.agarwal@nxp.com>

include/configs: ls1012a: Remove fdt_high env variable

Remove "fdt_high" environment variable to use the bootm_size
to safely contain a kernel, device tree and initrd for
relocation.

Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# e985eb14 26-May-2020 Tom Rini <trini@konsulko.com>

Convert CONFIG_CMD_ASKENV et al to Kconfig

This converts the following to Kconfig:
CONFIG_CMD_ASKENV
CONFIG_CMD_BMP
CONFIG_CMD_BOOTD
CONFIG_CMD_CACHE
CONFIG_CMD_CRC32
CONFIG_CMD_DHCP
CONFIG_CMD_ENV
CONFIG_CMD_EXPORTENV
CONFIG_CMD_EXT2
CONFIG_CMD_EXT4
CONFIG_CMD_FLASH
CONFIG_CMD_FS_GENERIC
CONFIG_CMD_FUSE
CONFIG_CMD_GPIO
CONFIG_CMD_GPT
CONFIG_CMD_GREPENV
CONFIG_CMD_I2C
CONFIG_CMD_IMLS
CONFIG_CMD_IMPORTENV
CONFIG_CMD_LOADB
CONFIG_CMD_LOADS
CONFIG_CMD_MEMINFO
CONFIG_CMD_MII
CONFIG_CMD_MTDPARTS
CONFIG_CMD_NAND
CONFIG_CMD_NAND_TRIMFFS
CONFIG_CMD_NFS
CONFIG_CMD_PCA953X
CONFIG_CMD_PCA953X_INFO
CONFIG_CMD_PCI
CONFIG_CMD_PING
CONFIG_CMD_READ
CONFIG_CMD_SF
CONFIG_CMD_SPI
CONFIG_CMD_SPL
CONFIG_CMD_SPL_WRITE_SIZE
CONFIG_CMD_TIME
CONFIG_CMD_TRACE
CONFIG_CMD_UBI
CONFIG_CMD_UBIFS
CONFIG_CMD_UNZIP
CONFIG_FS_EXT4

Signed-off-by: Tom Rini <trini@konsulko.com>

# c93ad777 11-May-2020 Kuldeep Singh <kuldeep.singh@nxp.com>

treewide: Remove unused FSL QSPI config options for Layerscape platforms

Some of these options are not used by the driver anymore and some of
them are obsolete as the information is gathered from the dt. Also
consolidating defines in common headers.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 702de89c 04-May-2020 Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>

treewide: mem: Move mtest related defines to Kconfig

Move below defines which are used by mtest utility to Kconfig.
CONFIG_SYS_MEMTEST_START
CONFIG_SYS_MEMTEST_END

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
[trini: Fix kmcoge5ne board, re-run migration as well]
Signed-off-by: Tom Rini <trini@konsulko.com>

# a389c9cd 04-May-2020 Michal Simek <michal.simek@xilinx.com>

treewide: mem: Enable MEMTEST via defconfig

There is no reason to enable MEMTEST from headers when was converted to
Kconfig already.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>

# a2c402cc 17-Apr-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: drop env qspi_bootcmd

Drop useless environment variable installer and qspi_bootcmd
for ls1012afrwy.
Only 2 MB nor flash in ls1012afrwy. So cannot get kernel(30 MB) from
the nor flash, then drop it.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# fad129f3 22-Apr-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: support dhcp boot

Add support of dhcp boot for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 5706b9b5 23-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: fix board name

Fix board name for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 1d0bb1b9 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: adjust env kernel_addr_r

Adjust environment kernel_addr_r from 0x96000000 to 0x92000000
to fix a bug that failed to boot kernel for ls1012afrwy with 512MiB RAM,
=> tftpboot $kernel_addr_r Image (Image size is 36 MiB)
TFTP error: trying to overwrite reserved memory...

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# c8a7cadc 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: fix wrong env of board

Fix wrong environment variable of board for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 095b6be4 12-Mar-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: fix load address of itb with bootm command

The old load address of itb will overwrite uboots reserved memory
on ls1012afrwy with 512 MiB ram

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# f0d4cd43 10-Jan-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: adjust kernel_addr_r

The linux kernel Image is growing quite quickly,
if kernel Image size grow beyond 36 MB then
kernel Image at load address 0x81000000
overlaps with the reserved memory region
at 0x83400000.

Adjust kernel load address(kernel_addr_r) from
0x81000000 to 0x96000000 to avoid kernel Image
overlapping with reserved memory region.

This change fixes the below U-Boot error while
booting uncompressed kernel Image through booti command,
ERROR: reserving fdt memory region failed (addr=83400000 size=c00000)

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a3c9805f 15-Nov-2019 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012a: add pfe stop command

This adds pfe stop command before boot linux kernel
to fix a problem that ethernet won't be workable
after enter linux. Because there is a h/w limitation
in LS1012A PFE, to re-initialize PFE it has to be
safe shutdown, these steps are done through PFE stop.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a09fea1d 18-Nov-2019 Tom Rini <trini@konsulko.com>

env: Finish migration of common ENV options

- 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>

# 6972c60f 29-Sep-2019 Kuldeep Singh <kuldeep.singh@nxp.com>

configs: ls1012afrwy: Add CONFIG_ENV_ADDR

This configuration enables picking the environment from flash before
DDR init.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# 60742bfb 20-Jun-2019 Yangbo Lu <yangbo.lu@nxp.com>

Move CONFIG_FSL_ESDHC to defconfig

Moved CONFIG_FSL_ESDHC from header files to defconfig files.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Martyn Welch <martyn.welch@collabora.com>
Acked-by: Jason Liu <Jason.hui.liu@nxp.com>

# 78c58082 22-Apr-2019 Vinitha V Pillai <vinitha.pillai@nxp.com>

armv8: Secure Boot: Modify boot_a_script definition

esbc_validate command will not be executed if “load” command for its
header fails and will further execute the source command for bootscript,
without its validation and boot process continues.

To halt the boot process in case secure boot header is not loaded
successfully, esbc_validate command is invoked separately after “load”
command. The secure boot validation of the bootscript header will fail
(if header is not loaded) and halts the boot process, which prevent source
command from execution.

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>

# 7f91b658 05-Nov-2018 Rajesh Bhagat <rajesh.bhagat@nxp.com>

armv8: ls1012afrx: Add TFABOOT support

TFABOOT support includes:
- ls1012a2g5rdb/ls1012afrdm/ls1012afrwy_tfa_defconfig to be
loaded by trusted firmware
- define BOOTCOMMAND for TFABOOT

Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
[YS: remove unnecessary braces]
Reviewed-by: York Sun <york.sun@nxp.com>

# 1deae0c4 13-Aug-2018 Pramod Kumar <pramod.kumar_1@nxp.com>

ls1012afrwy: Add ls1012afrwy revC board support.

LS1012AFRWY supports three board revisions.
Revision A and B board are collectively identified as revA/B,
Revision C board is identifies as revC.

Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
[York S: revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>

# 86cf1c82 16-Aug-2018 Tom Rini <trini@konsulko.com>

configs: Migrate CONFIG_NR_DRAM_BANKS

We have the following cases:
- CONFIG_NR_DRAM_BANKS was defined, migrate normally
- CONFIG_NR_DRAM_BANKS_MAX was defined and then used for
CONFIG_NR_DRAM_BANKS after a check, just migrate it over now.
- CONFIG_NR_DRAM_BANKS was very oddly defined on p2771-0000-* (to 1024 +
2), set this to 8.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 2d91b533 22-May-2018 Vinitha V Pillai <vinitha.pillai@nxp.com>

LS1012AFRWY: Add Secure Boot support

Added the following:
1. defconfig for LS1012AFRWY Secure boot
2. PfE Validation support

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>

# 9629ccdd 22-May-2018 Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>

board: ls1012a: FRWY-LS1012A board support

FRWY-LS1012A belongs to LS1012A family with features 2 1G SGMII PFE
MAC, Micro SD, USB 3.0, DDR, QuadSPI, Audio, UART.

Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
[yorks: rebase and fix SPDX tag]
[yorks: fix board/freescale/ls1012afrdm/Kconfig]
Reviewed-by: York Sun <york.sun@nxp.com>

# 34f39ce8 02-Jun-2021 Yangbo Lu <yangbo.lu@nxp.com>

armv8: layerscape: drop CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33

Drop CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33. CONFIG_FSL_ESDHC_VS33_NOT_SUPPORT
is used instead.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Acked-by: Michael Walle <michael@walle.cc> [for kontron-sl28]
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 864c3dbc 13-Apr-2021 Mian Yousaf Kaukab <ykaukab@suse.de>

ls1012a: net: pfe: remove pfe stop from bootcmd

When using bootefi to boot a EFI binary, u-boot is supposed to
provide networking service for EFI application. Currently, 'pfe stop'
command is called from bootcmd before running bootefi. As a result
network stops working for EFI applications and console is flooded with
"Rx pkt not on expected port" messages.

Implement board_quiesce_devices() for ls1012a boards and call
pfe_command_stop() from it instead of calling 'pfe stop' from
*_bootcmd and bootcmd.

Tested-by: Anji Jagarlmudi <anji.jagarlmudi@nxp.com>
Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
[Fixed checkpatch space error]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# a9855023 30-Mar-2021 Mian Yousaf Kaukab <ykaukab@suse.de>

ls1012a: use default scan_dev_for_boot

scan_dev_for_efi is supposed to be called from scan_dev_for_boot.
However, this call is missing for ls1012a boards. As a result EFI
boot doesn’t work. Fix this issue by removing custom definition of
scan_dev_for_boot and use the default definition instead.

Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 3fba2311 08-Jun-2020 Udit Agarwal <udit.agarwal@nxp.com>

include/configs: ls1012a: Remove fdt_high env variable

Remove "fdt_high" environment variable to use the bootm_size
to safely contain a kernel, device tree and initrd for
relocation.

Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# e985eb14 26-May-2020 Tom Rini <trini@konsulko.com>

Convert CONFIG_CMD_ASKENV et al to Kconfig

This converts the following to Kconfig:
CONFIG_CMD_ASKENV
CONFIG_CMD_BMP
CONFIG_CMD_BOOTD
CONFIG_CMD_CACHE
CONFIG_CMD_CRC32
CONFIG_CMD_DHCP
CONFIG_CMD_ENV
CONFIG_CMD_EXPORTENV
CONFIG_CMD_EXT2
CONFIG_CMD_EXT4
CONFIG_CMD_FLASH
CONFIG_CMD_FS_GENERIC
CONFIG_CMD_FUSE
CONFIG_CMD_GPIO
CONFIG_CMD_GPT
CONFIG_CMD_GREPENV
CONFIG_CMD_I2C
CONFIG_CMD_IMLS
CONFIG_CMD_IMPORTENV
CONFIG_CMD_LOADB
CONFIG_CMD_LOADS
CONFIG_CMD_MEMINFO
CONFIG_CMD_MII
CONFIG_CMD_MTDPARTS
CONFIG_CMD_NAND
CONFIG_CMD_NAND_TRIMFFS
CONFIG_CMD_NFS
CONFIG_CMD_PCA953X
CONFIG_CMD_PCA953X_INFO
CONFIG_CMD_PCI
CONFIG_CMD_PING
CONFIG_CMD_READ
CONFIG_CMD_SF
CONFIG_CMD_SPI
CONFIG_CMD_SPL
CONFIG_CMD_SPL_WRITE_SIZE
CONFIG_CMD_TIME
CONFIG_CMD_TRACE
CONFIG_CMD_UBI
CONFIG_CMD_UBIFS
CONFIG_CMD_UNZIP
CONFIG_FS_EXT4

Signed-off-by: Tom Rini <trini@konsulko.com>

# c93ad777 11-May-2020 Kuldeep Singh <kuldeep.singh@nxp.com>

treewide: Remove unused FSL QSPI config options for Layerscape platforms

Some of these options are not used by the driver anymore and some of
them are obsolete as the information is gathered from the dt. Also
consolidating defines in common headers.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 702de89c 04-May-2020 Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>

treewide: mem: Move mtest related defines to Kconfig

Move below defines which are used by mtest utility to Kconfig.
CONFIG_SYS_MEMTEST_START
CONFIG_SYS_MEMTEST_END

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
[trini: Fix kmcoge5ne board, re-run migration as well]
Signed-off-by: Tom Rini <trini@konsulko.com>

# a389c9cd 04-May-2020 Michal Simek <michal.simek@xilinx.com>

treewide: mem: Enable MEMTEST via defconfig

There is no reason to enable MEMTEST from headers when was converted to
Kconfig already.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>

# a2c402cc 17-Apr-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: drop env qspi_bootcmd

Drop useless environment variable installer and qspi_bootcmd
for ls1012afrwy.
Only 2 MB nor flash in ls1012afrwy. So cannot get kernel(30 MB) from
the nor flash, then drop it.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# fad129f3 22-Apr-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: support dhcp boot

Add support of dhcp boot for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 5706b9b5 23-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: fix board name

Fix board name for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 1d0bb1b9 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: adjust env kernel_addr_r

Adjust environment kernel_addr_r from 0x96000000 to 0x92000000
to fix a bug that failed to boot kernel for ls1012afrwy with 512MiB RAM,
=> tftpboot $kernel_addr_r Image (Image size is 36 MiB)
TFTP error: trying to overwrite reserved memory...

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# c8a7cadc 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: fix wrong env of board

Fix wrong environment variable of board for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 095b6be4 12-Mar-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: fix load address of itb with bootm command

The old load address of itb will overwrite uboots reserved memory
on ls1012afrwy with 512 MiB ram

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# f0d4cd43 10-Jan-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: adjust kernel_addr_r

The linux kernel Image is growing quite quickly,
if kernel Image size grow beyond 36 MB then
kernel Image at load address 0x81000000
overlaps with the reserved memory region
at 0x83400000.

Adjust kernel load address(kernel_addr_r) from
0x81000000 to 0x96000000 to avoid kernel Image
overlapping with reserved memory region.

This change fixes the below U-Boot error while
booting uncompressed kernel Image through booti command,
ERROR: reserving fdt memory region failed (addr=83400000 size=c00000)

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a3c9805f 15-Nov-2019 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012a: add pfe stop command

This adds pfe stop command before boot linux kernel
to fix a problem that ethernet won't be workable
after enter linux. Because there is a h/w limitation
in LS1012A PFE, to re-initialize PFE it has to be
safe shutdown, these steps are done through PFE stop.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a09fea1d 18-Nov-2019 Tom Rini <trini@konsulko.com>

env: Finish migration of common ENV options

- 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>

# 6972c60f 29-Sep-2019 Kuldeep Singh <kuldeep.singh@nxp.com>

configs: ls1012afrwy: Add CONFIG_ENV_ADDR

This configuration enables picking the environment from flash before
DDR init.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# 60742bfb 20-Jun-2019 Yangbo Lu <yangbo.lu@nxp.com>

Move CONFIG_FSL_ESDHC to defconfig

Moved CONFIG_FSL_ESDHC from header files to defconfig files.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Martyn Welch <martyn.welch@collabora.com>
Acked-by: Jason Liu <Jason.hui.liu@nxp.com>

# 78c58082 22-Apr-2019 Vinitha V Pillai <vinitha.pillai@nxp.com>

armv8: Secure Boot: Modify boot_a_script definition

esbc_validate command will not be executed if “load” command for its
header fails and will further execute the source command for bootscript,
without its validation and boot process continues.

To halt the boot process in case secure boot header is not loaded
successfully, esbc_validate command is invoked separately after “load”
command. The secure boot validation of the bootscript header will fail
(if header is not loaded) and halts the boot process, which prevent source
command from execution.

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>

# 7f91b658 05-Nov-2018 Rajesh Bhagat <rajesh.bhagat@nxp.com>

armv8: ls1012afrx: Add TFABOOT support

TFABOOT support includes:
- ls1012a2g5rdb/ls1012afrdm/ls1012afrwy_tfa_defconfig to be
loaded by trusted firmware
- define BOOTCOMMAND for TFABOOT

Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
[YS: remove unnecessary braces]
Reviewed-by: York Sun <york.sun@nxp.com>

# 1deae0c4 13-Aug-2018 Pramod Kumar <pramod.kumar_1@nxp.com>

ls1012afrwy: Add ls1012afrwy revC board support.

LS1012AFRWY supports three board revisions.
Revision A and B board are collectively identified as revA/B,
Revision C board is identifies as revC.

Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
[York S: revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>

# 86cf1c82 16-Aug-2018 Tom Rini <trini@konsulko.com>

configs: Migrate CONFIG_NR_DRAM_BANKS

We have the following cases:
- CONFIG_NR_DRAM_BANKS was defined, migrate normally
- CONFIG_NR_DRAM_BANKS_MAX was defined and then used for
CONFIG_NR_DRAM_BANKS after a check, just migrate it over now.
- CONFIG_NR_DRAM_BANKS was very oddly defined on p2771-0000-* (to 1024 +
2), set this to 8.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 2d91b533 22-May-2018 Vinitha V Pillai <vinitha.pillai@nxp.com>

LS1012AFRWY: Add Secure Boot support

Added the following:
1. defconfig for LS1012AFRWY Secure boot
2. PfE Validation support

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>

# 9629ccdd 22-May-2018 Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>

board: ls1012a: FRWY-LS1012A board support

FRWY-LS1012A belongs to LS1012A family with features 2 1G SGMII PFE
MAC, Micro SD, USB 3.0, DDR, QuadSPI, Audio, UART.

Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
[yorks: rebase and fix SPDX tag]
[yorks: fix board/freescale/ls1012afrdm/Kconfig]
Reviewed-by: York Sun <york.sun@nxp.com>

# a9855023 30-Mar-2021 Mian Yousaf Kaukab <ykaukab@suse.de>

ls1012a: use default scan_dev_for_boot

scan_dev_for_efi is supposed to be called from scan_dev_for_boot.
However, this call is missing for ls1012a boards. As a result EFI
boot doesn’t work. Fix this issue by removing custom definition of
scan_dev_for_boot and use the default definition instead.

Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 3fba2311 08-Jun-2020 Udit Agarwal <udit.agarwal@nxp.com>

include/configs: ls1012a: Remove fdt_high env variable

Remove "fdt_high" environment variable to use the bootm_size
to safely contain a kernel, device tree and initrd for
relocation.

Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# e985eb14 26-May-2020 Tom Rini <trini@konsulko.com>

Convert CONFIG_CMD_ASKENV et al to Kconfig

This converts the following to Kconfig:
CONFIG_CMD_ASKENV
CONFIG_CMD_BMP
CONFIG_CMD_BOOTD
CONFIG_CMD_CACHE
CONFIG_CMD_CRC32
CONFIG_CMD_DHCP
CONFIG_CMD_ENV
CONFIG_CMD_EXPORTENV
CONFIG_CMD_EXT2
CONFIG_CMD_EXT4
CONFIG_CMD_FLASH
CONFIG_CMD_FS_GENERIC
CONFIG_CMD_FUSE
CONFIG_CMD_GPIO
CONFIG_CMD_GPT
CONFIG_CMD_GREPENV
CONFIG_CMD_I2C
CONFIG_CMD_IMLS
CONFIG_CMD_IMPORTENV
CONFIG_CMD_LOADB
CONFIG_CMD_LOADS
CONFIG_CMD_MEMINFO
CONFIG_CMD_MII
CONFIG_CMD_MTDPARTS
CONFIG_CMD_NAND
CONFIG_CMD_NAND_TRIMFFS
CONFIG_CMD_NFS
CONFIG_CMD_PCA953X
CONFIG_CMD_PCA953X_INFO
CONFIG_CMD_PCI
CONFIG_CMD_PING
CONFIG_CMD_READ
CONFIG_CMD_SF
CONFIG_CMD_SPI
CONFIG_CMD_SPL
CONFIG_CMD_SPL_WRITE_SIZE
CONFIG_CMD_TIME
CONFIG_CMD_TRACE
CONFIG_CMD_UBI
CONFIG_CMD_UBIFS
CONFIG_CMD_UNZIP
CONFIG_FS_EXT4

Signed-off-by: Tom Rini <trini@konsulko.com>

# c93ad777 11-May-2020 Kuldeep Singh <kuldeep.singh@nxp.com>

treewide: Remove unused FSL QSPI config options for Layerscape platforms

Some of these options are not used by the driver anymore and some of
them are obsolete as the information is gathered from the dt. Also
consolidating defines in common headers.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 702de89c 04-May-2020 Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>

treewide: mem: Move mtest related defines to Kconfig

Move below defines which are used by mtest utility to Kconfig.
CONFIG_SYS_MEMTEST_START
CONFIG_SYS_MEMTEST_END

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
[trini: Fix kmcoge5ne board, re-run migration as well]
Signed-off-by: Tom Rini <trini@konsulko.com>

# a389c9cd 04-May-2020 Michal Simek <michal.simek@xilinx.com>

treewide: mem: Enable MEMTEST via defconfig

There is no reason to enable MEMTEST from headers when was converted to
Kconfig already.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>

# a2c402cc 17-Apr-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: drop env qspi_bootcmd

Drop useless environment variable installer and qspi_bootcmd
for ls1012afrwy.
Only 2 MB nor flash in ls1012afrwy. So cannot get kernel(30 MB) from
the nor flash, then drop it.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# fad129f3 22-Apr-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: support dhcp boot

Add support of dhcp boot for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 5706b9b5 23-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: fix board name

Fix board name for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 1d0bb1b9 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: adjust env kernel_addr_r

Adjust environment kernel_addr_r from 0x96000000 to 0x92000000
to fix a bug that failed to boot kernel for ls1012afrwy with 512MiB RAM,
=> tftpboot $kernel_addr_r Image (Image size is 36 MiB)
TFTP error: trying to overwrite reserved memory...

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# c8a7cadc 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: fix wrong env of board

Fix wrong environment variable of board for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 095b6be4 12-Mar-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: fix load address of itb with bootm command

The old load address of itb will overwrite uboots reserved memory
on ls1012afrwy with 512 MiB ram

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# f0d4cd43 10-Jan-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: adjust kernel_addr_r

The linux kernel Image is growing quite quickly,
if kernel Image size grow beyond 36 MB then
kernel Image at load address 0x81000000
overlaps with the reserved memory region
at 0x83400000.

Adjust kernel load address(kernel_addr_r) from
0x81000000 to 0x96000000 to avoid kernel Image
overlapping with reserved memory region.

This change fixes the below U-Boot error while
booting uncompressed kernel Image through booti command,
ERROR: reserving fdt memory region failed (addr=83400000 size=c00000)

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a3c9805f 15-Nov-2019 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012a: add pfe stop command

This adds pfe stop command before boot linux kernel
to fix a problem that ethernet won't be workable
after enter linux. Because there is a h/w limitation
in LS1012A PFE, to re-initialize PFE it has to be
safe shutdown, these steps are done through PFE stop.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a09fea1d 18-Nov-2019 Tom Rini <trini@konsulko.com>

env: Finish migration of common ENV options

- 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>

# 6972c60f 29-Sep-2019 Kuldeep Singh <kuldeep.singh@nxp.com>

configs: ls1012afrwy: Add CONFIG_ENV_ADDR

This configuration enables picking the environment from flash before
DDR init.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# 60742bfb 20-Jun-2019 Yangbo Lu <yangbo.lu@nxp.com>

Move CONFIG_FSL_ESDHC to defconfig

Moved CONFIG_FSL_ESDHC from header files to defconfig files.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Martyn Welch <martyn.welch@collabora.com>
Acked-by: Jason Liu <Jason.hui.liu@nxp.com>

# 78c58082 22-Apr-2019 Vinitha V Pillai <vinitha.pillai@nxp.com>

armv8: Secure Boot: Modify boot_a_script definition

esbc_validate command will not be executed if “load” command for its
header fails and will further execute the source command for bootscript,
without its validation and boot process continues.

To halt the boot process in case secure boot header is not loaded
successfully, esbc_validate command is invoked separately after “load”
command. The secure boot validation of the bootscript header will fail
(if header is not loaded) and halts the boot process, which prevent source
command from execution.

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>

# 7f91b658 05-Nov-2018 Rajesh Bhagat <rajesh.bhagat@nxp.com>

armv8: ls1012afrx: Add TFABOOT support

TFABOOT support includes:
- ls1012a2g5rdb/ls1012afrdm/ls1012afrwy_tfa_defconfig to be
loaded by trusted firmware
- define BOOTCOMMAND for TFABOOT

Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
[YS: remove unnecessary braces]
Reviewed-by: York Sun <york.sun@nxp.com>

# 1deae0c4 13-Aug-2018 Pramod Kumar <pramod.kumar_1@nxp.com>

ls1012afrwy: Add ls1012afrwy revC board support.

LS1012AFRWY supports three board revisions.
Revision A and B board are collectively identified as revA/B,
Revision C board is identifies as revC.

Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
[York S: revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>

# 86cf1c82 16-Aug-2018 Tom Rini <trini@konsulko.com>

configs: Migrate CONFIG_NR_DRAM_BANKS

We have the following cases:
- CONFIG_NR_DRAM_BANKS was defined, migrate normally
- CONFIG_NR_DRAM_BANKS_MAX was defined and then used for
CONFIG_NR_DRAM_BANKS after a check, just migrate it over now.
- CONFIG_NR_DRAM_BANKS was very oddly defined on p2771-0000-* (to 1024 +
2), set this to 8.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 2d91b533 22-May-2018 Vinitha V Pillai <vinitha.pillai@nxp.com>

LS1012AFRWY: Add Secure Boot support

Added the following:
1. defconfig for LS1012AFRWY Secure boot
2. PfE Validation support

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>

# 9629ccdd 22-May-2018 Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>

board: ls1012a: FRWY-LS1012A board support

FRWY-LS1012A belongs to LS1012A family with features 2 1G SGMII PFE
MAC, Micro SD, USB 3.0, DDR, QuadSPI, Audio, UART.

Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
[yorks: rebase and fix SPDX tag]
[yorks: fix board/freescale/ls1012afrdm/Kconfig]
Reviewed-by: York Sun <york.sun@nxp.com>

# 3fba2311 08-Jun-2020 Udit Agarwal <udit.agarwal@nxp.com>

include/configs: ls1012a: Remove fdt_high env variable

Remove "fdt_high" environment variable to use the bootm_size
to safely contain a kernel, device tree and initrd for
relocation.

Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# e985eb14 26-May-2020 Tom Rini <trini@konsulko.com>

Convert CONFIG_CMD_ASKENV et al to Kconfig

This converts the following to Kconfig:
CONFIG_CMD_ASKENV
CONFIG_CMD_BMP
CONFIG_CMD_BOOTD
CONFIG_CMD_CACHE
CONFIG_CMD_CRC32
CONFIG_CMD_DHCP
CONFIG_CMD_ENV
CONFIG_CMD_EXPORTENV
CONFIG_CMD_EXT2
CONFIG_CMD_EXT4
CONFIG_CMD_FLASH
CONFIG_CMD_FS_GENERIC
CONFIG_CMD_FUSE
CONFIG_CMD_GPIO
CONFIG_CMD_GPT
CONFIG_CMD_GREPENV
CONFIG_CMD_I2C
CONFIG_CMD_IMLS
CONFIG_CMD_IMPORTENV
CONFIG_CMD_LOADB
CONFIG_CMD_LOADS
CONFIG_CMD_MEMINFO
CONFIG_CMD_MII
CONFIG_CMD_MTDPARTS
CONFIG_CMD_NAND
CONFIG_CMD_NAND_TRIMFFS
CONFIG_CMD_NFS
CONFIG_CMD_PCA953X
CONFIG_CMD_PCA953X_INFO
CONFIG_CMD_PCI
CONFIG_CMD_PING
CONFIG_CMD_READ
CONFIG_CMD_SF
CONFIG_CMD_SPI
CONFIG_CMD_SPL
CONFIG_CMD_SPL_WRITE_SIZE
CONFIG_CMD_TIME
CONFIG_CMD_TRACE
CONFIG_CMD_UBI
CONFIG_CMD_UBIFS
CONFIG_CMD_UNZIP
CONFIG_FS_EXT4

Signed-off-by: Tom Rini <trini@konsulko.com>

# c93ad777 11-May-2020 Kuldeep Singh <kuldeep.singh@nxp.com>

treewide: Remove unused FSL QSPI config options for Layerscape platforms

Some of these options are not used by the driver anymore and some of
them are obsolete as the information is gathered from the dt. Also
consolidating defines in common headers.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 702de89c 04-May-2020 Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>

treewide: mem: Move mtest related defines to Kconfig

Move below defines which are used by mtest utility to Kconfig.
CONFIG_SYS_MEMTEST_START
CONFIG_SYS_MEMTEST_END

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
[trini: Fix kmcoge5ne board, re-run migration as well]
Signed-off-by: Tom Rini <trini@konsulko.com>

# a389c9cd 04-May-2020 Michal Simek <michal.simek@xilinx.com>

treewide: mem: Enable MEMTEST via defconfig

There is no reason to enable MEMTEST from headers when was converted to
Kconfig already.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>

# a2c402cc 17-Apr-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: drop env qspi_bootcmd

Drop useless environment variable installer and qspi_bootcmd
for ls1012afrwy.
Only 2 MB nor flash in ls1012afrwy. So cannot get kernel(30 MB) from
the nor flash, then drop it.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# fad129f3 22-Apr-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: support dhcp boot

Add support of dhcp boot for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 5706b9b5 23-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: fix board name

Fix board name for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 1d0bb1b9 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: adjust env kernel_addr_r

Adjust environment kernel_addr_r from 0x96000000 to 0x92000000
to fix a bug that failed to boot kernel for ls1012afrwy with 512MiB RAM,
=> tftpboot $kernel_addr_r Image (Image size is 36 MiB)
TFTP error: trying to overwrite reserved memory...

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# c8a7cadc 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: fix wrong env of board

Fix wrong environment variable of board for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 095b6be4 12-Mar-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: fix load address of itb with bootm command

The old load address of itb will overwrite uboots reserved memory
on ls1012afrwy with 512 MiB ram

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# f0d4cd43 10-Jan-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: adjust kernel_addr_r

The linux kernel Image is growing quite quickly,
if kernel Image size grow beyond 36 MB then
kernel Image at load address 0x81000000
overlaps with the reserved memory region
at 0x83400000.

Adjust kernel load address(kernel_addr_r) from
0x81000000 to 0x96000000 to avoid kernel Image
overlapping with reserved memory region.

This change fixes the below U-Boot error while
booting uncompressed kernel Image through booti command,
ERROR: reserving fdt memory region failed (addr=83400000 size=c00000)

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a3c9805f 15-Nov-2019 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012a: add pfe stop command

This adds pfe stop command before boot linux kernel
to fix a problem that ethernet won't be workable
after enter linux. Because there is a h/w limitation
in LS1012A PFE, to re-initialize PFE it has to be
safe shutdown, these steps are done through PFE stop.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a09fea1d 18-Nov-2019 Tom Rini <trini@konsulko.com>

env: Finish migration of common ENV options

- 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>

# 6972c60f 29-Sep-2019 Kuldeep Singh <kuldeep.singh@nxp.com>

configs: ls1012afrwy: Add CONFIG_ENV_ADDR

This configuration enables picking the environment from flash before
DDR init.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# 60742bfb 20-Jun-2019 Yangbo Lu <yangbo.lu@nxp.com>

Move CONFIG_FSL_ESDHC to defconfig

Moved CONFIG_FSL_ESDHC from header files to defconfig files.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Martyn Welch <martyn.welch@collabora.com>
Acked-by: Jason Liu <Jason.hui.liu@nxp.com>

# 78c58082 22-Apr-2019 Vinitha V Pillai <vinitha.pillai@nxp.com>

armv8: Secure Boot: Modify boot_a_script definition

esbc_validate command will not be executed if “load” command for its
header fails and will further execute the source command for bootscript,
without its validation and boot process continues.

To halt the boot process in case secure boot header is not loaded
successfully, esbc_validate command is invoked separately after “load”
command. The secure boot validation of the bootscript header will fail
(if header is not loaded) and halts the boot process, which prevent source
command from execution.

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>

# 7f91b658 05-Nov-2018 Rajesh Bhagat <rajesh.bhagat@nxp.com>

armv8: ls1012afrx: Add TFABOOT support

TFABOOT support includes:
- ls1012a2g5rdb/ls1012afrdm/ls1012afrwy_tfa_defconfig to be
loaded by trusted firmware
- define BOOTCOMMAND for TFABOOT

Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
[YS: remove unnecessary braces]
Reviewed-by: York Sun <york.sun@nxp.com>

# 1deae0c4 13-Aug-2018 Pramod Kumar <pramod.kumar_1@nxp.com>

ls1012afrwy: Add ls1012afrwy revC board support.

LS1012AFRWY supports three board revisions.
Revision A and B board are collectively identified as revA/B,
Revision C board is identifies as revC.

Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
[York S: revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>

# 86cf1c82 16-Aug-2018 Tom Rini <trini@konsulko.com>

configs: Migrate CONFIG_NR_DRAM_BANKS

We have the following cases:
- CONFIG_NR_DRAM_BANKS was defined, migrate normally
- CONFIG_NR_DRAM_BANKS_MAX was defined and then used for
CONFIG_NR_DRAM_BANKS after a check, just migrate it over now.
- CONFIG_NR_DRAM_BANKS was very oddly defined on p2771-0000-* (to 1024 +
2), set this to 8.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 2d91b533 22-May-2018 Vinitha V Pillai <vinitha.pillai@nxp.com>

LS1012AFRWY: Add Secure Boot support

Added the following:
1. defconfig for LS1012AFRWY Secure boot
2. PfE Validation support

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>

# 9629ccdd 22-May-2018 Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>

board: ls1012a: FRWY-LS1012A board support

FRWY-LS1012A belongs to LS1012A family with features 2 1G SGMII PFE
MAC, Micro SD, USB 3.0, DDR, QuadSPI, Audio, UART.

Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
[yorks: rebase and fix SPDX tag]
[yorks: fix board/freescale/ls1012afrdm/Kconfig]
Reviewed-by: York Sun <york.sun@nxp.com>

# e985eb14 26-May-2020 Tom Rini <trini@konsulko.com>

Convert CONFIG_CMD_ASKENV et al to Kconfig

This converts the following to Kconfig:
CONFIG_CMD_ASKENV
CONFIG_CMD_BMP
CONFIG_CMD_BOOTD
CONFIG_CMD_CACHE
CONFIG_CMD_CRC32
CONFIG_CMD_DHCP
CONFIG_CMD_ENV
CONFIG_CMD_EXPORTENV
CONFIG_CMD_EXT2
CONFIG_CMD_EXT4
CONFIG_CMD_FLASH
CONFIG_CMD_FS_GENERIC
CONFIG_CMD_FUSE
CONFIG_CMD_GPIO
CONFIG_CMD_GPT
CONFIG_CMD_GREPENV
CONFIG_CMD_I2C
CONFIG_CMD_IMLS
CONFIG_CMD_IMPORTENV
CONFIG_CMD_LOADB
CONFIG_CMD_LOADS
CONFIG_CMD_MEMINFO
CONFIG_CMD_MII
CONFIG_CMD_MTDPARTS
CONFIG_CMD_NAND
CONFIG_CMD_NAND_TRIMFFS
CONFIG_CMD_NFS
CONFIG_CMD_PCA953X
CONFIG_CMD_PCA953X_INFO
CONFIG_CMD_PCI
CONFIG_CMD_PING
CONFIG_CMD_READ
CONFIG_CMD_SF
CONFIG_CMD_SPI
CONFIG_CMD_SPL
CONFIG_CMD_SPL_WRITE_SIZE
CONFIG_CMD_TIME
CONFIG_CMD_TRACE
CONFIG_CMD_UBI
CONFIG_CMD_UBIFS
CONFIG_CMD_UNZIP
CONFIG_FS_EXT4

Signed-off-by: Tom Rini <trini@konsulko.com>

# c93ad777 11-May-2020 Kuldeep Singh <kuldeep.singh@nxp.com>

treewide: Remove unused FSL QSPI config options for Layerscape platforms

Some of these options are not used by the driver anymore and some of
them are obsolete as the information is gathered from the dt. Also
consolidating defines in common headers.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 702de89c 04-May-2020 Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>

treewide: mem: Move mtest related defines to Kconfig

Move below defines which are used by mtest utility to Kconfig.
CONFIG_SYS_MEMTEST_START
CONFIG_SYS_MEMTEST_END

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
[trini: Fix kmcoge5ne board, re-run migration as well]
Signed-off-by: Tom Rini <trini@konsulko.com>

# a389c9cd 04-May-2020 Michal Simek <michal.simek@xilinx.com>

treewide: mem: Enable MEMTEST via defconfig

There is no reason to enable MEMTEST from headers when was converted to
Kconfig already.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>

# a2c402cc 17-Apr-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: drop env qspi_bootcmd

Drop useless environment variable installer and qspi_bootcmd
for ls1012afrwy.
Only 2 MB nor flash in ls1012afrwy. So cannot get kernel(30 MB) from
the nor flash, then drop it.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# fad129f3 22-Apr-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: support dhcp boot

Add support of dhcp boot for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 5706b9b5 23-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: fix board name

Fix board name for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 1d0bb1b9 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: adjust env kernel_addr_r

Adjust environment kernel_addr_r from 0x96000000 to 0x92000000
to fix a bug that failed to boot kernel for ls1012afrwy with 512MiB RAM,
=> tftpboot $kernel_addr_r Image (Image size is 36 MiB)
TFTP error: trying to overwrite reserved memory...

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# c8a7cadc 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: fix wrong env of board

Fix wrong environment variable of board for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 095b6be4 12-Mar-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: fix load address of itb with bootm command

The old load address of itb will overwrite uboots reserved memory
on ls1012afrwy with 512 MiB ram

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# f0d4cd43 10-Jan-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: adjust kernel_addr_r

The linux kernel Image is growing quite quickly,
if kernel Image size grow beyond 36 MB then
kernel Image at load address 0x81000000
overlaps with the reserved memory region
at 0x83400000.

Adjust kernel load address(kernel_addr_r) from
0x81000000 to 0x96000000 to avoid kernel Image
overlapping with reserved memory region.

This change fixes the below U-Boot error while
booting uncompressed kernel Image through booti command,
ERROR: reserving fdt memory region failed (addr=83400000 size=c00000)

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a3c9805f 15-Nov-2019 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012a: add pfe stop command

This adds pfe stop command before boot linux kernel
to fix a problem that ethernet won't be workable
after enter linux. Because there is a h/w limitation
in LS1012A PFE, to re-initialize PFE it has to be
safe shutdown, these steps are done through PFE stop.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a09fea1d 18-Nov-2019 Tom Rini <trini@konsulko.com>

env: Finish migration of common ENV options

- 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>

# 6972c60f 29-Sep-2019 Kuldeep Singh <kuldeep.singh@nxp.com>

configs: ls1012afrwy: Add CONFIG_ENV_ADDR

This configuration enables picking the environment from flash before
DDR init.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# 60742bfb 20-Jun-2019 Yangbo Lu <yangbo.lu@nxp.com>

Move CONFIG_FSL_ESDHC to defconfig

Moved CONFIG_FSL_ESDHC from header files to defconfig files.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Martyn Welch <martyn.welch@collabora.com>
Acked-by: Jason Liu <Jason.hui.liu@nxp.com>

# 78c58082 22-Apr-2019 Vinitha V Pillai <vinitha.pillai@nxp.com>

armv8: Secure Boot: Modify boot_a_script definition

esbc_validate command will not be executed if “load” command for its
header fails and will further execute the source command for bootscript,
without its validation and boot process continues.

To halt the boot process in case secure boot header is not loaded
successfully, esbc_validate command is invoked separately after “load”
command. The secure boot validation of the bootscript header will fail
(if header is not loaded) and halts the boot process, which prevent source
command from execution.

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>

# 7f91b658 05-Nov-2018 Rajesh Bhagat <rajesh.bhagat@nxp.com>

armv8: ls1012afrx: Add TFABOOT support

TFABOOT support includes:
- ls1012a2g5rdb/ls1012afrdm/ls1012afrwy_tfa_defconfig to be
loaded by trusted firmware
- define BOOTCOMMAND for TFABOOT

Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
[YS: remove unnecessary braces]
Reviewed-by: York Sun <york.sun@nxp.com>

# 1deae0c4 13-Aug-2018 Pramod Kumar <pramod.kumar_1@nxp.com>

ls1012afrwy: Add ls1012afrwy revC board support.

LS1012AFRWY supports three board revisions.
Revision A and B board are collectively identified as revA/B,
Revision C board is identifies as revC.

Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
[York S: revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>

# 86cf1c82 16-Aug-2018 Tom Rini <trini@konsulko.com>

configs: Migrate CONFIG_NR_DRAM_BANKS

We have the following cases:
- CONFIG_NR_DRAM_BANKS was defined, migrate normally
- CONFIG_NR_DRAM_BANKS_MAX was defined and then used for
CONFIG_NR_DRAM_BANKS after a check, just migrate it over now.
- CONFIG_NR_DRAM_BANKS was very oddly defined on p2771-0000-* (to 1024 +
2), set this to 8.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 2d91b533 22-May-2018 Vinitha V Pillai <vinitha.pillai@nxp.com>

LS1012AFRWY: Add Secure Boot support

Added the following:
1. defconfig for LS1012AFRWY Secure boot
2. PfE Validation support

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>

# 9629ccdd 22-May-2018 Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>

board: ls1012a: FRWY-LS1012A board support

FRWY-LS1012A belongs to LS1012A family with features 2 1G SGMII PFE
MAC, Micro SD, USB 3.0, DDR, QuadSPI, Audio, UART.

Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
[yorks: rebase and fix SPDX tag]
[yorks: fix board/freescale/ls1012afrdm/Kconfig]
Reviewed-by: York Sun <york.sun@nxp.com>

# c93ad777 11-May-2020 Kuldeep Singh <kuldeep.singh@nxp.com>

treewide: Remove unused FSL QSPI config options for Layerscape platforms

Some of these options are not used by the driver anymore and some of
them are obsolete as the information is gathered from the dt. Also
consolidating defines in common headers.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 702de89c 04-May-2020 Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>

treewide: mem: Move mtest related defines to Kconfig

Move below defines which are used by mtest utility to Kconfig.
CONFIG_SYS_MEMTEST_START
CONFIG_SYS_MEMTEST_END

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
[trini: Fix kmcoge5ne board, re-run migration as well]
Signed-off-by: Tom Rini <trini@konsulko.com>

# a389c9cd 04-May-2020 Michal Simek <michal.simek@xilinx.com>

treewide: mem: Enable MEMTEST via defconfig

There is no reason to enable MEMTEST from headers when was converted to
Kconfig already.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>

# a2c402cc 17-Apr-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: drop env qspi_bootcmd

Drop useless environment variable installer and qspi_bootcmd
for ls1012afrwy.
Only 2 MB nor flash in ls1012afrwy. So cannot get kernel(30 MB) from
the nor flash, then drop it.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# fad129f3 22-Apr-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: support dhcp boot

Add support of dhcp boot for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 5706b9b5 23-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: fix board name

Fix board name for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 1d0bb1b9 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: adjust env kernel_addr_r

Adjust environment kernel_addr_r from 0x96000000 to 0x92000000
to fix a bug that failed to boot kernel for ls1012afrwy with 512MiB RAM,
=> tftpboot $kernel_addr_r Image (Image size is 36 MiB)
TFTP error: trying to overwrite reserved memory...

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# c8a7cadc 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: fix wrong env of board

Fix wrong environment variable of board for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 095b6be4 12-Mar-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: fix load address of itb with bootm command

The old load address of itb will overwrite uboots reserved memory
on ls1012afrwy with 512 MiB ram

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# f0d4cd43 10-Jan-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: adjust kernel_addr_r

The linux kernel Image is growing quite quickly,
if kernel Image size grow beyond 36 MB then
kernel Image at load address 0x81000000
overlaps with the reserved memory region
at 0x83400000.

Adjust kernel load address(kernel_addr_r) from
0x81000000 to 0x96000000 to avoid kernel Image
overlapping with reserved memory region.

This change fixes the below U-Boot error while
booting uncompressed kernel Image through booti command,
ERROR: reserving fdt memory region failed (addr=83400000 size=c00000)

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a3c9805f 15-Nov-2019 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012a: add pfe stop command

This adds pfe stop command before boot linux kernel
to fix a problem that ethernet won't be workable
after enter linux. Because there is a h/w limitation
in LS1012A PFE, to re-initialize PFE it has to be
safe shutdown, these steps are done through PFE stop.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a09fea1d 18-Nov-2019 Tom Rini <trini@konsulko.com>

env: Finish migration of common ENV options

- 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>

# 6972c60f 29-Sep-2019 Kuldeep Singh <kuldeep.singh@nxp.com>

configs: ls1012afrwy: Add CONFIG_ENV_ADDR

This configuration enables picking the environment from flash before
DDR init.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# 60742bfb 20-Jun-2019 Yangbo Lu <yangbo.lu@nxp.com>

Move CONFIG_FSL_ESDHC to defconfig

Moved CONFIG_FSL_ESDHC from header files to defconfig files.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Martyn Welch <martyn.welch@collabora.com>
Acked-by: Jason Liu <Jason.hui.liu@nxp.com>

# 78c58082 22-Apr-2019 Vinitha V Pillai <vinitha.pillai@nxp.com>

armv8: Secure Boot: Modify boot_a_script definition

esbc_validate command will not be executed if “load” command for its
header fails and will further execute the source command for bootscript,
without its validation and boot process continues.

To halt the boot process in case secure boot header is not loaded
successfully, esbc_validate command is invoked separately after “load”
command. The secure boot validation of the bootscript header will fail
(if header is not loaded) and halts the boot process, which prevent source
command from execution.

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>

# 7f91b658 05-Nov-2018 Rajesh Bhagat <rajesh.bhagat@nxp.com>

armv8: ls1012afrx: Add TFABOOT support

TFABOOT support includes:
- ls1012a2g5rdb/ls1012afrdm/ls1012afrwy_tfa_defconfig to be
loaded by trusted firmware
- define BOOTCOMMAND for TFABOOT

Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
[YS: remove unnecessary braces]
Reviewed-by: York Sun <york.sun@nxp.com>

# 1deae0c4 13-Aug-2018 Pramod Kumar <pramod.kumar_1@nxp.com>

ls1012afrwy: Add ls1012afrwy revC board support.

LS1012AFRWY supports three board revisions.
Revision A and B board are collectively identified as revA/B,
Revision C board is identifies as revC.

Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
[York S: revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>

# 86cf1c82 16-Aug-2018 Tom Rini <trini@konsulko.com>

configs: Migrate CONFIG_NR_DRAM_BANKS

We have the following cases:
- CONFIG_NR_DRAM_BANKS was defined, migrate normally
- CONFIG_NR_DRAM_BANKS_MAX was defined and then used for
CONFIG_NR_DRAM_BANKS after a check, just migrate it over now.
- CONFIG_NR_DRAM_BANKS was very oddly defined on p2771-0000-* (to 1024 +
2), set this to 8.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 2d91b533 22-May-2018 Vinitha V Pillai <vinitha.pillai@nxp.com>

LS1012AFRWY: Add Secure Boot support

Added the following:
1. defconfig for LS1012AFRWY Secure boot
2. PfE Validation support

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>

# 9629ccdd 22-May-2018 Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>

board: ls1012a: FRWY-LS1012A board support

FRWY-LS1012A belongs to LS1012A family with features 2 1G SGMII PFE
MAC, Micro SD, USB 3.0, DDR, QuadSPI, Audio, UART.

Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
[yorks: rebase and fix SPDX tag]
[yorks: fix board/freescale/ls1012afrdm/Kconfig]
Reviewed-by: York Sun <york.sun@nxp.com>

# 702de89c 04-May-2020 Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>

treewide: mem: Move mtest related defines to Kconfig

Move below defines which are used by mtest utility to Kconfig.
CONFIG_SYS_MEMTEST_START
CONFIG_SYS_MEMTEST_END

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
[trini: Fix kmcoge5ne board, re-run migration as well]
Signed-off-by: Tom Rini <trini@konsulko.com>

# a389c9cd 04-May-2020 Michal Simek <michal.simek@xilinx.com>

treewide: mem: Enable MEMTEST via defconfig

There is no reason to enable MEMTEST from headers when was converted to
Kconfig already.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>

# a2c402cc 17-Apr-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: drop env qspi_bootcmd

Drop useless environment variable installer and qspi_bootcmd
for ls1012afrwy.
Only 2 MB nor flash in ls1012afrwy. So cannot get kernel(30 MB) from
the nor flash, then drop it.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# fad129f3 22-Apr-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: support dhcp boot

Add support of dhcp boot for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 5706b9b5 23-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: fix board name

Fix board name for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 1d0bb1b9 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: adjust env kernel_addr_r

Adjust environment kernel_addr_r from 0x96000000 to 0x92000000
to fix a bug that failed to boot kernel for ls1012afrwy with 512MiB RAM,
=> tftpboot $kernel_addr_r Image (Image size is 36 MiB)
TFTP error: trying to overwrite reserved memory...

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# c8a7cadc 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: fix wrong env of board

Fix wrong environment variable of board for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 095b6be4 12-Mar-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: fix load address of itb with bootm command

The old load address of itb will overwrite uboots reserved memory
on ls1012afrwy with 512 MiB ram

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# f0d4cd43 10-Jan-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: adjust kernel_addr_r

The linux kernel Image is growing quite quickly,
if kernel Image size grow beyond 36 MB then
kernel Image at load address 0x81000000
overlaps with the reserved memory region
at 0x83400000.

Adjust kernel load address(kernel_addr_r) from
0x81000000 to 0x96000000 to avoid kernel Image
overlapping with reserved memory region.

This change fixes the below U-Boot error while
booting uncompressed kernel Image through booti command,
ERROR: reserving fdt memory region failed (addr=83400000 size=c00000)

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a3c9805f 15-Nov-2019 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012a: add pfe stop command

This adds pfe stop command before boot linux kernel
to fix a problem that ethernet won't be workable
after enter linux. Because there is a h/w limitation
in LS1012A PFE, to re-initialize PFE it has to be
safe shutdown, these steps are done through PFE stop.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a09fea1d 18-Nov-2019 Tom Rini <trini@konsulko.com>

env: Finish migration of common ENV options

- 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>

# 6972c60f 29-Sep-2019 Kuldeep Singh <kuldeep.singh@nxp.com>

configs: ls1012afrwy: Add CONFIG_ENV_ADDR

This configuration enables picking the environment from flash before
DDR init.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# 60742bfb 20-Jun-2019 Yangbo Lu <yangbo.lu@nxp.com>

Move CONFIG_FSL_ESDHC to defconfig

Moved CONFIG_FSL_ESDHC from header files to defconfig files.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Martyn Welch <martyn.welch@collabora.com>
Acked-by: Jason Liu <Jason.hui.liu@nxp.com>

# 78c58082 22-Apr-2019 Vinitha V Pillai <vinitha.pillai@nxp.com>

armv8: Secure Boot: Modify boot_a_script definition

esbc_validate command will not be executed if “load” command for its
header fails and will further execute the source command for bootscript,
without its validation and boot process continues.

To halt the boot process in case secure boot header is not loaded
successfully, esbc_validate command is invoked separately after “load”
command. The secure boot validation of the bootscript header will fail
(if header is not loaded) and halts the boot process, which prevent source
command from execution.

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>

# 7f91b658 05-Nov-2018 Rajesh Bhagat <rajesh.bhagat@nxp.com>

armv8: ls1012afrx: Add TFABOOT support

TFABOOT support includes:
- ls1012a2g5rdb/ls1012afrdm/ls1012afrwy_tfa_defconfig to be
loaded by trusted firmware
- define BOOTCOMMAND for TFABOOT

Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
[YS: remove unnecessary braces]
Reviewed-by: York Sun <york.sun@nxp.com>

# 1deae0c4 13-Aug-2018 Pramod Kumar <pramod.kumar_1@nxp.com>

ls1012afrwy: Add ls1012afrwy revC board support.

LS1012AFRWY supports three board revisions.
Revision A and B board are collectively identified as revA/B,
Revision C board is identifies as revC.

Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
[York S: revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>

# 86cf1c82 16-Aug-2018 Tom Rini <trini@konsulko.com>

configs: Migrate CONFIG_NR_DRAM_BANKS

We have the following cases:
- CONFIG_NR_DRAM_BANKS was defined, migrate normally
- CONFIG_NR_DRAM_BANKS_MAX was defined and then used for
CONFIG_NR_DRAM_BANKS after a check, just migrate it over now.
- CONFIG_NR_DRAM_BANKS was very oddly defined on p2771-0000-* (to 1024 +
2), set this to 8.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 2d91b533 22-May-2018 Vinitha V Pillai <vinitha.pillai@nxp.com>

LS1012AFRWY: Add Secure Boot support

Added the following:
1. defconfig for LS1012AFRWY Secure boot
2. PfE Validation support

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>

# 9629ccdd 22-May-2018 Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>

board: ls1012a: FRWY-LS1012A board support

FRWY-LS1012A belongs to LS1012A family with features 2 1G SGMII PFE
MAC, Micro SD, USB 3.0, DDR, QuadSPI, Audio, UART.

Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
[yorks: rebase and fix SPDX tag]
[yorks: fix board/freescale/ls1012afrdm/Kconfig]
Reviewed-by: York Sun <york.sun@nxp.com>

# a2c402cc 17-Apr-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: drop env qspi_bootcmd

Drop useless environment variable installer and qspi_bootcmd
for ls1012afrwy.
Only 2 MB nor flash in ls1012afrwy. So cannot get kernel(30 MB) from
the nor flash, then drop it.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# fad129f3 22-Apr-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: support dhcp boot

Add support of dhcp boot for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 5706b9b5 23-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: fix board name

Fix board name for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 1d0bb1b9 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: adjust env kernel_addr_r

Adjust environment kernel_addr_r from 0x96000000 to 0x92000000
to fix a bug that failed to boot kernel for ls1012afrwy with 512MiB RAM,
=> tftpboot $kernel_addr_r Image (Image size is 36 MiB)
TFTP error: trying to overwrite reserved memory...

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# c8a7cadc 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: fix wrong env of board

Fix wrong environment variable of board for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 095b6be4 12-Mar-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: fix load address of itb with bootm command

The old load address of itb will overwrite uboots reserved memory
on ls1012afrwy with 512 MiB ram

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# f0d4cd43 10-Jan-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: adjust kernel_addr_r

The linux kernel Image is growing quite quickly,
if kernel Image size grow beyond 36 MB then
kernel Image at load address 0x81000000
overlaps with the reserved memory region
at 0x83400000.

Adjust kernel load address(kernel_addr_r) from
0x81000000 to 0x96000000 to avoid kernel Image
overlapping with reserved memory region.

This change fixes the below U-Boot error while
booting uncompressed kernel Image through booti command,
ERROR: reserving fdt memory region failed (addr=83400000 size=c00000)

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a3c9805f 15-Nov-2019 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012a: add pfe stop command

This adds pfe stop command before boot linux kernel
to fix a problem that ethernet won't be workable
after enter linux. Because there is a h/w limitation
in LS1012A PFE, to re-initialize PFE it has to be
safe shutdown, these steps are done through PFE stop.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a09fea1d 18-Nov-2019 Tom Rini <trini@konsulko.com>

env: Finish migration of common ENV options

- 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>

# 6972c60f 29-Sep-2019 Kuldeep Singh <kuldeep.singh@nxp.com>

configs: ls1012afrwy: Add CONFIG_ENV_ADDR

This configuration enables picking the environment from flash before
DDR init.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# 60742bfb 20-Jun-2019 Yangbo Lu <yangbo.lu@nxp.com>

Move CONFIG_FSL_ESDHC to defconfig

Moved CONFIG_FSL_ESDHC from header files to defconfig files.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Martyn Welch <martyn.welch@collabora.com>
Acked-by: Jason Liu <Jason.hui.liu@nxp.com>

# 78c58082 22-Apr-2019 Vinitha V Pillai <vinitha.pillai@nxp.com>

armv8: Secure Boot: Modify boot_a_script definition

esbc_validate command will not be executed if “load” command for its
header fails and will further execute the source command for bootscript,
without its validation and boot process continues.

To halt the boot process in case secure boot header is not loaded
successfully, esbc_validate command is invoked separately after “load”
command. The secure boot validation of the bootscript header will fail
(if header is not loaded) and halts the boot process, which prevent source
command from execution.

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>

# 7f91b658 05-Nov-2018 Rajesh Bhagat <rajesh.bhagat@nxp.com>

armv8: ls1012afrx: Add TFABOOT support

TFABOOT support includes:
- ls1012a2g5rdb/ls1012afrdm/ls1012afrwy_tfa_defconfig to be
loaded by trusted firmware
- define BOOTCOMMAND for TFABOOT

Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
[YS: remove unnecessary braces]
Reviewed-by: York Sun <york.sun@nxp.com>

# 1deae0c4 13-Aug-2018 Pramod Kumar <pramod.kumar_1@nxp.com>

ls1012afrwy: Add ls1012afrwy revC board support.

LS1012AFRWY supports three board revisions.
Revision A and B board are collectively identified as revA/B,
Revision C board is identifies as revC.

Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
[York S: revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>

# 86cf1c82 16-Aug-2018 Tom Rini <trini@konsulko.com>

configs: Migrate CONFIG_NR_DRAM_BANKS

We have the following cases:
- CONFIG_NR_DRAM_BANKS was defined, migrate normally
- CONFIG_NR_DRAM_BANKS_MAX was defined and then used for
CONFIG_NR_DRAM_BANKS after a check, just migrate it over now.
- CONFIG_NR_DRAM_BANKS was very oddly defined on p2771-0000-* (to 1024 +
2), set this to 8.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 2d91b533 22-May-2018 Vinitha V Pillai <vinitha.pillai@nxp.com>

LS1012AFRWY: Add Secure Boot support

Added the following:
1. defconfig for LS1012AFRWY Secure boot
2. PfE Validation support

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>

# 9629ccdd 22-May-2018 Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>

board: ls1012a: FRWY-LS1012A board support

FRWY-LS1012A belongs to LS1012A family with features 2 1G SGMII PFE
MAC, Micro SD, USB 3.0, DDR, QuadSPI, Audio, UART.

Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
[yorks: rebase and fix SPDX tag]
[yorks: fix board/freescale/ls1012afrdm/Kconfig]
Reviewed-by: York Sun <york.sun@nxp.com>

# 5706b9b5 23-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: fix board name

Fix board name for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 1d0bb1b9 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: adjust env kernel_addr_r

Adjust environment kernel_addr_r from 0x96000000 to 0x92000000
to fix a bug that failed to boot kernel for ls1012afrwy with 512MiB RAM,
=> tftpboot $kernel_addr_r Image (Image size is 36 MiB)
TFTP error: trying to overwrite reserved memory...

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# c8a7cadc 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: fix wrong env of board

Fix wrong environment variable of board for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 095b6be4 12-Mar-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: fix load address of itb with bootm command

The old load address of itb will overwrite uboots reserved memory
on ls1012afrwy with 512 MiB ram

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# f0d4cd43 10-Jan-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: adjust kernel_addr_r

The linux kernel Image is growing quite quickly,
if kernel Image size grow beyond 36 MB then
kernel Image at load address 0x81000000
overlaps with the reserved memory region
at 0x83400000.

Adjust kernel load address(kernel_addr_r) from
0x81000000 to 0x96000000 to avoid kernel Image
overlapping with reserved memory region.

This change fixes the below U-Boot error while
booting uncompressed kernel Image through booti command,
ERROR: reserving fdt memory region failed (addr=83400000 size=c00000)

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a3c9805f 15-Nov-2019 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012a: add pfe stop command

This adds pfe stop command before boot linux kernel
to fix a problem that ethernet won't be workable
after enter linux. Because there is a h/w limitation
in LS1012A PFE, to re-initialize PFE it has to be
safe shutdown, these steps are done through PFE stop.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a09fea1d 18-Nov-2019 Tom Rini <trini@konsulko.com>

env: Finish migration of common ENV options

- 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>

# 6972c60f 29-Sep-2019 Kuldeep Singh <kuldeep.singh@nxp.com>

configs: ls1012afrwy: Add CONFIG_ENV_ADDR

This configuration enables picking the environment from flash before
DDR init.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# 60742bfb 20-Jun-2019 Yangbo Lu <yangbo.lu@nxp.com>

Move CONFIG_FSL_ESDHC to defconfig

Moved CONFIG_FSL_ESDHC from header files to defconfig files.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Martyn Welch <martyn.welch@collabora.com>
Acked-by: Jason Liu <Jason.hui.liu@nxp.com>

# 78c58082 22-Apr-2019 Vinitha V Pillai <vinitha.pillai@nxp.com>

armv8: Secure Boot: Modify boot_a_script definition

esbc_validate command will not be executed if “load” command for its
header fails and will further execute the source command for bootscript,
without its validation and boot process continues.

To halt the boot process in case secure boot header is not loaded
successfully, esbc_validate command is invoked separately after “load”
command. The secure boot validation of the bootscript header will fail
(if header is not loaded) and halts the boot process, which prevent source
command from execution.

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>

# 7f91b658 05-Nov-2018 Rajesh Bhagat <rajesh.bhagat@nxp.com>

armv8: ls1012afrx: Add TFABOOT support

TFABOOT support includes:
- ls1012a2g5rdb/ls1012afrdm/ls1012afrwy_tfa_defconfig to be
loaded by trusted firmware
- define BOOTCOMMAND for TFABOOT

Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
[YS: remove unnecessary braces]
Reviewed-by: York Sun <york.sun@nxp.com>

# 1deae0c4 13-Aug-2018 Pramod Kumar <pramod.kumar_1@nxp.com>

ls1012afrwy: Add ls1012afrwy revC board support.

LS1012AFRWY supports three board revisions.
Revision A and B board are collectively identified as revA/B,
Revision C board is identifies as revC.

Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
[York S: revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>

# 86cf1c82 16-Aug-2018 Tom Rini <trini@konsulko.com>

configs: Migrate CONFIG_NR_DRAM_BANKS

We have the following cases:
- CONFIG_NR_DRAM_BANKS was defined, migrate normally
- CONFIG_NR_DRAM_BANKS_MAX was defined and then used for
CONFIG_NR_DRAM_BANKS after a check, just migrate it over now.
- CONFIG_NR_DRAM_BANKS was very oddly defined on p2771-0000-* (to 1024 +
2), set this to 8.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 2d91b533 22-May-2018 Vinitha V Pillai <vinitha.pillai@nxp.com>

LS1012AFRWY: Add Secure Boot support

Added the following:
1. defconfig for LS1012AFRWY Secure boot
2. PfE Validation support

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>

# 9629ccdd 22-May-2018 Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>

board: ls1012a: FRWY-LS1012A board support

FRWY-LS1012A belongs to LS1012A family with features 2 1G SGMII PFE
MAC, Micro SD, USB 3.0, DDR, QuadSPI, Audio, UART.

Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
[yorks: rebase and fix SPDX tag]
[yorks: fix board/freescale/ls1012afrdm/Kconfig]
Reviewed-by: York Sun <york.sun@nxp.com>

# 1d0bb1b9 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: adjust env kernel_addr_r

Adjust environment kernel_addr_r from 0x96000000 to 0x92000000
to fix a bug that failed to boot kernel for ls1012afrwy with 512MiB RAM,
=> tftpboot $kernel_addr_r Image (Image size is 36 MiB)
TFTP error: trying to overwrite reserved memory...

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# c8a7cadc 20-Mar-2020 Biwen Li <biwen.li@nxp.com>

configs: ls1012afrwy: fix wrong env of board

Fix wrong environment variable of board for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# 095b6be4 12-Mar-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: fix load address of itb with bootm command

The old load address of itb will overwrite uboots reserved memory
on ls1012afrwy with 512 MiB ram

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# f0d4cd43 10-Jan-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: adjust kernel_addr_r

The linux kernel Image is growing quite quickly,
if kernel Image size grow beyond 36 MB then
kernel Image at load address 0x81000000
overlaps with the reserved memory region
at 0x83400000.

Adjust kernel load address(kernel_addr_r) from
0x81000000 to 0x96000000 to avoid kernel Image
overlapping with reserved memory region.

This change fixes the below U-Boot error while
booting uncompressed kernel Image through booti command,
ERROR: reserving fdt memory region failed (addr=83400000 size=c00000)

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a3c9805f 15-Nov-2019 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012a: add pfe stop command

This adds pfe stop command before boot linux kernel
to fix a problem that ethernet won't be workable
after enter linux. Because there is a h/w limitation
in LS1012A PFE, to re-initialize PFE it has to be
safe shutdown, these steps are done through PFE stop.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a09fea1d 18-Nov-2019 Tom Rini <trini@konsulko.com>

env: Finish migration of common ENV options

- 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>

# 6972c60f 29-Sep-2019 Kuldeep Singh <kuldeep.singh@nxp.com>

configs: ls1012afrwy: Add CONFIG_ENV_ADDR

This configuration enables picking the environment from flash before
DDR init.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# 60742bfb 20-Jun-2019 Yangbo Lu <yangbo.lu@nxp.com>

Move CONFIG_FSL_ESDHC to defconfig

Moved CONFIG_FSL_ESDHC from header files to defconfig files.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Martyn Welch <martyn.welch@collabora.com>
Acked-by: Jason Liu <Jason.hui.liu@nxp.com>

# 78c58082 22-Apr-2019 Vinitha V Pillai <vinitha.pillai@nxp.com>

armv8: Secure Boot: Modify boot_a_script definition

esbc_validate command will not be executed if “load” command for its
header fails and will further execute the source command for bootscript,
without its validation and boot process continues.

To halt the boot process in case secure boot header is not loaded
successfully, esbc_validate command is invoked separately after “load”
command. The secure boot validation of the bootscript header will fail
(if header is not loaded) and halts the boot process, which prevent source
command from execution.

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>

# 7f91b658 05-Nov-2018 Rajesh Bhagat <rajesh.bhagat@nxp.com>

armv8: ls1012afrx: Add TFABOOT support

TFABOOT support includes:
- ls1012a2g5rdb/ls1012afrdm/ls1012afrwy_tfa_defconfig to be
loaded by trusted firmware
- define BOOTCOMMAND for TFABOOT

Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
[YS: remove unnecessary braces]
Reviewed-by: York Sun <york.sun@nxp.com>

# 1deae0c4 13-Aug-2018 Pramod Kumar <pramod.kumar_1@nxp.com>

ls1012afrwy: Add ls1012afrwy revC board support.

LS1012AFRWY supports three board revisions.
Revision A and B board are collectively identified as revA/B,
Revision C board is identifies as revC.

Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
[York S: revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>

# 86cf1c82 16-Aug-2018 Tom Rini <trini@konsulko.com>

configs: Migrate CONFIG_NR_DRAM_BANKS

We have the following cases:
- CONFIG_NR_DRAM_BANKS was defined, migrate normally
- CONFIG_NR_DRAM_BANKS_MAX was defined and then used for
CONFIG_NR_DRAM_BANKS after a check, just migrate it over now.
- CONFIG_NR_DRAM_BANKS was very oddly defined on p2771-0000-* (to 1024 +
2), set this to 8.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 2d91b533 22-May-2018 Vinitha V Pillai <vinitha.pillai@nxp.com>

LS1012AFRWY: Add Secure Boot support

Added the following:
1. defconfig for LS1012AFRWY Secure boot
2. PfE Validation support

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>

# 9629ccdd 22-May-2018 Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>

board: ls1012a: FRWY-LS1012A board support

FRWY-LS1012A belongs to LS1012A family with features 2 1G SGMII PFE
MAC, Micro SD, USB 3.0, DDR, QuadSPI, Audio, UART.

Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
[yorks: rebase and fix SPDX tag]
[yorks: fix board/freescale/ls1012afrdm/Kconfig]
Reviewed-by: York Sun <york.sun@nxp.com>

# f0d4cd43 10-Jan-2020 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012afrwy: adjust kernel_addr_r

The linux kernel Image is growing quite quickly,
if kernel Image size grow beyond 36 MB then
kernel Image at load address 0x81000000
overlaps with the reserved memory region
at 0x83400000.

Adjust kernel load address(kernel_addr_r) from
0x81000000 to 0x96000000 to avoid kernel Image
overlapping with reserved memory region.

This change fixes the below U-Boot error while
booting uncompressed kernel Image through booti command,
ERROR: reserving fdt memory region failed (addr=83400000 size=c00000)

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a3c9805f 15-Nov-2019 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012a: add pfe stop command

This adds pfe stop command before boot linux kernel
to fix a problem that ethernet won't be workable
after enter linux. Because there is a h/w limitation
in LS1012A PFE, to re-initialize PFE it has to be
safe shutdown, these steps are done through PFE stop.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a09fea1d 18-Nov-2019 Tom Rini <trini@konsulko.com>

env: Finish migration of common ENV options

- 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>

# 6972c60f 29-Sep-2019 Kuldeep Singh <kuldeep.singh@nxp.com>

configs: ls1012afrwy: Add CONFIG_ENV_ADDR

This configuration enables picking the environment from flash before
DDR init.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# 60742bfb 20-Jun-2019 Yangbo Lu <yangbo.lu@nxp.com>

Move CONFIG_FSL_ESDHC to defconfig

Moved CONFIG_FSL_ESDHC from header files to defconfig files.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Martyn Welch <martyn.welch@collabora.com>
Acked-by: Jason Liu <Jason.hui.liu@nxp.com>

# 78c58082 22-Apr-2019 Vinitha V Pillai <vinitha.pillai@nxp.com>

armv8: Secure Boot: Modify boot_a_script definition

esbc_validate command will not be executed if “load” command for its
header fails and will further execute the source command for bootscript,
without its validation and boot process continues.

To halt the boot process in case secure boot header is not loaded
successfully, esbc_validate command is invoked separately after “load”
command. The secure boot validation of the bootscript header will fail
(if header is not loaded) and halts the boot process, which prevent source
command from execution.

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>

# 7f91b658 05-Nov-2018 Rajesh Bhagat <rajesh.bhagat@nxp.com>

armv8: ls1012afrx: Add TFABOOT support

TFABOOT support includes:
- ls1012a2g5rdb/ls1012afrdm/ls1012afrwy_tfa_defconfig to be
loaded by trusted firmware
- define BOOTCOMMAND for TFABOOT

Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
[YS: remove unnecessary braces]
Reviewed-by: York Sun <york.sun@nxp.com>

# 1deae0c4 13-Aug-2018 Pramod Kumar <pramod.kumar_1@nxp.com>

ls1012afrwy: Add ls1012afrwy revC board support.

LS1012AFRWY supports three board revisions.
Revision A and B board are collectively identified as revA/B,
Revision C board is identifies as revC.

Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
[York S: revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>

# 86cf1c82 16-Aug-2018 Tom Rini <trini@konsulko.com>

configs: Migrate CONFIG_NR_DRAM_BANKS

We have the following cases:
- CONFIG_NR_DRAM_BANKS was defined, migrate normally
- CONFIG_NR_DRAM_BANKS_MAX was defined and then used for
CONFIG_NR_DRAM_BANKS after a check, just migrate it over now.
- CONFIG_NR_DRAM_BANKS was very oddly defined on p2771-0000-* (to 1024 +
2), set this to 8.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 2d91b533 22-May-2018 Vinitha V Pillai <vinitha.pillai@nxp.com>

LS1012AFRWY: Add Secure Boot support

Added the following:
1. defconfig for LS1012AFRWY Secure boot
2. PfE Validation support

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>

# 9629ccdd 22-May-2018 Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>

board: ls1012a: FRWY-LS1012A board support

FRWY-LS1012A belongs to LS1012A family with features 2 1G SGMII PFE
MAC, Micro SD, USB 3.0, DDR, QuadSPI, Audio, UART.

Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
[yorks: rebase and fix SPDX tag]
[yorks: fix board/freescale/ls1012afrdm/Kconfig]
Reviewed-by: York Sun <york.sun@nxp.com>

# a3c9805f 15-Nov-2019 Biwen Li <biwen.li@nxp.com>

include/configs: ls1012a: add pfe stop command

This adds pfe stop command before boot linux kernel
to fix a problem that ethernet won't be workable
after enter linux. Because there is a h/w limitation
in LS1012A PFE, to re-initialize PFE it has to be
safe shutdown, these steps are done through PFE stop.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>

# a09fea1d 18-Nov-2019 Tom Rini <trini@konsulko.com>

env: Finish migration of common ENV options

- 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>

# 6972c60f 29-Sep-2019 Kuldeep Singh <kuldeep.singh@nxp.com>

configs: ls1012afrwy: Add CONFIG_ENV_ADDR

This configuration enables picking the environment from flash before
DDR init.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# 60742bfb 20-Jun-2019 Yangbo Lu <yangbo.lu@nxp.com>

Move CONFIG_FSL_ESDHC to defconfig

Moved CONFIG_FSL_ESDHC from header files to defconfig files.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Martyn Welch <martyn.welch@collabora.com>
Acked-by: Jason Liu <Jason.hui.liu@nxp.com>

# 78c58082 22-Apr-2019 Vinitha V Pillai <vinitha.pillai@nxp.com>

armv8: Secure Boot: Modify boot_a_script definition

esbc_validate command will not be executed if “load” command for its
header fails and will further execute the source command for bootscript,
without its validation and boot process continues.

To halt the boot process in case secure boot header is not loaded
successfully, esbc_validate command is invoked separately after “load”
command. The secure boot validation of the bootscript header will fail
(if header is not loaded) and halts the boot process, which prevent source
command from execution.

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>

# 7f91b658 05-Nov-2018 Rajesh Bhagat <rajesh.bhagat@nxp.com>

armv8: ls1012afrx: Add TFABOOT support

TFABOOT support includes:
- ls1012a2g5rdb/ls1012afrdm/ls1012afrwy_tfa_defconfig to be
loaded by trusted firmware
- define BOOTCOMMAND for TFABOOT

Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
[YS: remove unnecessary braces]
Reviewed-by: York Sun <york.sun@nxp.com>

# 1deae0c4 13-Aug-2018 Pramod Kumar <pramod.kumar_1@nxp.com>

ls1012afrwy: Add ls1012afrwy revC board support.

LS1012AFRWY supports three board revisions.
Revision A and B board are collectively identified as revA/B,
Revision C board is identifies as revC.

Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
[York S: revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>

# 86cf1c82 16-Aug-2018 Tom Rini <trini@konsulko.com>

configs: Migrate CONFIG_NR_DRAM_BANKS

We have the following cases:
- CONFIG_NR_DRAM_BANKS was defined, migrate normally
- CONFIG_NR_DRAM_BANKS_MAX was defined and then used for
CONFIG_NR_DRAM_BANKS after a check, just migrate it over now.
- CONFIG_NR_DRAM_BANKS was very oddly defined on p2771-0000-* (to 1024 +
2), set this to 8.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 2d91b533 22-May-2018 Vinitha V Pillai <vinitha.pillai@nxp.com>

LS1012AFRWY: Add Secure Boot support

Added the following:
1. defconfig for LS1012AFRWY Secure boot
2. PfE Validation support

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>

# 9629ccdd 22-May-2018 Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>

board: ls1012a: FRWY-LS1012A board support

FRWY-LS1012A belongs to LS1012A family with features 2 1G SGMII PFE
MAC, Micro SD, USB 3.0, DDR, QuadSPI, Audio, UART.

Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
[yorks: rebase and fix SPDX tag]
[yorks: fix board/freescale/ls1012afrdm/Kconfig]
Reviewed-by: York Sun <york.sun@nxp.com>

# a09fea1d 18-Nov-2019 Tom Rini <trini@konsulko.com>

env: Finish migration of common ENV options

- 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>

# 6972c60f 29-Sep-2019 Kuldeep Singh <kuldeep.singh@nxp.com>

configs: ls1012afrwy: Add CONFIG_ENV_ADDR

This configuration enables picking the environment from flash before
DDR init.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# 60742bfb 20-Jun-2019 Yangbo Lu <yangbo.lu@nxp.com>

Move CONFIG_FSL_ESDHC to defconfig

Moved CONFIG_FSL_ESDHC from header files to defconfig files.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Martyn Welch <martyn.welch@collabora.com>
Acked-by: Jason Liu <Jason.hui.liu@nxp.com>

# 78c58082 22-Apr-2019 Vinitha V Pillai <vinitha.pillai@nxp.com>

armv8: Secure Boot: Modify boot_a_script definition

esbc_validate command will not be executed if “load” command for its
header fails and will further execute the source command for bootscript,
without its validation and boot process continues.

To halt the boot process in case secure boot header is not loaded
successfully, esbc_validate command is invoked separately after “load”
command. The secure boot validation of the bootscript header will fail
(if header is not loaded) and halts the boot process, which prevent source
command from execution.

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>

# 7f91b658 05-Nov-2018 Rajesh Bhagat <rajesh.bhagat@nxp.com>

armv8: ls1012afrx: Add TFABOOT support

TFABOOT support includes:
- ls1012a2g5rdb/ls1012afrdm/ls1012afrwy_tfa_defconfig to be
loaded by trusted firmware
- define BOOTCOMMAND for TFABOOT

Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
[YS: remove unnecessary braces]
Reviewed-by: York Sun <york.sun@nxp.com>

# 1deae0c4 13-Aug-2018 Pramod Kumar <pramod.kumar_1@nxp.com>

ls1012afrwy: Add ls1012afrwy revC board support.

LS1012AFRWY supports three board revisions.
Revision A and B board are collectively identified as revA/B,
Revision C board is identifies as revC.

Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
[York S: revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>

# 86cf1c82 16-Aug-2018 Tom Rini <trini@konsulko.com>

configs: Migrate CONFIG_NR_DRAM_BANKS

We have the following cases:
- CONFIG_NR_DRAM_BANKS was defined, migrate normally
- CONFIG_NR_DRAM_BANKS_MAX was defined and then used for
CONFIG_NR_DRAM_BANKS after a check, just migrate it over now.
- CONFIG_NR_DRAM_BANKS was very oddly defined on p2771-0000-* (to 1024 +
2), set this to 8.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 2d91b533 22-May-2018 Vinitha V Pillai <vinitha.pillai@nxp.com>

LS1012AFRWY: Add Secure Boot support

Added the following:
1. defconfig for LS1012AFRWY Secure boot
2. PfE Validation support

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>

# 9629ccdd 22-May-2018 Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>

board: ls1012a: FRWY-LS1012A board support

FRWY-LS1012A belongs to LS1012A family with features 2 1G SGMII PFE
MAC, Micro SD, USB 3.0, DDR, QuadSPI, Audio, UART.

Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
[yorks: rebase and fix SPDX tag]
[yorks: fix board/freescale/ls1012afrdm/Kconfig]
Reviewed-by: York Sun <york.sun@nxp.com>

# 6972c60f 29-Sep-2019 Kuldeep Singh <kuldeep.singh@nxp.com>

configs: ls1012afrwy: Add CONFIG_ENV_ADDR

This configuration enables picking the environment from flash before
DDR init.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>

# 60742bfb 20-Jun-2019 Yangbo Lu <yangbo.lu@nxp.com>

Move CONFIG_FSL_ESDHC to defconfig

Moved CONFIG_FSL_ESDHC from header files to defconfig files.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Martyn Welch <martyn.welch@collabora.com>
Acked-by: Jason Liu <Jason.hui.liu@nxp.com>

# 78c58082 22-Apr-2019 Vinitha V Pillai <vinitha.pillai@nxp.com>

armv8: Secure Boot: Modify boot_a_script definition

esbc_validate command will not be executed if “load” command for its
header fails and will further execute the source command for bootscript,
without its validation and boot process continues.

To halt the boot process in case secure boot header is not loaded
successfully, esbc_validate command is invoked separately after “load”
command. The secure boot validation of the bootscript header will fail
(if header is not loaded) and halts the boot process, which prevent source
command from execution.

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>

# 7f91b658 05-Nov-2018 Rajesh Bhagat <rajesh.bhagat@nxp.com>

armv8: ls1012afrx: Add TFABOOT support

TFABOOT support includes:
- ls1012a2g5rdb/ls1012afrdm/ls1012afrwy_tfa_defconfig to be
loaded by trusted firmware
- define BOOTCOMMAND for TFABOOT

Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
[YS: remove unnecessary braces]
Reviewed-by: York Sun <york.sun@nxp.com>

# 1deae0c4 13-Aug-2018 Pramod Kumar <pramod.kumar_1@nxp.com>

ls1012afrwy: Add ls1012afrwy revC board support.

LS1012AFRWY supports three board revisions.
Revision A and B board are collectively identified as revA/B,
Revision C board is identifies as revC.

Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
[York S: revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>

# 86cf1c82 16-Aug-2018 Tom Rini <trini@konsulko.com>

configs: Migrate CONFIG_NR_DRAM_BANKS

We have the following cases:
- CONFIG_NR_DRAM_BANKS was defined, migrate normally
- CONFIG_NR_DRAM_BANKS_MAX was defined and then used for
CONFIG_NR_DRAM_BANKS after a check, just migrate it over now.
- CONFIG_NR_DRAM_BANKS was very oddly defined on p2771-0000-* (to 1024 +
2), set this to 8.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 2d91b533 22-May-2018 Vinitha V Pillai <vinitha.pillai@nxp.com>

LS1012AFRWY: Add Secure Boot support

Added the following:
1. defconfig for LS1012AFRWY Secure boot
2. PfE Validation support

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>

# 9629ccdd 22-May-2018 Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>

board: ls1012a: FRWY-LS1012A board support

FRWY-LS1012A belongs to LS1012A family with features 2 1G SGMII PFE
MAC, Micro SD, USB 3.0, DDR, QuadSPI, Audio, UART.

Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
[yorks: rebase and fix SPDX tag]
[yorks: fix board/freescale/ls1012afrdm/Kconfig]
Reviewed-by: York Sun <york.sun@nxp.com>

# 60742bfb 20-Jun-2019 Yangbo Lu <yangbo.lu@nxp.com>

Move CONFIG_FSL_ESDHC to defconfig

Moved CONFIG_FSL_ESDHC from header files to defconfig files.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Martyn Welch <martyn.welch@collabora.com>
Acked-by: Jason Liu <Jason.hui.liu@nxp.com>

# 78c58082 22-Apr-2019 Vinitha V Pillai <vinitha.pillai@nxp.com>

armv8: Secure Boot: Modify boot_a_script definition

esbc_validate command will not be executed if “load” command for its
header fails and will further execute the source command for bootscript,
without its validation and boot process continues.

To halt the boot process in case secure boot header is not loaded
successfully, esbc_validate command is invoked separately after “load”
command. The secure boot validation of the bootscript header will fail
(if header is not loaded) and halts the boot process, which prevent source
command from execution.

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>

# 7f91b658 05-Nov-2018 Rajesh Bhagat <rajesh.bhagat@nxp.com>

armv8: ls1012afrx: Add TFABOOT support

TFABOOT support includes:
- ls1012a2g5rdb/ls1012afrdm/ls1012afrwy_tfa_defconfig to be
loaded by trusted firmware
- define BOOTCOMMAND for TFABOOT

Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
[YS: remove unnecessary braces]
Reviewed-by: York Sun <york.sun@nxp.com>

# 1deae0c4 13-Aug-2018 Pramod Kumar <pramod.kumar_1@nxp.com>

ls1012afrwy: Add ls1012afrwy revC board support.

LS1012AFRWY supports three board revisions.
Revision A and B board are collectively identified as revA/B,
Revision C board is identifies as revC.

Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
[York S: revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>

# 86cf1c82 16-Aug-2018 Tom Rini <trini@konsulko.com>

configs: Migrate CONFIG_NR_DRAM_BANKS

We have the following cases:
- CONFIG_NR_DRAM_BANKS was defined, migrate normally
- CONFIG_NR_DRAM_BANKS_MAX was defined and then used for
CONFIG_NR_DRAM_BANKS after a check, just migrate it over now.
- CONFIG_NR_DRAM_BANKS was very oddly defined on p2771-0000-* (to 1024 +
2), set this to 8.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 2d91b533 22-May-2018 Vinitha V Pillai <vinitha.pillai@nxp.com>

LS1012AFRWY: Add Secure Boot support

Added the following:
1. defconfig for LS1012AFRWY Secure boot
2. PfE Validation support

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>

# 9629ccdd 22-May-2018 Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>

board: ls1012a: FRWY-LS1012A board support

FRWY-LS1012A belongs to LS1012A family with features 2 1G SGMII PFE
MAC, Micro SD, USB 3.0, DDR, QuadSPI, Audio, UART.

Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
[yorks: rebase and fix SPDX tag]
[yorks: fix board/freescale/ls1012afrdm/Kconfig]
Reviewed-by: York Sun <york.sun@nxp.com>

# 1deae0c4 13-Aug-2018 Pramod Kumar <pramod.kumar_1@nxp.com>

ls1012afrwy: Add ls1012afrwy revC board support.

LS1012AFRWY supports three board revisions.
Revision A and B board are collectively identified as revA/B,
Revision C board is identifies as revC.

Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
[York S: revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>


# 86cf1c82 16-Aug-2018 Tom Rini <trini@konsulko.com>

configs: Migrate CONFIG_NR_DRAM_BANKS

We have the following cases:
- CONFIG_NR_DRAM_BANKS was defined, migrate normally
- CONFIG_NR_DRAM_BANKS_MAX was defined and then used for
CONFIG_NR_DRAM_BANKS after a check, just migrate it over now.
- CONFIG_NR_DRAM_BANKS was very oddly defined on p2771-0000-* (to 1024 +
2), set this to 8.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 2d91b533 22-May-2018 Vinitha V Pillai <vinitha.pillai@nxp.com>

LS1012AFRWY: Add Secure Boot support

Added the following:
1. defconfig for LS1012AFRWY Secure boot
2. PfE Validation support

Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>


# 9629ccdd 22-May-2018 Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>

board: ls1012a: FRWY-LS1012A board support

FRWY-LS1012A belongs to LS1012A family with features 2 1G SGMII PFE
MAC, Micro SD, USB 3.0, DDR, QuadSPI, Audio, UART.

Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
[yorks: rebase and fix SPDX tag]
[yorks: fix board/freescale/ls1012afrdm/Kconfig]
Reviewed-by: York Sun <york.sun@nxp.com>