x86: fsp: Only compile fsp_save_s3_stack if (SPL_)DM_RTC is enabled
authorSean Anderson <sean.anderson@seco.com>
Tue, 22 Nov 2022 17:54:51 +0000 (12:54 -0500)
committerTom Rini <trini@konsulko.com>
Fri, 9 Dec 2022 19:10:28 +0000 (14:10 -0500)
commit0db588caf99821b616169a7888d8a9515604940c
tree347f0207702074de31e30248be51b89b6bdb972a
parent544071ac4a1c301ed38d7f9ce41cc7cd0910083d
x86: fsp: Only compile fsp_save_s3_stack if (SPL_)DM_RTC is enabled

This function calls rtc_write32, which has a different signature
depending on if (SPL_)DM_RTC is enabled or not. This could result in a
mismatch in SPL if DM_RTC was enabled but SPL_DM_RTC, as the non-DM
declaration would still be used in SPL even though the implementation
would be for non-DM_RTC. We are switching to the correct definitions in
the next commit, so this will become a compilation error. Since
fsp_save_s3_stack is not called from SPL, avoid compiling it if
(SPL_)DM_RTC is disabled.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
arch/x86/lib/fsp/fsp_common.c