Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp121019imj; Wed, 13 Feb 2019 05:45:12 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia8bJ3LbGVwrNlAzcuDzt0EXmQuuAsI5Q3JbuWvbrfGMHLCYst385HK7WJW8oF7tXYFrfU6 X-Received: by 2002:a63:9348:: with SMTP id w8mr574798pgm.198.1550065512684; Wed, 13 Feb 2019 05:45:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550065512; cv=none; d=google.com; s=arc-20160816; b=UkYXtjdy6Cm3TTnMGsKi3+vtwGpzce317rBx1Ifg2hrigiRbLz8HtqAzgnvLCgPTUy YtvuFj4g3JUvJluu/RConZzUe3pa5bpEfi3l8CQ8vBqRiYbNEsi9rzwBFlXfQhjfeFyz uKhGLDKDskIOT5sD06XaqESCeSRS0s9v3f77XQnIqebbuw/97vYvd6Lnj9yY4D+6NQ9w fsrKIMbiWy99WBUN7dj02oXbki5KV/K7g5zvfRZ6FTXGT6ZQ8FHYXANyU0u903UJkuHt yijidpUFzcQCRhnMGfaX90O2vsHOwuHEFhMi0uGDBmtf9YXGo07DYLrHMe9zWmWrLiV1 zxkQ== 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=4PkyRM9LdRS3VccLHP+LNCCOIPvUX0cNYbYPhXWFY7M=; b=qxYZ1TqZ3paw+bP70T0sx16AsMdh0h9k6MQ3cIGg28ELfG0MvPp+OItQmJlH/UelhH zRmm53tVXTPQk5diDIN5UgusrwtgR1/hBo2upNlSMeDShJBzNHKlYGorPRRuJ+lRLE05 rZ+mCrMYzMUN4gHGIIwxGFpx5VN2KLrVEmyo47XGISJkyO3bUe3r3PNwJ1Vi2DkPE3JL YGlpAChKOCsVZnbTTf6EH6OgfkAW/ODTTmyCYOKflZS2zNhD0dTgeQmNl++Nl362yWVN mm56uMIfD6z1/+by8a6QmB9KY2pnbx1nSmOBKT6Fu2LlV3Wf5jtXEc1y/6qiGCCQuTnc MmRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bPbJyUZ4; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d19si16204726plr.327.2019.02.13.05.44.56; Wed, 13 Feb 2019 05:45:12 -0800 (PST) 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=@linaro.org header.s=google header.b=bPbJyUZ4; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388457AbfBMKMP (ORCPT + 99 others); Wed, 13 Feb 2019 05:12:15 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:33930 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729502AbfBMKMO (ORCPT ); Wed, 13 Feb 2019 05:12:14 -0500 Received: by mail-pl1-f195.google.com with SMTP id w4so956788plz.1 for ; Wed, 13 Feb 2019 02:12:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.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=4PkyRM9LdRS3VccLHP+LNCCOIPvUX0cNYbYPhXWFY7M=; b=bPbJyUZ4Y/la1Ew8iVoCMd2F9jAa5gtu9gs6bFMN6NP0+y+n5zAPu7M3kCiT7exsMD 2pHEnQhP/Li8sE671vCYA6prsfZulzO63qC9t84U4j12PbOcD/5RdqvvDGCUl1L1jyOw zFQ0cJPiP+BQg3ZNalayPYdNgEO7xFagnJWxTKu8UJCx7jdyabhYHtBn/PbSaxut1YnD ep72hrXYMUDFfygByXibWLRi2Kg4QjLnvTu06QmqDrEpsrECQlTNSJxlSC6riNe7s0dQ 3PxH/S5rRq1g8BIg7+Do/GMDnReqjrF+l3mfgnPc3IZUdMmmqCwqg2DP8jeeVkCrRts4 jccw== 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=4PkyRM9LdRS3VccLHP+LNCCOIPvUX0cNYbYPhXWFY7M=; b=HSFLExmJvv4RhAlhr0HU3fy4JbR5aBHgTSfb6YhqKhIv6J8YhVEBLw/DtjsoyQJYwx Fn9mlZdB1plO7aj0X5JXbjpsJ2WyA5EIIuekmxw0dcm58BrYdCSeiq4lZx/SQeUAZ3jX 64rT4CVu1MLilGsAlWyvKB1v3exBrwCSN3RPgRxV2wuDXnNbkO167v1+pPEwBD4o4N42 5UiDQFz7fOxaiOZbLv6qojnhEtSez6tJ/q45NTvEZGdQg0BnObf3v8TJXEMplb1WHfvy JLrMYLnGd+h+7SLCZM3sm0dhiD1Igow943ZUSE1/xW7bqGHLB9eWMuSV4tD8usJ2JV3l BXSw== X-Gm-Message-State: AHQUAubuvR0iePZEarD7szsIG2n5ramb0y0PoQ1r9yhJe+OKOjWJTLoN zxKZzA0hfu/YdFsH1P8xxmMCMg== X-Received: by 2002:a17:902:264:: with SMTP id 91mr9122566plc.108.1550052733308; Wed, 13 Feb 2019 02:12:13 -0800 (PST) Received: from localhost ([122.172.102.63]) by smtp.gmail.com with ESMTPSA id 22sm7897323pfk.53.2019.02.13.02.12.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Feb 2019 02:12:10 -0800 (PST) Date: Wed, 13 Feb 2019 15:42:07 +0530 From: Viresh Kumar To: Anson Huang Cc: "robh+dt@kernel.org" , "mark.rutland@arm.com" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , "rjw@rjwysocki.net" , Aisheng Dong , Daniel Baluta , Andy Gross , "horms+renesas@verge.net.au" , "heiko@sntech.de" , "arnd@arndb.de" , "bjorn.andersson@linaro.org" , "jagan@amarulasolutions.com" , "enric.balletbo@collabora.com" , "marc.w.gonzalez@free.fr" , "olof@lixom.net" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "linux-pm@vger.kernel.org" , dl-linux-imx Subject: Re: [PATCH 3/3] cpufreq: imx-sc: add i.mx system controller cpufreq support Message-ID: <20190213101207.ggunz5lhlv46r5o6@vireshk-i7> References: <1550027011-7884-1-git-send-email-Anson.Huang@nxp.com> <1550027011-7884-3-git-send-email-Anson.Huang@nxp.com> <20190213070904.3oswrjafy6cqedsr@vireshk-i7> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20180323-120-3dd1ac Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13-02-19, 08:46, Anson Huang wrote: > Hi, Viresh > > Best Regards! > Anson Huang > > > -----Original Message----- > > From: Viresh Kumar [mailto:viresh.kumar@linaro.org] > > Sent: 2019年2月13日 15:09 > > To: Anson Huang > > Cc: robh+dt@kernel.org; mark.rutland@arm.com; shawnguo@kernel.org; > > s.hauer@pengutronix.de; kernel@pengutronix.de; festevam@gmail.com; > > catalin.marinas@arm.com; will.deacon@arm.com; rjw@rjwysocki.net; > > Aisheng Dong ; Daniel Baluta > > ; Andy Gross ; > > horms+renesas@verge.net.au; heiko@sntech.de; arnd@arndb.de; > > bjorn.andersson@linaro.org; jagan@amarulasolutions.com; > > enric.balletbo@collabora.com; marc.w.gonzalez@free.fr; olof@lixom.net; > > devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux- > > kernel@vger.kernel.org; linux-pm@vger.kernel.org; dl-linux-imx > imx@nxp.com> > > Subject: Re: [PATCH 3/3] cpufreq: imx-sc: add i.mx system controller cpufreq > > support > > > > On 13-02-19, 03:09, Anson Huang wrote: > > > On NXP's i.MX SoCs with system controller inside, CPU frequency > > > scaling can ONLY be done by system controller firmware, and it can > > > ONLY be requested from secure mode, so Linux cpufreq driver has to > > > call ARM SMC to trap to ARM-Trusted-Firmware to request system > > > controller firmware to do CPU frequency scaling. > > > > > > This patch adds i.MX system controller cpufreq driver support, when > > > doing CPU frequency scaling, cpufreq driver will do ARM SMC call and > > > trap to ARM-Trusted-Firmware, then SIP(silicon provider) service will > > > communicate with system controller for CPU frequenct scaling. > > > > > > Signed-off-by: Anson Huang > > > --- > > > drivers/cpufreq/Kconfig.arm | 9 ++ > > > drivers/cpufreq/Makefile | 1 + > > > drivers/cpufreq/imx-sc-cpufreq.c | 183 > > > +++++++++++++++++++++++++++++++++++++++ > > > 3 files changed, 193 insertions(+) > > > create mode 100644 drivers/cpufreq/imx-sc-cpufreq.c > > > > Why can't you use cpufreq-dt driver like everyone else ? > > Just notice that we can overwrite the set_target if using cpufreq-dt, then we still > need a platform cpufreq file to implement arch_set_freq_scale(), I can use it to save Why do you need to implement arch_set_freq_scale() ? It is already defined for arm64 I believe. > the code of imx system controller cpufreq driver, and BTW, can cpufreq-dt support > multi clusters cpufreq? As i.MX8QM has 2 clusters running with different OPPs. Yes, it supports multi-cluster. -- viresh