From patchwork Wed Oct 23 17:45:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Stuebner X-Patchwork-Id: 1182328 X-Patchwork-Delegate: ykai007@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) 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=sntech.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46yyTM1qSbz9sP6 for ; Thu, 24 Oct 2019 04:45:43 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id DC90DC21DB6; Wed, 23 Oct 2019 17:45:30 +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=none 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 DD396C21C51; Wed, 23 Oct 2019 17:45:28 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id AF469C21CB1; Wed, 23 Oct 2019 17:45:27 +0000 (UTC) Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by lists.denx.de (Postfix) with ESMTPS id 57B20C21C51 for ; Wed, 23 Oct 2019 17:45:27 +0000 (UTC) Received: from ip5f5a6266.dynamic.kabel-deutschland.de ([95.90.98.102] helo=phil.fritz.box) by gloria.sntech.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1iNKhJ-0002rw-Jn; Wed, 23 Oct 2019 19:45:25 +0200 From: Heiko Stuebner To: u-boot@lists.denx.de Date: Wed, 23 Oct 2019 19:45:14 +0200 Message-Id: <20191023174515.8892-1-heiko@sntech.de> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Subject: [U-Boot] [PATCH 1/2] rockchip: clk: rv1108: remove duplicate reset init 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" rockchip_reset_bind() already does the needed init for the reset registers, only referenced the wrong cru structure. So we can get rid of the open-coded reset init and just fix the correct cru reference. Signed-off-by: Heiko Stuebner --- drivers/clk/rockchip/clk_rv1108.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/clk/rockchip/clk_rv1108.c b/drivers/clk/rockchip/clk_rv1108.c index 3ebb007fab..5dc31e1eb0 100644 --- a/drivers/clk/rockchip/clk_rv1108.c +++ b/drivers/clk/rockchip/clk_rv1108.c @@ -698,22 +698,11 @@ static int rv1108_clk_bind(struct udevice *dev) } #if CONFIG_IS_ENABLED(CONFIG_RESET_ROCKCHIP) - ret = offsetof(struct rk3368_cru, softrst_con[0]); + ret = offsetof(struct rv1108_cru, softrst_con[0]); ret = rockchip_reset_bind(dev, ret, 13); if (ret) debug("Warning: software reset driver bind faile\n"); #endif - ret = device_bind_driver_to_node(dev, "rockchip_reset", "reset", - dev_ofnode(dev), &sf_child); - if (ret) { - debug("Warning: No rockchip reset driver: ret=%d\n", ret); - } else { - sf_priv = malloc(sizeof(struct softreset_reg)); - sf_priv->sf_reset_offset = offsetof(struct rv1108_cru, - softrst_con[0]); - sf_priv->sf_reset_num = 13; - sf_child->priv = sf_priv; - } return 0; }