From patchwork Sat Apr 14 18:51:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dinh Nguyen X-Patchwork-Id: 898177 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=kernel.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40NkM44f4Hz9s0n for ; Sun, 15 Apr 2018 04:53:52 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 44D2DC21E16; Sat, 14 Apr 2018 18:52:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id E702FC21E18; Sat, 14 Apr 2018 18:51:59 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 15366C21D4A; Sat, 14 Apr 2018 18:51:58 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by lists.denx.de (Postfix) with ESMTPS id 82199C21C2C for ; Sat, 14 Apr 2018 18:51:57 +0000 (UTC) Received: from localhost.localdomain (cpe-70-114-128-244.austin.res.rr.com [70.114.128.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 446B92178E; Sat, 14 Apr 2018 18:51:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 446B92178E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dinguyen@kernel.org From: Dinh Nguyen To: u-boot@lists.denx.de Date: Sat, 14 Apr 2018 13:51:27 -0500 Message-Id: <1523731900-4675-2-git-send-email-dinguyen@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523731900-4675-1-git-send-email-dinguyen@kernel.org> References: <1523731900-4675-1-git-send-email-dinguyen@kernel.org> Cc: marex@denx.de, joe.hershberger@ni.com, jagan@openedev.com Subject: [U-Boot] [PATCHv1 01/14] reset: tegra: remove request and free functions X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 --- 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 #include -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 #include -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, }; From patchwork Sat Apr 14 18:51:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dinh Nguyen X-Patchwork-Id: 898176 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=kernel.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40NkLn2xhLz9s0n for ; Sun, 15 Apr 2018 04:53:37 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 0C80BC21DB6; Sat, 14 Apr 2018 18:52:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 110C8C21DB6; Sat, 14 Apr 2018 18:52:08 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6F5D3C21E44; Sat, 14 Apr 2018 18:52:02 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by lists.denx.de (Postfix) with ESMTPS id BFDBFC21D8E for ; Sat, 14 Apr 2018 18:51:58 +0000 (UTC) Received: from localhost.localdomain (cpe-70-114-128-244.austin.res.rr.com [70.114.128.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8421A217D5; Sat, 14 Apr 2018 18:51:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8421A217D5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dinguyen@kernel.org From: Dinh Nguyen To: u-boot@lists.denx.de Date: Sat, 14 Apr 2018 13:51:28 -0500 Message-Id: <1523731900-4675-3-git-send-email-dinguyen@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523731900-4675-1-git-send-email-dinguyen@kernel.org> References: <1523731900-4675-1-git-send-email-dinguyen@kernel.org> Cc: marex@denx.de, joe.hershberger@ni.com, jagan@openedev.com Subject: [U-Boot] [PATCHv1 02/14] reset: sti: remove request and free functions X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 Reviewed-by: Patrice Chotard --- drivers/reset/sti-reset.c | 12 ------------ drivers/reset/stm32-reset.c | 12 ------------ 2 files changed, 24 deletions(-) diff --git a/drivers/reset/sti-reset.c b/drivers/reset/sti-reset.c index 0fc5a28..672dd97 100644 --- a/drivers/reset/sti-reset.c +++ b/drivers/reset/sti-reset.c @@ -277,16 +277,6 @@ static int sti_reset_program_hw(struct reset_ctl *reset_ctl, int assert) return 0; } -static int sti_reset_request(struct reset_ctl *reset_ctl) -{ - return 0; -} - -static int sti_reset_free(struct reset_ctl *reset_ctl) -{ - return 0; -} - static int sti_reset_assert(struct reset_ctl *reset_ctl) { return sti_reset_program_hw(reset_ctl, true); @@ -298,8 +288,6 @@ static int sti_reset_deassert(struct reset_ctl *reset_ctl) } struct reset_ops sti_reset_ops = { - .request = sti_reset_request, - .free = sti_reset_free, .rst_assert = sti_reset_assert, .rst_deassert = sti_reset_deassert, }; diff --git a/drivers/reset/stm32-reset.c b/drivers/reset/stm32-reset.c index e98f34b..efde745 100644 --- a/drivers/reset/stm32-reset.c +++ b/drivers/reset/stm32-reset.c @@ -23,16 +23,6 @@ struct stm32_reset_priv { fdt_addr_t base; }; -static int stm32_reset_request(struct reset_ctl *reset_ctl) -{ - return 0; -} - -static int stm32_reset_free(struct reset_ctl *reset_ctl) -{ - return 0; -} - static int stm32_reset_assert(struct reset_ctl *reset_ctl) { struct stm32_reset_priv *priv = dev_get_priv(reset_ctl->dev); @@ -68,8 +58,6 @@ static int stm32_reset_deassert(struct reset_ctl *reset_ctl) } static const struct reset_ops stm32_reset_ops = { - .request = stm32_reset_request, - .free = stm32_reset_free, .rst_assert = stm32_reset_assert, .rst_deassert = stm32_reset_deassert, }; From patchwork Sat Apr 14 18:51:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dinh Nguyen X-Patchwork-Id: 898180 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=kernel.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40NkRY5G8qz9s0n for ; Sun, 15 Apr 2018 04:57:45 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 6A77CC21E18; Sat, 14 Apr 2018 18:54:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id B03DAC21E79; Sat, 14 Apr 2018 18:52:49 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 91FECC21EA7; Sat, 14 Apr 2018 18:52:05 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by lists.denx.de (Postfix) with ESMTPS id 0C643C21E1D for ; Sat, 14 Apr 2018 18:52:00 +0000 (UTC) Received: from localhost.localdomain (cpe-70-114-128-244.austin.res.rr.com [70.114.128.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C785C2177F; Sat, 14 Apr 2018 18:51:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C785C2177F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dinguyen@kernel.org From: Dinh Nguyen To: u-boot@lists.denx.de Date: Sat, 14 Apr 2018 13:51:29 -0500 Message-Id: <1523731900-4675-4-git-send-email-dinguyen@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523731900-4675-1-git-send-email-dinguyen@kernel.org> References: <1523731900-4675-1-git-send-email-dinguyen@kernel.org> Cc: marex@denx.de, joe.hershberger@ni.com, jagan@openedev.com Subject: [U-Boot] [PATCHv1 03/14] reset: uniphier: remove request and free functions X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 --- drivers/reset/reset-uniphier.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/drivers/reset/reset-uniphier.c b/drivers/reset/reset-uniphier.c index a40cea5..5b1d923 100644 --- a/drivers/reset/reset-uniphier.c +++ b/drivers/reset/reset-uniphier.c @@ -171,16 +171,6 @@ struct uniphier_reset_priv { const struct uniphier_reset_data *data; }; -static int uniphier_reset_request(struct reset_ctl *reset_ctl) -{ - return 0; -} - -static int uniphier_reset_free(struct reset_ctl *reset_ctl) -{ - return 0; -} - static int uniphier_reset_update(struct reset_ctl *reset_ctl, int assert) { struct uniphier_reset_priv *priv = dev_get_priv(reset_ctl->dev); @@ -226,8 +216,6 @@ static int uniphier_reset_deassert(struct reset_ctl *reset_ctl) } static const struct reset_ops uniphier_reset_ops = { - .request = uniphier_reset_request, - .free = uniphier_reset_free, .rst_assert = uniphier_reset_assert, .rst_deassert = uniphier_reset_deassert, }; From patchwork Sat Apr 14 18:51:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dinh Nguyen X-Patchwork-Id: 898179 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=kernel.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40NkQJ2YGLz9s15 for ; Sun, 15 Apr 2018 04:56:40 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 0ABBAC21E63; Sat, 14 Apr 2018 18:52:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 16F1FC21E1B; Sat, 14 Apr 2018 18:52:16 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D375EC21C2C; Sat, 14 Apr 2018 18:52:05 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by lists.denx.de (Postfix) with ESMTPS id 705A9C21E47 for ; Sat, 14 Apr 2018 18:52:01 +0000 (UTC) Received: from localhost.localdomain (cpe-70-114-128-244.austin.res.rr.com [70.114.128.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 12567217D9; Sat, 14 Apr 2018 18:51:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 12567217D9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dinguyen@kernel.org From: Dinh Nguyen To: u-boot@lists.denx.de Date: Sat, 14 Apr 2018 13:51:30 -0500 Message-Id: <1523731900-4675-5-git-send-email-dinguyen@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523731900-4675-1-git-send-email-dinguyen@kernel.org> References: <1523731900-4675-1-git-send-email-dinguyen@kernel.org> Cc: marex@denx.de, joe.hershberger@ni.com, jagan@openedev.com Subject: [U-Boot] [PATCHv1 04/14] reset: rockchip: remove request and free functions X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 --- drivers/reset/reset-rockchip.c | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/drivers/reset/reset-rockchip.c b/drivers/reset/reset-rockchip.c index 01047a2..5eecd51 100644 --- a/drivers/reset/reset-rockchip.c +++ b/drivers/reset/reset-rockchip.c @@ -24,27 +24,6 @@ struct rockchip_reset_priv { u32 reset_reg_num; }; -static int rockchip_reset_request(struct reset_ctl *reset_ctl) -{ - struct rockchip_reset_priv *priv = dev_get_priv(reset_ctl->dev); - - debug("%s(reset_ctl=%p) (dev=%p, id=%lu) (reg_num=%d)\n", __func__, - reset_ctl, reset_ctl->dev, reset_ctl->id, priv->reset_reg_num); - - if (reset_ctl->id / ROCKCHIP_RESET_NUM_IN_REG >= priv->reset_reg_num) - return -EINVAL; - - return 0; -} - -static int rockchip_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 rockchip_reset_assert(struct reset_ctl *reset_ctl) { struct rockchip_reset_priv *priv = dev_get_priv(reset_ctl->dev); @@ -55,6 +34,9 @@ static int rockchip_reset_assert(struct reset_ctl *reset_ctl) reset_ctl, reset_ctl->dev, reset_ctl->id, priv->base + (bank * 4)); + if (reset_ctl->id / ROCKCHIP_RESET_NUM_IN_REG >= priv->reset_reg_num) + return -EINVAL; + rk_setreg(priv->base + (bank * 4), BIT(offset)); return 0; @@ -76,8 +58,6 @@ static int rockchip_reset_deassert(struct reset_ctl *reset_ctl) } struct reset_ops rockchip_reset_ops = { - .request = rockchip_reset_request, - .free = rockchip_reset_free, .rst_assert = rockchip_reset_assert, .rst_deassert = rockchip_reset_deassert, }; From patchwork Sat Apr 14 18:51:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dinh Nguyen X-Patchwork-Id: 898181 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=kernel.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40NkRw060fz9s0n for ; Sun, 15 Apr 2018 04:58:03 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 8571DC21DB6; Sat, 14 Apr 2018 18:54:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 391A0C21DF9; Sat, 14 Apr 2018 18:52:42 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 35405C21E74; Sat, 14 Apr 2018 18:52:06 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by lists.denx.de (Postfix) with ESMTPS id 8D39FC21D8E for ; Sat, 14 Apr 2018 18:52:02 +0000 (UTC) Received: from localhost.localdomain (cpe-70-114-128-244.austin.res.rr.com [70.114.128.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 56449217D7; Sat, 14 Apr 2018 18:52:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 56449217D7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dinguyen@kernel.org From: Dinh Nguyen To: u-boot@lists.denx.de Date: Sat, 14 Apr 2018 13:51:31 -0500 Message-Id: <1523731900-4675-6-git-send-email-dinguyen@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523731900-4675-1-git-send-email-dinguyen@kernel.org> References: <1523731900-4675-1-git-send-email-dinguyen@kernel.org> Cc: marex@denx.de, joe.hershberger@ni.com, jagan@openedev.com Subject: [U-Boot] [PATCHv1 05/14] reset: meson: remove request and free functions X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 --- drivers/reset/reset-meson.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/drivers/reset/reset-meson.c b/drivers/reset/reset-meson.c index 5324f86..8bbaa6c 100644 --- a/drivers/reset/reset-meson.c +++ b/drivers/reset/reset-meson.c @@ -20,19 +20,6 @@ struct meson_reset_priv { struct regmap *regmap; }; -static int meson_reset_request(struct reset_ctl *reset_ctl) -{ - if (reset_ctl->id > (REG_COUNT * BITS_PER_REG)) - return -EINVAL; - - return 0; -} - -static int meson_reset_free(struct reset_ctl *reset_ctl) -{ - return 0; -} - static int meson_reset_level(struct reset_ctl *reset_ctl, bool assert) { struct meson_reset_priv *priv = dev_get_priv(reset_ctl->dev); @@ -41,6 +28,9 @@ static int meson_reset_level(struct reset_ctl *reset_ctl, bool assert) uint reg_offset = LEVEL_OFFSET + (bank << 2); uint val; + if (reset_ctl->id > (REG_COUNT * BITS_PER_REG)) + return -EINVAL; + regmap_read(priv->regmap, reg_offset, &val); if (assert) val &= ~BIT(offset); @@ -62,8 +52,6 @@ static int meson_reset_deassert(struct reset_ctl *reset_ctl) } struct reset_ops meson_reset_ops = { - .request = meson_reset_request, - .free = meson_reset_free, .rst_assert = meson_reset_assert, .rst_deassert = meson_reset_deassert, }; From patchwork Sat Apr 14 18:51:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dinh Nguyen X-Patchwork-Id: 898187 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=kernel.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40NkW51nvLz9s0n for ; Sun, 15 Apr 2018 05:00:49 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id DE924C21E2B; Sat, 14 Apr 2018 18:54:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id EFB3FC21E76; Sat, 14 Apr 2018 18:52:36 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D462DC21E85; Sat, 14 Apr 2018 18:52:07 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by lists.denx.de (Postfix) with ESMTPS id D47BEC21E68 for ; Sat, 14 Apr 2018 18:52:03 +0000 (UTC) Received: from localhost.localdomain (cpe-70-114-128-244.austin.res.rr.com [70.114.128.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9911F217A6; Sat, 14 Apr 2018 18:52:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9911F217A6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dinguyen@kernel.org From: Dinh Nguyen To: u-boot@lists.denx.de Date: Sat, 14 Apr 2018 13:51:32 -0500 Message-Id: <1523731900-4675-7-git-send-email-dinguyen@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523731900-4675-1-git-send-email-dinguyen@kernel.org> References: <1523731900-4675-1-git-send-email-dinguyen@kernel.org> Cc: marex@denx.de, joe.hershberger@ni.com, jagan@openedev.com Subject: [U-Boot] [PATCHv1 06/14] reset: bcm6345: remove request and free functions X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 --- drivers/reset/reset-bcm6345.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/drivers/reset/reset-bcm6345.c b/drivers/reset/reset-bcm6345.c index ebf6bee..b49a2f1 100644 --- a/drivers/reset/reset-bcm6345.c +++ b/drivers/reset/reset-bcm6345.c @@ -23,6 +23,9 @@ static int bcm6345_reset_assert(struct reset_ctl *rst) { struct bcm6345_reset_priv *priv = dev_get_priv(rst->dev); + if (rst->id >= MAX_RESETS) + return -EINVAL; + clrbits_be32(priv->regs, BIT(rst->id)); mdelay(20); @@ -33,28 +36,16 @@ static int bcm6345_reset_deassert(struct reset_ctl *rst) { struct bcm6345_reset_priv *priv = dev_get_priv(rst->dev); + if (rst->id >= MAX_RESETS) + return -EINVAL; + setbits_be32(priv->regs, BIT(rst->id)); mdelay(20); return 0; } -static int bcm6345_reset_free(struct reset_ctl *rst) -{ - return 0; -} - -static int bcm6345_reset_request(struct reset_ctl *rst) -{ - if (rst->id >= MAX_RESETS) - return -EINVAL; - - return bcm6345_reset_assert(rst); -} - struct reset_ops bcm6345_reset_reset_ops = { - .free = bcm6345_reset_free, - .request = bcm6345_reset_request, .rst_assert = bcm6345_reset_assert, .rst_deassert = bcm6345_reset_deassert, }; From patchwork Sat Apr 14 18:51:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dinh Nguyen X-Patchwork-Id: 898186 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=kernel.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40NkVc6KQgz9s0n for ; Sun, 15 Apr 2018 05:00:24 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 8024BC21E96; Sat, 14 Apr 2018 18:54:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 96F79C21E44; Sat, 14 Apr 2018 18:52:34 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 5765AC21E18; Sat, 14 Apr 2018 18:52:08 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by lists.denx.de (Postfix) with ESMTPS id 18C89C21E0B for ; Sat, 14 Apr 2018 18:52:05 +0000 (UTC) Received: from localhost.localdomain (cpe-70-114-128-244.austin.res.rr.com [70.114.128.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DA4E6217D5; Sat, 14 Apr 2018 18:52:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DA4E6217D5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dinguyen@kernel.org From: Dinh Nguyen To: u-boot@lists.denx.de Date: Sat, 14 Apr 2018 13:51:33 -0500 Message-Id: <1523731900-4675-8-git-send-email-dinguyen@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523731900-4675-1-git-send-email-dinguyen@kernel.org> References: <1523731900-4675-1-git-send-email-dinguyen@kernel.org> Cc: marex@denx.de, joe.hershberger@ni.com, jagan@openedev.com Subject: [U-Boot] [PATCHv1 07/14] reset: ast2500: remove request function X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The request reset function is not really used for any useful purpose except for debugging. We can safely remove it. Signed-off-by: Dinh Nguyen --- drivers/reset/ast2500-reset.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/reset/ast2500-reset.c b/drivers/reset/ast2500-reset.c index b2c89e1..65708cf 100644 --- a/drivers/reset/ast2500-reset.c +++ b/drivers/reset/ast2500-reset.c @@ -68,14 +68,6 @@ static int ast2500_reset_assert(struct reset_ctl *reset_ctl) return ret; } -static int ast2500_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 ast2500_reset_probe(struct udevice *dev) { struct ast2500_reset_priv *priv = dev_get_priv(dev); @@ -92,7 +84,6 @@ static const struct udevice_id ast2500_reset_ids[] = { struct reset_ops ast2500_reset_ops = { .rst_assert = ast2500_reset_assert, - .request = ast2500_reset_request, }; U_BOOT_DRIVER(ast2500_reset) = { From patchwork Sat Apr 14 18:51:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dinh Nguyen X-Patchwork-Id: 898178 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=kernel.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40NkQH1qDPz9s0n for ; Sun, 15 Apr 2018 04:56:39 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id D3820C21E5B; Sat, 14 Apr 2018 18:53:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 6C1B1C21E53; Sat, 14 Apr 2018 18:52:33 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 79414C21E6C; Sat, 14 Apr 2018 18:52:09 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by lists.denx.de (Postfix) with ESMTPS id 84621C21E2C for ; Sat, 14 Apr 2018 18:52:06 +0000 (UTC) Received: from localhost.localdomain (cpe-70-114-128-244.austin.res.rr.com [70.114.128.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 212BA2178E; Sat, 14 Apr 2018 18:52:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 212BA2178E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dinguyen@kernel.org From: Dinh Nguyen To: u-boot@lists.denx.de Date: Sat, 14 Apr 2018 13:51:34 -0500 Message-Id: <1523731900-4675-9-git-send-email-dinguyen@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523731900-4675-1-git-send-email-dinguyen@kernel.org> References: <1523731900-4675-1-git-send-email-dinguyen@kernel.org> Cc: marex@denx.de, joe.hershberger@ni.com, jagan@openedev.com Subject: [U-Boot] [PATCHv1 08/14] reset: socfpga: remove request and free functions X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 --- drivers/reset/reset-socfpga.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/drivers/reset/reset-socfpga.c b/drivers/reset/reset-socfpga.c index 466455d..3d04132 100644 --- a/drivers/reset/reset-socfpga.c +++ b/drivers/reset/reset-socfpga.c @@ -52,25 +52,7 @@ static int socfpga_reset_deassert(struct reset_ctl *reset_ctl) return 0; } -static int socfpga_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 socfpga_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 const struct reset_ops socfpga_reset_ops = { - .request = socfpga_reset_request, - .free = socfpga_reset_free, .rst_assert = socfpga_reset_assert, .rst_deassert = socfpga_reset_deassert, }; From patchwork Sat Apr 14 18:51:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dinh Nguyen X-Patchwork-Id: 898183 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=kernel.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40NkTL3wjhz9s0n for ; Sun, 15 Apr 2018 04:59:18 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 1B3D7C21E45; Sat, 14 Apr 2018 18:53:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 4A506C21E3B; Sat, 14 Apr 2018 18:52:19 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B61A4C21E68; Sat, 14 Apr 2018 18:52:10 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by lists.denx.de (Postfix) with ESMTPS id 9B078C21E16 for ; Sat, 14 Apr 2018 18:52:07 +0000 (UTC) Received: from localhost.localdomain (cpe-70-114-128-244.austin.res.rr.com [70.114.128.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6355B217D9; Sat, 14 Apr 2018 18:52:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6355B217D9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dinguyen@kernel.org From: Dinh Nguyen To: u-boot@lists.denx.de Date: Sat, 14 Apr 2018 13:51:35 -0500 Message-Id: <1523731900-4675-10-git-send-email-dinguyen@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523731900-4675-1-git-send-email-dinguyen@kernel.org> References: <1523731900-4675-1-git-send-email-dinguyen@kernel.org> Cc: marex@denx.de, joe.hershberger@ni.com, jagan@openedev.com Subject: [U-Boot] [PATCHv1 09/14] reset: sandbox: remove request and free functions X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 --- drivers/reset/sandbox-reset.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/drivers/reset/sandbox-reset.c b/drivers/reset/sandbox-reset.c index c310749..a75143f 100644 --- a/drivers/reset/sandbox-reset.c +++ b/drivers/reset/sandbox-reset.c @@ -20,29 +20,15 @@ struct sandbox_reset { struct sandbox_reset_signal signals[SANDBOX_RESET_SIGNALS]; }; -static int sandbox_reset_request(struct reset_ctl *reset_ctl) -{ - debug("%s(reset_ctl=%p)\n", __func__, reset_ctl); - - if (reset_ctl->id >= SANDBOX_RESET_SIGNALS) - return -EINVAL; - - return 0; -} - -static int sandbox_reset_free(struct reset_ctl *reset_ctl) -{ - debug("%s(reset_ctl=%p)\n", __func__, reset_ctl); - - return 0; -} - static int sandbox_reset_assert(struct reset_ctl *reset_ctl) { struct sandbox_reset *sbr = dev_get_priv(reset_ctl->dev); debug("%s(reset_ctl=%p)\n", __func__, reset_ctl); + if (reset_ctl->id >= SANDBOX_RESET_SIGNALS) + return -EINVAL; + sbr->signals[reset_ctl->id].asserted = true; return 0; @@ -54,6 +40,9 @@ static int sandbox_reset_deassert(struct reset_ctl *reset_ctl) debug("%s(reset_ctl=%p)\n", __func__, reset_ctl); + if (reset_ctl->id >= SANDBOX_RESET_SIGNALS) + return -EINVAL; + sbr->signals[reset_ctl->id].asserted = false; return 0; @@ -79,8 +68,6 @@ static const struct udevice_id sandbox_reset_ids[] = { }; struct reset_ops sandbox_reset_reset_ops = { - .request = sandbox_reset_request, - .free = sandbox_reset_free, .rst_assert = sandbox_reset_assert, .rst_deassert = sandbox_reset_deassert, }; From patchwork Sat Apr 14 18:51:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dinh Nguyen X-Patchwork-Id: 898182 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=kernel.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40NkT36wH8z9s0n for ; Sun, 15 Apr 2018 04:59:03 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id A3810C21E7F; Sat, 14 Apr 2018 18:53:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id B7E1AC21E16; Sat, 14 Apr 2018 18:52:20 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id CBEA8C21DA2; Sat, 14 Apr 2018 18:52:13 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by lists.denx.de (Postfix) with ESMTPS id DF3E7C21E47 for ; Sat, 14 Apr 2018 18:52:08 +0000 (UTC) Received: from localhost.localdomain (cpe-70-114-128-244.austin.res.rr.com [70.114.128.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A60A9217A6; Sat, 14 Apr 2018 18:52:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A60A9217A6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dinguyen@kernel.org From: Dinh Nguyen To: u-boot@lists.denx.de Date: Sat, 14 Apr 2018 13:51:36 -0500 Message-Id: <1523731900-4675-11-git-send-email-dinguyen@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523731900-4675-1-git-send-email-dinguyen@kernel.org> References: <1523731900-4675-1-git-send-email-dinguyen@kernel.org> Cc: marex@denx.de, joe.hershberger@ni.com, jagan@openedev.com Subject: [U-Boot] [PATCHv1 10/14] net: dwc_eth_qos: remove reset_free from driver X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The call to free the reset control line is a deadend call that doesn't lead to any reset control functionality. Also the reset_free() function will be remove in a subsequent patch, so remove it here. Signed-off-by: Dinh Nguyen --- drivers/net/dwc_eth_qos.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c index 232e803..a3f1b40 100644 --- a/drivers/net/dwc_eth_qos.c +++ b/drivers/net/dwc_eth_qos.c @@ -1371,7 +1371,6 @@ static int eqos_probe_resources_tegra186(struct udevice *dev) GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE); if (ret) { pr_err("gpio_request_by_name(phy reset) failed: %d", ret); - goto err_free_reset_eqos; } ret = clk_get_by_name(dev, "slave_bus", &eqos->clk_slave_bus); @@ -1418,8 +1417,6 @@ err_free_clk_slave_bus: clk_free(&eqos->clk_slave_bus); err_free_gpio_phy_reset: dm_gpio_free(dev, &eqos->phy_reset_gpio); -err_free_reset_eqos: - reset_free(&eqos->reset_ctl); debug("%s: returns %d\n", __func__, ret); return ret; @@ -1437,7 +1434,6 @@ static int eqos_remove_resources_tegra186(struct udevice *dev) clk_free(&eqos->clk_slave_bus); clk_free(&eqos->clk_master_bus); dm_gpio_free(dev, &eqos->phy_reset_gpio); - reset_free(&eqos->reset_ctl); debug("%s: OK\n", __func__); return 0; From patchwork Sat Apr 14 18:51:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dinh Nguyen X-Patchwork-Id: 898188 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=kernel.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40NkWV3Cj0z9s15 for ; Sun, 15 Apr 2018 05:01:10 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 124F1C21E79; Sat, 14 Apr 2018 18:55:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id A96D4C21E50; Sat, 14 Apr 2018 18:54:11 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id EB7B5C21E52; Sat, 14 Apr 2018 18:52:14 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by lists.denx.de (Postfix) with ESMTPS id 29888C21E1D for ; Sat, 14 Apr 2018 18:52:10 +0000 (UTC) Received: from localhost.localdomain (cpe-70-114-128-244.austin.res.rr.com [70.114.128.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E4703217D5; Sat, 14 Apr 2018 18:52:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E4703217D5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dinguyen@kernel.org From: Dinh Nguyen To: u-boot@lists.denx.de Date: Sat, 14 Apr 2018 13:51:37 -0500 Message-Id: <1523731900-4675-12-git-send-email-dinguyen@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523731900-4675-1-git-send-email-dinguyen@kernel.org> References: <1523731900-4675-1-git-send-email-dinguyen@kernel.org> Cc: marex@denx.de, joe.hershberger@ni.com, jagan@openedev.com Subject: [U-Boot] [PATCHv1 11/14] phy: bcm63xx: remove reset_free function X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The call to free the reset control line is a deadend call that doesn't lead to any reset control functionality. Also the reset_free() function will be remove in a subsequent patch, so remove it here. Signed-off-by: Dinh Nguyen --- drivers/phy/bcm6318-usbh-phy.c | 4 ---- drivers/phy/bcm6348-usbh-phy.c | 4 ---- drivers/phy/bcm6358-usbh-phy.c | 4 ---- drivers/phy/bcm6368-usbh-phy.c | 4 ---- drivers/spi/bcm63xx_hsspi.c | 4 ---- drivers/spi/bcm63xx_spi.c | 4 ---- 6 files changed, 24 deletions(-) diff --git a/drivers/phy/bcm6318-usbh-phy.c b/drivers/phy/bcm6318-usbh-phy.c index 6d54214..70907be 100644 --- a/drivers/phy/bcm6318-usbh-phy.c +++ b/drivers/phy/bcm6318-usbh-phy.c @@ -125,10 +125,6 @@ static int bcm6318_usbh_probe(struct udevice *dev) if (ret < 0) return ret; - ret = reset_free(&rst_ctl); - if (ret < 0) - return ret; - mdelay(100); return 0; diff --git a/drivers/phy/bcm6348-usbh-phy.c b/drivers/phy/bcm6348-usbh-phy.c index 169ee0e..2cc04e1 100644 --- a/drivers/phy/bcm6348-usbh-phy.c +++ b/drivers/phy/bcm6348-usbh-phy.c @@ -77,10 +77,6 @@ static int bcm6348_usbh_probe(struct udevice *dev) if (ret < 0) return ret; - ret = reset_free(&rst_ctl); - if (ret < 0) - return ret; - return 0; } diff --git a/drivers/phy/bcm6358-usbh-phy.c b/drivers/phy/bcm6358-usbh-phy.c index e000316..0440388 100644 --- a/drivers/phy/bcm6358-usbh-phy.c +++ b/drivers/phy/bcm6358-usbh-phy.c @@ -77,10 +77,6 @@ static int bcm6358_usbh_probe(struct udevice *dev) if (ret < 0) return ret; - ret = reset_free(&rst_ctl); - if (ret < 0) - return ret; - return 0; } diff --git a/drivers/phy/bcm6368-usbh-phy.c b/drivers/phy/bcm6368-usbh-phy.c index 71abc0f..38dd5e0 100644 --- a/drivers/phy/bcm6368-usbh-phy.c +++ b/drivers/phy/bcm6368-usbh-phy.c @@ -165,10 +165,6 @@ static int bcm6368_usbh_probe(struct udevice *dev) if (ret < 0) return ret; - ret = reset_free(&rst_ctl); - if (ret < 0) - return ret; - /* enable usb_ref clock */ ret = clk_get_by_name(dev, "usb_ref", &clk); if (!ret) { diff --git a/drivers/spi/bcm63xx_hsspi.c b/drivers/spi/bcm63xx_hsspi.c index 3393166..ddf75f0 100644 --- a/drivers/spi/bcm63xx_hsspi.c +++ b/drivers/spi/bcm63xx_hsspi.c @@ -383,10 +383,6 @@ static int bcm63xx_hsspi_probe(struct udevice *dev) if (ret < 0) return ret; - ret = reset_free(&rst_ctl); - if (ret < 0) - return ret; - /* initialize hardware */ writel_be(0, priv->regs + SPI_IR_MASK_REG); diff --git a/drivers/spi/bcm63xx_spi.c b/drivers/spi/bcm63xx_spi.c index f0df687..71bb07d 100644 --- a/drivers/spi/bcm63xx_spi.c +++ b/drivers/spi/bcm63xx_spi.c @@ -409,10 +409,6 @@ static int bcm63xx_spi_probe(struct udevice *dev) if (ret < 0) return ret; - ret = reset_free(&rst_ctl); - if (ret < 0) - return ret; - /* initialize hardware */ writeb_be(0, priv->base + regs[SPI_IR_MASK]); From patchwork Sat Apr 14 18:51:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dinh Nguyen X-Patchwork-Id: 898185 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=kernel.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40NkV63wd3z9s0n for ; Sun, 15 Apr 2018 04:59:58 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 24B93C21BE5; Sat, 14 Apr 2018 18:55:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 473F0C21E2C; Sat, 14 Apr 2018 18:54:27 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A63ECC21E3E; Sat, 14 Apr 2018 18:52:18 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by lists.denx.de (Postfix) with ESMTPS id 8A3F5C21E0B for ; Sat, 14 Apr 2018 18:52:11 +0000 (UTC) Received: from localhost.localdomain (cpe-70-114-128-244.austin.res.rr.com [70.114.128.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3164C2178E; Sat, 14 Apr 2018 18:52:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3164C2178E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dinguyen@kernel.org From: Dinh Nguyen To: u-boot@lists.denx.de Date: Sat, 14 Apr 2018 13:51:38 -0500 Message-Id: <1523731900-4675-13-git-send-email-dinguyen@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523731900-4675-1-git-send-email-dinguyen@kernel.org> References: <1523731900-4675-1-git-send-email-dinguyen@kernel.org> Cc: marex@denx.de, joe.hershberger@ni.com, jagan@openedev.com Subject: [U-Boot] [PATCHv1 12/14] usb: ehci/ohci: remove reset_free function X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The call to free the reset control line is a deadend call that doesn't lead to any reset control functionality. Also the reset_free() function will be remove in a subsequent patch, so remove it here. Signed-off-by: Dinh Nguyen Reviewed-by: Patrice Chotard --- drivers/usb/host/ehci-generic.c | 1 - drivers/usb/host/ohci-generic.c | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/usb/host/ehci-generic.c b/drivers/usb/host/ehci-generic.c index b012d86..8ed6a27 100644 --- a/drivers/usb/host/ehci-generic.c +++ b/drivers/usb/host/ehci-generic.c @@ -133,7 +133,6 @@ static int ehci_usb_probe(struct udevice *dev) if (reset_deassert(&priv->resets[i])) { dev_err(dev, "failed to deassert reset %d\n", i); - reset_free(&priv->resets[i]); goto reset_err; } priv->reset_count++; diff --git a/drivers/usb/host/ohci-generic.c b/drivers/usb/host/ohci-generic.c index 5bdd799..f61c0fc 100644 --- a/drivers/usb/host/ohci-generic.c +++ b/drivers/usb/host/ohci-generic.c @@ -125,7 +125,6 @@ static int ohci_usb_probe(struct udevice *dev) err = reset_deassert(&priv->resets[i]); if (err) { dev_err(dev, "failed to deassert reset %d\n", i); - reset_free(&priv->resets[i]); goto reset_err; } priv->reset_count++; From patchwork Sat Apr 14 18:51:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dinh Nguyen X-Patchwork-Id: 898184 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=kernel.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40NkTh4J45z9s0n for ; Sun, 15 Apr 2018 04:59:36 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 4B873C21E8A; Sat, 14 Apr 2018 18:55:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id E8DA6C21E42; Sat, 14 Apr 2018 18:55:22 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D83A5C21E26; Sat, 14 Apr 2018 18:52:18 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by lists.denx.de (Postfix) with ESMTPS id AA5A2C21E6C for ; Sat, 14 Apr 2018 18:52:12 +0000 (UTC) Received: from localhost.localdomain (cpe-70-114-128-244.austin.res.rr.com [70.114.128.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6E3E6217D7; Sat, 14 Apr 2018 18:52:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6E3E6217D7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dinguyen@kernel.org From: Dinh Nguyen To: u-boot@lists.denx.de Date: Sat, 14 Apr 2018 13:51:39 -0500 Message-Id: <1523731900-4675-14-git-send-email-dinguyen@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523731900-4675-1-git-send-email-dinguyen@kernel.org> References: <1523731900-4675-1-git-send-email-dinguyen@kernel.org> Cc: marex@denx.de, joe.hershberger@ni.com, jagan@openedev.com Subject: [U-Boot] [PATCHv1 13/14] reset: test: remove sandbox_reset_test_free function X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Remove sandbox_reset_test_free() because it calls reset_free, which is being removed. Signed-off-by: Dinh Nguyen --- arch/sandbox/include/asm/reset.h | 1 - drivers/reset/sandbox-reset-test.c | 7 ------- test/dm/reset.c | 2 -- 3 files changed, 10 deletions(-) diff --git a/arch/sandbox/include/asm/reset.h b/arch/sandbox/include/asm/reset.h index 0cd7702..c54b266 100644 --- a/arch/sandbox/include/asm/reset.h +++ b/arch/sandbox/include/asm/reset.h @@ -19,7 +19,6 @@ int sandbox_reset_test_assert(struct udevice *dev); int sandbox_reset_test_assert_bulk(struct udevice *dev); int sandbox_reset_test_deassert(struct udevice *dev); int sandbox_reset_test_deassert_bulk(struct udevice *dev); -int sandbox_reset_test_free(struct udevice *dev); int sandbox_reset_test_release_bulk(struct udevice *dev); #endif diff --git a/drivers/reset/sandbox-reset-test.c b/drivers/reset/sandbox-reset-test.c index f0ceaa0..91a1f6e 100644 --- a/drivers/reset/sandbox-reset-test.c +++ b/drivers/reset/sandbox-reset-test.c @@ -57,13 +57,6 @@ int sandbox_reset_test_deassert_bulk(struct udevice *dev) return reset_deassert_bulk(&sbrt->bulk); } -int sandbox_reset_test_free(struct udevice *dev) -{ - struct sandbox_reset_test *sbrt = dev_get_priv(dev); - - return reset_free(&sbrt->ctl); -} - int sandbox_reset_test_release_bulk(struct udevice *dev) { struct sandbox_reset_test *sbrt = dev_get_priv(dev); diff --git a/test/dm/reset.c b/test/dm/reset.c index 8dc0023..289693d 100644 --- a/test/dm/reset.c +++ b/test/dm/reset.c @@ -35,8 +35,6 @@ static int dm_test_reset(struct unit_test_state *uts) ut_assertok(sandbox_reset_test_deassert(dev_test)); ut_asserteq(0, sandbox_reset_query(dev_reset, TEST_RESET_ID)); - ut_assertok(sandbox_reset_test_free(dev_test)); - return 0; } DM_TEST(dm_test_reset, DM_TESTF_SCAN_FDT); From patchwork Sat Apr 14 18:51:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dinh Nguyen X-Patchwork-Id: 898189 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=kernel.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40NkWh5lkkz9s0n for ; Sun, 15 Apr 2018 05:01:20 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 7D564C21E96; Sat, 14 Apr 2018 18:55:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 21DE0C21EA7; Sat, 14 Apr 2018 18:52:53 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B2323C21EA7; Sat, 14 Apr 2018 18:52:18 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by lists.denx.de (Postfix) with ESMTPS id E4F6AC21DFD for ; Sat, 14 Apr 2018 18:52:13 +0000 (UTC) Received: from localhost.localdomain (cpe-70-114-128-244.austin.res.rr.com [70.114.128.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AFE5E217A6; Sat, 14 Apr 2018 18:52:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AFE5E217A6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dinguyen@kernel.org From: Dinh Nguyen To: u-boot@lists.denx.de Date: Sat, 14 Apr 2018 13:51:40 -0500 Message-Id: <1523731900-4675-15-git-send-email-dinguyen@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523731900-4675-1-git-send-email-dinguyen@kernel.org> References: <1523731900-4675-1-git-send-email-dinguyen@kernel.org> Cc: marex@denx.de, joe.hershberger@ni.com, jagan@openedev.com Subject: [U-Boot] [PATCHv1 14/14] reset: remove request and free functions X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 --- drivers/reset/reset-uclass.c | 28 ---------------------------- include/reset-uclass.h | 21 --------------------- include/reset.h | 23 ----------------------- 3 files changed, 72 deletions(-) diff --git a/drivers/reset/reset-uclass.c b/drivers/reset/reset-uclass.c index 9a5c9c9..24dd48c 100644 --- a/drivers/reset/reset-uclass.c +++ b/drivers/reset/reset-uclass.c @@ -72,12 +72,6 @@ int reset_get_by_index(struct udevice *dev, int index, return ret; } - ret = ops->request(reset_ctl); - if (ret) { - debug("ops->request() failed: %d\n", ret); - return ret; - } - return 0; } @@ -133,24 +127,6 @@ int reset_get_by_name(struct udevice *dev, const char *name, return reset_get_by_index(dev, index, reset_ctl); } -int reset_request(struct reset_ctl *reset_ctl) -{ - struct reset_ops *ops = reset_dev_ops(reset_ctl->dev); - - debug("%s(reset_ctl=%p)\n", __func__, reset_ctl); - - return ops->request(reset_ctl); -} - -int reset_free(struct reset_ctl *reset_ctl) -{ - struct reset_ops *ops = reset_dev_ops(reset_ctl->dev); - - debug("%s(reset_ctl=%p)\n", __func__, reset_ctl); - - return ops->free(reset_ctl); -} - int reset_assert(struct reset_ctl *reset_ctl) { struct reset_ops *ops = reset_dev_ops(reset_ctl->dev); @@ -209,10 +185,6 @@ int reset_release_all(struct reset_ctl *reset_ctl, int count) ret = reset_assert(&reset_ctl[i]); if (ret) return ret; - - ret = reset_free(&reset_ctl[i]); - if (ret) - return ret; } return 0; diff --git a/include/reset-uclass.h b/include/reset-uclass.h index 50fbeb1..a6301cf 100644 --- a/include/reset-uclass.h +++ b/include/reset-uclass.h @@ -40,27 +40,6 @@ struct reset_ops { int (*of_xlate)(struct reset_ctl *reset_ctl, struct ofnode_phandle_args *args); /** - * request - Request a translated reset control. - * - * The reset core calls this function as the second step in - * implementing a client's reset_get_by_*() call, following a - * successful xxx_xlate() call. - * - * @reset_ctl: The reset control struct to request; this has been - * filled in by a previoux xxx_xlate() function call. - * @return 0 if OK, or a negative error code. - */ - int (*request)(struct reset_ctl *reset_ctl); - /** - * free - Free a previously requested reset control. - * - * This is the implementation of the client reset_free() API. - * - * @reset_ctl: The reset control to free. - * @return 0 if OK, or a negative error code. - */ - int (*free)(struct reset_ctl *reset_ctl); - /** * rst_assert - Assert a reset signal. * * Note: This function is named rst_assert not assert to avoid diff --git a/include/reset.h b/include/reset.h index d38f176..505de77 100644 --- a/include/reset.h +++ b/include/reset.h @@ -134,24 +134,6 @@ int reset_get_by_name(struct udevice *dev, const char *name, struct reset_ctl *reset_ctl); /** - * reset_request - Request a reset signal. - * - * @reset_ctl: A reset control struct. - * - * @return 0 if OK, or a negative error code. - */ -int reset_request(struct reset_ctl *reset_ctl); - -/** - * reset_free - Free a previously requested reset signal. - * - * @reset_ctl: A reset control struct that was previously successfully - * requested by reset_get_by_*(). - * @return 0 if OK, or a negative error code. - */ -int reset_free(struct reset_ctl *reset_ctl); - -/** * reset_assert - Assert a reset signal. * * This function will assert the specified reset signal, thus resetting the @@ -254,11 +236,6 @@ static inline int reset_get_by_name(struct udevice *dev, const char *name, return -ENOTSUPP; } -static inline int reset_free(struct reset_ctl *reset_ctl) -{ - return 0; -} - static inline int reset_assert(struct reset_ctl *reset_ctl) { return 0;