From: Marek Vasut Date: Tue, 28 Aug 2012 15:15:53 +0000 (+0000) Subject: MX28: Fixup the ad-hoc use of DIGCTL_MICROSECONDS X-Git-Tag: v2012.10-rc1~2^2^2~21 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d82f05fcad3873dd6f5f06e042a28bacf2f0f950;p=u-boot MX28: Fixup the ad-hoc use of DIGCTL_MICROSECONDS Use proper struct-based access for this register in the SPL code. Signed-off-by: Marek Vasut Cc: Wolfgang Denk Cc: Stefano Babic Cc: Fabio Estevam Acked-by: Stefano Babic --- diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c index ddafddbf2b..ad66c57c5d 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)) ; }