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
0f7d2e89
Commit
0f7d2e89
authored
May 27, 2021
by
Madhukar Pappireddy
Committed by
TrustedFirmware Code Review
May 27, 2021
Browse files
Merge "fix(plat/mediatek/pmic_wrap): update idle flow" into integration
parents
1f8dceea
9ed4e6fb
Changes
1
Show whitespace changes
Inline
Side-by-side
plat/mediatek/common/drivers/pmic_wrap/pmic_wrap_init_v2.c
View file @
0f7d2e89
...
@@ -26,12 +26,30 @@ static uint32_t pwrap_check_idle(void *wacs_register, uint32_t timeout_us)
...
@@ -26,12 +26,30 @@ static uint32_t pwrap_check_idle(void *wacs_register, uint32_t timeout_us)
while
(
retry
!=
0
)
{
while
(
retry
!=
0
)
{
udelay
(
WAIT_IDLE_POLLING_DELAY_US
);
udelay
(
WAIT_IDLE_POLLING_DELAY_US
);
reg_rdata
=
mmio_read_32
((
uintptr_t
)
wacs_register
);
reg_rdata
=
mmio_read_32
((
uintptr_t
)
wacs_register
);
if
(
GET_WACS_FSM
(
reg_rdata
)
==
SWINF_FSM_IDLE
)
{
/* if last read command timeout,clear vldclr bit
* read command state machine:FSM_REQ-->wfdle-->WFVLDCLR;
* write:FSM_REQ-->idle
*/
switch
(
GET_WACS_FSM
(
reg_rdata
))
{
case
SWINF_FSM_WFVLDCLR
:
mmio_write_32
((
uintptr_t
)
&
mtk_pwrap
->
wacs2_vldclr
,
0x1
);
INFO
(
"WACS_FSM = SWINF_FSM_WFVLDCLR
\n
"
);
break
;
case
SWINF_FSM_WFDLE
:
INFO
(
"WACS_FSM = SWINF_FSM_WFDLE
\n
"
);
break
;
case
SWINF_FSM_REQ
:
INFO
(
"WACS_FSM = SWINF_FSM_REQ
\n
"
);
break
;
case
SWINF_FSM_IDLE
:
goto
done
;
default:
break
;
break
;
}
}
retry
--
;
retry
--
;
};
};
done:
if
(
retry
==
0
)
{
if
(
retry
==
0
)
{
/* timeout */
/* timeout */
return
E_PWR_WAIT_IDLE_TIMEOUT
;
return
E_PWR_WAIT_IDLE_TIMEOUT
;
...
...
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