summaryrefslogtreecommitdiff
path: root/chip/lm4/mock_flash.c
diff options
context:
space:
mode:
Diffstat (limited to 'chip/lm4/mock_flash.c')
-rw-r--r--chip/lm4/mock_flash.c27
1 files changed, 3 insertions, 24 deletions
diff --git a/chip/lm4/mock_flash.c b/chip/lm4/mock_flash.c
index e516439355..8e46d52bfc 100644
--- a/chip/lm4/mock_flash.c
+++ b/chip/lm4/mock_flash.c
@@ -11,33 +11,12 @@
#include "uart.h"
#include "util.h"
-#define FLASH_WRITE_BYTES 4
-#define FLASH_ERASE_BYTES 1024
-#define FLASH_PROTECT_BYTES 2048
#define FLASH_FSIZE 0x7f
-#define PHYSICAL_SIZE ((FLASH_FSIZE + 1) * FLASH_PROTECT_BYTES)
-#define FLASH_MOCK_BEGIN (FLASH_FSIZE * FLASH_PROTECT_BYTES)
+#define PHYSICAL_SIZE ((FLASH_FSIZE + 1) * CONFIG_FLASH_BANK_SIZE)
+#define FLASH_MOCK_BEGIN (FLASH_FSIZE * CONFIG_FLASH_BANK_SIZE)
char mock_protect[FLASH_FSIZE + 1];
-char pstate_space[FLASH_PROTECT_BYTES];
-
-int flash_get_write_block_size(void)
-{
- return FLASH_WRITE_BYTES;
-}
-
-
-int flash_get_erase_block_size(void)
-{
- return FLASH_ERASE_BYTES;
-}
-
-
-int flash_get_protect_block_size(void)
-{
- return FLASH_PROTECT_BYTES;
-}
-
+char pstate_space[CONFIG_FLASH_BANK_SIZE];
int flash_physical_size(void)
{