sandbox: implement ft_board_setup()
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sat, 14 Mar 2020 11:13:40 +0000 (12:13 +0100)
committerSimon Glass <sjg@chromium.org>
Thu, 16 Apr 2020 14:07:58 +0000 (08:07 -0600)
Currently we are not able to test reservations created by ft_board_setup().

Implement ft_board_setup() to create an arbitrary reservation and enable
OF_BOARD_SETUP.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromum.org>
arch/Kconfig
board/sandbox/sandbox.c

index ae9c93ed7b12f9a8c0f32ec91d81d874f3609731..91e049b3226d4d901e28718659006ed32db1dbd2 100644 (file)
@@ -96,6 +96,7 @@ config SANDBOX
        select DM_SPI_FLASH
        select HAVE_BLOCK_DEVICE
        select LZO
+       select OF_BOARD_SETUP
        select PCI_ENDPOINT
        select SPI
        select SUPPORT_OF_CONTROL
index 0c3d245dff7a74e537da644e6d388541f53d64c5..137200301874a5514844c2d269334cf5b490c613 100644 (file)
@@ -58,6 +58,12 @@ int board_init(void)
        return 0;
 }
 
+int ft_board_setup(void *fdt, bd_t *bd)
+{
+       /* Create an arbitrary reservation to allow testing OF_BOARD_SETUP.*/
+       return fdt_add_mem_rsv(fdt, 0x00d02000, 0x4000);
+}
+
 #ifdef CONFIG_BOARD_LATE_INIT
 int board_late_init(void)
 {