soc/intel/common/nvm: Allow overriding to_flash_offset() function
commit922064162bb4695a276bd46ba0a928e94825ac8b
authorAlexandru Gagniuc <alexandrux.gagniuc@intel.com>
Thu, 3 Mar 2016 18:58:30 +0000 (3 10:58 -0800)
committerAaron Durbin <adurbin@chromium.org>
Fri, 8 Apr 2016 16:10:58 +0000 (8 18:10 +0200)
tree2c4e6802e141e4fb3826231bd6774e6b95000fde
parent5a577251263369d259bee033e41584d7c562ca6d
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>
src/soc/intel/common/nvm.c
src/soc/intel/common/nvm.h