From patchwork Fri Nov 6 19:17:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Quinlan X-Patchwork-Id: 11888019 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,T_TVD_MIME_NO_HEADERS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC11BC388F2 for ; Fri, 6 Nov 2020 19:18:29 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 547C42151B for ; Fri, 6 Nov 2020 19:18:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="C3iI02Ge"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="AlD71ucE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 547C42151B Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type:MIME-Version: Cc:List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: References:In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+UTnNAiZqn2cCgVZmEWO8fT6xU8tCR/HlJA6w/NLJBY=; b=C3iI02GeRnYifx4nM8AqPAAsn xVIwyRAGTqeS/fmIacw62zMFWgk4yrA+xKAz75Gh2W+sykcgOkhEX/P5wcsjbdrilqY9+NJO3hV7d LqEJoli02gCWgyMdOwlnXzsIrlqHAjxXUv2VcfXD0wC+fERTukFvYas7x/ObCBEv1TqvXviN9mJV3 Mt9iVT+OilcK7R5SilqH3ByroX+d8Qn7Pbtpaomtw/+EuWNVBCqQHmKtJb/xICXP3ki0IZK9bhV5+ nHWMZAbx8LxxH5Bmt48SmdtMeJrISyYc79roDGexvpkuyt3qI6sn0rh/dOtoKT0CpN/AD/7QFr196 MmsV1HzoA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kb7FG-0007UM-Gf; Fri, 06 Nov 2020 19:17:58 +0000 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kb7FA-0007SC-7q for linux-arm-kernel@lists.infradead.org; Fri, 06 Nov 2020 19:17:53 +0000 Received: by mail-pl1-x644.google.com with SMTP id w11so1102060pll.8 for ; Fri, 06 Nov 2020 11:17:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=IykbfjXAp2r2rayGGVWu3ZIDCBFMkpvbrDVQBlUFSQA=; b=AlD71ucErwFj4QDoB32mYXA3xHGAmQAOY34wBiBRiAqrxaX4fzNzjqtkIpXDU/dgpy qDfZbGCR5MHbWgqdw6J+f8knVeQNtyPlUpRlKsdg+RZk7s4X07AK2M2p2M9Ia+/fC10+ RyPcBC3k0Nr0A4JAj4+9y937oPWBvus9gqDz8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=IykbfjXAp2r2rayGGVWu3ZIDCBFMkpvbrDVQBlUFSQA=; b=bynUUqqgY9xb4ks4D7iRJvQO04aWi1waX3vjuvacMhv7WHElSV+CJOrjTvXe2fzYQE p0NlsRS14MD5enTjmslnzGO6hESma56Mwm41JuMNrPXrrj4nxjpi3KiiJL9KefwIq1Ne Y74qOTjhIO/9Qy2nx+KOkBWQsmBVNjB8XKg9jxNkNa4Dtk+AcZpCzFfgxWrdLVrMloRZ BkuglmeVqbejdJVEKev/RT1vRh0fgYDNXaH/O8wsnfxnZG9tqZL8igkxKxm7jnoS3TAL LQFAmA36r6biHPjVO2l6YrXWsnOz64fVnK0Ls4JnanuRymCopljyWkikubXPfOFn0yxW CyyA== X-Gm-Message-State: AOAM532Ql2l5DxVHc59esNmR4gMS2zkOS+sZTNihijcT59UTnv0pDWJ4 UXIrHiJ0GgrPxeGbmywz2qd0kg== X-Google-Smtp-Source: ABdhPJxeKR2Hw9OCb+F3nOOyw27IkjXvX7yIEVEMik4AjM7TAoA4Xi9LVht/QGqVqIHjVO9/sQeuvQ== X-Received: by 2002:a17:902:748a:b029:d6:9d17:44f3 with SMTP id h10-20020a170902748ab02900d69d1744f3mr2977960pll.45.1604690270429; Fri, 06 Nov 2020 11:17:50 -0800 (PST) Received: from stbsrv-and-01.and.broadcom.net ([192.19.231.250]) by smtp.gmail.com with ESMTPSA id m3sm3302207pjv.52.2020.11.06.11.17.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Nov 2020 11:17:49 -0800 (PST) From: Jim Quinlan To: Philipp Zabel , Hans de Goede , Jens Axboe , bcm-kernel-feedback-list@broadcom.com, james.quinlan@broadcom.com Subject: [PATCH v2 1/2] reset: brcmstb rescal: implement {de}assert() instead of reset() Date: Fri, 6 Nov 2020 14:17:42 -0500 Message-Id: <20201106191743.40457-2-james.quinlan@broadcom.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201106191743.40457-1-james.quinlan@broadcom.com> References: <20201106191743.40457-1-james.quinlan@broadcom.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201106_141752_334552_69CCA368 X-CRM114-Status: GOOD ( 13.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Florian Fainelli , open list , "moderated list:BROADCOM BCM7XXX ARM ARCHITECTURE" MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Before, only control_reset() was implemented. However, the reset core only invokes control_reset() once in its lifetime. Because we need it to invoke control_reset() again after resume out of S2 or S3, we have switched to putting the reset functionality into the control_deassert() method and having an empty control_assert() method. Signed-off-by: Jim Quinlan --- drivers/reset/reset-brcmstb-rescal.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/reset/reset-brcmstb-rescal.c b/drivers/reset/reset-brcmstb-rescal.c index b6f074d6a65f..1f54ae4f91fe 100644 --- a/drivers/reset/reset-brcmstb-rescal.c +++ b/drivers/reset/reset-brcmstb-rescal.c @@ -20,8 +20,8 @@ struct brcm_rescal_reset { struct reset_controller_dev rcdev; }; -static int brcm_rescal_reset_set(struct reset_controller_dev *rcdev, - unsigned long id) +static int brcm_rescal_reset_deassert(struct reset_controller_dev *rcdev, + unsigned long id) { struct brcm_rescal_reset *data = container_of(rcdev, struct brcm_rescal_reset, rcdev); @@ -52,6 +52,12 @@ static int brcm_rescal_reset_set(struct reset_controller_dev *rcdev, return 0; } +static int brcm_rescal_reset_assert(struct reset_controller_dev *rcdev, + unsigned long id) +{ + return 0; +} + static int brcm_rescal_reset_xlate(struct reset_controller_dev *rcdev, const struct of_phandle_args *reset_spec) { @@ -60,7 +66,8 @@ static int brcm_rescal_reset_xlate(struct reset_controller_dev *rcdev, } static const struct reset_control_ops brcm_rescal_reset_ops = { - .reset = brcm_rescal_reset_set, + .deassert = brcm_rescal_reset_deassert, + .assert = brcm_rescal_reset_assert, }; static int brcm_rescal_reset_probe(struct platform_device *pdev)