2011-09-26 14:10:39 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2011 The Chromium OS Authors.
|
2013-07-08 07:37:19 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
2011-09-26 14:10:39 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
2011-10-03 19:26:44 +00:00
|
|
|
#include <os.h>
|
2011-09-26 14:10:39 +00:00
|
|
|
|
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
|
|
|
|
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|
|
|
{
|
2011-10-03 19:26:44 +00:00
|
|
|
/* This is considered normal termination for now */
|
|
|
|
os_exit(0);
|
2011-09-26 14:10:39 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* delay x useconds */
|
|
|
|
void __udelay(unsigned long usec)
|
|
|
|
{
|
2011-11-29 11:16:40 +00:00
|
|
|
os_usleep(usec);
|
2011-09-26 14:10:39 +00:00
|
|
|
}
|
|
|
|
|
2013-06-11 18:14:44 +00:00
|
|
|
unsigned long __attribute__((no_instrument_function)) timer_get_us(void)
|
2011-09-26 14:10:39 +00:00
|
|
|
{
|
2011-11-29 11:16:40 +00:00
|
|
|
return os_get_nsec() / 1000;
|
2011-09-26 14:10:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
|
|
|
|
{
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
int cleanup_before_linux(void)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
void *map_physmem(phys_addr_t paddr, unsigned long len, unsigned long flags)
|
|
|
|
{
|
2012-12-13 20:49:11 +00:00
|
|
|
return (void *)(gd->arch.ram_buf + paddr);
|
2011-09-26 14:10:39 +00:00
|
|
|
}
|
|
|
|
|
2013-04-20 08:42:37 +00:00
|
|
|
phys_addr_t map_to_sysmem(void *ptr)
|
|
|
|
{
|
|
|
|
return (u8 *)ptr - gd->arch.ram_buf;
|
|
|
|
}
|
|
|
|
|
2011-09-26 14:10:39 +00:00
|
|
|
void flush_dcache_range(unsigned long start, unsigned long stop)
|
|
|
|
{
|
|
|
|
}
|