drivers/intel/fsp2_0: Display FSP calls and status

Disable the chatty FSP behavior for normal builds.  Use a Kconfig value
to enable the display of the FSP call entry points, the call parameters
and the returned status for MemoryInit, SiliconInit and FspNotify. The
debug code is placed into drivers/intel/fsp2_0/debug.c.

TEST=Build and run on Galileo Gen2

Change-Id: Iacae66f72bc5b4ba1469f53fcce4669726234441
Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Reviewed-on: https://review.coreboot.org/15989
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
diff --git a/src/drivers/intel/fsp2_0/memory_init.c b/src/drivers/intel/fsp2_0/memory_init.c
index 8e3eb68..ada1c28 100644
--- a/src/drivers/intel/fsp2_0/memory_init.c
+++ b/src/drivers/intel/fsp2_0/memory_init.c
@@ -29,9 +29,6 @@
 #include <timestamp.h>
 #include <vboot/vboot_common.h>
 
-typedef asmlinkage enum fsp_status (*fsp_memory_init_fn)
-				   (void *raminit_upd, void **hob_list);
-
 static void save_memory_training_data(bool s3wake, uint32_t fsp_version)
 {
 	size_t  mrc_data_size;
@@ -221,9 +218,8 @@
 
 	/* Call FspMemoryInit */
 	fsp_raminit = (void *)(hdr->image_base + hdr->memory_init_entry_offset);
-	printk(BIOS_DEBUG, "Calling FspMemoryInit: 0x%p\n", fsp_raminit);
-	printk(BIOS_SPEW, "\t%p: raminit_upd\n", &fspm_upd);
-	printk(BIOS_SPEW, "\t%p: hob_list ptr\n", &hob_list_ptr);
+	fsp_debug_before_memory_init(fsp_raminit, upd, &fspm_upd,
+		&hob_list_ptr);
 
 	post_code(POST_FSP_MEMORY_INIT);
 	timestamp_add_now(TS_FSP_MEMORY_INIT_START);
@@ -231,7 +227,7 @@
 	post_code(POST_FSP_MEMORY_INIT);
 	timestamp_add_now(TS_FSP_MEMORY_INIT_END);
 
-	printk(BIOS_DEBUG, "FspMemoryInit returned 0x%08x\n", status);
+	fsp_debug_after_memory_init(status, hob_list_ptr);
 
 	/* Handle any resets requested by FSPM. */
 	fsp_handle_reset(status);