[U-Boot] [PATCH v1 04/15] clk: imx: Rename and export get_usdhc_clk() to imx6_get_usdhc_clk()

Lukasz Majewski lukma at denx.de
Sat Jan 19 09:15:17 UTC 2019


This commit allows reusing the mach-imx/mx6/clock.c code in the CLK
driver model (DM) driver for iMX6Q.

Signed-off-by: Lukasz Majewski <lukma at denx.de>
---

 arch/arm/include/asm/arch-mx6/clock.h |  1 +
 arch/arm/mach-imx/mx6/clock.c         | 10 +++++-----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/arch/arm/include/asm/arch-mx6/clock.h b/arch/arm/include/asm/arch-mx6/clock.h
index a9481a5fea..5ce58e1b7a 100644
--- a/arch/arm/include/asm/arch-mx6/clock.h
+++ b/arch/arm/include/asm/arch-mx6/clock.h
@@ -59,6 +59,7 @@ enum enet_freq {
 u32 imx_get_uartclk(void);
 u32 imx_get_fecclk(void);
 unsigned int mxc_get_clock(enum mxc_clock clk);
+u32 imx6_get_usdhc_clk(u32 port);
 void setup_gpmi_io_clk(u32 cfg);
 void hab_caam_clock_enable(unsigned char enable);
 void enable_ocotp_clk(unsigned char enable);
diff --git a/arch/arm/mach-imx/mx6/clock.c b/arch/arm/mach-imx/mx6/clock.c
index 366a4e3c6b..96348b742b 100644
--- a/arch/arm/mach-imx/mx6/clock.c
+++ b/arch/arm/mach-imx/mx6/clock.c
@@ -978,7 +978,7 @@ int enable_fec_anatop_clock(int fec_id, enum enet_freq freq)
 }
 #endif
 
-static u32 get_usdhc_clk(u32 port)
+u32 imx6_get_usdhc_clk(u32 port)
 {
 	u32 root_freq = 0, usdhc_podf = 0, clk_sel = 0;
 	u32 cscmr1 = __raw_readl(&imx_ccm->cscmr1);
@@ -1258,13 +1258,13 @@ unsigned int mxc_get_clock(enum mxc_clock clk)
 	case MXC_DDR_CLK:
 		return get_mmdc_ch0_clk();
 	case MXC_ESDHC_CLK:
-		return get_usdhc_clk(0);
+		return imx6_get_usdhc_clk(0);
 	case MXC_ESDHC2_CLK:
-		return get_usdhc_clk(1);
+		return imx6_get_usdhc_clk(1);
 	case MXC_ESDHC3_CLK:
-		return get_usdhc_clk(2);
+		return imx6_get_usdhc_clk(2);
 	case MXC_ESDHC4_CLK:
-		return get_usdhc_clk(3);
+		return imx6_get_usdhc_clk(3);
 	case MXC_SATA_CLK:
 		return get_ahb_clk();
 	default:
-- 
2.11.0



More information about the U-Boot mailing list