summaryrefslogtreecommitdiff
path: root/src/soc/intel/common/nvm.h
diff options
context:
space:
mode:
authorAlexandru Gagniuc <alexandrux.gagniuc@intel.com>2016-03-03 10:58:30 -0800
committerAaron Durbin <adurbin@chromium.org>2016-04-08 18:10:58 +0200
commit922064162bb4695a276bd46ba0a928e94825ac8b (patch)
tree2c4e6802e141e4fb3826231bd6774e6b95000fde /src/soc/intel/common/nvm.h
parent5a577251263369d259bee033e41584d7c562ca6d (diff)
downloadcoreboot-922064162bb4695a276bd46ba0a928e94825ac8b.tar.xz
soc/intel/common/nvm: Allow overriding to_flash_offset() function
On apollolake, the flash is memory-mapped differently, and the default MMIO to flash calculation does not produce correct results. While the long-term solution is to rewrite the NVM functionality to keep the flash offset as part of its context, as a temporary measure, allow overriding the to_flash_offset() function by declaring it weak. Change-Id: Ic54baeba2441a08cfe1a47e235747797f6efb59b Signed-off-by: Alexandru Gagniuc <alexandrux.gagniuc@intel.com> Signed-off-by: Andrey Petrov <andrey.petrov@intel.com> Reviewed-on: https://review.coreboot.org/14247 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/soc/intel/common/nvm.h')
-rw-r--r--src/soc/intel/common/nvm.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/soc/intel/common/nvm.h b/src/soc/intel/common/nvm.h
index feae5c3823..074a2ce406 100644
--- a/src/soc/intel/common/nvm.h
+++ b/src/soc/intel/common/nvm.h
@@ -33,4 +33,7 @@ int nvm_is_write_protected(void);
/* Apply protection to a range of flash */
int nvm_protect(void *start, size_t size);
+/* Map MMIO address to actual address in flash */
+uint32_t nvm_mmio_to_flash_offset(void *p);
+
#endif /* _COMMON_NVM_H_ */