From patchwork Tue Dec 8 14:32:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 57881 Delivered-To: patch@linaro.org Received: by 10.112.147.194 with SMTP id tm2csp67178lbb; Tue, 8 Dec 2015 06:36:35 -0800 (PST) X-Received: by 10.66.139.234 with SMTP id rb10mr316901pab.82.1449585395467; Tue, 08 Dec 2015 06:36:35 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h71si5644412pfj.158.2015.12.08.06.36.35; Tue, 08 Dec 2015 06:36:35 -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; 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; dkim=neutral (body hash did not verify) header.i=@linaro-org.20150623.gappssmtp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756812AbbLHOgd (ORCPT + 28 others); Tue, 8 Dec 2015 09:36:33 -0500 Received: from mail-wm0-f47.google.com ([74.125.82.47]:34249 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933245AbbLHOeX (ORCPT ); Tue, 8 Dec 2015 09:34:23 -0500 Received: by wmvv187 with SMTP id v187so216293865wmv.1 for ; Tue, 08 Dec 2015 06:34:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=eUSlsMQn+gJYTCN+vgreV4EIIfwv+H16LCXF9/g/gqw=; b=G7FHBDBdg77GsFm1erb1rj8HYBg8AZvyjoVPTs3zn721a7WCyakhqfDTpxmmdkwGi8 U66toPx5ReVB6qF3RFgFGyocfZmKbkJQGvRagmQ/4JHDjrAwe/gpAUCH+CSKv2vTI5sy gVyX1Zck53k7eOW/m9serABbnNUk7cuIbTfu7gUsfo2ems0IOE0L8xWcJ0IkJS//9Mnu oD5NsNoQSnZbUhF24sIz6MShKZ7D6Hk1TjN0Xpc1aUCW8OU7bi/XxUMsAFRaJZV3QF1L H7jzWZUK1tsvMGHQ2kFYgHBZbg03jSQN1r1PUD/P9mLkiK8laX6be0g149h3gwIq2rpV 7BXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=eUSlsMQn+gJYTCN+vgreV4EIIfwv+H16LCXF9/g/gqw=; b=k2qsKz2LIInWgc820OTS12bxrWQBXL7kgfPuOctbXoWdAEX4iV7QfHOyp6+OBjujSl HDPdevom8lbOxL5qwaHm/fU141iglR9YZLW/q2mQKsdAb2jdsO15JblupBfQXt0r/kDC hHlAp1lttQULa5bnOI5dl1z3yG8nVo7UgmT9WIi53f9BjCn+a3LFWPzb7ZfD27Q+pdeC bSP2EBMmnzQtbThOzS48WTx5tBPUjV/XVXMDhjJI2B0J3jJX7+1IXeV8hvIzO8N9n2Wm vhB4SWw73bmZw7MmXr3EFttN0nQwAvvdTlvZoxUlcp8QQi2/PkDbRCSgSi5kL2kZ0S6S bGoQ== X-Gm-Message-State: ALoCoQk6bKA5r31EJswf0cIDq7ApPIhd/SCpfdpEdlHbOeSE7x5H4vFe1wgWwA3ohvLQKSat73kmud8c4dXao/0QHCNyIO2Tsg== X-Received: by 10.28.210.74 with SMTP id j71mr4730413wmg.96.1449585262247; Tue, 08 Dec 2015 06:34:22 -0800 (PST) Received: from localhost.localdomain (host81-129-169-67.range81-129.btcentralplus.com. [81.129.169.67]) by smtp.gmail.com with ESMTPSA id q6sm21710438wmd.8.2015.12.08.06.34.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 08 Dec 2015 06:34:21 -0800 (PST) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: kernel@stlinux.com, maxime.coquelin@st.com, viresh.kumar@linaro.org, linux-pm@vger.kernel.org, rjw@rjwysocki.net, devicetree@vger.kernel.org, ajitpal.singh@st.com, Lee Jones Subject: [PATCH v5 08/11] ARM: STi: Register CPUFreq device Date: Tue, 8 Dec 2015 14:32:01 +0000 Message-Id: <1449585124-15596-9-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1449585124-15596-1-git-send-email-lee.jones@linaro.org> References: <1449585124-15596-1-git-send-email-lee.jones@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org DT will not allow pseudo-devices. Only devices which represent real hardware are permitted. So we have to register the CPUFreq driver from platform code instead. Rather than create a new file, we're bundling this in with the SMP functionality and renaming it from 'smp' to the more generic 'cpu'. Signed-off-by: Lee Jones --- arch/arm/mach-sti/Makefile | 2 +- arch/arm/mach-sti/board-dt.c | 3 ++- arch/arm/mach-sti/{platsmp.c => cpu.c} | 17 +++++++++++++++-- arch/arm/mach-sti/{smp.h => cpu.h} | 1 + 4 files changed, 19 insertions(+), 4 deletions(-) rename arch/arm/mach-sti/{platsmp.c => cpu.c} (93%) rename arch/arm/mach-sti/{smp.h => cpu.h} (93%) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/arch/arm/mach-sti/Makefile b/arch/arm/mach-sti/Makefile index acb3309..caaeeaa 100644 --- a/arch/arm/mach-sti/Makefile +++ b/arch/arm/mach-sti/Makefile @@ -1,2 +1,2 @@ -obj-$(CONFIG_SMP) += platsmp.o headsmp.o +obj-$(CONFIG_SMP) += cpu.o headsmp.o obj-$(CONFIG_ARCH_STI) += board-dt.o diff --git a/arch/arm/mach-sti/board-dt.c b/arch/arm/mach-sti/board-dt.c index ae10fb2..60b23a7 100644 --- a/arch/arm/mach-sti/board-dt.c +++ b/arch/arm/mach-sti/board-dt.c @@ -12,7 +12,7 @@ #include #include -#include "smp.h" +#include "cpu.h" static const char *const stih41x_dt_match[] __initconst = { "st,stih415", @@ -31,4 +31,5 @@ DT_MACHINE_START(STM, "STiH415/416 SoC with Flattened Device Tree") L2C_AUX_CTRL_WAY_SIZE(4), .l2c_aux_mask = 0xc0000fff, .smp = smp_ops(sti_smp_ops), + .init_late = init_cpufreq, MACHINE_END diff --git a/arch/arm/mach-sti/platsmp.c b/arch/arm/mach-sti/cpu.c similarity index 93% rename from arch/arm/mach-sti/platsmp.c rename to arch/arm/mach-sti/cpu.c index c4ad6ea..335ecaf 100644 --- a/arch/arm/mach-sti/platsmp.c +++ b/arch/arm/mach-sti/cpu.c @@ -1,5 +1,5 @@ /* - * arch/arm/mach-sti/platsmp.c + * arch/arm/mach-sti/cpu.c * * Copyright (C) 2013 STMicroelectronics (R&D) Limited. * http://www.st.com @@ -13,6 +13,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ + #include #include #include @@ -21,13 +22,17 @@ #include #include #include +#include #include #include #include -#include "smp.h" +#include "cpu.h" +/** + * SMP Operations + */ static void write_pen_release(int val) { pen_release = val; @@ -161,3 +166,11 @@ struct smp_operations __initdata sti_smp_ops = { .smp_secondary_init = sti_secondary_init, .smp_boot_secondary = sti_boot_secondary, }; + +/** + * CPUFreq Registration + */ +void init_cpufreq(void) +{ + platform_device_register_simple("sti-cpufreq", -1, NULL, 0); +} diff --git a/arch/arm/mach-sti/smp.h b/arch/arm/mach-sti/cpu.h similarity index 93% rename from arch/arm/mach-sti/smp.h rename to arch/arm/mach-sti/cpu.h index ae22707..957c4d1 100644 --- a/arch/arm/mach-sti/smp.h +++ b/arch/arm/mach-sti/cpu.h @@ -15,5 +15,6 @@ extern struct smp_operations sti_smp_ops; void sti_secondary_startup(void); +extern void init_cpufreq(void); #endif