diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2015-02-19 06:34:53 +0800 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-02-19 10:40:50 +1100 |
commit | e7d1f60eb49bfd81e1fe153cece899de2542f83e (patch) | |
tree | c530c6442149dafcbc0d1e4205eeb0a1d5e8886e /include/skiboot.h | |
parent | 10a7817fce7416a44d3683d381af1066fad315cd (diff) | |
download | skiboot-e7d1f60eb49bfd81e1fe153cece899de2542f83e.zip skiboot-e7d1f60eb49bfd81e1fe153cece899de2542f83e.tar.gz skiboot-e7d1f60eb49bfd81e1fe153cece899de2542f83e.tar.bz2 |
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 <jk@ozlabs.org>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include/skiboot.h')
-rw-r--r-- | include/skiboot.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/skiboot.h b/include/skiboot.h index 1b55638..dbc2057 100644 --- a/include/skiboot.h +++ b/include/skiboot.h @@ -196,12 +196,16 @@ extern void occ_pstates_init(void); extern void slw_init(void); extern void occ_fsp_init(void); +/* flash support */ +struct flash_chip; +extern int flash_register(struct flash_chip *chip, bool is_system_flash); +extern bool flash_load_resource(enum resource_id id, void *buf, size_t *len); + /* NVRAM support */ extern void nvram_init(void); extern void nvram_read_complete(bool success); /* NVRAM on flash helper */ -struct flash_chip; extern int flash_nvram_init(struct flash_chip *chip, uint32_t start, uint32_t size); /* UART stuff */ |