提交 90600829 编写于 作者: P Philippe Mathieu-Daudé 提交者: Peter Maydell

hw/arm/digic4: Inline digic4_board_setup_ram() function

Having the RAM creation code in a separate function is not
very helpful. Move this code directly inside the board_init()
function, this will later allow the board to have the QOM
ownership of the RAM.
Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: NAlistair Francis <alistair.francis@wdc.com>
Message-id: 20191021190653.9511-7-philmd@redhat.com
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
上级 4387b253
......@@ -53,12 +53,6 @@ typedef struct DigicBoard {
const char *rom1_def_filename;
} DigicBoard;
static void digic4_board_setup_ram(DigicBoardState *s, hwaddr ram_size)
{
memory_region_allocate_system_memory(&s->ram, NULL, "ram", ram_size);
memory_region_add_subregion(get_system_memory(), 0, &s->ram);
}
static void digic4_board_init(DigicBoard *board)
{
Error *err = NULL;
......@@ -72,7 +66,8 @@ static void digic4_board_init(DigicBoard *board)
exit(1);
}
digic4_board_setup_ram(s, board->ram_size);
memory_region_allocate_system_memory(&s->ram, NULL, "ram", board->ram_size);
memory_region_add_subregion(get_system_memory(), 0, &s->ram);
if (board->add_rom0) {
board->add_rom0(s, DIGIC4_ROM0_BASE, board->rom0_def_filename);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册