cpu.c 1015 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 <watchdog.h>
  18. #include <asm/cache.h>
  19. #include <faraday/ftwdt010_wdt.h>
  20. /*
  21. * cleanup_before_linux() is called just before we call linux
  22. * it prepares the processor for linux
  23. *
  24. * we disable interrupt and caches.
  25. */
  26. int cleanup_before_linux(void)
  27. {
  28. disable_interrupts();
  29. /* turn off I/D-cache */
  30. cache_flush();
  31. icache_disable();
  32. dcache_disable();
  33. return 0;
  34. }
  35. int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
  36. {
  37. disable_interrupts();
  38. panic("AE3XX wdt not support yet.\n");
  39. }