Skip to content
Snippets Groups Projects
Commit d82f05fc authored by Marek Vasut's avatar Marek Vasut Committed by Stefano Babic
Browse files

MX28: Fixup the ad-hoc use of DIGCTL_MICROSECONDS


Use proper struct-based access for this register in the SPL code.

Signed-off-by: default avatarMarek Vasut <marex@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <festevam@freescale.com>
Acked-by: default avatarStefano Babic <sbabic@denx.de>
parent 8aa09026
No related merge requests found
...@@ -38,12 +38,14 @@ ...@@ -38,12 +38,14 @@
* takes a few seconds to roll. The boot doesn't take that long, so to keep the * 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. * code simple, it doesn't take rolling into consideration.
*/ */
#define HW_DIGCTRL_MICROSECONDS 0x8001c0c0
void early_delay(int delay) 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; st += delay;
while (st > readl(HW_DIGCTRL_MICROSECONDS)) while (st > readl(&digctl_regs->hw_digctl_microseconds))
; ;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment