From 8d29cef5887887157f54f98493440ce5c824d5cb Mon Sep 17 00:00:00 2001 From: Nikita Kiryanov Date: Fri, 21 Nov 2014 12:47:22 +0200 Subject: [PATCH] arm: mx6: introduce disable_sata_clock Implement disable_sata_clock for mx6 SoCs. Signed-off-by: Nikita Kiryanov Cc: Stefano Babic --- arch/arm/cpu/armv7/mx6/clock.c | 8 ++++++++ arch/arm/include/asm/arch-mx6/clock.h | 1 + 2 files changed, 9 insertions(+) diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c index 80b11aaf50..ab7ac3d703 100644 --- a/arch/arm/cpu/armv7/mx6/clock.c +++ b/arch/arm/cpu/armv7/mx6/clock.c @@ -596,6 +596,14 @@ int enable_sata_clock(void) ungate_sata_clock(); return enable_enet_pll(BM_ANADIG_PLL_ENET_ENABLE_SATA); } + +void disable_sata_clock(void) +{ + struct mxc_ccm_reg *const imx_ccm = + (struct mxc_ccm_reg *)CCM_BASE_ADDR; + + clrbits_le32(&imx_ccm->CCGR5, MXC_CCM_CCGR5_SATA_MASK); +} #endif int enable_pcie_clock(void) diff --git a/arch/arm/include/asm/arch-mx6/clock.h b/arch/arm/include/asm/arch-mx6/clock.h index 8e51f9b3a0..323805c75c 100644 --- a/arch/arm/include/asm/arch-mx6/clock.h +++ b/arch/arm/include/asm/arch-mx6/clock.h @@ -60,6 +60,7 @@ void enable_uart_clk(unsigned char enable); int enable_cspi_clock(unsigned char enable, unsigned spi_num); int enable_usdhc_clk(unsigned char enable, unsigned bus_num); int enable_sata_clock(void); +void disable_sata_clock(void); int enable_pcie_clock(void); int enable_i2c_clk(unsigned char enable, unsigned i2c_num); int enable_spi_clk(unsigned char enable, unsigned spi_num); -- 2.39.5