Message ID | 20200314111340.278897-3-xypron.glpk@gmx.de |
---|---|
State | Accepted |
Commit | 1c0bc80ae106a363770d38d633a40b4c3f583566 |
Headers | show |
Series | sandbox: provide memory reservations | expand |
On Sat, 14 Mar 2020 at 05:13, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote: > > 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 at gmx.de> > --- > arch/Kconfig | 1 + > board/sandbox/sandbox.c | 6 ++++++ > 2 files changed, 7 insertions(+) Reviewed-by: Simon Glass <sjg at chromum.org>
diff --git a/arch/Kconfig b/arch/Kconfig index ae9c93ed7b..91e049b322 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -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 diff --git a/board/sandbox/sandbox.c b/board/sandbox/sandbox.c index 0c3d245dff..51881b025d 100644 --- a/board/sandbox/sandbox.c +++ b/board/sandbox/sandbox.c @@ -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) {
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 at gmx.de> --- arch/Kconfig | 1 + board/sandbox/sandbox.c | 6 ++++++ 2 files changed, 7 insertions(+) -- 2.25.1