speed.c 398 B

12345678910111213141516171819202122
  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 <asm/processor.h>
  8. #include <asm/immap.h>
  9. DECLARE_GLOBAL_DATA_PTR;
  10. /* get_clocks() fills in gd->cpu_clock and gd->bus_clk */
  11. int get_clocks(void)
  12. {
  13. #if defined(CONFIG_M5307)
  14. gd->bus_clk = CONFIG_SYS_CLK;
  15. gd->cpu_clk = CONFIG_SYS_CPU_CLK;
  16. #endif
  17. return 0;
  18. }