mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] reset: fix non GPIO reset
@ 2016-01-10 21:36 Lucas Stach
  2016-01-11 10:26 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Lucas Stach @ 2016-01-10 21:36 UTC (permalink / raw)
  To: barebox

The reset controller structure is zero initialized in the OF
reset case, but as 0 is also a valid GPIO number the current
code tries to assert/deassert the GPIO instead of calling into
the reset controller device.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
Sascha, please apply this to master, as without this change
Tegra is broken there.
---
 drivers/reset/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/reset/core.c b/drivers/reset/core.c
index 0f900a9..59f75ca 100644
--- a/drivers/reset/core.c
+++ b/drivers/reset/core.c
@@ -190,6 +190,7 @@ struct reset_control *of_reset_control_get(struct device_node *node,
 
 	rstc->rcdev = rcdev;
 	rstc->id = rstc_id;
+	rstc->gpio = -ENODEV;
 
 	return rstc;
 }
-- 
2.5.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-11 10:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-10 21:36 [PATCH] reset: fix non GPIO reset Lucas Stach
2016-01-11 10:26 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox