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