summaryrefslogtreecommitdiffstats
path: root/platforms
diff options
context:
space:
mode:
authorAlistair Popple <alistair@popple.id.au>2015-03-20 14:59:15 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-03-26 11:12:18 +1100
commitfc2906d321adf27db33918711b1055a8ea5b34f9 (patch)
tree609849d3bbc735d0643d9cb42fa5e2764ab8da88 /platforms
parent822403ea5dcc51a5c70c0ab061ef49adb17d82e4 (diff)
downloadtalos-skiboot-fc2906d321adf27db33918711b1055a8ea5b34f9.tar.gz
talos-skiboot-fc2906d321adf27db33918711b1055a8ea5b34f9.zip
memboot: Add a memboot flash backend
memboot uses bmc system memory instead of a real flash chip. This patch adds a flash backend for bmc system memory to allow use of the memboot tool (in external/memboot) to boot the system. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'platforms')
-rw-r--r--platforms/astbmc/pnor.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/platforms/astbmc/pnor.c b/platforms/astbmc/pnor.c
index c64f41e8..8e88edd7 100644
--- a/platforms/astbmc/pnor.c
+++ b/platforms/astbmc/pnor.c
@@ -30,8 +30,16 @@ int pnor_init(void)
struct flash_chip *pnor_chip;
int rc;
- /* Open controller and flash */
- rc = ast_sf_open(AST_SF_TYPE_PNOR, &pnor_ctrl);
+ /* Open controller and flash. If the LPC->AHB doesn't point to
+ * the PNOR flash base we assume we're booting from BMC system
+ * memory (or some other place setup by the BMC to support LPC
+ * FW reads & writes). */
+ if (ast_is_ahb_lpc_pnor())
+ rc = ast_sf_open(AST_SF_TYPE_PNOR, &pnor_ctrl);
+ else {
+ printf("PLAT: Memboot detected\n");
+ rc = ast_sf_open(AST_SF_TYPE_MEM, &pnor_ctrl);
+ }
if (rc) {
prerror("PLAT: Failed to open PNOR flash controller\n");
goto fail;
@@ -54,4 +62,3 @@ int pnor_init(void)
return rc;
}
-
OpenPOWER on IntegriCloud