Rafal Jaworowski | a19be78 | 2008-01-09 19:39:36 +0100 | [diff] [blame] | 1 | /* |
2 | * (C) Copyright 2007 Semihalf | ||||
3 | * | ||||
4 | * Written by: Rafal Jaworowski <raj@semihalf.com> | ||||
5 | * | ||||
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 6 | * SPDX-License-Identifier: GPL-2.0+ |
Rafal Jaworowski | a19be78 | 2008-01-09 19:39:36 +0100 | [diff] [blame] | 7 | * |
8 | * This is is a set of wrappers/stubs that allow to use certain routines from | ||||
Peter Tyser | 685b7f5 | 2010-04-12 22:28:05 -0500 | [diff] [blame] | 9 | * U-Boot's lib in the standalone app. This way way we can re-use |
Rafal Jaworowski | a19be78 | 2008-01-09 19:39:36 +0100 | [diff] [blame] | 10 | * existing code e.g. operations on strings and similar. |
Rafal Jaworowski | a19be78 | 2008-01-09 19:39:36 +0100 | [diff] [blame] | 11 | */ |
12 | |||||
13 | #include <common.h> | ||||
14 | #include <linux/types.h> | ||||
15 | #include <api_public.h> | ||||
16 | |||||
17 | #include "glue.h" | ||||
18 | |||||
Stefan Roese | 363ab7b | 2015-11-23 07:00:22 +0100 | [diff] [blame] | 19 | void putc(const char c) |
Rafal Jaworowski | a19be78 | 2008-01-09 19:39:36 +0100 | [diff] [blame] | 20 | { |
Stefan Roese | 363ab7b | 2015-11-23 07:00:22 +0100 | [diff] [blame] | 21 | ub_putc(c); |
Rafal Jaworowski | a19be78 | 2008-01-09 19:39:36 +0100 | [diff] [blame] | 22 | } |
23 | |||||
Stefan Roese | 363ab7b | 2015-11-23 07:00:22 +0100 | [diff] [blame] | 24 | void puts(const char *s) |
Rafal Jaworowski | a19be78 | 2008-01-09 19:39:36 +0100 | [diff] [blame] | 25 | { |
Stefan Roese | 363ab7b | 2015-11-23 07:00:22 +0100 | [diff] [blame] | 26 | ub_puts(s); |
Rafal Jaworowski | a19be78 | 2008-01-09 19:39:36 +0100 | [diff] [blame] | 27 | } |
28 | |||||
Ingo van Lil | f0f778a | 2009-11-24 14:09:21 +0100 | [diff] [blame] | 29 | void __udelay(unsigned long usec) |
Rafal Jaworowski | a19be78 | 2008-01-09 19:39:36 +0100 | [diff] [blame] | 30 | { |
31 | ub_udelay(usec); | ||||
32 | } | ||||
33 | |||||
Mike Frysinger | 1f0a7e3 | 2010-12-19 17:16:53 -0500 | [diff] [blame] | 34 | int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
Rafal Jaworowski | a19be78 | 2008-01-09 19:39:36 +0100 | [diff] [blame] | 35 | { |
36 | ub_reset(); | ||||
Mike Frysinger | 1f0a7e3 | 2010-12-19 17:16:53 -0500 | [diff] [blame] | 37 | return 0; |
Rafal Jaworowski | a19be78 | 2008-01-09 19:39:36 +0100 | [diff] [blame] | 38 | } |
39 | |||||
Rafal Jaworowski | 35e4e8d | 2008-01-29 17:00:34 +0100 | [diff] [blame] | 40 | void *malloc (size_t len) |
Rafal Jaworowski | a19be78 | 2008-01-09 19:39:36 +0100 | [diff] [blame] | 41 | { |
42 | return NULL; | ||||
43 | } | ||||
Rafal Jaworowski | 35e4e8d | 2008-01-29 17:00:34 +0100 | [diff] [blame] | 44 | |
45 | void hang (void) | ||||
46 | { | ||||
47 | while (1) ; | ||||
48 | } |