diff options
author | Andrew Jeffery <andrew@aj.id.au> | 2018-08-08 16:56:03 +0930 |
---|---|---|
committer | Andrew Jeffery <andrew@aj.id.au> | 2018-09-05 17:44:24 +0930 |
commit | f953f798e2bb5b559eebccf8728117860679af67 (patch) | |
tree | bc9b6c203efc1df2cd48813f00a73168274cd623 | |
parent | e0cdd3ea2f7abd3cb3459bf370b2ff061d6dc522 (diff) | |
download | phosphor-mboxbridge-f953f798e2bb5b559eebccf8728117860679af67.tar.gz phosphor-mboxbridge-f953f798e2bb5b559eebccf8728117860679af67.zip |
flash: Rename set_flash_bytemap to flash_set_bytemap
Change-Id: I0bd244ab1f8f37cdf54a5dc9198651ade7ed0876
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
-rw-r--r-- | control.c | 2 | ||||
-rw-r--r-- | flash.c | 10 | ||||
-rw-r--r-- | flash.h | 2 | ||||
-rw-r--r-- | mboxd_lpc.c | 2 | ||||
-rw-r--r-- | vpnor/flash.cpp | 2 | ||||
-rw-r--r-- | vpnor/pnor_partition.cpp | 2 |
6 files changed, 10 insertions, 10 deletions
@@ -68,7 +68,7 @@ int control_kill(struct mbox_context *context) int control_modified(struct mbox_context *context) { /* Flash has been modified - can no longer trust our erased bytemap */ - set_flash_bytemap(context, 0, context->flash_size, FLASH_DIRTY); + flash_set_bytemap(context, 0, context->flash_size, FLASH_DIRTY); /* Force daemon to reload all windows -> Set BMC event to notify host */ reset_all_windows(context, SET_BMC_EVENT); @@ -120,7 +120,7 @@ static inline bool flash_is_erased(struct mbox_context *context, } /* - * set_flash_bytemap() - Set the flash erased bytemap + * flash_set_bytemap() - Set the flash erased bytemap * @context: The mbox context pointer * @offset: The flash offset to set (bytes) * @count: Number of bytes to set @@ -131,7 +131,7 @@ static inline bool flash_is_erased(struct mbox_context *context, * * Return: 0 if success otherwise negative error code */ -int set_flash_bytemap(struct mbox_context *context, uint32_t offset, +int flash_set_bytemap(struct mbox_context *context, uint32_t offset, uint32_t count, uint8_t val) { if ((offset + count) > context->flash_size) { @@ -189,7 +189,7 @@ int erase_flash(struct mbox_context *context, uint32_t offset, uint32_t count) return -MBOX_R_SYSTEM_ERROR; } /* Mark ERASED where we just erased */ - set_flash_bytemap(context, erase_info.start, + flash_set_bytemap(context, erase_info.start, erase_info.length, FLASH_ERASED); erase_info.start = 0; erase_info.length = 0; @@ -209,7 +209,7 @@ int erase_flash(struct mbox_context *context, uint32_t offset, uint32_t count) return -MBOX_R_SYSTEM_ERROR; } /* Mark ERASED where we just erased */ - set_flash_bytemap(context, erase_info.start, erase_info.length, + flash_set_bytemap(context, erase_info.start, erase_info.length, FLASH_ERASED); } @@ -289,7 +289,7 @@ int write_flash(struct mbox_context *context, uint32_t offset, void *buf, return -MBOX_R_WRITE_ERROR; } /* Mark *NOT* erased where we just wrote */ - set_flash_bytemap(context, offset + buf_offset, rc, + flash_set_bytemap(context, offset + buf_offset, rc, FLASH_DIRTY); count -= rc; buf_offset += rc; @@ -13,7 +13,7 @@ int flash_dev_init(struct mbox_context *context); void flash_dev_free(struct mbox_context *context); int64_t flash_copy(struct mbox_context *context, uint32_t offset, void *mem, uint32_t size); -int set_flash_bytemap(struct mbox_context *context, uint32_t offset, +int flash_set_bytemap(struct mbox_context *context, uint32_t offset, uint32_t count, uint8_t val); int erase_flash(struct mbox_context *context, uint32_t offset, uint32_t count); int write_flash(struct mbox_context *context, uint32_t offset, void *buf, diff --git a/mboxd_lpc.c b/mboxd_lpc.c index 8d5885a..d9dcc64 100644 --- a/mboxd_lpc.c +++ b/mboxd_lpc.c @@ -138,7 +138,7 @@ int point_to_flash(struct mbox_context *context) * Since the host now has access to the flash it can change it out from * under us */ - return set_flash_bytemap(context, 0, context->flash_size, FLASH_DIRTY); + return flash_set_bytemap(context, 0, context->flash_size, FLASH_DIRTY); } /* diff --git a/vpnor/flash.cpp b/vpnor/flash.cpp index e18f3b8..aff74b5 100644 --- a/vpnor/flash.cpp +++ b/vpnor/flash.cpp @@ -94,7 +94,7 @@ void flash_dev_free(struct mbox_context* context) // No-op } -int set_flash_bytemap(struct mbox_context* context, uint32_t offset, +int flash_set_bytemap(struct mbox_context* context, uint32_t offset, uint32_t count, uint8_t val) { // No-op diff --git a/vpnor/pnor_partition.cpp b/vpnor/pnor_partition.cpp index 3ec4d22..68013a6 100644 --- a/vpnor/pnor_partition.cpp +++ b/vpnor/pnor_partition.cpp @@ -154,7 +154,7 @@ size_t Request::fulfil(const fs::path &path, int flags, void *buf, size_t len) else { memcpy((char *)map + offset, buf, len); - set_flash_bytemap(ctx, base + offset, len, FLASH_DIRTY); + flash_set_bytemap(ctx, base + offset, len, FLASH_DIRTY); } munmap(map, fileSize); close(fd); |