Revert "Re-factor 'to_flash_offset()' into 'spi_flash.h'"
This reverts commit 9270553fff
.
Change-Id: I195f721ce7a18aac6c1aa6f4e0f9284455d531b0
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/8138
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
This commit is contained in:
committed by
Edward O'Callaghan
parent
6355cbff51
commit
9b29aad526
@@ -76,15 +76,4 @@ static inline int spi_flash_erase(struct spi_flash *flash, u32 offset,
|
||||
return flash->erase(flash, offset, len);
|
||||
}
|
||||
|
||||
#if !defined(__PRE_RAM__)
|
||||
/* convert a pointer to flash area into the offset inside the flash */
|
||||
static inline u32 to_flash_offset(struct spi_flash *flash, void *p) {
|
||||
#if defined(CONFIG_VIRTUAL_ROM_SIZE)
|
||||
return ((u32)p + CONFIG_VIRTUAL_ROM_SIZE);
|
||||
#else
|
||||
return ((u32)p + flash->size);
|
||||
#endif /* defined(CONFIG_VIRTUAL_ROM_SIZE) */
|
||||
}
|
||||
#endif /* !defined(__PRE_RAM__) */
|
||||
|
||||
#endif /* _SPI_FLASH_H_ */
|
||||
|
Reference in New Issue
Block a user