Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp783490imm; Thu, 5 Jul 2018 08:49:03 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe9JIJIe+VwUI0QsdiAzCI/SyTVbH8alTQqOeyrJztaTagU4hJfhFUGhdSnQ5mkRK9dhX22 X-Received: by 2002:a17:902:3041:: with SMTP id u59-v6mr6744193plb.208.1530805743018; Thu, 05 Jul 2018 08:49:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530805742; cv=none; d=google.com; s=arc-20160816; b=yxXZtHMqZplrAoSx/xKxJ+W+s0EOLmq+NghVFZzrx1BaB27wJR262PEXDpSfHLHnmw 38dJHxCCmchZpK59vZJJqXvh0+fKmcv69MWNr4QmuRlYSnJlXHvczya9o6+rSu5SUZq3 skHueYU0J2cojlY2NsMBA9eAIcp81w6Gu77v3sk4O6PxY3xIO1hvoHXXaAb1zD1YjDzf l6v12ohJ73jT8QNQwg7jzPd29Wql3L/ULDK4Q3+tY+6a9JKZenpBOK8Am12JUIg5HF5K 7vqO9EDMs1HWEpvzJundY/POLkDMbGF5aUO+U9yovMRkAOqisqiEqXvSrIVfJ+Nwl9rJ VmfQ== 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=RLWDLNloYyi+3WGNw+zKDXiz3mO7JeHDj/X42AwxtNc=; b=btTdXzULefuZue1HGzcJ208EjSyybZ7Z/h/9yZzBDwa35bCpGkLqSC+O1oyDjxevZH M4/5TbWIWDjzTNj/Xba6Ul7Pl8LXRhltoRexr5pNPRe4ReCJlzTgd60+1mnxJJ1u2weQ vv/OTGuDxrhwc1q6JINUj7hMFfRzpiImCfWCkaOZ5PWiRCOuG2p9YNgJ/ofobmyX5JCy WHVtDjRgy9er22x11EjN7XYgqngnQPQvMvH9zKpd+/jZdldCMwI5uKWomI5VdjM1Hqmx sQLkLPeSBekalZ0JVZdnwRPiu2Yj8AZxD7Tq+wBQEEBIObePE7EgAlQGa7NT8gsWMlXP kg8g== 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 h4-v6si5960397pgm.441.2018.07.05.08.48.48; Thu, 05 Jul 2018 08:49:02 -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 S1753915AbeGEPsE (ORCPT + 99 others); Thu, 5 Jul 2018 11:48:04 -0400 Received: from muru.com ([72.249.23.125]:50450 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753677AbeGEPsC (ORCPT ); Thu, 5 Jul 2018 11:48:02 -0400 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id B2900813A; Thu, 5 Jul 2018 15:50:59 +0000 (UTC) Date: Thu, 5 Jul 2018 08:47:58 -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, robh+dt@kernel.org, bcousson@baylibre.com, paul@pwsan.com, t-kristo@ti.com, mark.rutland@arm.com Subject: Re: [PATCH v4 4/6] bus: ti-sysc: Add support for software reset Message-ID: <20180705154758.GA112168@atomide.com> References: <20180705142319.19583-1-faiz_abbas@ti.com> <20180705142319.19583-5-faiz_abbas@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180705142319.19583-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 [180705 14:24]: > +static int sysc_reset(struct sysc *ddata) > +{ > + int offset = ddata->offsets[SYSC_SYSCONFIG]; > + int val = sysc_read(ddata, offset); Can you please just warn and return early for now if no syss_mask is specified? Otherwise we'll have mysterious errors if somebody leaves out "ti,hwmods" for module types we do not yet support reset for. > + val |= (0x1 << ddata->cap->regbits->srst_shift); > + sysc_write(ddata, offset, val); > + > + /* Poll on reset status */ > + if (ddata->cfg.syss_mask) { > + 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; > +} > + Otherwise looks good to me. Thanks, Tony