
30 Aug
2018
30 Aug
'18
2:45 a.m.
On Wed, Aug 29, 2018 at 7:57 PM Marek Vasut marex@denx.de wrote:
On 08/29/2018 10:44 AM, Ley Foon Tan wrote:
Add code to reset all reset signals as in gpio DT node. A reset property is an optional feature, so only print out a warning and do not fail if a reset property is not present.
If a reset property is discovered, then use it to deassert, thus bringing the IP out of reset.
Signed-off-by: Ley Foon Tan ley.foon.tan@intel.com
This is much better.
+static int gpio_dwapb_reset(struct udevice *dev) +{
int ret;
struct gpio_dwapb_priv *priv = dev_get_priv(dev);
ret = reset_get_bulk(dev, &priv->resets);
if (ret) {
dev_warn(dev, "Can't get reset: %d\n", ret);
Won't this barf on machines which either don't have DM_RESET enabled or don't have it described in DT ?
By default, dev_warn() is not show up. Or we can move this dev_warn when "return ret" error below.
/* Return 0 if error due to !CONFIG_DM_RESET and reset
* DT property is not present.
*/
if (ret == -ENOENT || ret == -ENOTSUPP)
return 0;
else
return ret;
}
[...]
-- Best regards, Marek Vasut