From 748e38b6203f5e4bc3552e9ec9ae5fc85ca723d8 Mon Sep 17 00:00:00 2001 From: Cyril Bur Date: Mon, 4 Jan 2016 13:23:10 +1100 Subject: 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 Signed-off-by: Stewart Smith --- external/opal-prd/pnor.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'external/opal-prd/pnor.h') 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 +#include struct pnor { char *path; struct ffs_handle *ffsh; uint32_t size; uint32_t erasesize; + struct blocklevel_device *bl; }; enum pnor_op { -- cgit v1.2.1