common: Move clock functions into a new file

These three clock functions don't use driver model and should be migrated.
In the meantime, create a new file to hold them.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2019-12-28 10:44:58 -07:00 committed by Jagan Teki
parent 39fdefa6cf
commit b63ff2ae54
71 changed files with 86 additions and 11 deletions

View File

@ -7,6 +7,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <div64.h>
#include <asm/io.h>
#include <linux/errno.h>

View File

@ -4,6 +4,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <div64.h>
#include <asm/arch/cpu.h>
#include <asm/arch/clk.h>

View File

@ -9,6 +9,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <div64.h>
#include <netdev.h>
#include <vsprintf.h>

View File

@ -4,6 +4,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <asm/io.h>
#include <asm/arch/immap_ls102xa.h>
#include <asm/arch/clock.h>

View File

@ -4,6 +4,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <linux/libfdt.h>
#include <fdt_support.h>
#include <asm/io.h>

View File

@ -4,6 +4,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <cpu_func.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>

View File

@ -4,6 +4,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <efi_loader.h>
#include <linux/libfdt.h>
#include <fdt_support.h>

View File

@ -5,6 +5,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <cpu_func.h>
#include <linux/compiler.h>
#include <asm/io.h>

View File

@ -7,6 +7,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <cpu_func.h>
#include <linux/compiler.h>
#include <fsl_ifc.h>

View File

@ -5,6 +5,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <env.h>
#include <fsl_immap.h>
#include <fsl_ifc.h>

View File

@ -4,6 +4,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <cpu_func.h>
#include <env.h>
#include <spl.h>

View File

@ -4,6 +4,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/clock.h>

View File

@ -7,6 +7,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <div64.h>
#include <asm/io.h>
#include <linux/errno.h>

View File

@ -4,6 +4,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <div64.h>
#include <asm/io.h>
#include <errno.h>

View File

@ -8,6 +8,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/clock.h>

View File

@ -6,6 +6,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <asm/processor.h>
#include <asm/immap.h>

View File

@ -9,6 +9,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <asm/processor.h>
#include <asm/immap.h>

View File

@ -8,6 +8,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <asm/processor.h>
#include <asm/immap.h>
#include <asm/io.h>
@ -15,7 +16,7 @@
DECLARE_GLOBAL_DATA_PTR;
/* get_clocks() fills in gd->cpu_clock and gd->bus_clk */
int get_clocks (void)
int get_clocks(void)
{
#if defined(CONFIG_M5208)
pll_t *pll = (pll_t *) MMAP_PLL;

View File

@ -5,6 +5,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <asm/processor.h>
#include <asm/immap.h>

View File

@ -9,6 +9,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <asm/processor.h>
#include <asm/immap.h>

View File

@ -6,6 +6,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <asm/processor.h>
#include <asm/immap.h>

View File

@ -9,6 +9,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <asm/processor.h>
#include <asm/immap.h>

View File

@ -4,6 +4,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <asm/io.h>
#include <asm/addrspace.h>
#include <asm/types.h>

View File

@ -4,6 +4,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <asm/io.h>
#include <asm/addrspace.h>
#include <asm/types.h>

View File

@ -4,6 +4,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <asm/io.h>
#include <asm/addrspace.h>
#include <asm/types.h>

View File

@ -4,6 +4,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <asm/io.h>
#include <asm/addrspace.h>
#include <asm/types.h>

View File

@ -7,6 +7,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <linux/libfdt.h>
#include <fdt_support.h>
#include <asm/processor.h>

View File

@ -9,6 +9,7 @@
#ifndef CONFIG_CLK_MPC83XX
#include <common.h>
#include <clock_legacy.h>
#include <mpc83xx.h>
#include <command.h>
#include <vsprintf.h>

View File

@ -4,6 +4,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <mpc83xx.h>
#include "lblaw/lblaw.h"

View File

@ -7,6 +7,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <env.h>
#include <linux/libfdt.h>
#include <fdt_support.h>

View File

@ -574,8 +574,7 @@ void get_sys_info(sys_info_t *sys_info)
#endif
}
int get_clocks (void)
int get_clocks(void)
{
sys_info_t sys_info;
#ifdef CONFIG_ARCH_MPC8544
@ -653,7 +652,7 @@ int get_clocks (void)
* get_bus_freq
* return system bus freq in Hz
*********************************************/
ulong get_bus_freq (ulong dummy)
ulong get_bus_freq(ulong dummy)
{
return gd->bus_clk;
}

View File

@ -9,6 +9,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <mpc86xx.h>
#include <asm/processor.h>
#include <asm/io.h>

View File

@ -5,6 +5,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <mpc8xx.h>
#include <asm/processor.h>
#include <asm/io.h>

View File

@ -8,6 +8,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <console.h>
#include <env.h>
#include <env_internal.h>

View File

@ -8,6 +8,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <spl.h>
#include <asm/io.h>
#include <asm/gpio.h>

View File

@ -3,6 +3,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <console.h>
#include <env.h>
#include <env_internal.h>

View File

@ -3,6 +3,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <console.h>
#include <env_internal.h>
#include <init.h>

View File

@ -4,6 +4,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <fdt_support.h>
#include <init.h>
#include <asm/arch/immap_ls102xa.h>

View File

@ -4,6 +4,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <fdt_support.h>
#include <i2c.h>
#include <init.h>

View File

@ -2,6 +2,7 @@
/* Copyright 2016-2019 NXP Semiconductors
*/
#include <common.h>
#include <clock_legacy.h>
#include <fdt_support.h>
#include <init.h>
#include <asm/arch-ls102xa/ls102xa_soc.h>

View File

@ -4,6 +4,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <fdt_support.h>
#include <i2c.h>
#include <init.h>

View File

@ -4,6 +4,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <dm.h>
#include <dm/platform_data/serial_pl01x.h>
#include <i2c.h>

View File

@ -6,6 +6,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <fdt_support.h>
#include <init.h>
#if defined(CONFIG_OF_LIBFDT)

View File

@ -8,6 +8,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <command.h>
#include <asm/io.h>
#include <fsl_diu_fb.h>

View File

@ -3,6 +3,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <console.h>
#include <env.h>
#include <env_internal.h>

View File

@ -7,6 +7,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <command.h>
#include <linux/ctype.h>
#include <asm/io.h>

View File

@ -4,6 +4,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <console.h>
#include <env.h>
#include <env_internal.h>

View File

@ -4,6 +4,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <console.h>
#include <env.h>
#include <env_internal.h>

View File

@ -323,7 +323,7 @@ void get_sys_info(sys_info_t *sys_info)
sys_info->freq_processor[0] = freq;
}
int get_clocks (void)
int get_clocks(void)
{
sys_info_t sys_info;
@ -350,7 +350,7 @@ unsigned long get_tbclk (void)
* get_bus_freq
* return system bus freq in Hz
*********************************************/
ulong get_bus_freq (ulong dummy)
ulong get_bus_freq(ulong dummy)
{
sys_info_t sys_info;
get_sys_info(&sys_info);

View File

@ -3,6 +3,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <console.h>
#include <env_internal.h>
#include <init.h>

View File

@ -3,6 +3,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <console.h>
#include <env_internal.h>
#include <init.h>

View File

@ -5,6 +5,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <command.h>
#include <linux/ctype.h>
#include <asm/io.h>

View File

@ -4,6 +4,7 @@
* Author: Priyanka Jain <Priyanka.Jain@freescale.com>
*/
#include <clock_legacy.h>
#include <asm/io.h>
#include <common.h>
#include <command.h>

View File

@ -3,6 +3,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <console.h>
#include <env_internal.h>
#include <init.h>

View File

@ -3,6 +3,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <console.h>
#include <env_internal.h>
#include <init.h>

View File

@ -3,6 +3,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <console.h>
#include <env_internal.h>
#include <init.h>

View File

@ -3,6 +3,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <console.h>
#include <env_internal.h>
#include <init.h>

View File

@ -6,6 +6,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <console.h>
#include <env_internal.h>
#include <init.h>

View File

@ -7,6 +7,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <command.h>
#include <linux/ctype.h>
#include <asm/io.h>

View File

@ -6,6 +6,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <init.h>
#include <asm/io.h>
#include <asm/arch/clock.h>

View File

@ -11,6 +11,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <env.h>
#include <pci.h>
#include <asm/processor.h>

View File

@ -11,6 +11,7 @@
#include <common.h>
#include <bloblist.h>
#include <clock_legacy.h>
#include <console.h>
#include <cpu.h>
#include <cpu_func.h>

View File

@ -6,6 +6,7 @@
#include <common.h>
#include <clk-uclass.h>
#include <clock_legacy.h>
#include <dm.h>
#include <vsprintf.h>
#include <dm/lists.h>

View File

@ -7,6 +7,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <cpu_func.h>
#include <dm.h>
#include <errno.h>

View File

@ -4,6 +4,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <dm.h>
#include <serial.h>
#include <dm/platform_data/lpc32xx_hsuart.h>

View File

@ -4,6 +4,7 @@
* modified to use CONFIG_SYS_ISA_MEM and new defines
*/
#include <clock_legacy.h>
#include <common.h>
#include <clk.h>
#include <dm.h>

View File

@ -4,6 +4,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <dm.h>
#include <div64.h>
#include <errno.h>

View File

@ -5,6 +5,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <ns16550.h>
#include <serial.h>
#include <linux/compiler.h>

View File

@ -4,6 +4,7 @@
*/
#include <common.h>
#include <clock_legacy.h>
#include <spi.h>
#include <dm.h>
#include <div64.h>

14
include/clock_legacy.h Normal file
View File

@ -0,0 +1,14 @@
/* 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);
#endif

View File

@ -78,11 +78,6 @@ ulong get_tbclk (void);
void reset_misc (void);
void reset_cpu (ulong addr);
/* $(CPU)/speed.c */
int get_clocks (void);
ulong get_bus_freq (ulong);
int get_serial_clock(void);
/* lib/uuid.c */
#include <uuid.h>