From b5edb1692b7f6af1a60758f4f63f52f795b5dba0 Mon Sep 17 00:00:00 2001 From: Andrew Jeffery Date: Tue, 9 Oct 2018 00:32:32 -0700 Subject: astbmc: Prefer ipmi-hiomap for PNOR access If the IPMI command is not available, fall back to the mailbox interface. Signed-off-by: Andrew Jeffery [stewart: fix up mbox test] Signed-off-by: Stewart Smith --- hw/ast-bmc/ast-io.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'hw/ast-bmc') diff --git a/hw/ast-bmc/ast-io.c b/hw/ast-bmc/ast-io.c index a6ae85a..e8258b4 100644 --- a/hw/ast-bmc/ast-io.c +++ b/hw/ast-bmc/ast-io.c @@ -426,12 +426,16 @@ bool ast_io_init(void) return ast_io_is_rw(); } -bool ast_lpc_fw_is_mbox(void) +bool ast_lpc_fw_needs_hiomap(void) { - return dt_find_compatible_node(dt_root, NULL, "mbox"); + struct dt_node *n; + + n = dt_find_compatible_node(dt_root, NULL, "mbox"); + + return n != NULL; } -bool ast_lpc_fw_is_flash(void) +bool ast_lpc_fw_maps_flash(void) { uint8_t boot_version; uint8_t boot_flags; -- cgit v1.1