2018-05-06 21:58:06 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
2008-01-15 19:37:34 +00:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* (C) Copyright 2000-2003
|
|
|
|
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2004-2007 Freescale Semiconductor, Inc.
|
|
|
|
* TsiChung Liew (Tsi-Chung.Liew@freescale.com)
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
2019-12-28 17:44:58 +00:00
|
|
|
#include <clock_legacy.h>
|
2020-10-31 03:38:53 +00:00
|
|
|
#include <asm/global_data.h>
|
2008-01-15 19:37:34 +00:00
|
|
|
#include <asm/processor.h>
|
|
|
|
|
|
|
|
#include <asm/immap.h>
|
|
|
|
|
2010-12-21 01:27:51 +00:00
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
|
2008-01-15 19:37:34 +00:00
|
|
|
/*
|
|
|
|
* get_clocks() fills in gd->cpu_clock and gd->bus_clk
|
|
|
|
*/
|
|
|
|
int get_clocks(void)
|
|
|
|
{
|
2008-10-16 13:01:15 +00:00
|
|
|
gd->bus_clk = CONFIG_SYS_CLK;
|
2008-01-15 19:37:34 +00:00
|
|
|
gd->cpu_clk = (gd->bus_clk * 2);
|
2008-08-18 21:01:19 +00:00
|
|
|
|
2012-10-24 11:48:22 +00:00
|
|
|
#ifdef CONFIG_SYS_I2C_FSL
|
2012-12-13 20:48:49 +00:00
|
|
|
gd->arch.i2c1_clk = gd->bus_clk;
|
2008-08-18 21:01:19 +00:00
|
|
|
#endif
|
|
|
|
|
2008-01-15 19:37:34 +00:00
|
|
|
return (0);
|
|
|
|
}
|