]>
Commit | Line | Data |
---|---|---|
500856eb RJ |
1 | /* |
2 | * (C) Copyright 2007 Semihalf | |
3 | * | |
4 | * Written by: Rafal Jaworowski <raj@semihalf.com> | |
5 | * | |
1a459660 | 6 | * SPDX-License-Identifier: GPL-2.0+ |
500856eb RJ |
7 | * |
8 | * This is is a set of wrappers/stubs that allow to use certain routines from | |
78acc472 | 9 | * U-Boot's lib in the standalone app. This way way we can re-use |
500856eb | 10 | * existing code e.g. operations on strings and similar. |
500856eb RJ |
11 | */ |
12 | ||
13 | #include <common.h> | |
14 | #include <linux/types.h> | |
15 | #include <api_public.h> | |
16 | ||
17 | #include "glue.h" | |
18 | ||
7d9cde10 | 19 | void putc(const char c) |
500856eb | 20 | { |
7d9cde10 | 21 | ub_putc(c); |
500856eb RJ |
22 | } |
23 | ||
7d9cde10 | 24 | void puts(const char *s) |
500856eb | 25 | { |
7d9cde10 | 26 | ub_puts(s); |
500856eb RJ |
27 | } |
28 | ||
3eb90bad | 29 | void __udelay(unsigned long usec) |
500856eb RJ |
30 | { |
31 | ub_udelay(usec); | |
32 | } | |
33 | ||
e0306cab | 34 | int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
500856eb RJ |
35 | { |
36 | ub_reset(); | |
e0306cab | 37 | return 0; |
500856eb RJ |
38 | } |
39 | ||
63f732d3 | 40 | void *malloc (size_t len) |
500856eb RJ |
41 | { |
42 | return NULL; | |
43 | } | |
63f732d3 RJ |
44 | |
45 | void hang (void) | |
46 | { | |
47 | while (1) ; | |
48 | } |