Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3493905imu; Fri, 30 Nov 2018 00:59:19 -0800 (PST) X-Google-Smtp-Source: AFSGD/WehcSEWoqvRhOjUjJt95PVs402rD5eIRbaEZJnAHDyNpQJyYnYMrZJvPCLHUZHpz39U2zV X-Received: by 2002:a17:902:8507:: with SMTP id bj7-v6mr4730339plb.99.1543568358950; Fri, 30 Nov 2018 00:59:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543568358; cv=none; d=google.com; s=arc-20160816; b=wO4KDFWjLoGWjePiIcHyiX4WmCGuy7NDImVGrcfvcnsyZ/E1JskeTa1gLiA8siBEVD dcXPgHFXY4TY3V3IXiLAsQWaICg8WhcmljO4GS8L/emgPtH8e6EXh5px6wJrUYyKmNuX CNx6bjzp52djliJu1FjTmnIHzjCwKW5wEU8r1hWkugCEB38F/8JUkWdXgS4lr7MNZPJC gCXYZA4IKBj51LCWBC0bUe0BHfWv3qb4nXMLbAExnbWUWFSPbVwNTPUS6herRo9aFtF7 3FyRF2jzdK2YU3FzpDz2ZIn1VrTOiTQlbdZZugrNGs9l7+aeddwu4EjyM1AvGYPOCAf+ cyMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version:dkim-signature; bh=YBpraMOB41OHReGvJGci8OcFdb27Lxk7K++XjkDwYO0=; b=ifr3KalAPhoYejEkGv5LK6TiZZJVFqSubwCHY+D45J1wXRrombht/+9uULJY39n4d4 oGWMLxOygK9Nr4eEQQwwTzTFsLTakr0AsC3rX3ziGjmLApcJt8yHt2mj8Sk4JoJo6XyT XUyR08a13qaQ/SeSrkUuJ+qEpI4ZlyLyG8KDLNTmUbAA5MmW32ZJLWg7daGNDrsYybv+ 36wjWD/cHvguBqPp2vmbr5MM3Gue3HW8/aDX9KLIxRMMgwG/9wHhjUm+fbajvvGKdbmB AOq3HN3DPxHMjzDBYAe4GlLryrkbSIXEps1uZSgrad385YphEkN/HD0H0kY4QW572wDK RgSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="B/3jDeGb"; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r14si4596928pfh.229.2018.11.30.00.59.04; Fri, 30 Nov 2018 00:59:18 -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=@kernel.org header.s=default header.b="B/3jDeGb"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727221AbeK3UHI (ORCPT + 99 others); Fri, 30 Nov 2018 15:07:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:37476 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726825AbeK3UHI (ORCPT ); Fri, 30 Nov 2018 15:07:08 -0500 Received: from localhost (unknown [104.132.0.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 24FD12081C; Fri, 30 Nov 2018 08:58:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543568311; bh=LF7Es7jHKRU0hrJttA457Z328c0KCI5D9cqtLvqQK7M=; h=To:From:In-Reply-To:Cc:References:Subject:Date:From; b=B/3jDeGbtUaK8+gypbwHBGmk8Pj6JmMh+e3k5pbLTpdxDGU2afY6yv4LBgIgq3s19 iLrq4GfoPXxe//pwVHZIcNEQh6TIMQ/qeHUSaMW1tFMEf0ADb9efGjvgrwidzPQG2i OlQAw9r8GPefOc2b6vFWV79wIhPG3tbyp/Kyzlb0= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: Janek Kotas From: Stephen Boyd In-Reply-To: <76BDCB72-CC05-41D1-93A0-6D71CBD97651@global.cadence.com> Cc: "mark.rutland@arm.com" , "mturquette@baylibre.com" , "robh+dt@kernel.org" , "linux-clk@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <154223394933.88331.14659021245427374668@swboyd.mtv.corp.google.com> <154353057449.88331.10017415440005548379@swboyd.mtv.corp.google.com> <76BDCB72-CC05-41D1-93A0-6D71CBD97651@global.cadence.com> Message-ID: <154356831048.88331.9290972200429107619@swboyd.mtv.corp.google.com> User-Agent: alot/0.7 Subject: Re: [PATCH 2/2] clk: Add Fixed MMIO clock driver Date: Fri, 30 Nov 2018 00:58:30 -0800 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Janek Kotas (2018-11-30 00:52:16) > = > We have a single register in a fixed location which contains = > the frequency of the main system clock. > This allows us to use the same image in emulation, FPGA > and simulation without any changes. > We usually don=E2=80=99t use a full bootloader, just a simple wra= pper, > which initializes the necessary stuff and jumps to the kernel. > = > = > So the hardware team has decided to throw a frequency register in the= re? > Alright! Does that fixed rate clk generate its fixed rate from some > other clk? I=E2=80=99m curious if this fixed rate clk has a parent so= urce. > = > = > It depends, in simulation and emulation we can just generate = > a clock source with a given frequency. > On FPGA it=E2=80=99s usually an external oscillator, sometimes a fixed PL= L. > The driver is not intended to be used in full, complex SoCs. Ok, sounds like it isn't worth modeling this then. > = > = > It would also be good to make sure that any clks registered from this > driver can't be populated from regions of memory like DDR. Can you > confirm? I think it will fail, but it would be worth checking > = Please try this. > Yes I'd prefer a platform driver unless there's some reason it can't = be > done. We may need to have both in case this needs to be populated very > early, but if that isn=E2=80=99t the case then just a platform driver= for now. > = > = > I played with it a bit, and it and it looks like I need both. > We use this clock source with some of our components, = > and for some of them the platform driver was initialized too late. > = Ok. So do both then.