Commit 5987b4bf authored by Jiancheng Xue's avatar Jiancheng Xue Committed by Philipp Zabel

reset: ti_syscon: fix a ti_syscon_reset_status issue

If STATUS_SET was not set, ti_syscon_reset_status would always return 0
no matter whether the status_bit was set or not.
Signed-off-by: default avatarJiancheng Xue <xuejiancheng@hisilicon.com>
Fixes: cc7c2bb1 ("reset: add TI SYSCON based reset driver")
Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
parent a121103c
......@@ -154,8 +154,8 @@ static int ti_syscon_reset_status(struct reset_controller_dev *rcdev,
if (ret)
return ret;
return (reset_state & BIT(control->status_bit)) &&
(control->flags & STATUS_SET);
return !(reset_state & BIT(control->status_bit)) ==
!(control->flags & STATUS_SET);
}
static struct reset_control_ops ti_syscon_reset_ops = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment