diff options
author | Tom Rini <trini@konsulko.com> | 2020-04-30 18:05:15 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-04-30 18:05:15 -0400 |
commit | b641dd3ec8dc3f6b18d2fa945ac3ab597063d191 (patch) | |
tree | 98fe84b2d017589f42da3a410f27c2358fd49ddd /include/environment | |
parent | 78021b63373de32335bd204471d6cb7c7e18bc52 (diff) | |
parent | 286bcdb40f11def282117e16401bb85502e426a8 (diff) |
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-spi
- distro boot support for SPI flash
- sifive spi flash driver
Diffstat (limited to 'include/environment')
-rw-r--r-- | include/environment/distro/sf.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/include/environment/distro/sf.h b/include/environment/distro/sf.h new file mode 100644 index 0000000000..e793be06c6 --- /dev/null +++ b/include/environment/distro/sf.h @@ -0,0 +1,41 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2020 Amarula Solutions(India) + * + * SF distro configurations. + */ + +#ifndef __DISTRO_SF_CONFIG_H +#define __DISTRO_SF_CONFIG_H + +#if CONFIG_IS_ENABLED(CMD_SF) +#define BOOTENV_SHARED_SF(devtypel) \ + #devtypel "_boot=" \ + "if " #devtypel " probe ${busnum}; then " \ + "devtype=" #devtypel "; " \ + "run scan_sf_for_scripts; " \ + "fi\0" +#define BOOTENV_DEV_SF(devtypeu, devtypel, instance) \ + "bootcmd_" #devtypel #instance "=" \ + "busnum=" #instance "; " \ + "run " #devtypel "_boot\0" +#define BOOTENV_DEV_NAME_SF(devtypeu, devtypel, instance) \ + #devtypel #instance " " +#else +#define BOOTENV_SHARED_SF(devtypel) +#define BOOTENV_DEV_SF \ + BOOT_TARGET_DEVICES_references_SF_without_CONFIG_CMD_SF +#define BOOTENV_DEV_NAME_SF \ + BOOT_TARGET_DEVICES_references_SF_without_CONFIG_CMD_SF + +#endif /* CONFIG_CMD_SF */ + +#define BOOTENV_SF \ + BOOTENV_SHARED_SF(sf) \ + "scan_sf_for_scripts=" \ + "${devtype} read ${scriptaddr} " \ + "${script_offset_f} ${script_size_f}; " \ + "source ${scriptaddr}; " \ + "echo SCRIPT FAILED: continuing...\0" + +#endif /* __DISTRO_SF_CONFIG_H */ |