[U-Boot] [PATCH 2/2] MX28: Fixup the ad-hoc use of DIGCTL_MICROSECONDS

Stefano Babic sbabic at denx.de
Wed Aug 29 09:51:41 CEST 2012


On 29/08/2012 03:15, Marek Vasut wrote:
> Use proper struct-based access for this register in the SPL code.
> 
> Signed-off-by: Marek Vasut <marex at denx.de>
> Cc: Wolfgang Denk <wd at denx.de>
> Cc: Stefano Babic <sbabic at denx.de>
> Cc: Fabio Estevam <festevam at freescale.com>
> ---
>  arch/arm/cpu/arm926ejs/mxs/spl_boot.c |    8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
> index ddafddb..ad66c57 100644
> --- a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
> +++ b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
> @@ -38,12 +38,14 @@
>   * takes a few seconds to roll. The boot doesn't take that long, so to keep the
>   * code simple, it doesn't take rolling into consideration.
>   */
> -#define	HW_DIGCTRL_MICROSECONDS	0x8001c0c0
>  void early_delay(int delay)
>  {
> -	uint32_t st = readl(HW_DIGCTRL_MICROSECONDS);
> +	struct mxs_digctl_regs *digctl_regs =
> +		(struct mxs_digctl_regs *)MXS_DIGCTL_BASE;
> +
> +	uint32_t st = readl(&digctl_regs->hw_digctl_microseconds);
>  	st += delay;
> -	while (st > readl(HW_DIGCTRL_MICROSECONDS))
> +	while (st > readl(&digctl_regs->hw_digctl_microseconds))
>  		;
>  }
>  
> 

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

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
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