diff mbox series

[U-Boot,v2,55/58] mpc83xx: Add arch clock.h to make SDHC work

Message ID 20181105144512.16727-55-mario.six@gdsys.cc
State Superseded
Delegated to: Mario Six
Headers show
Series [U-Boot,v2,01/58] mpc83xx: Introduce ARCH_MPC830* | expand

Commit Message

Mario Six Nov. 5, 2018, 2:45 p.m. UTC
The fsl-esdhc driver can be used for the SDHC functionality on MPC83xx,
but it needs some additional definitions.

Add a clock.h file, so we can use the driver for MPC83xx.

Signed-off-by: Mario Six <mario.six@gdsys.cc>

---

v1 -> v2:
New in v2

---
 arch/powerpc/include/asm/arch-mpc83xx/clock.h | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 arch/powerpc/include/asm/arch-mpc83xx/clock.h
diff mbox series

Patch

diff --git a/arch/powerpc/include/asm/arch-mpc83xx/clock.h b/arch/powerpc/include/asm/arch-mpc83xx/clock.h
new file mode 100644
index 00000000000..d57e93c2df9
--- /dev/null
+++ b/arch/powerpc/include/asm/arch-mpc83xx/clock.h
@@ -0,0 +1,22 @@ 
+/*
+ * (C) Copyright 2018
+ * Mario Six, Guntermann & Drunck GmbH, mario.six@gdsys.cc
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#ifndef __ASM_POWERPC_CLOCK_H
+#define __ASM_POWERPC_CLOCK_H
+
+/* Make fsl_esdhc driver happy */
+enum mxc_clock {
+	MXC_ESDHC_CLK,
+};
+
+DECLARE_GLOBAL_DATA_PTR;
+
+uint mxc_get_clock(int clk)
+{
+	return gd->arch.sdhc_clk;
+}
+#endif /* __ASM_POWERPC_CLOCK_H */