2022-04-12 13:31:38 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
|
|
/*
|
|
|
|
* Copyright 2021 Collabora Ltd.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __IMX8MN_BSH_SMM_S2_H
|
|
|
|
#define __IMX8MN_BSH_SMM_S2_H
|
|
|
|
|
|
|
|
#include <configs/imx8mn_bsh_smm_s2_common.h>
|
|
|
|
|
|
|
|
#define BOOT_TARGET_DEVICES(func) \
|
|
|
|
func(NAND, nand, 0) \
|
|
|
|
|
|
|
|
#include <config_distro_bootcmd.h>
|
|
|
|
|
|
|
|
#define NANDARGS \
|
|
|
|
"nandargs=setenv bootargs console=${console} " \
|
|
|
|
"${optargs} " \
|
2022-06-26 10:05:18 +00:00
|
|
|
"mtdparts=${mtdparts} " \
|
2022-04-12 13:31:38 +00:00
|
|
|
"root=${nandroot} " \
|
|
|
|
"rootfstype=${nandrootfstype}\0" \
|
|
|
|
"nandroot=ubi0:root rw ubi.mtd=nandrootfs\0" \
|
2022-05-22 13:22:08 +00:00
|
|
|
"nandrootfstype=ubifs rootwait\0" \
|
2022-04-12 13:31:38 +00:00
|
|
|
"nandboot=echo Booting from nand ...; " \
|
|
|
|
"run nandargs; " \
|
|
|
|
"nand read ${fdt_addr_r} nanddtb; " \
|
|
|
|
"nand read ${loadaddr} nandkernel; " \
|
|
|
|
"booti ${loadaddr} - ${fdt_addr_r}\0"
|
|
|
|
|
|
|
|
#define BOOTENV_DEV_NAND(devtypeu, devtypel, instance) \
|
|
|
|
"bootcmd_" #devtypel #instance "=" \
|
|
|
|
"run nandboot\0"
|
|
|
|
|
|
|
|
#define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \
|
|
|
|
#devtypel #instance " "
|
|
|
|
|
|
|
|
/* Initial environment variables */
|
2022-12-04 15:03:50 +00:00
|
|
|
#define CFG_EXTRA_ENV_SETTINGS \
|
2022-04-12 13:31:38 +00:00
|
|
|
MEM_LAYOUT_ENV_SETTINGS \
|
|
|
|
NANDARGS \
|
|
|
|
BOOTENV
|
|
|
|
|
|
|
|
#define PHYS_SDRAM_SIZE SZ_256M
|
|
|
|
|
|
|
|
/* NAND */
|
|
|
|
|
2022-11-12 22:36:51 +00:00
|
|
|
#define CFG_SYS_NAND_BASE 0x20000000
|
2022-04-12 13:31:38 +00:00
|
|
|
|
|
|
|
#endif /* __IMX8MN_BSH_SMM_S2_H */
|