From 15e30106ce624ade62ba87c2defe7ea67c88f1b5 Mon Sep 17 00:00:00 2001 From: Kristian Amlie Date: Tue, 7 Sep 2021 08:37:51 +0200 Subject: ARM: vexpress_ca9x4: Reintroduce board in order to use with QEMU. vexpress_ca9x4 is seemingly the only board except for qemu_arm which is able to run U-Boot correctly, using the `-M vexpress-a9` option to QEMU. Building for qemu_arm and running qemu-system-arm with the `-M virt` argument has a number of downsides, most importantly that it only supports virtio storage drivers. This significantly reduces its usefulness in testing memory card and Flash solutions, especially when the tested images are from a third party source. So therefore we reintroduce the vexpress_ca9x4 board in this commit, with the explicit goal of using it with QEMU. A number of differences to note from the original: * Since the board was apparently unmaintained, I have now set myself as the maintainer. * The board has been converted to use the driver model, which was the reason it was removed in the first place. * The vexpress_ca15_tc2 and vexpress_ca5x2 boards, which were removed in the same commit, are not necessary for the QEMU use case, and have been omitted. * An `mmc0` alias was introduced in the dts file. The mmc is not detected correctly without this, now that it's based on the device tree instead of the board's init function. * A couple of other nodes were removed because they were problematic when trying to run the UEFI bootmgr. Once again, the primary use case here is QEMU, and these nodes are not needed for that to work. * Unnecessary board init code has been removed, thanks to driver model and device tree. * `CONFIG_OF_EMBED` has been enabled. I know this goes against recommended practice, but there doesn't seem to be any other way to pass the dtb to U-Boot in the QEMU scenario. Using the -dtb argument does not work, I suppose because U-Boot doesn't use the same mechanics as the kernel when it's booting. * Load addresses have been changed to fit QEMU use case. People wanting to get a more detailed, yet somewhat isolated, diff between this and the original, can run this command: git diff c6c26a05b89f25a06e7562f8c2071b60fd0c9eac~1 -- \ $( git diff-tree --diff-filter=A -r --name-only HEAD~1 HEAD) (Make sure to either check out this commit first, or replace HEAD with the commit ID of this commit) Signed-off-by: Kristian Amlie --- configs/vexpress_ca9x4_defconfig | 49 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 configs/vexpress_ca9x4_defconfig (limited to 'configs') diff --git a/configs/vexpress_ca9x4_defconfig b/configs/vexpress_ca9x4_defconfig new file mode 100644 index 0000000..36ee378 --- /dev/null +++ b/configs/vexpress_ca9x4_defconfig @@ -0,0 +1,49 @@ +CONFIG_ARM=y +CONFIG_TARGET_VEXPRESS_CA9X4=y +CONFIG_SYS_TEXT_BASE=0x60800000 +CONFIG_NR_DRAM_BANKS=2 +CONFIG_ENV_SIZE=0x40000 +CONFIG_ENV_SECT_SIZE=0x40000 +CONFIG_DISTRO_DEFAULTS=y +CONFIG_BOOTCOMMAND="run distro_bootcmd; run bootflash" +CONFIG_DEFAULT_FDT_FILE="vexpress-v2p-ca9.dtb" +# CONFIG_DISPLAY_CPUINFO is not set +# CONFIG_DISPLAY_BOARDINFO is not set +# CONFIG_CMD_CONSOLE is not set +# CONFIG_CMD_BOOTD is not set +# CONFIG_CMD_XIMG is not set +# CONFIG_CMD_EDITENV is not set +# CONFIG_CMD_LOADB is not set +# CONFIG_CMD_LOADS is not set +CONFIG_CMD_MMC=y +# CONFIG_CMD_ITEST is not set +# CONFIG_CMD_SETEXPR is not set +# CONFIG_CMD_NFS is not set +# CONFIG_CMD_SLEEP is not set +CONFIG_CMD_UBI=y +CONFIG_ENV_OVERWRITE=y +CONFIG_ENV_IS_IN_FLASH=y +CONFIG_ENV_ADDR=0x47F80000 +CONFIG_ARM_PL180_MMCI=y +CONFIG_MTD=y +CONFIG_MTD_NOR_FLASH=y +CONFIG_FLASH_CFI_DRIVER=y +CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y +CONFIG_SYS_FLASH_PROTECTION=y +CONFIG_SYS_FLASH_CFI=y +CONFIG_SMC911X=y +CONFIG_SMC911X_BASE=0x4e000000 +CONFIG_SMC911X_32_BIT=y +CONFIG_BAUDRATE=38400 +CONFIG_CONS_INDEX=0 +CONFIG_OF_LIBFDT=y +CONFIG_OF_CONTROL=y +CONFIG_DEFAULT_DEVICE_TREE="vexpress-v2p-ca9" +CONFIG_OF_EMBED=y +CONFIG_DM=y +CONFIG_DM_MMC=y +CONFIG_DM_ETH=y +CONFIG_DM_GPIO=y +CONFIG_CFI_FLASH=y +CONFIG_DM_MTD=y +CONFIG_CLK=y -- cgit v1.1