[U-Boot] [PATCH, V2] Resend: i.MX6: add enable_sata_clock()

Dirk Behme dirk.behme at googlemail.com
Sat Apr 28 16:42:37 CEST 2012


Hi Eric,

first, do you really want the "Resend" in the subject?

On 26.04.2012 01:48, Eric Nelson wrote:
> This patch requires Stefano's driver for MX5/MX6 to be useful.
> 	http://lists.denx.de/pipermail/u-boot/2012-February/118530.html
>
> This is the first and board-independent part of what's needed to enable
> SATA on an i.MX6 board as discussed in this thread:
> 	http://lists.denx.de/pipermail/u-boot/2012-March/120919.html
>
> Signed-off-by: Eric Nelson<eric.nelson at boundarydevices.com>
>
> ---
> V2 updated to return -EIO instead of -1.
>
>   arch/arm/cpu/armv7/mx6/clock.c           |   31 ++++++++
>   arch/arm/include/asm/arch-mx6/clock.h    |    1 +
>   arch/arm/include/asm/arch-mx6/imx-regs.h |    9 +++
>   arch/arm/include/asm/arch-mx6/iomux-v3.h |  111 ++++++++++++++++++++++++++++++
>   4 files changed, 152 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c
> index ef98563..de91cac 100644
> --- a/arch/arm/cpu/armv7/mx6/clock.c
> +++ b/arch/arm/cpu/armv7/mx6/clock.c
> @@ -303,6 +303,37 @@ u32 imx_get_fecclk(void)
>   	return decode_pll(PLL_ENET, CONFIG_SYS_MX6_HCLK);
>   }
>
> +int enable_sata_clock(void)
> +{
> +	u32 reg = 0;
> +	s32 timeout = 100000;
> +	struct imx_ccm_reg *const imx_ccm
> +		= (struct imx_ccm_reg *) CCM_BASE_ADDR;

Could you check if the file clock.c has already a global

struct imx_ccm_reg *imx_ccm = (struct imx_ccm_reg *)CCM_BASE_ADDR;

definition, so this redefinition of "struct imx_ccm_reg *const 
imx_ccm" should (must?) be removed here? See

http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=arch/arm/cpu/armv7/mx6/clock.c;h=ef98563ff7639a3895e5dc00acd9cc30bb3c6772;hb=HEAD#l37

Trying to compile this I had to remove this on my test branch [1].

Best regards

Dirk

[1] 
https://github.com/dirkbehme/u-boot-imx6/commit/543964ad861b8143c142df3bb0f914ef2aee7558#L0R309



More information about the U-Boot mailing list