speed.c 424 B

1234567891011121314151617181920212223
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * (C) Copyright 2014 Angelo Dureghello <angelo@sysam.it>
  4. *
  5. */
  6. #include <common.h>
  7. #include <clock_legacy.h>
  8. #include <asm/processor.h>
  9. #include <asm/immap.h>
  10. DECLARE_GLOBAL_DATA_PTR;
  11. /* get_clocks() fills in gd->cpu_clock and gd->bus_clk */
  12. int get_clocks(void)
  13. {
  14. #if defined(CONFIG_M5307)
  15. gd->bus_clk = CONFIG_SYS_CLK;
  16. gd->cpu_clk = CONFIG_SYS_CPU_CLK;
  17. #endif
  18. return 0;
  19. }