[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/25] tests/avocado: Truncate M2S-FG484 SOM SPI flash to 16MiB
From: |
Cédric Le Goater |
Subject: |
[PULL 02/25] tests/avocado: Truncate M2S-FG484 SOM SPI flash to 16MiB |
Date: |
Tue, 7 Feb 2023 11:07:21 +0100 |
From: Philippe Mathieu-Daudé <philmd@linaro.org>
The M2S-FG484 SOM uses a 16 MiB SPI flash (Spansion
S25FL128SDPBHICO). Since the test asset is bigger,
truncate it to the correct size to avoid when running
the test_arm_emcraft_sf2 test:
qemu-system-arm: device requires 16777216 bytes, block backend provides
67108864 bytes
Add comment regarding the M2S-FG484 SOM hardware in
hw/arm/msf2-som.c.
Reported-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Tested-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
hw/arm/msf2-som.c | 5 ++++-
tests/avocado/boot_linux_console.py | 2 ++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/hw/arm/msf2-som.c b/hw/arm/msf2-som.c
index a6df473ec9..7b3106c790 100644
--- a/hw/arm/msf2-som.c
+++ b/hw/arm/msf2-som.c
@@ -1,6 +1,9 @@
/*
* SmartFusion2 SOM starter kit(from Emcraft) emulation.
*
+ * M2S-FG484 SOM hardware architecture specification:
+ * https://www.emcraft.com/jdownloads/som/m2s/m2s-som-ha.pdf
+ *
* Copyright (c) 2017 Subbaraya Sundeep <sundeep.lkml@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -87,7 +90,7 @@ static void emcraft_sf2_s2s010_init(MachineState *machine)
/* Attach SPI flash to SPI0 controller */
spi_bus = qdev_get_child_bus(dev, "spi0");
- spi_flash = qdev_new("s25sl12801");
+ spi_flash = qdev_new("s25sl12801"); /* Spansion S25FL128SDPBHICO */
qdev_prop_set_uint8(spi_flash, "spansion-cr2nv", 1);
if (dinfo) {
qdev_prop_set_drive_err(spi_flash, "drive",
diff --git a/tests/avocado/boot_linux_console.py
b/tests/avocado/boot_linux_console.py
index 13e6688624..258f2ee897 100644
--- a/tests/avocado/boot_linux_console.py
+++ b/tests/avocado/boot_linux_console.py
@@ -400,6 +400,8 @@ def test_arm_emcraft_sf2(self):
spi_hash = '65523a1835949b6f4553be96dec1b6a38fb05501'
spi_path = self.fetch_asset(spi_url, asset_hash=spi_hash)
+ file_truncate(spi_path, 16 << 20) # Spansion S25FL128SDPBHICO is 16 MiB
+
self.vm.set_console()
kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE
self.vm.add_args('-kernel', uboot_path,
--
2.39.1
- [PULL 00/25] aspeed queue, Cédric Le Goater, 2023/02/07
- [PULL 02/25] tests/avocado: Truncate M2S-FG484 SOM SPI flash to 16MiB,
Cédric Le Goater <=
- [PULL 04/25] hw/net: Fix read of uninitialized memory in ftgmac100, Cédric Le Goater, 2023/02/07
- [PULL 03/25] aspeed: Add Supermicro X11 SPI machine type, Cédric Le Goater, 2023/02/07
- [PULL 01/25] tests/avocado: Introduce file_truncate(), Cédric Le Goater, 2023/02/07
- [PULL 06/25] m25p80: Add the is25wp256 SFPD table, Cédric Le Goater, 2023/02/07
- [PULL 13/25] hw/arm/aspeed: Add aspeed_eeprom.c, Cédric Le Goater, 2023/02/07
- [PULL 11/25] hw/arm/aspeed: Replace aspeed_eeprom_init with at24c_eeprom_init, Cédric Le Goater, 2023/02/07
- [PULL 07/25] tests/avocado/machine_aspeed.py: update buildroot tests, Cédric Le Goater, 2023/02/07
- [PULL 10/25] hw/arm: Extract at24c_eeprom_init helper from Aspeed and Nuvoton boards, Cédric Le Goater, 2023/02/07
- [PULL 16/25] hw/watchdog/wdt_aspeed: Extend MMIO range to cover more registers, Cédric Le Goater, 2023/02/07
- [PULL 18/25] hw/misc/aspeed_hace: Do not crash if address_space_map() failed, Cédric Le Goater, 2023/02/07