Simon Glass | 4b0730d | 2011-09-26 14:10:39 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2011 The Chromium OS Authors. |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 3 | * SPDX-License-Identifier: GPL-2.0+ |
Simon Glass | 4b0730d | 2011-09-26 14:10:39 +0000 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #include <common.h> |
Simon Glass | 7a9219c | 2011-10-03 19:26:44 +0000 | [diff] [blame] | 7 | #include <os.h> |
Simon Glass | 4b0730d | 2011-09-26 14:10:39 +0000 | [diff] [blame] | 8 | |
| 9 | DECLARE_GLOBAL_DATA_PTR; |
| 10 | |
| 11 | int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
| 12 | { |
Simon Glass | 7a9219c | 2011-10-03 19:26:44 +0000 | [diff] [blame] | 13 | /* This is considered normal termination for now */ |
| 14 | os_exit(0); |
Simon Glass | 4b0730d | 2011-09-26 14:10:39 +0000 | [diff] [blame] | 15 | return 0; |
| 16 | } |
| 17 | |
| 18 | /* delay x useconds */ |
| 19 | void __udelay(unsigned long usec) |
| 20 | { |
Matthias Weisser | d99a687 | 2011-11-29 12:16:40 +0100 | [diff] [blame] | 21 | os_usleep(usec); |
Simon Glass | 4b0730d | 2011-09-26 14:10:39 +0000 | [diff] [blame] | 22 | } |
| 23 | |
Simon Glass | e2ee100 | 2013-06-11 11:14:44 -0700 | [diff] [blame] | 24 | unsigned long __attribute__((no_instrument_function)) timer_get_us(void) |
Simon Glass | 4b0730d | 2011-09-26 14:10:39 +0000 | [diff] [blame] | 25 | { |
Matthias Weisser | d99a687 | 2011-11-29 12:16:40 +0100 | [diff] [blame] | 26 | return os_get_nsec() / 1000; |
Simon Glass | 4b0730d | 2011-09-26 14:10:39 +0000 | [diff] [blame] | 27 | } |
| 28 | |
| 29 | int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) |
| 30 | { |
| 31 | return -1; |
| 32 | } |
| 33 | |
| 34 | int cleanup_before_linux(void) |
| 35 | { |
| 36 | return 0; |
| 37 | } |
| 38 | |
| 39 | void *map_physmem(phys_addr_t paddr, unsigned long len, unsigned long flags) |
| 40 | { |
Simon Glass | 8ee666a | 2012-12-13 20:49:11 +0000 | [diff] [blame] | 41 | return (void *)(gd->arch.ram_buf + paddr); |
Simon Glass | 4b0730d | 2011-09-26 14:10:39 +0000 | [diff] [blame] | 42 | } |
| 43 | |
Simon Glass | 781adb5 | 2013-04-20 08:42:37 +0000 | [diff] [blame] | 44 | phys_addr_t map_to_sysmem(void *ptr) |
| 45 | { |
| 46 | return (u8 *)ptr - gd->arch.ram_buf; |
| 47 | } |
| 48 | |
Simon Glass | 4b0730d | 2011-09-26 14:10:39 +0000 | [diff] [blame] | 49 | void flush_dcache_range(unsigned long start, unsigned long stop) |
| 50 | { |
| 51 | } |