diff options
author | Cyril Bur <cyril.bur@au1.ibm.com> | 2015-06-02 10:51:02 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-06-09 16:37:33 +1000 |
commit | 39d9e14cdeef9a20e3da05d527b136de65e39904 (patch) | |
tree | 13246271b2b9fba1dbfc0a6729ca84223668e6cf /platforms/rhesus | |
parent | 1fd9d5afc6aff3870695110c74a4a9daa88e5c81 (diff) | |
download | skiboot-39d9e14cdeef9a20e3da05d527b136de65e39904.zip skiboot-39d9e14cdeef9a20e3da05d527b136de65e39904.tar.gz skiboot-39d9e14cdeef9a20e3da05d527b136de65e39904.tar.bz2 |
libflash: start using the blocklevel interface.
Converted all the libflash calls to use the blocklevel interface, modified all
callers to libflash to use the blocklevel interface.
This patch should introduce next to no functional change.
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'platforms/rhesus')
-rw-r--r-- | platforms/rhesus/rhesus.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/platforms/rhesus/rhesus.c b/platforms/rhesus/rhesus.c index 27e1c91..855d0e4 100644 --- a/platforms/rhesus/rhesus.c +++ b/platforms/rhesus/rhesus.c @@ -22,6 +22,7 @@ #include <opal.h> #include <libflash/libflash.h> #include <libflash/libffs.h> +#include <libflash/blocklevel.h> #include <sfc-ctrl.h> #include <ec/config.h> #include <ec/gpio.h> @@ -118,7 +119,7 @@ static int64_t rhesus_power_down(uint64_t request __unused) static int rhesus_pnor_init(void) { struct spi_flash_ctrl *pnor_ctrl; - struct flash_chip *pnor_chip = NULL; + struct blocklevel_device *bl; int rc; /* Open controller, flash and ffs */ @@ -127,19 +128,19 @@ static int rhesus_pnor_init(void) prerror("PLAT: Failed to open PNOR flash controller\n"); goto fail; } - rc = flash_init(pnor_ctrl, &pnor_chip); + rc = flash_init(pnor_ctrl, &bl); if (rc) { prerror("PLAT: Failed to open init PNOR driver\n"); goto fail; } - rc = flash_register(pnor_chip, true); + rc = flash_register(bl, true); if (!rc) return 0; fail: - if (pnor_chip) - flash_exit(pnor_chip); + if (bl) + flash_exit(bl); if (pnor_ctrl) sfc_close(pnor_ctrl); |