summaryrefslogtreecommitdiffstats
path: root/external/opal-prd/pnor.h
diff options
context:
space:
mode:
authorCyril Bur <cyril.bur@au1.ibm.com>2016-01-04 13:23:10 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-01-15 15:04:57 +1100
commit748e38b6203f5e4bc3552e9ec9ae5fc85ca723d8 (patch)
tree52e1a59c055420e2519e61636a82fd12c5ae6349 /external/opal-prd/pnor.h
parent77b97a12d91cfd7ffe23276dea35c401e8989f73 (diff)
downloadtalos-skiboot-748e38b6203f5e4bc3552e9ec9ae5fc85ca723d8.tar.gz
talos-skiboot-748e38b6203f5e4bc3552e9ec9ae5fc85ca723d8.zip
external/opal-prd: Use libflash/blocklevel for MTD/file accesses
pnor.c existed before blocklevel, it is time that this code got updated to use the available libraries. Changes include using the blocklevel accessors for MTD reads and writes rather than read() and write() on a file descriptor. This patch also makes use of the arch_flash_init() auto detection of the /dev/mtd device which corresponds to the MTD device exposed by skiboot for access to platform flash. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'external/opal-prd/pnor.h')
-rw-r--r--external/opal-prd/pnor.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/external/opal-prd/pnor.h b/external/opal-prd/pnor.h
index 06219dce..729a969e 100644
--- a/external/opal-prd/pnor.h
+++ b/external/opal-prd/pnor.h
@@ -2,12 +2,14 @@
#define PNOR_H
#include <libflash/libffs.h>
+#include <libflash/blocklevel.h>
struct pnor {
char *path;
struct ffs_handle *ffsh;
uint32_t size;
uint32_t erasesize;
+ struct blocklevel_device *bl;
};
enum pnor_op {
OpenPOWER on IntegriCloud