diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2007-07-16 10:29:28 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2007-07-16 10:29:28 +0200 |
commit | 056a695c15e83f4a85305482fadea67f76fb7528 (patch) | |
tree | 9d94794fa65bab3f8787605a2e3cf3ca4466b72f /include/driver.h | |
parent | be6790838d92ebe130f8b66637cef72e40a7b704 (diff) | |
download | barebox-056a695c15e83f4a85305482fadea67f76fb7528.tar.gz barebox-056a695c15e83f4a85305482fadea67f76fb7528.tar.xz |
implement flash protection
Diffstat (limited to 'include/driver.h')
-rw-r--r-- | include/driver.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/driver.h b/include/driver.h index 1be59100d6..293a265045 100644 --- a/include/driver.h +++ b/include/driver.h @@ -53,6 +53,7 @@ struct driver_d { ssize_t (*read) (struct device_d*, void* buf, size_t count, ulong offset, ulong flags); ssize_t (*write) (struct device_d*, const void* buf, size_t count, ulong offset, ulong flags); ssize_t (*erase) (struct device_d*, size_t count, unsigned long offset); + int (*protect)(struct device_d*, size_t count, unsigned long offset, int prot); int (*memmap)(struct device_d*, void **map, int flags); void (*info) (struct device_d *); @@ -101,6 +102,7 @@ struct driver_d *get_driver_by_name(const char *name); ssize_t dev_read(struct device_d *dev, void *buf, size_t count, ulong offset, ulong flags); ssize_t dev_write(struct device_d *dev, const void *buf, size_t count, ulong offset, ulong flags); ssize_t dev_erase(struct device_d *dev, size_t count, unsigned long offset); +ssize_t dev_protect(struct device_d *dev, size_t count, unsigned long offset, int prot); int dev_memmap(struct device_d *dev, void **map, int flags); /* These are used by drivers which work with direct memory accesses */ |