cpu.c 878 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* CPU specific code for the LEON2 CPU
  2. *
  3. * (C) Copyright 2007
  4. * Daniel Hellstrom, Gaisler Research, 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. /* ------------------------------------------------------------------------- */
  21. void cpu_reset(void)
  22. {
  23. /* Interrupts off */
  24. disable_interrupts();
  25. /* jump to restart in flash */
  26. _reset_reloc();
  27. }
  28. int do_reset(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
  29. {
  30. cpu_reset();
  31. return 1;
  32. }
  33. /* ------------------------------------------------------------------------- */
  34. #ifdef CONFIG_GRETH
  35. int cpu_eth_init(bd_t *bis)
  36. {
  37. return greth_initialize(bis);
  38. }
  39. #endif