public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Dinh Nguyen <dinguyen@kernel.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCHv1 01/14] reset: tegra: remove request and free functions
Date: Sat, 14 Apr 2018 13:51:27 -0500	[thread overview]
Message-ID: <1523731900-4675-2-git-send-email-dinguyen@kernel.org> (raw)
In-Reply-To: <1523731900-4675-1-git-send-email-dinguyen@kernel.org>

The request and free reset functions are not really used for any useful
purpose but for debugging. We can safely remove them.

Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
---
 drivers/reset/tegra-car-reset.c | 24 +++++-------------------
 drivers/reset/tegra186-reset.c  | 18 ------------------
 2 files changed, 5 insertions(+), 37 deletions(-)

diff --git a/drivers/reset/tegra-car-reset.c b/drivers/reset/tegra-car-reset.c
index 3147a50..b776adf 100644
--- a/drivers/reset/tegra-car-reset.c
+++ b/drivers/reset/tegra-car-reset.c
@@ -10,7 +10,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch-tegra/clk_rst.h>
 
-static int tegra_car_reset_request(struct reset_ctl *reset_ctl)
+static int tegra_car_reset_assert(struct reset_ctl *reset_ctl)
 {
 	debug("%s(reset_ctl=%p) (dev=%p, id=%lu)\n", __func__, reset_ctl,
 	      reset_ctl->dev, reset_ctl->id);
@@ -19,22 +19,6 @@ static int tegra_car_reset_request(struct reset_ctl *reset_ctl)
 	if (reset_ctl->id >= PERIPH_ID_COUNT)
 		return -EINVAL;
 
-	return 0;
-}
-
-static int tegra_car_reset_free(struct reset_ctl *reset_ctl)
-{
-	debug("%s(reset_ctl=%p) (dev=%p, id=%lu)\n", __func__, reset_ctl,
-	      reset_ctl->dev, reset_ctl->id);
-
-	return 0;
-}
-
-static int tegra_car_reset_assert(struct reset_ctl *reset_ctl)
-{
-	debug("%s(reset_ctl=%p) (dev=%p, id=%lu)\n", __func__, reset_ctl,
-	      reset_ctl->dev, reset_ctl->id);
-
 	reset_set_enable(reset_ctl->id, 1);
 
 	return 0;
@@ -45,14 +29,16 @@ static int tegra_car_reset_deassert(struct reset_ctl *reset_ctl)
 	debug("%s(reset_ctl=%p) (dev=%p, id=%lu)\n", __func__, reset_ctl,
 	      reset_ctl->dev, reset_ctl->id);
 
+	/* PERIPH_ID_COUNT varies per SoC */
+	if (reset_ctl->id >= PERIPH_ID_COUNT)
+		return -EINVAL;
+
 	reset_set_enable(reset_ctl->id, 0);
 
 	return 0;
 }
 
 struct reset_ops tegra_car_reset_ops = {
-	.request = tegra_car_reset_request,
-	.free = tegra_car_reset_free,
 	.rst_assert = tegra_car_reset_assert,
 	.rst_deassert = tegra_car_reset_deassert,
 };
diff --git a/drivers/reset/tegra186-reset.c b/drivers/reset/tegra186-reset.c
index 228adda..f83c50b 100644
--- a/drivers/reset/tegra186-reset.c
+++ b/drivers/reset/tegra186-reset.c
@@ -10,22 +10,6 @@
 #include <reset-uclass.h>
 #include <asm/arch-tegra/bpmp_abi.h>
 
-static int tegra186_reset_request(struct reset_ctl *reset_ctl)
-{
-	debug("%s(reset_ctl=%p) (dev=%p, id=%lu)\n", __func__, reset_ctl,
-	      reset_ctl->dev, reset_ctl->id);
-
-	return 0;
-}
-
-static int tegra186_reset_free(struct reset_ctl *reset_ctl)
-{
-	debug("%s(reset_ctl=%p) (dev=%p, id=%lu)\n", __func__, reset_ctl,
-	      reset_ctl->dev, reset_ctl->id);
-
-	return 0;
-}
-
 static int tegra186_reset_common(struct reset_ctl *reset_ctl,
 				 enum mrq_reset_commands cmd)
 {
@@ -60,8 +44,6 @@ static int tegra186_reset_deassert(struct reset_ctl *reset_ctl)
 }
 
 struct reset_ops tegra186_reset_ops = {
-	.request = tegra186_reset_request,
-	.free = tegra186_reset_free,
 	.rst_assert = tegra186_reset_assert,
 	.rst_deassert = tegra186_reset_deassert,
 };
-- 
2.7.4

  reply	other threads:[~2018-04-14 18:51 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-14 18:51 [U-Boot] [PATCHv1 00/14] reset: remove request and free functions Dinh Nguyen
2018-04-14 18:51 ` Dinh Nguyen [this message]
2018-04-14 18:51 ` [U-Boot] [PATCHv1 02/14] reset: sti: " Dinh Nguyen
2018-04-17 11:57   ` Patrice CHOTARD
2018-04-14 18:51 ` [U-Boot] [PATCHv1 03/14] reset: uniphier: " Dinh Nguyen
2018-04-14 18:51 ` [U-Boot] [PATCHv1 04/14] reset: rockchip: " Dinh Nguyen
2018-04-14 18:51 ` [U-Boot] [PATCHv1 05/14] reset: meson: " Dinh Nguyen
2018-04-14 18:51 ` [U-Boot] [PATCHv1 06/14] reset: bcm6345: " Dinh Nguyen
2018-04-14 18:51 ` [U-Boot] [PATCHv1 07/14] reset: ast2500: remove request function Dinh Nguyen
2018-04-14 18:51 ` [U-Boot] [PATCHv1 08/14] reset: socfpga: remove request and free functions Dinh Nguyen
2018-04-14 18:51 ` [U-Boot] [PATCHv1 09/14] reset: sandbox: " Dinh Nguyen
2018-04-14 18:51 ` [U-Boot] [PATCHv1 10/14] net: dwc_eth_qos: remove reset_free from driver Dinh Nguyen
2018-04-14 18:51 ` [U-Boot] [PATCHv1 11/14] phy: bcm63xx: remove reset_free function Dinh Nguyen
2018-04-14 18:51 ` [U-Boot] [PATCHv1 12/14] usb: ehci/ohci: " Dinh Nguyen
2018-04-17 11:58   ` Patrice CHOTARD
2018-04-14 18:51 ` [U-Boot] [PATCHv1 13/14] reset: test: remove sandbox_reset_test_free function Dinh Nguyen
2018-04-14 18:51 ` [U-Boot] [PATCHv1 14/14] reset: remove request and free functions Dinh Nguyen
2018-04-16 18:43   ` Simon Glass
2018-04-16 18:51     ` Stephen Warren
2018-04-16 20:41       ` Dinh Nguyen
2018-04-17 23:21         ` Simon Glass
2018-04-16 20:38     ` Dinh Nguyen

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=1523731900-4675-2-git-send-email-dinguyen@kernel.org \
    --to=dinguyen@kernel.org \
    --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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox