Message ID | 20210420084226.2996654-3-narmstrong@baylibre.com |
---|---|
State | Accepted |
Commit | b669db869bd91c5d4da63dbda11e3414b04c5647 |
Delegated to: | Tom Rini |
Headers | show |
Series | reset: fix reset_get_by_index_nodev index handling | expand |
On Tue, Apr 20, 2021 at 10:42:26AM +0200, Neil Armstrong wrote: > This fixes an issue getting resets index 1 and 3+, the spurius "> 0" > made it return the index 0 or 1, whatever index was passed. > > The dm_test_reset_base() did not catch it, but the dm_test_reset_base() extension > catches it and this fixes the regression. > > This also fixes a reggression on Amlogic G12A/G12B SoCs, where HDMI output was disable > even when Linux was booting. > > Fixes: ea9dc35aab ("reset: Get the RESET by index without device") > Reported-by: B1oHazard <ty3uk@mail.ua> > Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Applied to u-boot/master, thanks!
diff --git a/drivers/reset/reset-uclass.c b/drivers/reset/reset-uclass.c index 071c389ca0..ac89eaf098 100644 --- a/drivers/reset/reset-uclass.c +++ b/drivers/reset/reset-uclass.c @@ -95,7 +95,7 @@ int reset_get_by_index_nodev(ofnode node, int index, int ret; ret = ofnode_parse_phandle_with_args(node, "resets", "#reset-cells", 0, - index > 0, &args); + index, &args); return reset_get_by_index_tail(ret, node, &args, "resets", index > 0, reset_ctl);
This fixes an issue getting resets index 1 and 3+, the spurius "> 0" made it return the index 0 or 1, whatever index was passed. The dm_test_reset_base() did not catch it, but the dm_test_reset_base() extension catches it and this fixes the regression. This also fixes a reggression on Amlogic G12A/G12B SoCs, where HDMI output was disable even when Linux was booting. Fixes: ea9dc35aab ("reset: Get the RESET by index without device") Reported-by: B1oHazard <ty3uk@mail.ua> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> --- drivers/reset/reset-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)