blob: ba51007b14a6a268e3c87d72b48055a0a7bd511f [file] [log] [blame]
Rafal Jaworowskia19be782008-01-09 19:39:36 +01001/*
2 * (C) Copyright 2007 Semihalf
3 *
4 * Written by: Rafal Jaworowski <raj@semihalf.com>
5 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02006 * SPDX-License-Identifier: GPL-2.0+
Rafal Jaworowskia19be782008-01-09 19:39:36 +01007 *
8 * This is is a set of wrappers/stubs that allow to use certain routines from
Peter Tyser685b7f52010-04-12 22:28:05 -05009 * U-Boot's lib in the standalone app. This way way we can re-use
Rafal Jaworowskia19be782008-01-09 19:39:36 +010010 * existing code e.g. operations on strings and similar.
Rafal Jaworowskia19be782008-01-09 19:39:36 +010011 */
12
13#include <common.h>
14#include <linux/types.h>
15#include <api_public.h>
16
17#include "glue.h"
18
Stefan Roese363ab7b2015-11-23 07:00:22 +010019void putc(const char c)
Rafal Jaworowskia19be782008-01-09 19:39:36 +010020{
Stefan Roese363ab7b2015-11-23 07:00:22 +010021 ub_putc(c);
Rafal Jaworowskia19be782008-01-09 19:39:36 +010022}
23
Stefan Roese363ab7b2015-11-23 07:00:22 +010024void puts(const char *s)
Rafal Jaworowskia19be782008-01-09 19:39:36 +010025{
Stefan Roese363ab7b2015-11-23 07:00:22 +010026 ub_puts(s);
Rafal Jaworowskia19be782008-01-09 19:39:36 +010027}
28
Ingo van Lilf0f778a2009-11-24 14:09:21 +010029void __udelay(unsigned long usec)
Rafal Jaworowskia19be782008-01-09 19:39:36 +010030{
31 ub_udelay(usec);
32}
33
Mike Frysinger1f0a7e32010-12-19 17:16:53 -050034int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
Rafal Jaworowskia19be782008-01-09 19:39:36 +010035{
36 ub_reset();
Mike Frysinger1f0a7e32010-12-19 17:16:53 -050037 return 0;
Rafal Jaworowskia19be782008-01-09 19:39:36 +010038}
39
Rafal Jaworowski35e4e8d2008-01-29 17:00:34 +010040void *malloc (size_t len)
Rafal Jaworowskia19be782008-01-09 19:39:36 +010041{
42 return NULL;
43}
Rafal Jaworowski35e4e8d2008-01-29 17:00:34 +010044
45void hang (void)
46{
47 while (1) ;
48}