blob: cfc1fda1e15c651ef76a15e6d834e966ebe6a2e6 [file] [log] [blame]
Simon Glass4b0730d2011-09-26 14:10:39 +00001/*
2 * Copyright (c) 2011 The Chromium OS Authors.
Wolfgang Denk1a459662013-07-08 09:37:19 +02003 * SPDX-License-Identifier: GPL-2.0+
Simon Glass4b0730d2011-09-26 14:10:39 +00004 */
5
6#include <common.h>
Simon Glass7a9219c2011-10-03 19:26:44 +00007#include <os.h>
Simon Glass4b0730d2011-09-26 14:10:39 +00008
9DECLARE_GLOBAL_DATA_PTR;
10
11int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
12{
Simon Glass7a9219c2011-10-03 19:26:44 +000013 /* This is considered normal termination for now */
14 os_exit(0);
Simon Glass4b0730d2011-09-26 14:10:39 +000015 return 0;
16}
17
18/* delay x useconds */
19void __udelay(unsigned long usec)
20{
Matthias Weisserd99a6872011-11-29 12:16:40 +010021 os_usleep(usec);
Simon Glass4b0730d2011-09-26 14:10:39 +000022}
23
Simon Glasse2ee1002013-06-11 11:14:44 -070024unsigned long __attribute__((no_instrument_function)) timer_get_us(void)
Simon Glass4b0730d2011-09-26 14:10:39 +000025{
Matthias Weisserd99a6872011-11-29 12:16:40 +010026 return os_get_nsec() / 1000;
Simon Glass4b0730d2011-09-26 14:10:39 +000027}
28
29int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
30{
31 return -1;
32}
33
34int cleanup_before_linux(void)
35{
36 return 0;
37}
38
39void *map_physmem(phys_addr_t paddr, unsigned long len, unsigned long flags)
40{
Simon Glass8ee666a2012-12-13 20:49:11 +000041 return (void *)(gd->arch.ram_buf + paddr);
Simon Glass4b0730d2011-09-26 14:10:39 +000042}
43
Simon Glass781adb52013-04-20 08:42:37 +000044phys_addr_t map_to_sysmem(void *ptr)
45{
46 return (u8 *)ptr - gd->arch.ram_buf;
47}
48
Simon Glass4b0730d2011-09-26 14:10:39 +000049void flush_dcache_range(unsigned long start, unsigned long stop)
50{
51}