From patchwork Sat May 25 21:32:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Baker X-Patchwork-Id: 2614251 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork2.kernel.org (Postfix) with ESMTP id 1F1D0DF2A2 for ; Sat, 25 May 2013 21:32:51 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UgM4u-0007kd-PQ; Sat, 25 May 2013 21:32:40 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UgM4s-0006RY-17; Sat, 25 May 2013 21:32:38 +0000 Received: from anakin.london.02.net ([87.194.255.134]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UgM4l-0006RE-OY for linux-arm-kernel@lists.infradead.org; Sat, 25 May 2013 21:32:33 +0000 Received: from debian.baker-net.org.uk (188.222.116.57) by anakin.london.02.net (8.5.140) id 50D100E102D90A69; Sat, 25 May 2013 22:32:05 +0100 Received: from [192.168.0.143] (gromit.baker-net.org.uk [192.168.0.143]) by debian.baker-net.org.uk (Postfix) with ESMTPS id 89DE0CD44B0; Sat, 25 May 2013 22:32:05 +0100 (BST) Message-ID: <51A12DD4.9010907@baker-net.org.uk> Date: Sat, 25 May 2013 22:32:04 +0100 From: Adam Baker User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: linux ARM , Andrew Lunn Subject: Kirkwood CPU Freq driver X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130525_173231_990033_D1180825 X-CRM114-Status: GOOD ( 12.20 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [87.194.255.134 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Hi, I've been trying to test Andrew Lunn's work creating a CPU Idle driver for Kirkwood. The first problem I encountered was that somehow in merging the patch the ARCH_HAS_CPUFREQ line appears to have got lost in arch/arm/Kconfig so I put that back (this may not be an issue if you build a multiarch kernel but I was targetting just Kirkwood) (Yes I know Thunderbird has mangled the wordwrap in the patch but as I'm only providing it as a description of what I did not to be applied I won't beat it into submission this time) As nothing seems to depend upon it I went with the CPU compatible type as defined in Documentation/devicetree/bindings/arm/cpus.txt rather than the marvell,sheeva-88SV131 in Documentation/devicetree/bindings/arm/kirkwood.txt I tried putting some debug code in kirkwood_cpufreq_probe() and it doesn't appear to be getting called. Have I a) misunderstood what kirkwood variants this driver is supposed to work with b) manged my CPU definition so it doesn't work or c) missed some other critical configuration step? Many thanks Adam Tested-by: Adam Baker --- a/arch/arm/Kconfig 2013-05-24 19:45:59.000000000 +0100 +++ b/arch/arm/Kconfig 2013-05-17 19:58:21.000000000 +0100 @@ -567,6 +567,7 @@ config ARCH_DOVE config ARCH_KIRKWOOD bool "Marvell Kirkwood" + select ARCH_HAS_CPUFREQ select ARCH_REQUIRE_GPIOLIB select CPU_FEROCEON select GENERIC_CLOCKEVENTS Then I saw that the driver needs a cpu definition and none of the kirkwood dts files provide one. I believe all kirkwood SoCs are uniprocessor so I created an entry in kirkwood.dtsi --- a/arch/arm/boot/dts/kirkwood.dtsi 2013-05-19 22:57:07.000000000 +0100 +++ b/arch/arm/boot/dts/kirkwood.dtsi 2013-05-19 23:10:32.000000000 +0100 @@ -4,6 +4,18 @@ compatible = "marvell,kirkwood"; interrupt-parent = <&intc>; + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + compatible = "marvell,feroceon"; + clocks = <&core_clk 1>, <&core_clk 3>, <&gate_clk 11>; + clock-names = "cpu_clk", "ddrclk", "powersave"; + }; + }; + aliases { gpio0 = &gpio0; gpio1 = &gpio1;