xref: /rk3399_rockchip-uboot/arch/sandbox/cpu/cpu.c (revision 8ee666a76ffe2b63174af477c93ebf389a49d76b)
14b0730d2SSimon Glass /*
24b0730d2SSimon Glass  * Copyright (c) 2011 The Chromium OS Authors.
34b0730d2SSimon Glass  * See file CREDITS for list of people who contributed to this
44b0730d2SSimon Glass  * project.
54b0730d2SSimon Glass  *
64b0730d2SSimon Glass  * This program is free software; you can redistribute it and/or
74b0730d2SSimon Glass  * modify it under the terms of the GNU General Public License as
84b0730d2SSimon Glass  * published by the Free Software Foundation; either version 2 of
94b0730d2SSimon Glass  * the License, or (at your option) any later version.
104b0730d2SSimon Glass  *
114b0730d2SSimon Glass  * This program is distributed in the hope that it will be useful,
124b0730d2SSimon Glass  * but WITHOUT ANY WARRANTY; without even the implied warranty of
134b0730d2SSimon Glass  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
144b0730d2SSimon Glass  * GNU General Public License for more details.
154b0730d2SSimon Glass  *
164b0730d2SSimon Glass  * You should have received a copy of the GNU General Public License
174b0730d2SSimon Glass  * along with this program; if not, write to the Free Software
184b0730d2SSimon Glass  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
194b0730d2SSimon Glass  * MA 02111-1307 USA
204b0730d2SSimon Glass  */
214b0730d2SSimon Glass 
224b0730d2SSimon Glass #include <common.h>
237a9219c1SSimon Glass #include <os.h>
244b0730d2SSimon Glass 
254b0730d2SSimon Glass DECLARE_GLOBAL_DATA_PTR;
264b0730d2SSimon Glass 
274b0730d2SSimon Glass int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
284b0730d2SSimon Glass {
297a9219c1SSimon Glass 	/* This is considered normal termination for now */
307a9219c1SSimon Glass 	os_exit(0);
314b0730d2SSimon Glass 	return 0;
324b0730d2SSimon Glass }
334b0730d2SSimon Glass 
344b0730d2SSimon Glass /* delay x useconds */
354b0730d2SSimon Glass void __udelay(unsigned long usec)
364b0730d2SSimon Glass {
37d99a6874SMatthias Weisser 	os_usleep(usec);
384b0730d2SSimon Glass }
394b0730d2SSimon Glass 
404b0730d2SSimon Glass unsigned long timer_get_us(void)
414b0730d2SSimon Glass {
42d99a6874SMatthias Weisser 	return os_get_nsec() / 1000;
434b0730d2SSimon Glass }
444b0730d2SSimon Glass 
454b0730d2SSimon Glass int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
464b0730d2SSimon Glass {
474b0730d2SSimon Glass 	return -1;
484b0730d2SSimon Glass }
494b0730d2SSimon Glass 
504b0730d2SSimon Glass int cleanup_before_linux(void)
514b0730d2SSimon Glass {
524b0730d2SSimon Glass 	return 0;
534b0730d2SSimon Glass }
544b0730d2SSimon Glass 
554b0730d2SSimon Glass void *map_physmem(phys_addr_t paddr, unsigned long len, unsigned long flags)
564b0730d2SSimon Glass {
57*8ee666a7SSimon Glass 	return (void *)(gd->arch.ram_buf + paddr);
584b0730d2SSimon Glass }
594b0730d2SSimon Glass 
604b0730d2SSimon Glass void flush_dcache_range(unsigned long start, unsigned long stop)
614b0730d2SSimon Glass {
624b0730d2SSimon Glass }
63