Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp289623rdb; Thu, 19 Oct 2023 04:52:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE0hEY4b3ySZVkRrDWli90zNcGqAOzxc30+hT128BHoKuVeHcXDOPxdX4L33ZjQ/APZk898 X-Received: by 2002:a05:6a21:3e01:b0:17a:7a3:22b0 with SMTP id bk1-20020a056a213e0100b0017a07a322b0mr1716706pzc.39.1697716330238; Thu, 19 Oct 2023 04:52:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697716330; cv=none; d=google.com; s=arc-20160816; b=rI/WctpRoGjuayb7yWdhoUKzMsGSLgGqk/6+7gbZgvM97hWm+yXxUt7mXSHlBuVTxj oOx2HyKIjkOIajDGhEHmq+p9MvoZ4xlJYdP6dmqrietwleJ/im1hlCGpsmVv9Qqt6YOY WIdG4SncTGHpLqV+v7VZ8zm+/i3M69NREYl3XcWbUqMzstSjOfmGuA9VfTyS/Pbsdb+i 0lmoJ4ryBxZ+dDp2ascAhO2E3X1rILoKtAWyCTN4pH+O1VzDEVmOHs+jvaBrbEL5D2W/ 1rsw2cRTNsk78E/NOdHQNnMP6uIKpGbIEHwLFTTH4nSwN343oqBe9avSRFEtwkK6IvBj tecg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type:thread-index :content-language:content-transfer-encoding:mime-version:message-id :date:subject:in-reply-to:cc:to:from:dkim-signature:dkim-filter; bh=SVGW7QHIlwa5TULeQ7Mf1zBfInhhB9FdTC6QpS5e63g=; fh=za2Ddqh0pPdNj4p+pypF3ipiFhfLO31rK06zIw+vlFU=; b=jb+bK/gV5hyRKtx7o9C2JxGkXQ1GyMhgA6xQXL6i6Cug7P6XyUtOUXFwqZgsRQKnxJ zV+4Ek+4CQ2+NjPYHyG7aakWVRlFsA1XR4MX6soqWk04OCZbIlyI3DRhudS4QwfZwDAr PXTYMX0SwH5q2HalFSCygiF/fE4F6GbZLEEKr1m3rxoMTARsuuaJv4FHGhRVbpWNLSZV 5EM/tw8wLSNaj5+5hLDzTCo0hjiimNZUxe3y0MScdODFJN1mMkIQ+Ljdxw9nHwvuc7Ue 4dWC2B0uguze/AtOVa48XV8yNDCsh1soVh7X/va0wn2mL8R4uw6czHX33o4XMU/WBMHA KDYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="Tomy9l/K"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id bz33-20020a056a02062100b005a0018ec785si4849402pgb.375.2023.10.19.04.52.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 04:52:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="Tomy9l/K"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 327C9822CE1B; Thu, 19 Oct 2023 04:52:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235283AbjJSLwE (ORCPT + 99 others); Thu, 19 Oct 2023 07:52:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235234AbjJSLwA (ORCPT ); Thu, 19 Oct 2023 07:52:00 -0400 Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2C22184 for ; Thu, 19 Oct 2023 04:51:55 -0700 (PDT) Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20231019115153epoutp0348d43afcd4576e5f5cca97606ea38a88~Pf-4hKVk91459414594epoutp03_ for ; Thu, 19 Oct 2023 11:51:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20231019115153epoutp0348d43afcd4576e5f5cca97606ea38a88~Pf-4hKVk91459414594epoutp03_ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1697716314; bh=SVGW7QHIlwa5TULeQ7Mf1zBfInhhB9FdTC6QpS5e63g=; h=From:To:Cc:In-Reply-To:Subject:Date:References:From; b=Tomy9l/K8hp/qEAOhsAax86d0OhNvFF6C1xyOErYVjVSHiVOKnPNNP3XCQfo0Z5E5 K4FJavYiF9TTRLg+WuulMMFrULqSKxPA3qHWvUuVruTLu8hXIB2+IJPmD/FSJ55sSk cxMkXcquBWiL/iyM7ZNc/o/vvrsEJFo1OHhIw4TU= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20231019115153epcas1p1fee86a96239df7edebfc7cef53d761ff~Pf-35Z7Te0065600656epcas1p1R; Thu, 19 Oct 2023 11:51:53 +0000 (GMT) Received: from epsmges1p3.samsung.com (unknown [182.195.36.144]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4SB5fc2sJlz4x9Ps; Thu, 19 Oct 2023 11:51:52 +0000 (GMT) Received: from epcas1p1.samsung.com ( [182.195.41.45]) by epsmges1p3.samsung.com (Symantec Messaging Gateway) with SMTP id E1.2E.09739.85811356; Thu, 19 Oct 2023 20:51:52 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas1p4.samsung.com (KnoxPortal) with ESMTPA id 20231019115151epcas1p4042233c1498aed04c49a0a9f540e8473~Pf-133QQ22290422904epcas1p4X; Thu, 19 Oct 2023 11:51:51 +0000 (GMT) Received: from epsmgmcp1.samsung.com (unknown [182.195.42.82]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20231019115151epsmtrp11dc727f6b3817388d1e85d8afd629373~Pf-126yLy1810718107epsmtrp1j; Thu, 19 Oct 2023 11:51:51 +0000 (GMT) X-AuditID: b6c32a37-e67fa7000000260b-62-65311858f028 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgmcp1.samsung.com (Symantec Messaging Gateway) with SMTP id D2.68.18939.65811356; Thu, 19 Oct 2023 20:51:51 +0900 (KST) Received: from cw00choi03 (unknown [10.113.111.106]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20231019115150epsmtip2b501df77bf12f909d8e048ac4d1457bf~Pf-1jAInr2789127891epsmtip2H; Thu, 19 Oct 2023 11:51:50 +0000 (GMT) From: "Chanwoo Choi" To: "'Sascha Hauer'" , Cc: , , , "'Heiko Stuebner'" , "'Chanwoo Choi'" , "'Kyungmin Park'" , "'MyungJoo Ham'" , "'Will Deacon'" , "'Mark Rutland'" , , "'Michael Riesch'" , "'Robin Murphy'" , "'Vincent Legoll'" , "'Rob Herring'" , "'Krzysztof Kozlowski'" , "'Conor Dooley'" , , "'Sebastian Reichel'" In-Reply-To: <20231018061714.3553817-12-s.hauer@pengutronix.de> Subject: RE: [PATCH v8 11/26] PM / devfreq: rockchip-dfi: Handle LPDDR2 correctly Date: Thu, 19 Oct 2023 20:51:50 +0900 Message-ID: <001501da0282$a5b7a150$f126e3f0$@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Mailer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kag 9ziYlUR4VT0MUoV4UxIrq1KL8uOLSnNSiw8xSnOwKInzKud0pggJpCeWpGanphakFsFkmTg4 pRqYJnNMUb71JnvaWY8uzc4wDdtS9ed24YWvrfLehjPLnlogYyZ8csWb6SIffao21t5QmPTs 6Z4YMe0MB+Ovu3If3w/dyvfVbYW58lW2vvxrM36VTHnfpL+s7/C07cZq595d2xDsW2d146Dv /cw9OXcdFn8+GjW197Zld5S2YffTrskX0ucvnPPXJXFhe0HYFMdN3Mu2MHvVPwgOl1BMV6xQ 52rbr5x/uTdrj/rTqPfMCjcmqh3IiHR5JWe32DOScZFAYi5LSZDzpTQTwaX3lrV7+Lzh9VzF Fbs/OPNeqOt2tprHT6vzvCwuVc2Nfr3QRsWw6mdkUCnTq3N/FG/LlnGsil7RK3lVb6vBkaTp hoFKLMUZiYZazEXFiQBYMjzUaQMAAA== X-CMS-MailID: 20231019115151epcas1p4042233c1498aed04c49a0a9f540e8473 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20231018063705epcas1p296a5a044b8b4e2e9c457c2602ce10b0b References: <20231018061714.3553817-1-s.hauer@pengutronix.de> <20231018061714.3553817-12-s.hauer@pengutronix.de> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 19 Oct 2023 04:52:09 -0700 (PDT) > -----Original Message----- > From: Sascha Hauer > Sent: Wednesday, October 18, 2023 3:17 PM > To: linux-rockchip@lists.infradead.org > Cc: linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org; > linux-pm@vger.kernel.org; Heiko Stuebner ; Chanwoo Choi > ; Kyungmin Park ; MyungJoo > Ham ; Will Deacon ; Mark > Rutland ; kernel@pengutronix.de; Michael Riesch > ; Robin Murphy ; > Vincent Legoll ; Rob Herring > ; Krzysztof Kozlowski > ; Conor Dooley ; > devicetree@vger.kernel.org; Sebastian Reichel > ; Sascha Hauer ; > Jonathan Cameron ; Chanwoo Choi > > Subject: [PATCH v8 11/26] PM / devfreq: rockchip-dfi: Handle LPDDR2 > correctly > > According to the downstream driver the DDRMON_CTRL_LPDDR23 bit must be set > for both LPDDR2 and LPDDR3. Add the missing LPDDR2 case and while at it > turn the if/else if/else into switch/case which makes it easier to read. > > Reviewed-by: Jonathan Cameron > Reviewed-by: Sebastian Reichel > Acked-by: Chanwoo Choi > Signed-off-by: Sascha Hauer > --- > drivers/devfreq/event/rockchip-dfi.c | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/drivers/devfreq/event/rockchip-dfi.c > b/drivers/devfreq/event/rockchip-dfi.c > index 571d72d1abd1c..8ce0191552ef1 100644 > --- a/drivers/devfreq/event/rockchip-dfi.c > +++ b/drivers/devfreq/event/rockchip-dfi.c > @@ -83,12 +83,19 @@ static void rockchip_dfi_start_hardware_counter(struct > devfreq_event_dev *edev) > DDRMON_CTRL_HARDWARE_EN), dfi_regs + DDRMON_CTRL); > > /* set ddr type to dfi */ > - if (dfi->ddr_type == ROCKCHIP_DDRTYPE_LPDDR3) > + switch (dfi->ddr_type) { > + case ROCKCHIP_DDRTYPE_LPDDR2: > + case ROCKCHIP_DDRTYPE_LPDDR3: > writel_relaxed(HIWORD_UPDATE(DDRMON_CTRL_LPDDR23, > DDRMON_CTRL_DDR_TYPE_MASK), > dfi_regs + DDRMON_CTRL); > - else if (dfi->ddr_type == ROCKCHIP_DDRTYPE_LPDDR4) > + break; > + case ROCKCHIP_DDRTYPE_LPDDR4: > writel_relaxed(HIWORD_UPDATE(DDRMON_CTRL_LPDDR4, > DDRMON_CTRL_DDR_TYPE_MASK), > dfi_regs + DDRMON_CTRL); > + break; > + default: > + break; > + } > > /* enable count, use software mode */ > writel_relaxed(HIWORD_UPDATE(DDRMON_CTRL_SOFTWARE_EN, > DDRMON_CTRL_SOFTWARE_EN), > -- > 2.39.2 Applied it. Thanks Best Regards, Chanwoo Choi