Implement a leaner printf for Trusted Firmware

This patch implements a "tf_printf" which supports only the commonly
used format specifiers in Trusted Firmware, which uses a lot less
stack space than the stdlib printf function.

Fixes ARM-software/tf-issues#116

Change-Id: I7dfa1944f4c1e634b3e2d571f49afe02d109a351
diff --git a/bl32/tsp/tsp_interrupt.c b/bl32/tsp/tsp_interrupt.c
index ff6bdc5..c1c9aad 100644
--- a/bl32/tsp/tsp_interrupt.c
+++ b/bl32/tsp/tsp_interrupt.c
@@ -56,7 +56,7 @@
 		tsp_stats[linear_id].sync_fiq_ret_count++;
 
 	spin_lock(&console_lock);
-	printf("TSP: cpu 0x%x sync fiq request from 0x%llx \n\r",
+	tf_printf("TSP: cpu 0x%x sync fiq request from 0x%llx \n\r",
 	       mpidr, elr_el3);
 	INFO("cpu 0x%x: %d sync fiq requests, %d sync fiq returns\n",
 	     mpidr,
@@ -100,7 +100,7 @@
 	/* Update the statistics and print some messages */
 	tsp_stats[linear_id].fiq_count++;
 	spin_lock(&console_lock);
-	printf("TSP: cpu 0x%x handled fiq %d \n\r",
+	tf_printf("TSP: cpu 0x%x handled fiq %d \n\r",
 	       mpidr, id);
 	INFO("cpu 0x%x: %d fiq requests \n",
 	     mpidr, tsp_stats[linear_id].fiq_count);
@@ -116,7 +116,7 @@
 
 	tsp_stats[linear_id].irq_count++;
 	spin_lock(&console_lock);
-	printf("TSP: cpu 0x%x received irq\n\r", mpidr);
+	tf_printf("TSP: cpu 0x%x received irq\n\r", mpidr);
 	INFO("cpu 0x%x: %d irq requests \n",
 	     mpidr, tsp_stats[linear_id].irq_count);
 	spin_unlock(&console_lock);