mirror of
https://github.com/u-boot/u-boot.git
synced 2024-12-12 22:33:27 +08:00
efb5dab7ba
As this symbol can either be a fixed value or the function get_board_ddr_clk, migration is tricky. Introduce a choice of DYNAMIC or STATIC_DDR_CLK_FREQ. If DYNAMIC, we continue to use the board defined get_board_ddr_clk function. If STATIC, set CONFIG_DDR_CLK_FREQ to that value and now include/clock_legacy.h contains the function prototype or defines get_board_ddr_clk() to that static value. Update callers to test for DYNAMIC or STATIC. Signed-off-by: Tom Rini <trini@konsulko.com>
26 lines
597 B
C
26 lines
597 B
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* (C) Copyright 2000-2009
|
|
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
*/
|
|
|
|
#ifndef __CLOCK_LEGACY_H
|
|
#define __CLOCK_LEGACY_H
|
|
|
|
int get_clocks(void);
|
|
unsigned long get_bus_freq(unsigned long dummy);
|
|
int get_serial_clock(void);
|
|
|
|
/*
|
|
* If we have CONFIG_DYNAMIC_DDR_CLK_FREQ then there will be an
|
|
* implentation of get_board_ddr_clk() somewhere. Otherwise we have
|
|
* a static value to use now.
|
|
*/
|
|
#ifdef CONFIG_DYNAMIC_DDR_CLK_FREQ
|
|
unsigned long get_board_ddr_clk(void);
|
|
#else
|
|
#define get_board_ddr_clk() CONFIG_DDR_CLK_FREQ
|
|
#endif
|
|
|
|
#endif
|