event: Use an event to replace last_stage_init()

Add a new event which handles this function. Convert existing use of
the function to use the new event instead.

Make sure that EVENT is enabled by affected boards, by selecting it from
the LAST_STAGE_INIT option. For x86, enable it by default since all boards
need it.

For controlcenterdc, inline the get_tpm() function and make sure the event
is not built in SPL.

Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/board/gdsys/mpc8308/gazerbeam.c b/board/gdsys/mpc8308/gazerbeam.c
index ba88401..cc608c4 100644
--- a/board/gdsys/mpc8308/gazerbeam.c
+++ b/board/gdsys/mpc8308/gazerbeam.c
@@ -9,6 +9,7 @@
 #include <command.h>
 #include <dm.h>
 #include <env.h>
+#include <event.h>
 #include <fdt_support.h>
 #include <fsl_esdhc.h>
 #include <init.h>
@@ -124,7 +125,7 @@
 	       osd_info->width, osd_info->height);
 }
 
-int last_stage_init(void)
+static int last_stage_init(void)
 {
 	int fpga_hw_rev = 0;
 	int i;
@@ -179,6 +180,7 @@
 
 	return 0;
 }
+EVENT_SPY_SIMPLE(EVT_LAST_STAGE_INIT, last_stage_init);
 
 #if defined(CONFIG_OF_BOARD_SETUP)
 int ft_board_setup(void *blob, struct bd_info *bd)