From: Neil Armstrong <narmstrong@baylibre.com> To: u-boot@lists.denx.de Subject: [PATCH 2/2] reset: fix reset_get_by_index_nodev index handling Date: Tue, 20 Apr 2021 10:42:26 +0200 [thread overview] Message-ID: <20210420084226.2996654-3-narmstrong@baylibre.com> (raw) In-Reply-To: <20210420084226.2996654-1-narmstrong@baylibre.com> 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(-) 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); -- 2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: "Neil Armstrong" <narmstrong@baylibre.com> To: sjg@chromium.org Cc: jagan@amarulasolutions.com, u-boot@lists.denx.de, trini@konsulko.com, u-boot-amlogic@groups.io, Neil Armstrong <narmstrong@baylibre.com>, B1oHazard <ty3uk@mail.ua> Subject: [PATCH 2/2] reset: fix reset_get_by_index_nodev index handling Date: Tue, 20 Apr 2021 10:42:26 +0200 [thread overview] Message-ID: <20210420084226.2996654-3-narmstrong@baylibre.com> (raw) In-Reply-To: <20210420084226.2996654-1-narmstrong@baylibre.com> 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(-) 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); -- 2.25.1
next prev parent reply other threads:[~2021-04-20 8:42 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-20 8:42 [PATCH 0/2] reset: fix reset_get_by_index_nodev index handling Neil Armstrong 2021-04-20 8:42 ` Neil Armstrong 2021-04-20 8:42 ` [PATCH 1/2] test: reset: Extend base reset test to catch error Neil Armstrong 2021-04-20 8:42 ` Neil Armstrong 2021-04-27 16:46 ` Tom Rini 2021-04-20 8:42 ` Neil Armstrong [this message] 2021-04-20 8:42 ` [PATCH 2/2] reset: fix reset_get_by_index_nodev index handling Neil Armstrong 2021-04-27 16:46 ` Tom Rini 2021-04-27 7:37 ` [PATCH 0/2] " Neil Armstrong 2021-04-27 7:37 ` Neil Armstrong 2021-04-27 11:31 ` Tom Rini
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210420084226.2996654-3-narmstrong@baylibre.com \ --to=narmstrong@baylibre.com \ --cc=u-boot@lists.denx.de \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.