mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-09-01 20:11:32 +02:00
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"' I failed to notice that b4 noticed it was based on next and so took that as the base commit and merged that part of next to master. This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35. Reported-by: Jonas Karlman <jonas@kwiboo.se> Signed-off-by: Tom Rini <trini@konsulko.com>
43 lines
1.1 KiB
C
43 lines
1.1 KiB
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Copyright (C) 2023 Sean Anderson <seanga2@gmail.com>
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <dm.h>
|
|
#include <spi_flash.h>
|
|
#include <spl.h>
|
|
#include <test/spl.h>
|
|
#include <test/ut.h>
|
|
|
|
static int spl_test_spi_write_image(struct unit_test_state *uts, void *img,
|
|
size_t img_size)
|
|
{
|
|
struct spi_flash *flash;
|
|
|
|
flash = spi_flash_probe(spl_spi_boot_bus(), spl_spi_boot_cs(),
|
|
CONFIG_SF_DEFAULT_SPEED,
|
|
CONFIG_SF_DEFAULT_MODE);
|
|
ut_assertnonnull(flash);
|
|
ut_assertok(spi_flash_write(flash, spl_spi_get_uboot_offs(flash),
|
|
img_size, img));
|
|
|
|
return 0;
|
|
}
|
|
|
|
static int spl_test_spi(struct unit_test_state *uts, const char *test_name,
|
|
enum spl_test_image type)
|
|
{
|
|
return do_spl_test_load(uts, test_name, type,
|
|
SPL_LOAD_IMAGE_GET(1, BOOT_DEVICE_SPI,
|
|
spl_spi_load_image),
|
|
spl_test_spi_write_image);
|
|
}
|
|
SPL_IMG_TEST(spl_test_spi, LEGACY, DM_FLAGS);
|
|
SPL_IMG_TEST(spl_test_spi, LEGACY_LZMA, DM_FLAGS);
|
|
SPL_IMG_TEST(spl_test_spi, IMX8, DM_FLAGS);
|
|
SPL_IMG_TEST(spl_test_spi, FIT_INTERNAL, DM_FLAGS);
|
|
#if !IS_ENABLED(CONFIG_SPL_LOAD_FIT_FULL)
|
|
SPL_IMG_TEST(spl_test_spi, FIT_EXTERNAL, DM_FLAGS);
|
|
#endif
|