diff options
author | Cédric Le Goater <clg@kaod.org> | 2018-06-12 11:16:36 +0200 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2018-06-18 22:13:43 -0500 |
commit | 35cd7a379b935c74c184f4270c332b1ef85174a8 (patch) | |
tree | e50c6c7f0b366079185d0a972cebed27b9ed4b6a /platforms | |
parent | 28ba76c32ea1521625984ec3d54a437947628c91 (diff) | |
download | skiboot-35cd7a379b935c74c184f4270c332b1ef85174a8.zip skiboot-35cd7a379b935c74c184f4270c332b1ef85174a8.tar.gz skiboot-35cd7a379b935c74c184f4270c332b1ef85174a8.tar.bz2 |
plat/qemu: add PNOR support
To access the PNOR, OPAL/skiboot drives the BMC SPI controller using
the iLPC2AHB device of the BMC SuperIO controller and accesses the
flash contents using the LPC FW address space on which the PNOR is
remapped.
The QEMU PowerNV machine now integrates such models (SuperIO
controller, iLPC2AHB device) and also a pseudo Aspeed SoC AHB memory
space populated with the SPI controller registers (same model as for
ARM). The AHB window giving access to the contents of the BMC SPI
controller flash modules is mapped on the LPC FW address space.
The change should be compatible for machine without PNOR support.
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'platforms')
-rw-r--r-- | platforms/qemu/qemu.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/platforms/qemu/qemu.c b/platforms/qemu/qemu.c index 85ca213..dee61cc 100644 --- a/platforms/qemu/qemu.c +++ b/platforms/qemu/qemu.c @@ -24,6 +24,8 @@ #include <bt.h> #include <errorlog.h> #include <ipmi.h> +#include <ast.h> +#include <platforms/astbmc/astbmc.h> /* BT config */ #define BT_IO_BASE 0xe4 @@ -78,6 +80,9 @@ static void qemu_ipmi_setenables(void) static void qemu_init(void) { + /* Initialize PNOR/NVRAM */ + pnor_init(); + /* Setup UART console for use by Linux via OPAL API */ set_opal_console(&uart_opal_con); @@ -241,6 +246,9 @@ static bool qemu_probe(void) psi_set_external_irq_policy(EXTERNAL_IRQ_POLICY_SKIBOOT); + /* Initialize AHB accesses via AST2400 */ + ast_io_init(); + /* Setup UART and use it as console */ uart_init(); @@ -254,5 +262,7 @@ DECLARE_PLATFORM(qemu) = { .external_irq = qemu_ext_irq_serirq_cpld, .cec_power_down = qemu_ipmi_power_down, .cec_reboot = qemu_ipmi_reboot, + .start_preload_resource = flash_start_preload_resource, + .resource_loaded = flash_resource_loaded, .terminate = ipmi_terminate, }; |