libc: Adapt to TFTF

Add support for functions used in TFTF but not in TF-A.

Replaced calls to plat_panic_handler with calls to panic, since there is no
implementation of the former in TFTF.

Change-Id: Ic10de2c6e749db97b932cd7ffbb6067b5befe914
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
diff --git a/lib/libc/assert.c b/lib/libc/assert.c
index 60f1a86..dbf8507 100644
--- a/lib/libc/assert.c
+++ b/lib/libc/assert.c
@@ -9,35 +9,9 @@
 #include <stdio.h>
 
 #include <common/debug.h>
-#include <drivers/console.h>
-#include <plat/common/platform.h>
 
-/*
- * Only print the output if PLAT_LOG_LEVEL_ASSERT is higher or equal to
- * LOG_LEVEL_INFO, which is the default value for builds with DEBUG=1.
- */
-
-#if PLAT_LOG_LEVEL_ASSERT >= LOG_LEVEL_VERBOSE
 void __assert(const char *file, unsigned int line, const char *assertion)
 {
 	printf("ASSERT: %s:%d:%s\n", file, line, assertion);
-	backtrace("assert");
-	(void)console_flush();
-	plat_panic_handler();
+	panic();
 }
-#elif PLAT_LOG_LEVEL_ASSERT >= LOG_LEVEL_INFO
-void __assert(const char *file, unsigned int line)
-{
-	printf("ASSERT: %s:%d\n", file, line);
-	backtrace("assert");
-	(void)console_flush();
-	plat_panic_handler();
-}
-#else
-void __assert(void)
-{
-	backtrace("assert");
-	(void)console_flush();
-	plat_panic_handler();
-}
-#endif