cpu.c 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * (C) Copyright 2002
  4. * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
  5. * Marius Groeger <mgroeger@sysgo.de>
  6. *
  7. * (C) Copyright 2002
  8. * Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
  9. *
  10. * Copyright (C) 2011 Andes Technology Corporation
  11. * Shawn Lin, Andes Technology Corporation <nobuhiro@andestech.com>
  12. * Macpaul Lin, Andes Technology Corporation <macpaul@andestech.com>
  13. */
  14. /* CPU specific code */
  15. #include <common.h>
  16. #include <command.h>
  17. #include <cpu_func.h>
  18. #include <watchdog.h>
  19. #include <asm/cache.h>
  20. #include <faraday/ftwdt010_wdt.h>
  21. /*
  22. * cleanup_before_linux() is called just before we call linux
  23. * it prepares the processor for linux
  24. *
  25. * we disable interrupt and caches.
  26. */
  27. int cleanup_before_linux(void)
  28. {
  29. disable_interrupts();
  30. /* turn off I/D-cache */
  31. cache_flush();
  32. icache_disable();
  33. dcache_disable();
  34. return 0;
  35. }
  36. int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
  37. {
  38. disable_interrupts();
  39. panic("AE3XX wdt not support yet.\n");
  40. }