Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1984843imm; Thu, 7 Jun 2018 03:38:52 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKWpng2KF1UE+ahynu731N2TsUUXUuXz0uHK1/560qIRdKfQQdkhnJo91nEfserj9uoFDQc X-Received: by 2002:a17:902:ac97:: with SMTP id h23-v6mr1473347plr.140.1528367932607; Thu, 07 Jun 2018 03:38:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528367932; cv=none; d=google.com; s=arc-20160816; b=vHPJjdSySzTZD0nlMzBqksiNrGx25/UmK8OtGNTF9Sa+a3L6guvschHGKinY8EQIha FRjvIdOO59mHXND+eZO4pA4HqiSVOQ0P8PsxSl5ftozsU0cBrPssN0LU7oKJltK1E9g6 e+lTUVC5LVdN51KPcteRzdgPHSh7cQOLHd74Lgvlyl6DUsRhc7WTPKNhDyaVynTm4+5r DVvJffh4bYHxmj5h/5wLWLfgflJ5MdvnDhBgVe820GPUnYk08Ux5l0klHVl+BUrnji2M aN+aI/tNoAxlO/M2GOhCsTqmNa6P/BY3a3M0KU+b7rgbAzMIzdZbCb4yaFb/hZFxUXeR 7bhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=iryC2Nl8wWJQl0SqkKh5FSUVc4OPq0DcMuLJATladR0=; b=qwfamlLikUHsY5QwNnO4ZGYK4ASI9GB4I3rvD1OXOxV2BEQHONfJjboxlzdAlD/HgX FITAn2tVgD20fXXwSnInSllxVmO1wVpfyaShm9aLAIEN4b1Q2cel0Z58Ildl9ytvQS2m c1/W8ea86+2cC2dvSBhpp5sQkezIT7YyBS8lE9Zy0koMtLZrDI+2A56cBoGNCscWCGJW x2UKj+nP9ylj49vuUWtFzOVSYz5MLWMN8gbMfJP7hIJq7mkO7Nx9dYB+lUxpBu/T7fiY TrzmRBX6SZVIUp4dQpQn+g5m4GG9LGUesXyXfRRL6MxZW9KeBWxtD/H4lUd8uOBpS/8K lZPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=XByxzq5s; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i8-v6si9506816pgs.211.2018.06.07.03.38.37; Thu, 07 Jun 2018 03:38:52 -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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=XByxzq5s; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932586AbeFGKWr (ORCPT + 99 others); Thu, 7 Jun 2018 06:22:47 -0400 Received: from fllnx210.ext.ti.com ([198.47.19.17]:32382 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750897AbeFGKWp (ORCPT ); Thu, 7 Jun 2018 06:22:45 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id w57AMKMl019384; Thu, 7 Jun 2018 05:22:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1528366940; bh=iryC2Nl8wWJQl0SqkKh5FSUVc4OPq0DcMuLJATladR0=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=XByxzq5ssMnU5ZwolyktlNMulv6BzXuYZc57QanKziGaw3Gc2ZSWMq8UmPsv0TpoA mttS/FINOSJLECmEWOWAdkMqyuRfi/gcenaWGtYyOhzb/p8KI7A9DFcuEQ+4K780Vh JzYVP4GfmgkOSADfPFPYzs1uphgL/damAV3YF3eQ= Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w57AMKmu025293; Thu, 7 Jun 2018 05:22:20 -0500 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Thu, 7 Jun 2018 05:22:19 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Thu, 7 Jun 2018 05:22:19 -0500 Received: from [172.24.190.215] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w57AMG9A001329; Thu, 7 Jun 2018 05:22:16 -0500 Subject: Re: [PATCH v3 4/6] bus: ti-sysc: Add support for software reset To: Tony Lindgren CC: , , , , , , , , , References: <20180606060826.14671-1-faiz_abbas@ti.com> <20180606060826.14671-5-faiz_abbas@ti.com> <20180607073530.GH5738@atomide.com> From: Faiz Abbas Message-ID: Date: Thu, 7 Jun 2018 15:54:01 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180607073530.GH5738@atomide.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thursday 07 June 2018 01:05 PM, Tony Lindgren wrote: > * 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? I assumed SYSC_QUIRK is the prefix to indicate the ti-sysc driver not the register. Are there layouts in which the reset status bit is in the sysconfig register rather than the sysstatus register? Thanks, Faiz