powerpc/powernv: Add interfaces for flash device access
authorCyril Bur <cyrilbur@gmail.com>
Wed, 1 Apr 2015 06:05:30 +0000 (14:05 +0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Sat, 11 Apr 2015 10:49:21 +0000 (20:49 +1000)
This change adds the OPAL interface definitions to allow Linux to read,
write and erase from system flash devices. We register platform devices
for the flash devices exported by firmware.

We clash with the existing opal_flash_init function, which is really for
the FSP flash update functionality, so we rename that initcall to
opal_flash_update_init().

A future change will add an mtd driver that uses this interface.

Changes from Joel Stanley and Jeremy Kerr.

Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Joel Stanley <joel@jms.id.au>
Acked-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/opal-api.h
arch/powerpc/include/asm/opal.h
arch/powerpc/platforms/powernv/opal-flash.c
arch/powerpc/platforms/powernv/opal-wrappers.S
arch/powerpc/platforms/powernv/opal.c

index e8a6baf..0321a90 100644 (file)
 #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 */
 
Simple merge
Simple merge