diff options
author | Tom Rini <trini@konsulko.com> | 2019-11-03 19:28:54 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-11-03 19:28:54 -0500 |
commit | ee93ef0c4b272c57c08038655ff0259fdd2c4126 (patch) | |
tree | 8794b7d6bed8385811bac310d0ca35e6049b7e10 /test/dm/sf.c | |
parent | 9c17ad33fe3ec5ca9ce039db13ccf2e66d74d23b (diff) | |
parent | 73c6cd6c0bdb3af76d573f619bbcc141758bb16b (diff) |
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86
- Add support for Intel FSP-S and FSP-T in binman
- Correct priority selection for image loaders for SPL
- Add a size check for TPL
- Various small SPL/TPL bug fixes and changes
- SPI: Add support for memory-mapped flash
Diffstat (limited to 'test/dm/sf.c')
-rw-r--r-- | test/dm/sf.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/dm/sf.c b/test/dm/sf.c index 3788d59052e..65aab4f2e9c 100644 --- a/test/dm/sf.c +++ b/test/dm/sf.c @@ -23,6 +23,9 @@ static int dm_test_spi_flash(struct unit_test_state *uts) int full_size = 0x200000; int size = 0x10000; u8 *src, *dst; + uint map_size; + ulong map_base; + uint offset; int i; src = map_sysmem(0x20000, full_size); @@ -54,6 +57,12 @@ static int dm_test_spi_flash(struct unit_test_state *uts) sandbox_sf_set_block_protect(emul, 0); ut_asserteq(0, spl_flash_get_sw_write_prot(dev)); + /* Check mapping */ + ut_assertok(dm_spi_get_mmap(dev, &map_base, &map_size, &offset)); + ut_asserteq(0x1000, map_base); + ut_asserteq(0x2000, map_size); + ut_asserteq(0x100, offset); + /* * Since we are about to destroy all devices, we must tell sandbox * to forget the emulation device |