imx8: add dummy clock
authorPeng Fan <peng.fan@nxp.com>
Thu, 18 Oct 2018 12:28:26 +0000 (14:28 +0200)
committerStefano Babic <sbabic@denx.de>
Mon, 22 Oct 2018 10:59:01 +0000 (12:59 +0200)
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>
arch/arm/include/asm/arch-imx8/clock.h [new file with mode: 0644]
arch/arm/mach-imx/imx8/clock.c [new file with mode: 0644]

diff --git a/arch/arm/include/asm/arch-imx8/clock.h b/arch/arm/include/asm/arch-imx8/clock.h
new file mode 100644 (file)
index 0000000..bea1571
--- /dev/null
@@ -0,0 +1,27 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2018 NXP
+ */
+
+#ifndef __ASM_ARCH_IMX8_CLOCK_H__
+#define __ASM_ARCH_IMX8_CLOCK_H__
+
+/* Mainly for compatible to imx common code. */
+enum mxc_clock {
+       MXC_ARM_CLK = 0,
+       MXC_AHB_CLK,
+       MXC_IPG_CLK,
+       MXC_UART_CLK,
+       MXC_CSPI_CLK,
+       MXC_AXI_CLK,
+       MXC_DDR_CLK,
+       MXC_ESDHC_CLK,
+       MXC_ESDHC2_CLK,
+       MXC_ESDHC3_CLK,
+       MXC_I2C_CLK,
+       MXC_FEC_CLK,
+};
+
+u32 mxc_get_clock(enum mxc_clock clk);
+
+#endif /* __ASM_ARCH_IMX8_CLOCK_H__ */
diff --git a/arch/arm/mach-imx/imx8/clock.c b/arch/arm/mach-imx/imx8/clock.c
new file mode 100644 (file)
index 0000000..d747e13
--- /dev/null
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2018 NXP
+ */
+
+#include <common.h>
+#include <linux/errno.h>
+#include <asm/arch/clock.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+u32 mxc_get_clock(enum mxc_clock clk)
+{
+       switch (clk) {
+       default:
+               printf("Unsupported mxc_clock %d\n", clk);
+               break;
+       }
+
+       return 0;
+}