Skip to contentSkip to conversation

reset: fix non GPIO reset

PATCH Applied Lucas Stach 2 participants 2 messages Jan 10, 2016 – Jan 11, 2016 Reset controller framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 reset: fix non GPIO reset

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.

---
Sascha, please apply this to master, as without this change Tegra is broken there.

---
 drivers/reset/core.c | 1 +
 1 file changed, 1 insertion(+)
drivers/reset/core.c +1 -0
index 0f900a9..59f75ca 100644
@@ -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;
 }
Signature · 7 lines
2.5.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#1 lore raw
Quoted 9 lines · Lucas Stach

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.

---
Sascha, please apply this to master, as without this change Tegra is broken there.

Applied, thanks

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox