From e7d1f60eb49bfd81e1fe153cece899de2542f83e Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Thu, 19 Feb 2015 06:34:53 +0800 Subject: core/flash: Add flash API We'd like to enable access to the system PNOR, on platforms where its present. This change introduces an API for global flash operations: opal_flash_read opal_flash_erase opal_flash_write - plus device-tree bindings to expose the flash details. Since there are other components of the system that use the PNOR (NVRAM and pnor_load_resource), upcoming changes will port this these over to use the new interface. Signed-off-by: Jeremy Kerr Reviewed-by: Joel Stanley Signed-off-by: Stewart Smith --- include/opal.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/opal.h') diff --git a/include/opal.h b/include/opal.h index 0a57bd0..bdb0cc5 100644 --- a/include/opal.h +++ b/include/opal.h @@ -161,7 +161,10 @@ #define OPAL_IPMI_SEND 107 #define OPAL_IPMI_RECV 108 #define OPAL_I2C_REQUEST 109 -#define OPAL_LAST 109 +#define OPAL_FLASH_READ 110 +#define OPAL_FLASH_WRITE 111 +#define OPAL_FLASH_ERASE 112 +#define OPAL_LAST 112 /* Device tree flags */ -- cgit v1.1