Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5343851pxv; Wed, 21 Jul 2021 03:13:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsNl/lcvU30sjgZKR+QlZDg4Xto1RnjdyIBxejYL61fKnGQNi8vpoqfEZIg/C4+Vn/SwMb X-Received: by 2002:aa7:c956:: with SMTP id h22mr46347374edt.378.1626862380118; Wed, 21 Jul 2021 03:13:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626862380; cv=none; d=google.com; s=arc-20160816; b=KilzUYVuUTolROpk0dyDhQVeqPOcfS+BZ+aJ64wNBAsnfznV/395H2yuOywTdDBOM7 Pwz2kPka9Cxh96Fpz/T0bjCtOUl4StgtE9rq3PkxpbgH9ftjqwMn1uTd8URqG63oAbSx ESCMUvLtYkFZPFVeyvf027F1iamVoDZEzVwe+8X82Oq7ut744Nh/l229bOJKdAfmcam/ GsWkBo+2pOSZ2R8sLjvlHziK6tyt3SA2DiYY6A2I3Svmakjag5AD9L291obvlzcdCeMn WGht90E1gqxbtrcyy8z8OLUXoV/G636ORvZmCn8JkR/zkyJG0yRE7Q0b0oiTosyvKkmf Pg9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=Aan+0uQqfzStQFHVqXGxkpcS01BcnaxDsBdzds/Jk4A=; b=HvhIl+P2MPZaiwlVHa/kCY78xvSfPKjo+Xxbd4tarcD+qOEqANmzasGFT36NI/S6xK SV8zYI+XmklaZGXWp9W5lLKwDpHYstaewhYbEg2EuJiOIIMqED05PhkvCZgTCDhzJeqf NhjxcYbiozs08SnDhHPYZFN67YJbrbnFzkQPFrj1hNgtzefcOBOWk56AF8B8BOBaDhdu biiMIzH8xzcVVuWOFnIGmdvA+TZ4AP3gflw41g1u4yVcu976uOrZ/60aZs9GJcOrmcJD 9gkTRUyegSTiSOtaYi3Rgd2jUNctMthPowClj2nEQMjZ/Te/nI++NYTJaoSWN7RoO/s5 Bf6Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rh15si16124022ejb.613.2021.07.21.03.12.37; Wed, 21 Jul 2021 03:13:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237969AbhGUJV6 convert rfc822-to-8bit (ORCPT + 99 others); Wed, 21 Jul 2021 05:21:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238348AbhGUJNA (ORCPT ); Wed, 21 Jul 2021 05:13:00 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36BCAC061574 for ; Wed, 21 Jul 2021 02:53:34 -0700 (PDT) Received: from lupine.hi.pengutronix.de ([2001:67c:670:100:3ad5:47ff:feaf:1a17] helo=lupine) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m68uy-0000iB-MM; Wed, 21 Jul 2021 11:53:32 +0200 Received: from pza by lupine with local (Exim 4.92) (envelope-from ) id 1m68uw-0003Cy-QZ; Wed, 21 Jul 2021 11:53:30 +0200 Message-ID: <83b95ddab7c43ada71b7863522348aca076fe291.camel@pengutronix.de> Subject: Re: [PATCH v2 6/7] soc: mediatek: mmsys: Add reset controller support From: Philipp Zabel To: Enric Balletbo i Serra , linux-kernel@vger.kernel.org Cc: chunkuang.hu@kernel.org, hsinyi@chromium.org, kernel@collabora.com, drinkcat@chromium.org, eizan@chromium.org, linux-mediatek@lists.infradead.org, matthias.bgg@gmail.com, jitao.shi@mediatek.com, linux-arm-kernel@lists.infradead.org Date: Wed, 21 Jul 2021 11:53:30 +0200 In-Reply-To: References: <20210714101141.2089082-1-enric.balletbo@collabora.com> <20210714121116.v2.6.I15e2419141a69b2e5c7e700c34d92a69df47e04d@changeid> <039151e1f17676a101fb9c0682f5ee9fb8ad502d.camel@pengutronix.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:3ad5:47ff:feaf:1a17 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2021-07-20 at 19:07 +0200, Enric Balletbo i Serra wrote: > Hi Philipp, > > Thank you to take a look > > On 20/7/21 12:52, Philipp Zabel wrote: > > Hi Enric, > > > > On Wed, 2021-07-14 at 12:11 +0200, Enric Balletbo i Serra wrote: > > > Among other features the mmsys driver should implement a reset > > > controller to be able to reset different bits from their space. > > > > > > Cc: Jitao Shi > > > Suggested-by: Chun-Kuang Hu > > > Signed-off-by: Enric Balletbo i Serra > > > > The reset controller driver looks fine, just two questions below. > > > > > --- > > > > > > (no changes since v1) > > > > > > drivers/soc/mediatek/mtk-mmsys.c | 69 ++++++++++++++++++++++++++++++++ > > > drivers/soc/mediatek/mtk-mmsys.h | 2 + > > > 2 files changed, 71 insertions(+) > > > > > > diff --git a/drivers/soc/mediatek/mtk-mmsys.c b/drivers/soc/mediatek/mtk-mmsys.c > > > index e681029fe804..6ac4deff0164 100644 > > > --- a/drivers/soc/mediatek/mtk-mmsys.c > > > +++ b/drivers/soc/mediatek/mtk-mmsys.c > > [...] > > > @@ -91,6 +95,59 @@ void mtk_mmsys_ddp_disconnect(struct device *dev, > > [...] > > > +static int mtk_mmsys_reset(struct reset_controller_dev *rcdev, unsigned long id) > > > +{ > > > + int ret; > > > + > > > + ret = mtk_mmsys_reset_assert(rcdev, id); > > > + if (ret) > > > + return ret; > > > + > > > + usleep_range(1000, 1100); > > > > Is this known to be enough for all IP cores that can be reset by this > > controller? > > > > This time is copied from the downstream kernel, so, tbh, I am not totally sure > is enough or needed. Let me try to reach the Mediatek people for if they can > answer this. That would be great. When this is resolved either way, feel free to add Reviewed-by: Philipp Zabel regards Philipp