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