cpu.c 988 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* CPU specific code for the LEON2 CPU
  2. *
  3. * (C) Copyright 2007, 2015
  4. * Daniel Hellstrom, Cobham Gaisler, daniel@gaisler.com
  5. *
  6. * SPDX-License-Identifier: GPL-2.0+
  7. */
  8. #include <common.h>
  9. #include <watchdog.h>
  10. #include <command.h>
  11. #include <netdev.h>
  12. DECLARE_GLOBAL_DATA_PTR;
  13. extern void _reset_reloc(void);
  14. int checkcpu(void)
  15. {
  16. /* check LEON version here */
  17. printf("CPU: LEON2\n");
  18. return 0;
  19. }
  20. #ifdef CONFIG_DISPLAY_CPUINFO
  21. int print_cpuinfo(void)
  22. {
  23. printf("CPU: LEON2\n");
  24. return 0;
  25. }
  26. #endif
  27. /* ------------------------------------------------------------------------- */
  28. void cpu_reset(void)
  29. {
  30. /* Interrupts off */
  31. disable_interrupts();
  32. /* jump to restart in flash */
  33. _reset_reloc();
  34. }
  35. int do_reset(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
  36. {
  37. cpu_reset();
  38. return 1;
  39. }
  40. /* ------------------------------------------------------------------------- */
  41. #ifdef CONFIG_GRETH
  42. int cpu_eth_init(bd_t *bis)
  43. {
  44. return greth_initialize(bis);
  45. }
  46. #endif