Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
a8d9550b
Unverified
Commit
a8d9550b
authored
Apr 26, 2018
by
Dimitris Papastamos
Committed by
GitHub
Apr 26, 2018
Browse files
Merge pull request #1345 from dbasehore/udelay
rockchip/rk3399: Fix sram_udelay
parents
7f6d8f49
3cb74922
Changes
1
Hide whitespace changes
Inline
Side-by-side
plat/rockchip/rk3399/drivers/dram/suspend.c
View file @
a8d9550b
...
...
@@ -85,10 +85,11 @@ static __pmusramfunc uint32_t sram_get_timer_value(void)
static
__pmusramfunc
void
sram_udelay
(
uint32_t
usec
)
{
uint32_t
start
,
cnt
,
delta
,
delta_u
s
;
uint32_t
start
,
cnt
,
delta
,
total_tick
s
;
/* counter is decreasing */
start
=
sram_get_timer_value
();
total_ticks
=
usec
*
SYS_COUNTER_FREQ_IN_MHZ
;
do
{
cnt
=
sram_get_timer_value
();
if
(
cnt
>
start
)
{
...
...
@@ -96,8 +97,7 @@ static __pmusramfunc void sram_udelay(uint32_t usec)
delta
+=
start
;
}
else
delta
=
start
-
cnt
;
delta_us
=
(
delta
*
SYS_COUNTER_FREQ_IN_MHZ
);
}
while
(
delta_us
<
usec
);
}
while
(
delta
<=
total_ticks
);
}
static
__pmusramfunc
void
configure_sgrf
(
void
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment