aboutsummaryrefslogtreecommitdiff
path: root/libflash
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2016-07-28 17:15:31 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-08-02 18:12:48 +1000
commit17c22dbd6b011211a040dc2839d2e3e560fa0806 (patch)
treeeabdba6ba1954ca8bb90526842b08ca4e85ed5c4 /libflash
parent729a547cdd8007cb37cf0f35ffaee96bdaa1500f (diff)
downloadskiboot-17c22dbd6b011211a040dc2839d2e3e560fa0806.zip
skiboot-17c22dbd6b011211a040dc2839d2e3e560fa0806.tar.gz
skiboot-17c22dbd6b011211a040dc2839d2e3e560fa0806.tar.bz2
flash: Add documentation for blocklevel_smart_write()
A function called "smart" doesn't give the user any clues as to why they would want to use it over other calls. This adds some documentation so users can determine when to best use this call. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'libflash')
-rw-r--r--libflash/blocklevel.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/libflash/blocklevel.h b/libflash/blocklevel.h
index 9f4285e..e9eb32a 100644
--- a/libflash/blocklevel.h
+++ b/libflash/blocklevel.h
@@ -64,7 +64,14 @@ int blocklevel_erase(struct blocklevel_device *bl, uint32_t pos, uint32_t len);
int blocklevel_get_info(struct blocklevel_device *bl, const char **name, uint32_t *total_size,
uint32_t *erase_granule);
-/* Convienience functions */
+/*
+ * blocklevel_smart_write() performs reads on the data to see if it
+ * can skip erase or write calls. This is likely more convenient for
+ * the caller since they don't need to perform these checks
+ * themselves. Depending on the new and old data, this may be faster
+ * or slower than the just using blocklevel_erase/write calls.
+ * directly.
+ */
int blocklevel_smart_write(struct blocklevel_device *bl, uint32_t pos, const void *buf, uint32_t len);
/* Implemented in software at this level */