summaryrefslogtreecommitdiffstats
path: root/src/target/firmware/flash
diff options
context:
space:
mode:
authorIngo Albrecht2010-04-18 09:51:39 +0200
committerIngo Albrecht2010-07-20 14:41:20 +0200
commit7c33250e5b5dba5283702592de7c2e30fdecfb45 (patch)
treedc819187d53255da1bc73b1ffc3c32221109a527 /src/target/firmware/flash
parentfirmware: non-asm backlight init (diff)
downloadosmocom-7c33250e5b5dba5283702592de7c2e30fdecfb45.tar.gz
osmocom-7c33250e5b5dba5283702592de7c2e30fdecfb45.tar.xz
osmocom-7c33250e5b5dba5283702592de7c2e30fdecfb45.zip
firmware: compile-time define for flash write support
Diffstat (limited to 'src/target/firmware/flash')
-rw-r--r--src/target/firmware/flash/cfi_flash.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/target/firmware/flash/cfi_flash.c b/src/target/firmware/flash/cfi_flash.c
index 0f6fbeb..456f69d 100644
--- a/src/target/firmware/flash/cfi_flash.c
+++ b/src/target/firmware/flash/cfi_flash.c
@@ -141,7 +141,11 @@ static inline uint16_t flash_read16(const void *base_addr, uint32_t offset)
__ramtext
static char flash_protected(uint32_t block_offset) {
- return 0; // block_offset < 64*1024;
+#ifdef CONFIG_FLASH_WRITE
+ return 0;
+#else
+ return 1;
+#endif
}