diff options
author | Andrew Jeffery <andrew@aj.id.au> | 2018-10-09 00:32:32 -0700 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2018-10-31 16:49:21 +1100 |
commit | ae947a88fec95fb42816fbbbbb13784bbdd67cff (patch) | |
tree | 9e588887e1bf1b03fe4942d4b74cc93374817b63 /libflash | |
parent | 8b8dbd4e3353db19a5b2500a5602cf01873daf6e (diff) | |
download | skiboot-ae947a88fec95fb42816fbbbbb13784bbdd67cff.zip skiboot-ae947a88fec95fb42816fbbbbb13784bbdd67cff.tar.gz skiboot-ae947a88fec95fb42816fbbbbb13784bbdd67cff.tar.bz2 |
astbmc: Prefer ipmi-hiomap for PNOR access
[ Upstream commit b5edb1692b7f6af1a60758f4f63f52f795b5dba0 ]
If the IPMI command is not available, fall back to the mailbox
interface.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
[stewart: fix up mbox test]
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'libflash')
-rw-r--r-- | libflash/mbox-flash.c | 6 | ||||
-rw-r--r-- | libflash/test/test-mbox.c | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/libflash/mbox-flash.c b/libflash/mbox-flash.c index dd1f11c..f7f6a6d 100644 --- a/libflash/mbox-flash.c +++ b/libflash/mbox-flash.c @@ -1139,6 +1139,12 @@ int mbox_flash_init(struct blocklevel_device **bl) if (!bl) return FLASH_ERR_PARM_ERROR; + /* XXX: We only support one blocklevel flash device over mbox. If we + * ever support more than one, move this out. The chances of that are + * slim though due to circumstances. + */ + mbox_init(); + *bl = NULL; mbox_flash = zalloc(sizeof(struct mbox_flash_data)); diff --git a/libflash/test/test-mbox.c b/libflash/test/test-mbox.c index 74df983..9bd6f7c 100644 --- a/libflash/test/test-mbox.c +++ b/libflash/test/test-mbox.c @@ -31,6 +31,10 @@ #undef pr_fmt +void mbox_init(void) +{ +} + #include "../libflash.c" #include "../mbox-flash.c" #include "../ecc.c" |