Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4791004img; Tue, 26 Mar 2019 17:25:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqz1nUmh2xcilrXdF2DFcMa+3OgDJHU3x8Os0E7lyocuhZ1p8YczKnLIVI1nVUd9KWGr0rTM X-Received: by 2002:a62:1647:: with SMTP id 68mr32632253pfw.113.1553646338539; Tue, 26 Mar 2019 17:25:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553646338; cv=none; d=google.com; s=arc-20160816; b=CA4n4T9ooDu9bV2A5W5adjrMG+C0D+Yz1fHAT+I8OoKm3ybOmRw/tIMQU9tmZbbS5x GkMPpahGypm1GsJTYvP6loDTLcVRxH69E7w8v08aEKaBHrMpi0kEt6sO4XIF2GcQYGFi 8Y4pM21+jJyWAeP0EZ4+79FmsaRHq2DipZ5qomqFCOpSJOsQciP25OVFlg8BYRTOf00K TJRomaFfADiGRLYz6Bu2DwhO8bv6lwYWkuPdDh1cbKfR+jbJdILaeQ0VX4Vg/UeJGP7f kMrYhuD1WB/qGPYcH6dtpDX6qdVE2qBG4zWXIWJPEn8BjDKvIhVW3Opy3MyqPbSCUSIF 8O9g== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=pM5lfy5uK1o6QH81yfiNB8f+N42sksFZ3M2xo8AR0+w=; b=IzwW4NvQospsjoQ8cZw6h/OB8bBDHIqtByDkBimknyiOCVVS3IUDBS+csiNj2vY7yP T2MZwf0k5XcThlS44bOYgOlXMpJs0ff/nsmnhx0wwRK5PL6NoCNW6hmhJakNh9wcLcl3 EwRfP5bnWNpbWt+MKj7zB0+aRhaFCY2Adf40g2TZWdglez7o7Ea/1PQWiwatUhW2gZVK +W1Zm1q7jHEIU8xoYHwavYUVo0g/Cu0bwAcYD1xMFHcn0wA5R/5c9U58+vr1h7o5duZd GAl3eiJDI4DSC92t/pc6xQZYGV7ChD3bTCsDrh8cWz3H1J+WsUiYoU+fScoVwewPxYRn AjVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=d8LBccvY; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e11si19165650plb.140.2019.03.26.17.25.23; Tue, 26 Mar 2019 17:25:38 -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=@chromium.org header.s=google header.b=d8LBccvY; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731934AbfC0AYo (ORCPT + 99 others); Tue, 26 Mar 2019 20:24:44 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:34117 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731159AbfC0AYn (ORCPT ); Tue, 26 Mar 2019 20:24:43 -0400 Received: by mail-pg1-f196.google.com with SMTP id v12so9066135pgq.1 for ; Tue, 26 Mar 2019 17:24:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=pM5lfy5uK1o6QH81yfiNB8f+N42sksFZ3M2xo8AR0+w=; b=d8LBccvYGaLfY2gFL+MCyU/USreh9hADi1itEhgTiUbqJFIRgUDySofPMvYb7luU4Y MKEGtXTvZJ7Jbp0G0WOW3sAqjdf/u6+s8h11kiG8ejf6boJkA3TLv38apiw2C6L5iGZ/ 15zBIwUi0LQUW2Syjhsy4CxuP9MJ9MQusxlbI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=pM5lfy5uK1o6QH81yfiNB8f+N42sksFZ3M2xo8AR0+w=; b=JSeQ7M51McCGUQ2spR3vZYPFT+9/DMadXfVjrn5njGFaCpmItiIBZgLWYpUmkv2cNj Q5jz4PMRvNeKQaVoVLR8PY1O89QS8NAdV92KSgqSYBIXefxcCFfQP613/Ce1knezt0hO cLzuHmI1eyj5CEL4rV8wg+raxAHSmMyEi0nJ1eN9o82TFDtiuuNWS7Yd0H2pLdtXgVI3 zUlfyc+KbqSmIcfW44PuDTG3injD16MsbdIiplOvWNhG/lMmgQXz3MIEbMHOpb6xHHF5 IKQaO729lHX6I6V4QkuE9Gkovn3/1rcIYihSHn75bMmqV5Nuq7c6ncje4QnID/mK7ebi 5fgA== X-Gm-Message-State: APjAAAUz3xbmC57p858vpn7rWqJeBqGZRroEwT/ZRXsF4dpetpRjgazz Jo0Km1usdeNt5Z5apO151zTi6g== X-Received: by 2002:a62:e911:: with SMTP id j17mr32430006pfh.107.1553646283104; Tue, 26 Mar 2019 17:24:43 -0700 (PDT) Received: from localhost ([2620:15c:202:1:75a:3f6e:21d:9374]) by smtp.gmail.com with ESMTPSA id 125sm30045677pfw.139.2019.03.26.17.24.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Mar 2019 17:24:42 -0700 (PDT) Date: Tue, 26 Mar 2019 17:24:41 -0700 From: Matthias Kaehlcke To: =?utf-8?B?R2HDq2w=?= PORTAY Cc: Mark Rutland , devicetree@vger.kernel.org, Derek Basehore , Heiko Stuebner , linux-pm@vger.kernel.org, Brian Norris , Douglas Anderson , linux-kernel@vger.kernel.org, Chanwoo Choi , Kyungmin Park , Rob Herring , Klaus Goger , MyungJoo Ham , Enric Balletbo i Serra , linux-rockchip@lists.infradead.org, Randy Li , kernel@collabora.com, linux-arm-kernel@lists.infradead.org, Lin Huang Subject: Re: [PATCH v2 3/5] devfreq: rk3399_dmc: Pass ODT and auto power down parameters to TF-A. Message-ID: <20190327002441.GB112750@google.com> References: <20190319181323.22804-1-gael.portay@collabora.com> <20190319181323.22804-4-gael.portay@collabora.com> <20190320003352.GN112750@google.com> <20190320215013.43zgvyn5frnb3yud@archlinux.localdomain> <20190320220223.GP112750@google.com> <20190321231055.j7z23f3k3rcngq4u@archlinux.localdomain> <20190322000107.GU112750@google.com> <20190322124525.ge5thq4a7c6ufcra@archlinux.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190322124525.ge5thq4a7c6ufcra@archlinux.localdomain> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 22, 2019 at 08:45:26AM -0400, Gaƫl PORTAY wrote: > Hi Matthias, > > On Thu, Mar 21, 2019 at 05:01:07PM -0700, Matthias Kaehlcke wrote: > > > ... > > > > > > So, for a reason that I ignore, if we try to save unecessary calls to > > > ROCKCHIP_SIP_CONFIG_DRAM_SET_ODT_PD (odt_enable has not changed since > > > last call), we get stalled in the call to ROCKCHIP_SIP_CONFIG_SET_RAGE > > > that follows. The function arm_smccc_smc never returns and the device > > > hard hang. > > > > Thanks for giving it a try! > > > > Did your code ensure to perform the SMC call for the first frequency > > change? If not the problem could be that the DDR PD timings and ODT > > resistors are not properly configured for the new frequency. > > > > The DRAM_ODT_PD SMC call is supposed to be performed before the > DRAM_SET_RATE; unless someone else is doing the set_rate. However earlier the call wasn't done at all, and that didn't cause problems. > Does the ODT resistors should be configured for every existing > frequency? I don't have any background here. My initial assumption would be that it should be enough to re-configure them when the frequency passes the threshold in either direction. Anyway, IIUC there shouldn't be more than 5 frequency changes per second (polling_ms = 200), and likely no all of them would pass the threshold, so it seems limiting the calls (if possible) would be a micro-optimization and is probably not worth the hassle :) Thanks Matthias