diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index 100e798a5c82..f39f075abff9 100644 --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c @@ -18,6 +18,7 @@ #include #include #include +#include #include @@ -401,6 +402,19 @@ static int amba_device_try_add(struct amba_device *dev, struct resource *parent) ret = amba_get_enable_pclk(dev); if (ret == 0) { u32 pid, cid; + struct reset_control *rstc; + + /* + * Find reset control(s) of the amba bus and de-assert them. + */ + rstc = of_reset_control_array_get_optional_shared(dev->dev.of_node); + if (IS_ERR(rstc)) { + if (PTR_ERR(rstc) != -EPROBE_DEFER) + dev_err(&dev->dev, "Can't get amba reset!\n"); + return PTR_ERR(rstc); + } + reset_control_deassert(rstc); + reset_control_put(rstc); /* * Read pid and cid based on size of resource