diff options
author | Tom Rini <trini@konsulko.com> | 2020-10-29 16:10:24 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-10-29 16:10:24 +0300 |
commit | eca57cafa521345b2fc71616ae47245598dad53d (patch) | |
tree | 04bb2c22f4defdcfdb251cb31363276a8e7e34a7 /board/kontron/sl28/spl.c | |
parent | 81a659e10a10020cfb03abd4794103194add1f3a (diff) | |
parent | 78a8bca5e4971e4be0c3ba438f7386462507ad6a (diff) | |
download | u-boot-eca57cafa521345b2fc71616ae47245598dad53d.tar.xz |
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq
- Bug fixes and updates on vid, ls1088a lx2160a and other layerscape
platforms.
- Add optee_rpmb support for LX2 & Kontron sl28 support
Diffstat (limited to 'board/kontron/sl28/spl.c')
-rw-r--r-- | board/kontron/sl28/spl.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/board/kontron/sl28/spl.c b/board/kontron/sl28/spl.c new file mode 100644 index 0000000000..fa5829eee0 --- /dev/null +++ b/board/kontron/sl28/spl.c @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: GPL-2.0+ + +#include <common.h> +#include <asm/io.h> +#include <asm/spl.h> + +#define DCFG_RCWSR25 0x160 +#define GPINFO_HW_VARIANT_MASK 0xff + +int sl28_variant(void) +{ + return in_le32(DCFG_BASE + DCFG_RCWSR25) & GPINFO_HW_VARIANT_MASK; +} + +int board_fit_config_name_match(const char *name) +{ + int variant = sl28_variant(); + + switch (variant) { + case 3: + return strcmp(name, "fsl-ls1028a-kontron-sl28-var3"); + case 4: + return strcmp(name, "fsl-ls1028a-kontron-sl28-var4"); + default: + return strcmp(name, "fsl-ls1028a-kontron-sl28"); + } +} + +void board_boot_order(u32 *spl_boot_list) +{ + spl_boot_list[0] = BOOT_DEVICE_SPI; +} |