aboutsummaryrefslogtreecommitdiff
path: root/hw/ast-bmc
diff options
context:
space:
mode:
authorCyril Bur <cyril.bur@au1.ibm.com>2017-02-22 20:31:02 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-02-23 16:04:27 +1100
commit6d1028fe88572ab6fbcb08e16a9f1bf71b0de8df (patch)
treec8849bed0243ec0f2ee89ef480cbfc4204a34b7d /hw/ast-bmc
parent23fe769115c41e8859ce3d23dc75953bfb290f45 (diff)
downloadskiboot-6d1028fe88572ab6fbcb08e16a9f1bf71b0de8df.zip
skiboot-6d1028fe88572ab6fbcb08e16a9f1bf71b0de8df.tar.gz
skiboot-6d1028fe88572ab6fbcb08e16a9f1bf71b0de8df.tar.bz2
astbmc/pnor: Use mbox-flash for flash accesses
If the BMC is MBOX protocol aware, request flash reads/writes over the MBOX regs. This inits the blocklevel for pnor access with mbox-flash. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/ast-bmc')
-rw-r--r--hw/ast-bmc/ast-io.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/ast-bmc/ast-io.c b/hw/ast-bmc/ast-io.c
index 41234fb..1e826fc 100644
--- a/hw/ast-bmc/ast-io.c
+++ b/hw/ast-bmc/ast-io.c
@@ -88,6 +88,7 @@
#include <skiboot.h>
#include <lpc.h>
#include <lock.h>
+#include <device.h>
#include "ast.h"
@@ -388,6 +389,11 @@ void ast_io_init(void)
ast_setup_sio_irq_polarity();
}
+bool ast_is_mbox_pnor(void)
+{
+ return dt_find_compatible_node(dt_root, NULL, "mbox");
+}
+
bool ast_is_ahb_lpc_pnor(void)
{
uint8_t boot_version;