diff options
Diffstat (limited to 'hw')
-rw-r--r-- | hw/ast-bmc/ast-io.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/hw/ast-bmc/ast-io.c b/hw/ast-bmc/ast-io.c index cd1aba2..964d415 100644 --- a/hw/ast-bmc/ast-io.c +++ b/hw/ast-bmc/ast-io.c @@ -116,6 +116,7 @@ */ #define BMC_SIO_SCR29 0x29 +#define BMC_SIO_SCR29_MBOX 0x08 #define BMC_SIO_SCR29_MEMBOOT 0x10 enum { @@ -427,6 +428,19 @@ bool ast_is_ahb_lpc_pnor(void) return !(boot_flags & BMC_SIO_SCR29_MEMBOOT); } +bool ast_scratch_reg_is_mbox(void) +{ + uint8_t boot_version; + uint8_t boot_flags; + + boot_version = bmc_sio_inb(BMC_SIO_SCR28); + if (boot_version != BOOT_FLAGS_VERSION) + return false; + + boot_flags = bmc_sio_inb(BMC_SIO_SCR29); + return boot_flags & BMC_SIO_SCR29_MBOX; +} + void ast_setup_ibt(uint16_t io_base, uint8_t irq) { uint32_t v; |