blob: 67b2d641fc7c19de09dc15dd78bbf09f554697b7 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Rafal Jaworowski500856e2008-01-09 19:39:36 +01002/*
3 * (C) Copyright 2007 Semihalf
4 *
5 * Written by: Rafal Jaworowski <raj@semihalf.com>
6 *
Rafal Jaworowski500856e2008-01-09 19:39:36 +01007 * This is is a set of wrappers/stubs that allow to use certain routines from
Peter Tyser78acc472010-04-12 22:28:05 -05008 * U-Boot's lib in the standalone app. This way way we can re-use
Rafal Jaworowski500856e2008-01-09 19:39:36 +01009 * existing code e.g. operations on strings and similar.
Rafal Jaworowski500856e2008-01-09 19:39:36 +010010 */
11
12#include <common.h>
13#include <linux/types.h>
14#include <api_public.h>
15
16#include "glue.h"
17
Stefan Roese7d9cde12015-11-23 07:00:22 +010018void putc(const char c)
Rafal Jaworowski500856e2008-01-09 19:39:36 +010019{
20 ub_putc(c);
21}
22
Stefan Roese7d9cde12015-11-23 07:00:22 +010023void puts(const char *s)
24{
25 ub_puts(s);
26}
27
Ingo van Lil3eb90ba2009-11-24 14:09:21 +010028void __udelay(unsigned long usec)
Rafal Jaworowski500856e2008-01-09 19:39:36 +010029{
30 ub_udelay(usec);
31}
32
Mike Frysingere0306ca2010-12-19 17:16:53 -050033int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
Rafal Jaworowski500856e2008-01-09 19:39:36 +010034{
35 ub_reset();
Mike Frysingere0306ca2010-12-19 17:16:53 -050036 return 0;
Rafal Jaworowski500856e2008-01-09 19:39:36 +010037}
38
Rafal Jaworowski63f732d2008-01-29 17:00:34 +010039void *malloc (size_t len)
Rafal Jaworowski500856e2008-01-09 19:39:36 +010040{
41 return NULL;
42}
Rafal Jaworowski63f732d2008-01-29 17:00:34 +010043
44void hang (void)
45{
46 while (1) ;
47}