diff options
author | Alistair Popple <alistair@popple.id.au> | 2015-03-20 14:59:15 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-03-26 11:12:18 +1100 |
commit | fc2906d321adf27db33918711b1055a8ea5b34f9 (patch) | |
tree | 609849d3bbc735d0643d9cb42fa5e2764ab8da88 /platforms/astbmc | |
parent | 822403ea5dcc51a5c70c0ab061ef49adb17d82e4 (diff) | |
download | skiboot-fc2906d321adf27db33918711b1055a8ea5b34f9.zip skiboot-fc2906d321adf27db33918711b1055a8ea5b34f9.tar.gz skiboot-fc2906d321adf27db33918711b1055a8ea5b34f9.tar.bz2 |
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/astbmc')
-rw-r--r-- | platforms/astbmc/pnor.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/platforms/astbmc/pnor.c b/platforms/astbmc/pnor.c index c64f41e..8e88edd 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; } - |