blob: 0d253259d82eec2afdbf8b27078aab70a5c9c998 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// SPDX-License-Identifier: Apache-2.0
/* Copyright 2015-2017 IBM Corp */
#ifndef PNOR_H
#define PNOR_H
#include <libflash/libffs.h>
#include <libflash/blocklevel.h>
struct pnor {
char *path;
struct ffs_handle *ffsh;
uint64_t size;
uint32_t erasesize;
struct blocklevel_device *bl;
};
enum pnor_op {
PNOR_OP_READ,
PNOR_OP_WRITE,
};
extern int pnor_operation(struct pnor *pnor, const char *name,
uint64_t offset, void *data, size_t size,
enum pnor_op);
extern int pnor_init(struct pnor *pnor);
extern void pnor_close(struct pnor *pnor);
extern bool pnor_available(struct pnor *pnor);
#endif /*PNOR_H*/
|