diff options
Diffstat (limited to 'chip/mchp')
-rw-r--r-- | chip/mchp/flash.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/chip/mchp/flash.c b/chip/mchp/flash.c index 043e2b268f..1679cf92cb 100644 --- a/chip/mchp/flash.c +++ b/chip/mchp/flash.c @@ -35,7 +35,7 @@ struct flash_wp_state { * @param size Number of bytes to write. * @param data Destination buffer for data. */ -int flash_physical_read(int offset, int size, char *data) +int crec_flash_physical_read(int offset, int size, char *data) { trace13(0, FLASH, 0, "flash_phys_read: offset=0x%08X size=0x%08X dataptr=0x%08X", @@ -52,7 +52,7 @@ int flash_physical_read(int offset, int size, char *data) * @param size Number of bytes to write. * @param data Data to write to flash. Must be 32-bit aligned. */ -int flash_physical_write(int offset, int size, const char *data) +int crec_flash_physical_write(int offset, int size, const char *data) { int ret = EC_SUCCESS; int i, write_size; @@ -87,7 +87,7 @@ int flash_physical_write(int offset, int size, const char *data) * @param offset Flash offset to erase. * @param size Number of bytes to erase. */ -int flash_physical_erase(int offset, int size) +int crec_flash_physical_erase(int offset, int size) { int ret; @@ -107,7 +107,7 @@ int flash_physical_erase(int offset, int size) * @param bank Bank index to check. * @return non-zero if bank is protected until reboot. */ -int flash_physical_get_protect(int bank) +int crec_flash_physical_get_protect(int bank) { return spi_flash_check_protect(bank * CONFIG_FLASH_BANK_SIZE, CONFIG_FLASH_BANK_SIZE); @@ -121,7 +121,7 @@ int flash_physical_get_protect(int bank) * @param all Protect all (=1) or just read-only * @return non-zero if error. */ -int flash_physical_protect_now(int all) +int crec_flash_physical_protect_now(int all) { if (all) entire_flash_locked = 1; @@ -142,7 +142,7 @@ int flash_physical_protect_now(int all) * * Uses the EC_FLASH_PROTECT_* flags from ec_commands.h */ -uint32_t flash_physical_get_protect_flags(void) +uint32_t crec_flash_physical_get_protect_flags(void) { uint32_t flags = 0; @@ -162,7 +162,7 @@ uint32_t flash_physical_get_protect_flags(void) * * @return A combination of EC_FLASH_PROTECT_* flags from ec_commands.h */ -uint32_t flash_physical_get_valid_flags(void) +uint32_t crec_flash_physical_get_valid_flags(void) { return EC_FLASH_PROTECT_RO_AT_BOOT | EC_FLASH_PROTECT_RO_NOW | @@ -175,7 +175,7 @@ uint32_t flash_physical_get_valid_flags(void) * @param cur_flags The current flash protect flags. * @return A combination of EC_FLASH_PROTECT_* flags from ec_commands.h */ -uint32_t flash_physical_get_writable_flags(uint32_t cur_flags) +uint32_t crec_flash_physical_get_writable_flags(uint32_t cur_flags) { uint32_t ret = 0; enum spi_flash_wp wp_status = SPI_WP_NONE; @@ -204,7 +204,7 @@ uint32_t flash_physical_get_writable_flags(uint32_t cur_flags) * @param range The range to protect. * @return EC_SUCCESS, or nonzero if error. */ -int flash_physical_protect_at_boot(uint32_t new_flags) +int crec_flash_physical_protect_at_boot(uint32_t new_flags) { int offset, size, ret; enum spi_flash_wp flashwp = SPI_WP_NONE; @@ -234,13 +234,13 @@ int flash_physical_protect_at_boot(uint32_t new_flags) * * Applies at-boot protection settings if necessary. */ -int flash_pre_init(void) +int crec_flash_pre_init(void) { - flash_physical_restore_state(); + crec_flash_physical_restore_state(); return EC_SUCCESS; } -int flash_physical_restore_state(void) +int crec_flash_physical_restore_state(void) { uint32_t reset_flags = system_get_reset_flags(); int version, size; |