[U-Boot] [PATCHv1 01/14] reset: tegra: remove request and free functions
Dinh Nguyen
dinguyen at kernel.org
Sat Apr 14 18:51:27 UTC 2018
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 at 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
More information about the U-Boot
mailing list