Commit 2d58296f3ec93b9d9ff862eb6e656af1f7cd8c47
Committed by
Stefano Babic
1 parent
abeebc19db
Exists in
smarc_8mq_lf_v2020.04
and in
12 other branches
imx8: add dummy clock
This driver is mostly used to avoid build errors. We use uclass clk driver for clk related operations. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Anatolij Gustschin <agust@denx.de> Cc: Stefano Babic <sbabic@denx.de>
Showing 2 changed files with 48 additions and 0 deletions Side-by-side Diff
arch/arm/include/asm/arch-imx8/clock.h
1 | +/* SPDX-License-Identifier: GPL-2.0+ */ | |
2 | +/* | |
3 | + * Copyright 2018 NXP | |
4 | + */ | |
5 | + | |
6 | +#ifndef __ASM_ARCH_IMX8_CLOCK_H__ | |
7 | +#define __ASM_ARCH_IMX8_CLOCK_H__ | |
8 | + | |
9 | +/* Mainly for compatible to imx common code. */ | |
10 | +enum mxc_clock { | |
11 | + MXC_ARM_CLK = 0, | |
12 | + MXC_AHB_CLK, | |
13 | + MXC_IPG_CLK, | |
14 | + MXC_UART_CLK, | |
15 | + MXC_CSPI_CLK, | |
16 | + MXC_AXI_CLK, | |
17 | + MXC_DDR_CLK, | |
18 | + MXC_ESDHC_CLK, | |
19 | + MXC_ESDHC2_CLK, | |
20 | + MXC_ESDHC3_CLK, | |
21 | + MXC_I2C_CLK, | |
22 | + MXC_FEC_CLK, | |
23 | +}; | |
24 | + | |
25 | +u32 mxc_get_clock(enum mxc_clock clk); | |
26 | + | |
27 | +#endif /* __ASM_ARCH_IMX8_CLOCK_H__ */ |
arch/arm/mach-imx/imx8/clock.c
1 | +// SPDX-License-Identifier: GPL-2.0+ | |
2 | +/* | |
3 | + * Copyright 2018 NXP | |
4 | + */ | |
5 | + | |
6 | +#include <common.h> | |
7 | +#include <linux/errno.h> | |
8 | +#include <asm/arch/clock.h> | |
9 | + | |
10 | +DECLARE_GLOBAL_DATA_PTR; | |
11 | + | |
12 | +u32 mxc_get_clock(enum mxc_clock clk) | |
13 | +{ | |
14 | + switch (clk) { | |
15 | + default: | |
16 | + printf("Unsupported mxc_clock %d\n", clk); | |
17 | + break; | |
18 | + } | |
19 | + | |
20 | + return 0; | |
21 | +} |