[U-Boot] [PATCH V2 1/2] imx: mx6 remove duplicated enable_cspi_clock

Stefano Babic sbabic at denx.de
Sun Jun 28 10:53:20 CEST 2015


Hi Peng,

On 25/06/2015 03:33, Peng Fan wrote:
> enable_spi_clock does the same thing with enable_cspi_clock, so
> remove enable_cspi_clock.
> Remove enable_cspi_clock prototype in header file
> convert cm_fx6/spl.c to use enable_spi_clk
> 
> Signed-off-by: Peng Fan <Peng.Fan at freescale.com>
> ---
>  arch/arm/cpu/armv7/mx6/clock.c        | 19 -------------------
>  arch/arm/include/asm/arch-mx6/clock.h |  1 -
>  board/compulab/cm_fx6/spl.c           |  2 +-
>  3 files changed, 1 insertion(+), 21 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c
> index ae99945..1134770 100644
> --- a/arch/arm/cpu/armv7/mx6/clock.c
> +++ b/arch/arm/cpu/armv7/mx6/clock.c
> @@ -102,25 +102,6 @@ void enable_uart_clk(unsigned char enable)
>  }
>  #endif
>  
> -#ifdef CONFIG_SPI
> -/* spi_num can be from 0 - 4 */
> -int enable_cspi_clock(unsigned char enable, unsigned spi_num)
> -{
> -	u32 mask;
> -
> -	if (spi_num > 4)
> -		return -EINVAL;
> -
> -	mask = MXC_CCM_CCGR_CG_MASK << (spi_num * 2);
> -	if (enable)
> -		setbits_le32(&imx_ccm->CCGR1, mask);
> -	else
> -		clrbits_le32(&imx_ccm->CCGR1, mask);
> -
> -	return 0;
> -}
> -#endif
> -
>  #ifdef CONFIG_MMC
>  int enable_usdhc_clk(unsigned char enable, unsigned bus_num)
>  {
> diff --git a/arch/arm/include/asm/arch-mx6/clock.h b/arch/arm/include/asm/arch-mx6/clock.h
> index a6de5ee..7b3bbb8 100644
> --- a/arch/arm/include/asm/arch-mx6/clock.h
> +++ b/arch/arm/include/asm/arch-mx6/clock.h
> @@ -57,7 +57,6 @@ void hab_caam_clock_enable(unsigned char enable);
>  void enable_ocotp_clk(unsigned char enable);
>  void enable_usboh3_clk(unsigned char enable);
>  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);
> diff --git a/board/compulab/cm_fx6/spl.c b/board/compulab/cm_fx6/spl.c
> index 5b4b76f..d94ced9 100644
> --- a/board/compulab/cm_fx6/spl.c
> +++ b/board/compulab/cm_fx6/spl.c
> @@ -303,7 +303,7 @@ static void cm_fx6_setup_uart(void)
>  static void cm_fx6_setup_ecspi(void)
>  {
>  	cm_fx6_set_ecspi_iomux();
> -	enable_cspi_clock(1, 0);
> +	enable_spi_clk(1, 0);
>  }
>  #else
>  static void cm_fx6_setup_ecspi(void) { }
> 

Acked-by: Stefano Babic <sbabic at denx.de>

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================


More information about the U-Boot mailing list