summaryrefslogtreecommitdiff
path: root/common/usb_pd_policy.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/usb_pd_policy.c')
-rw-r--r--common/usb_pd_policy.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/common/usb_pd_policy.c b/common/usb_pd_policy.c
index 21d4f1b0e1..0ed69cb8a7 100644
--- a/common/usb_pd_policy.c
+++ b/common/usb_pd_policy.c
@@ -819,7 +819,7 @@ DECLARE_HOST_COMMAND(EC_CMD_USB_PD_GET_AMODE,
#endif
-#define FW_RW_END (CONFIG_FW_RW_OFF + CONFIG_FW_RW_SIZE)
+#define FW_RW_END (CONFIG_RW_MEM_OFF + CONFIG_RW_SIZE)
uint8_t *flash_hash_rw(void)
{
@@ -830,8 +830,8 @@ uint8_t *flash_hash_rw(void)
rw_flash_changed = 0;
SHA256_init(&ctx);
SHA256_update(&ctx, (void *)CONFIG_FLASH_BASE +
- CONFIG_FW_RW_OFF,
- CONFIG_FW_RW_SIZE - RSANUMBYTES);
+ CONFIG_RW_MEM_OFF,
+ CONFIG_RW_SIZE - RSANUMBYTES);
return SHA256_final(&ctx);
} else {
return ctx.buf;
@@ -881,14 +881,14 @@ int pd_custom_flash_vdm(int port, int cnt, uint32_t *payload)
if (system_get_image_copy() != SYSTEM_IMAGE_RO)
break;
pd_log_event(PD_EVENT_ACC_RW_ERASE, 0, 0, NULL);
- flash_offset = CONFIG_FW_RW_OFF;
- flash_physical_erase(CONFIG_FW_RW_OFF, CONFIG_FW_RW_SIZE);
+ flash_offset = CONFIG_RW_MEM_OFF;
+ flash_physical_erase(CONFIG_RW_MEM_OFF, CONFIG_RW_SIZE);
rw_flash_changed = 1;
break;
case VDO_CMD_FLASH_WRITE:
/* do not kill the code under our feet */
if ((system_get_image_copy() != SYSTEM_IMAGE_RO) ||
- (flash_offset < CONFIG_FW_RW_OFF))
+ (flash_offset < CONFIG_RW_MEM_OFF))
break;
flash_physical_write(flash_offset, 4*(cnt - 1),
(const char *)(payload+1));