arm: k3: Use driver_name to get ti_sci handle
[oweals/u-boot.git] / lib / tiny-printf.c
index 0b04813dc206be9cd6163136574b7213e5933e91..ebef92fc9f6b3c938bfd4abe7894483915b05768 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: LGPL-2.1+
 /*
  * Tiny printf version for SPL
  *
@@ -5,8 +6,6 @@
  * http://www.sparetimelabs.com/printfrevisited/printfrevisited.php
  *
  * Copyright (C) 2004,2008  Kustaa Nyholm
- *
- * SPDX-License-Identifier:    LGPL-2.1+
  */
 
 #include <common.h>
@@ -23,11 +22,6 @@ struct printf_info {
        void (*putc)(struct printf_info *info, char ch);
 };
 
-static void putc_normal(struct printf_info *info, char ch)
-{
-       putc(ch);
-}
-
 static void out(struct printf_info *info, char c)
 {
        *info->bf++ = c;
@@ -321,6 +315,12 @@ abort:
        return 0;
 }
 
+#if CONFIG_IS_ENABLED(PRINTF)
+static void putc_normal(struct printf_info *info, char ch)
+{
+       putc(ch);
+}
+
 int vprintf(const char *fmt, va_list va)
 {
        struct printf_info info;
@@ -343,6 +343,7 @@ int printf(const char *fmt, ...)
 
        return ret;
 }
+#endif
 
 static void putc_outstr(struct printf_info *info, char ch)
 {
@@ -381,12 +382,3 @@ int snprintf(char *buf, size_t size, const char *fmt, ...)
 
        return ret;
 }
-
-void __assert_fail(const char *assertion, const char *file, unsigned line,
-                  const char *function)
-{
-       /* This will not return */
-       printf("%s:%u: %s: Assertion `%s' failed.", file, line, function,
-              assertion);
-       hang();
-}