]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: mx6: introduce disable_sata_clock
authorNikita Kiryanov <nikita@compulab.co.il>
Fri, 21 Nov 2014 10:47:22 +0000 (12:47 +0200)
committerStefano Babic <sbabic@denx.de>
Mon, 24 Nov 2014 10:59:59 +0000 (11:59 +0100)
Implement disable_sata_clock for mx6 SoCs.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Stefano Babic <sbabic@denx.de>
arch/arm/cpu/armv7/mx6/clock.c
arch/arm/include/asm/arch-mx6/clock.h

index 80b11aaf505fe5ca006ad04c51da9b2a735c54e1..ab7ac3d703e2050de9c9ab92f575e8f7055fb17d 100644 (file)
@@ -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)
index 8e51f9b3a0edb34cc0561acdc9f20e4ec6bd81e2..323805c75ca576287fb2727a9410f508bc34f392 100644 (file)
@@ -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);