cpu.c 914 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copyright (c) 2011 The Chromium OS Authors.
  3. * SPDX-License-Identifier: GPL-2.0+
  4. */
  5. #include <common.h>
  6. #include <os.h>
  7. DECLARE_GLOBAL_DATA_PTR;
  8. int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
  9. {
  10. /* This is considered normal termination for now */
  11. os_exit(0);
  12. return 0;
  13. }
  14. /* delay x useconds */
  15. void __udelay(unsigned long usec)
  16. {
  17. os_usleep(usec);
  18. }
  19. unsigned long __attribute__((no_instrument_function)) timer_get_us(void)
  20. {
  21. return os_get_nsec() / 1000;
  22. }
  23. int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
  24. {
  25. return -1;
  26. }
  27. int cleanup_before_linux(void)
  28. {
  29. return 0;
  30. }
  31. void *map_physmem(phys_addr_t paddr, unsigned long len, unsigned long flags)
  32. {
  33. return (void *)(gd->arch.ram_buf + paddr);
  34. }
  35. phys_addr_t map_to_sysmem(void *ptr)
  36. {
  37. return (u8 *)ptr - gd->arch.ram_buf;
  38. }
  39. void flush_dcache_range(unsigned long start, unsigned long stop)
  40. {
  41. }