]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
MX28: Fixup the ad-hoc use of DIGCTL_MICROSECONDS
authorMarek Vasut <marex@denx.de>
Tue, 28 Aug 2012 15:15:53 +0000 (15:15 +0000)
committerStefano Babic <sbabic@denx.de>
Tue, 4 Sep 2012 09:57:57 +0000 (11:57 +0200)
Use proper struct-based access for this register in the SPL code.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <festevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
arch/arm/cpu/arm926ejs/mxs/spl_boot.c

index ddafddbf2b44e48bae738d6227d26e07a74b7b98..ad66c57c5d396660a4428970de394da58ad6fe5d 100644 (file)
  * 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))
                ;
 }