summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Jeffery <andrew@aj.id.au>2018-08-08 16:56:03 +0930
committerAndrew Jeffery <andrew@aj.id.au>2018-09-05 17:44:24 +0930
commitf953f798e2bb5b559eebccf8728117860679af67 (patch)
treebc9b6c203efc1df2cd48813f00a73168274cd623
parente0cdd3ea2f7abd3cb3459bf370b2ff061d6dc522 (diff)
downloadphosphor-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.c2
-rw-r--r--flash.c10
-rw-r--r--flash.h2
-rw-r--r--mboxd_lpc.c2
-rw-r--r--vpnor/flash.cpp2
-rw-r--r--vpnor/pnor_partition.cpp2
6 files changed, 10 insertions, 10 deletions
diff --git a/control.c b/control.c
index 72245d7..98bed09 100644
--- a/control.c
+++ b/control.c
@@ -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);
diff --git a/flash.c b/flash.c
index 4975efb..811a25c 100644
--- a/flash.c
+++ b/flash.c
@@ -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;
diff --git a/flash.h b/flash.h
index dcc8288..7566d4b 100644
--- a/flash.h
+++ b/flash.h
@@ -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);
OpenPOWER on IntegriCloud