diff options
author | Patrice Chotard <patrice.chotard@st.com> | 2017-07-18 11:57:05 +0200 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2017-07-28 23:34:06 +0200 |
commit | 9bd5cdf6b62b249dc48a00a23b44dc7be547f9f9 (patch) | |
tree | 90495c9ea494b341fe3f51ddd889843696379a1f /drivers/reset | |
parent | f56db163adf9f922020436e5a3f85ffbdbaed04f (diff) | |
download | u-boot-9bd5cdf6b62b249dc48a00a23b44dc7be547f9f9.tar.gz |
reset: add reset_request()
This is needed in error path to assert previously deasserted
reset by using a saved reset_ctl reference.
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/reset')
-rw-r--r-- | drivers/reset/reset-uclass.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/reset/reset-uclass.c b/drivers/reset/reset-uclass.c index de3695ffaa..4fd82b9cd9 100644 --- a/drivers/reset/reset-uclass.c +++ b/drivers/reset/reset-uclass.c @@ -97,6 +97,15 @@ int reset_get_by_name(struct udevice *dev, const char *name, return reset_get_by_index(dev, index, reset_ctl); } +int reset_request(struct reset_ctl *reset_ctl) +{ + struct reset_ops *ops = reset_dev_ops(reset_ctl->dev); + + debug("%s(reset_ctl=%p)\n", __func__, reset_ctl); + + return ops->request(reset_ctl); +} + int reset_free(struct reset_ctl *reset_ctl) { struct reset_ops *ops = reset_dev_ops(reset_ctl->dev); |