Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1840093imm; Thu, 7 Jun 2018 00:57:11 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKTcTjQE1+UAZ1ZFZkPpkv1fhFU4nKHDC/PaaUM1kyoQ2oJwOOnLDzhmBwcWLxdrj75ltXY X-Received: by 2002:a62:98c9:: with SMTP id d70-v6mr802374pfk.195.1528358231036; Thu, 07 Jun 2018 00:57:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528358231; cv=none; d=google.com; s=arc-20160816; b=X65IFysPGzMdEP5QbfwshugM8mZytUVzaviLrcSanym65AjyEy8uOi6mRbLIf58Szq dC53/40dv/SUI9lASKKYYi5ejGNANFLumZUoS2WQsQwT1IWTBU42ae5pWFk+HoFG3wCq RYMTg8F1UEjzJJRgxSKD+2sUbbgjaegRrKtoMMSJciWVkSb3nEymyHzMaLsP8g2T6HKh IMn4TFfGznl0fTQugFHClFVQ6wLnqHCYD9bCwJwvCW7/1UjZ8SJovhxoRGAuOPGWMU4J l15zgJcRAUGnzYtgE3q5DS730krkDDjjxDa9KFH0ghQI5OWB1Z9WQOzKJRMvAQDIjpoB RrqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=VrRHCnhmhmlZwNmq9hCr9e/l9qjfNzM/RSG8jmwapys=; b=khEtSijIR7U5inOylNy0m1AH5hpSS5/tz50bpryRf9ZWEq91VSHUMWShAXYwinLzON 8oatHm0e3P8HcltQK++4oKXz3fFB3BGXo8Syt/awPJxetGzUDgvWnESZtiOqJ+SEIZX/ 9+CRX05a7cNr68ZDyxWlJc2805klH5zhAl/o5jKM+5LGIW9vzYxBkefePRBSbBLc4rTh b4NhmL4+vLtaMWnqHA0Lr3ToB4GltcQSY/ZJ7yVJYzXooYzEvqqxNi2JZXrumAJXEtF4 rlXoZA2Rhfg8rtuZGiarOa5Mk/X7lqIwrQTKz2BMjyFGzkfF0BDsDH9VGCwMEzNT+HfZ tdAA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a12-v6si13042806plt.474.2018.06.07.00.56.56; Thu, 07 Jun 2018 00:57:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753397AbeFGHff (ORCPT + 99 others); Thu, 7 Jun 2018 03:35:35 -0400 Received: from muru.com ([72.249.23.125]:46244 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752336AbeFGHfe (ORCPT ); Thu, 7 Jun 2018 03:35:34 -0400 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 221728080; Thu, 7 Jun 2018 07:38:03 +0000 (UTC) Date: Thu, 7 Jun 2018 00:35:30 -0700 From: Tony Lindgren To: Faiz Abbas Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, mark.rutland@arm.com, paul@pwsan.com, t-kristo@ti.com, robh+dt@kernel.org, bcousson@baylibre.com Subject: Re: [PATCH v3 4/6] bus: ti-sysc: Add support for software reset Message-ID: <20180607073530.GH5738@atomide.com> References: <20180606060826.14671-1-faiz_abbas@ti.com> <20180606060826.14671-5-faiz_abbas@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180606060826.14671-5-faiz_abbas@ti.com> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Faiz Abbas [180606 06:14]: > +static int sysc_reset(struct sysc *ddata) > +{ > + int offset = ddata->offsets[SYSC_SYSCONFIG]; > + int val = sysc_read(ddata, offset); > + > + val |= (0x1 << ddata->cap->regbits->srst_shift); > + sysc_write(ddata, offset, val); > + > + /* Poll on reset status */ > + if (ddata->cfg.quirks & SYSC_QUIRK_RESET_STATUS) { > + offset = ddata->offsets[SYSC_SYSSTATUS]; > + > + return readl_poll_timeout(ddata->module_va + offset, val, > + (val & ddata->cfg.syss_mask) == 0x0, > + 100, MAX_MODULE_SOFTRESET_WAIT); > + } > + > + return 0; > +} I wonder if we should also add SYSS_QUIRK_RESET_STATUS in addition to SYSC_QUIRK_RESET status to make it easy to read the right register? Then we can add support for SYSC_QUIRK_RESET_STATUS later on when tested and return error for now. Regards, Tony