Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp391226ybe; Wed, 4 Sep 2019 01:06:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqxTdXzxzwcTEBQTT46P0luvSSMfaE1h4Afszy3znmhNCTws4UKxKclerlaJWL3PSkIaOqLu X-Received: by 2002:a17:90a:bd10:: with SMTP id y16mr3753742pjr.132.1567584412254; Wed, 04 Sep 2019 01:06:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567584412; cv=none; d=google.com; s=arc-20160816; b=Oir1Bpe1WyYA0CSzZ/R3QSwYzj4wDUAKULw2u+DlSbwY8kTTAw3GQZbwb9FS5gM8En LG1IxdwOHtqPm5oG53P3JUYiPtLcWdHGTL3NFiWBQYXKtgqtV/sgiGfpURMFdP8yNQE+ TfEZlxOvHaql1bWZTERWpJ8X7ac6XyXVZofDXawASE/SKNWJmU1DDHMD7HVbdYq2F7gW rFlAxayJlfG4qrfXqgO5c860RsFXJNZ8Sfp6ref31NAN4LMtgCSCnHwDMqFH3Hm75+jN S7fAjXisBVNhwsxY2DrkjWqV73UEMh/YCJuV+Bf4M8CGgY+sG+rijUlOgYA8nADtwznZ B/5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=ePwlgPUl5UDkS6om3hhLYrEm+MGniBQylkCu8ihce/w=; b=xUGpYNtWVariKUAUpfFzcn9kSEP5QtabdAbSMt6/S9Utxu5edeRi7AiQ/oPUrg8GXT rVuMAUWG6Mt4FOcvTQ/rz3HGb1mrlt8TU6YBOhGjP7f6zO/oHWYX1xi/DqOPKtxFNoG6 Lc54oPmYuDmpVP6dMOKBGmDpD6PUyxa2b6tWBNAJ/yWU6rG9QWGcZpZMxK52dPa2ia7J jptQKLjyRpjOLynAZX1YAPIWmp1Jw/tdqoBm4fcjX5A3q059sOOE8l2g+LPtpcm5NrvA /eGTXSboWN4UedjtED3S2bGowBtw6sBQbCKR+ysiM91CU0ADqGIqUn3vav8rwU2bpjz3 hpbA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h38si16828585pgi.327.2019.09.04.01.06.36; Wed, 04 Sep 2019 01:06:52 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729234AbfIDIEG (ORCPT + 99 others); Wed, 4 Sep 2019 04:04:06 -0400 Received: from mga11.intel.com ([192.55.52.93]:47680 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727787AbfIDIEF (ORCPT ); Wed, 4 Sep 2019 04:04:05 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Sep 2019 01:04:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,465,1559545200"; d="scan'208";a="182406388" Received: from linux.intel.com ([10.54.29.200]) by fmsmga008.fm.intel.com with ESMTP; 04 Sep 2019 01:04:04 -0700 Received: from [10.226.38.83] (rtanwar-mobl.gar.corp.intel.com [10.226.38.83]) by linux.intel.com (Postfix) with ESMTP id 336DC580105; Wed, 4 Sep 2019 01:04:02 -0700 (PDT) Subject: Re: [PATCH v1 1/2] clk: intel: Add CGU clock driver for a new SoC To: Martin Blumenstingl Cc: andriy.shevchenko@intel.com, cheol.yong.kim@intel.com, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, mark.rutland@arm.com, mturquette@baylibre.com, qi-ming.wu@intel.com, rahul.tanwar@intel.com, robh+dt@kernel.org, robh@kernel.org, sboyd@kernel.org, yixin.zhu@linux.intel.com References: <6a3c26bc6e25d883686287883528dbde30725922.1566975410.git.rahul.tanwar@linux.intel.com> <20190902222015.11360-1-martin.blumenstingl@googlemail.com> From: "Tanwar, Rahul" Message-ID: Date: Wed, 4 Sep 2019 16:03:59 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Martin, On 4/9/2019 2:53 AM, Martin Blumenstingl wrote: >> My understanding is that if we do not use syscon, then there is no >> point in using regmap because this driver uses simple 32 bit register >> access. Can directly read/write registers using readl() & writel(). >> >> Would you agree ? > if there was only the LGM SoC then I would say: drop regmap > > however, last year a driver for the GRX350/GRX550 SoCs was proposed: [0] > this was never updated but it seems to use the same "framework" as the > LGM driver > with this in mind I am for keeping regmap support because. > I think it will be easier to add support for old SoCs like > GRX350/GRX550 (but also VRX200), because the PLL sub-driver (I am > assuming that it is similar on all SoCs) or some other helpers can be > re-used across various SoCs instead of "duplicating" code (where one > variant would use regmap and the other readl/writel). Earlier, we had discussed about it in our team.  There are no plans to upstream mips based platform code, past up-streaming efforts for mips platforms were also dropped. GRX350/GRX550/VRX200 are all mips based platforms. Plan is to upstream only x86 based platforms. In-fact, i had removed GRX & other older SoCs support from this driver before sending for review. So we can consider only x86 based LGM family of SoCs for this driver & all of them will be reusing same IP. > [...] >>> + select OF_EARLY_FLATTREE >>> there's not a single other "select OF_EARLY_FLATTREE" in driver/clk >>> I'm not saying this is wrong but it makes me curious why you need this >> >> We need OF_EARLY_FLATTREE for LGM. But adding a new x86 >> platform for LGM is discouraged because that would lead to too >> many platforms. Only differentiating factor for LGM is CPU model >> ID but it can differentiate only at run time. So i had no option >> other then enabling it with some LGM specific core system module >> driver and CGU seemed perfect for this purpose. > so when my x86 kernel maintainer enables CONFIG_INTEL_LGM_CGU_CLK then > OF_EARLY_FLATTREE is enabled as well. > does this hurt any existing x86 platform? if not: why can't we enable > it for x86 unconditionally? IMHO, it will not hurt any other existing x86 platform but enabling it for x86 unconditionally also doesn't sound like a good idea. I now get your point that enabling OF_EARLY_FLATTREE here is a bit odd. I will remove it in next patch. Regards, Rahul > I went through meson & qcom regmap clock code. Agree, it can be > reused for mux, divider and gate. But as mentioned above, i am now > considering to move away from using regmap. > thank you for evaluating them. let's continue the discussion above > whether regmap should be used - after that we decide (if needed) which > regmap implementation to use > > > Martin > > > [0] https://patchwork.kernel.org/patch/10554401/