cpu.c 559 B

1234567891011121314151617181920212223242526272829303132333435
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
  4. */
  5. #include <common.h>
  6. #include <asm/arcregs.h>
  7. #include <asm/cache.h>
  8. DECLARE_GLOBAL_DATA_PTR;
  9. int arch_cpu_init(void)
  10. {
  11. timer_init();
  12. gd->cpu_clk = CONFIG_SYS_CLK_FREQ;
  13. gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
  14. cache_init();
  15. return 0;
  16. }
  17. int arch_early_init_r(void)
  18. {
  19. gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
  20. gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
  21. return 0;
  22. }
  23. /* This is a dummy function on arc */
  24. int dram_init(void)
  25. {
  26. return 0;
  27. }