Hi Simon, On Mon, Aug 2, 2021 at 3:19 AM Simon Glass <s...@chromium.org> wrote: > > Hi Bin, > > On Sat, 31 Jul 2021 at 02:45, Bin Meng <bmeng...@gmail.com> wrote: > > > > For FSP1, there is no such INIT_PHASE_END_FIRMWARE. > > > > Fixes: 7c73cea44290 ("x86: Notify the FSP of the 'end firmware' event") > > Signed-off-by: Bin Meng <bmeng...@gmail.com> > > > > --- > > > > arch/x86/lib/fsp/fsp_common.c | 16 +++++++++------- > > 1 file changed, 9 insertions(+), 7 deletions(-) > > > > diff --git a/arch/x86/lib/fsp/fsp_common.c b/arch/x86/lib/fsp/fsp_common.c > > index 6365b0a50a..0155eaee8d 100644 > > --- a/arch/x86/lib/fsp/fsp_common.c > > +++ b/arch/x86/lib/fsp/fsp_common.c > > @@ -68,13 +68,15 @@ void board_final_cleanup(void) > > /* TODO(s...@chromium.org): This causes Linux to crash */ > > return; > > > > - /* call into FspNotify */ > > - debug("Calling into FSP (notify phase INIT_PHASE_END_FIRMWARE): "); > > - status = fsp_notify(NULL, INIT_PHASE_END_FIRMWARE); > > - if (status) > > - debug("fail, error code %x\n", status); > > - else > > - debug("OK\n"); > > + if (CONFIG_IS_ENABLED(FSP_VERSION2)) { > > + /* call into FspNotify */ > > + debug("Calling into FSP (notify phase > > INIT_PHASE_END_FIRMWARE): "); > > + status = fsp_notify(NULL, INIT_PHASE_END_FIRMWARE); > > + if (status) > > + debug("fail, error code %x\n", status); > > + else > > + debug("OK\n"); > > + } > > } > > So shouldn't we move this whole function into fsp2?
Yes, I think so. Regards, Bin