From patchwork Mon Aug 5 04:09:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olof Johansson X-Patchwork-Id: 2838522 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 235AC9F3B9 for ; Mon, 5 Aug 2013 04:24:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1D1C52016A for ; Mon, 5 Aug 2013 04:24:54 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DC82120165 for ; Mon, 5 Aug 2013 04:24:52 +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 1V6CL0-0006Yt-Mo; Mon, 05 Aug 2013 04:24:07 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V6CKh-0000sM-Gd; Mon, 05 Aug 2013 04:23:47 +0000 Received: from mail-pd0-f178.google.com ([209.85.192.178]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V6CKM-0000oy-SD for linux-arm-kernel@lists.infradead.org; Mon, 05 Aug 2013 04:23:28 +0000 Received: by mail-pd0-f178.google.com with SMTP id w10so2769187pde.9 for ; Sun, 04 Aug 2013 21:23:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=4wuuL3HUvX8ZupzW+aWqxozDxIdZszZ6UdDyt8kxGAE=; b=NeRFF1ziDYHApHZNj8PZE2wFjQCuGeCcaLWOfHyvprJJVWd2zd66ZFF/p6Be2KK2f4 NWxJ6bZU3z3oLNnYbiZuEt3+QIIWeF69Lh8ogpfUqdT1wH/f+b+lxhu9Gm2EIuYEgK0e d7+/enBZZrRpUp2uLO1ubzpxc11WUk4faqBs1m5iMmLZoWSITCwm2e3M/mieQZkaguXV TNDEZyTRzGqNEnvAFgFiS8DAZnYnXZnRzKBDeIZwrqMmg24HWtsiOEnOGiP5uCCd1Qxq ULrO2Yh8qQMpWuzLwgc26gANKucJ0ZpkgEyn5Z7PU3smWSwTeqOtVBo32IdVGP5k4TcK iMfg== X-Received: by 10.66.159.72 with SMTP id xa8mr23269512pab.38.1375676581773; Sun, 04 Aug 2013 21:23:01 -0700 (PDT) Received: from quad.lixom.net (173-13-129-225-sfba.hfc.comcastbusiness.net. [173.13.129.225]) by mx.google.com with ESMTPSA id ys4sm21383042pbb.9.2013.08.04.21.23.00 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 04 Aug 2013 21:23:00 -0700 (PDT) From: Olof Johansson To: Pawel Moll Subject: [PATCH 1/3] ARM: vexpress: move spc driver back under mach-vexpress Date: Sun, 4 Aug 2013 21:09:51 -0700 Message-Id: <1375675793-16492-2-git-send-email-olof@lixom.net> X-Mailer: git-send-email 1.8.1.192.gc4361b8 In-Reply-To: <1375675793-16492-1-git-send-email-olof@lixom.net> References: <1375675793-16492-1-git-send-email-olof@lixom.net> X-Gm-Message-State: ALoCoQkbJDi27U+c6nTp2ByHxcgIfU6nW47Q/COH/sy0r8+pi7y62xaIrrt8R7bqZtC849ltLL+V X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130805_002327_122138_189A81B3 X-CRM114-Status: GOOD ( 16.35 ) X-Spam-Score: -1.9 (-) Cc: Olof Johansson , Lorenzo Pieralisi , linux-arm-kernel@lists.infradead.org, nico@linaro.org 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: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Otherwise we have tc2_pm platform code calling into exported driver functions, which doesn't make sense at this level. Signed-off-by: Olof Johansson --- arch/arm/mach-vexpress/Makefile | 2 +- .../platform/vexpress => arch/arm/mach-vexpress}/spc.c | 1 - arch/arm/mach-vexpress/tc2_pm.c | 3 ++- drivers/platform/Kconfig | 3 --- drivers/platform/Makefile | 1 - drivers/platform/vexpress/Kconfig | 9 --------- drivers/platform/vexpress/Makefile | 1 - include/linux/vexpress.h | 17 ----------------- 8 files changed, 3 insertions(+), 34 deletions(-) rename {drivers/platform/vexpress => arch/arm/mach-vexpress}/spc.c (99%) delete mode 100644 drivers/platform/vexpress/Kconfig delete mode 100644 drivers/platform/vexpress/Makefile diff --git a/arch/arm/mach-vexpress/Makefile b/arch/arm/mach-vexpress/Makefile index 0853da6..36ea824 100644 --- a/arch/arm/mach-vexpress/Makefile +++ b/arch/arm/mach-vexpress/Makefile @@ -7,6 +7,6 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \ obj-y := v2m.o obj-$(CONFIG_ARCH_VEXPRESS_CA9X4) += ct-ca9x4.o obj-$(CONFIG_ARCH_VEXPRESS_DCSCB) += dcscb.o dcscb_setup.o -obj-$(CONFIG_ARCH_VEXPRESS_TC2_PM) += tc2_pm.o +obj-$(CONFIG_ARCH_VEXPRESS_TC2_PM) += tc2_pm.o spc.o obj-$(CONFIG_SMP) += platsmp.o obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o diff --git a/drivers/platform/vexpress/spc.c b/arch/arm/mach-vexpress/spc.c similarity index 99% rename from drivers/platform/vexpress/spc.c rename to arch/arm/mach-vexpress/spc.c index aa8c2a4..34e4bf4 100644 --- a/drivers/platform/vexpress/spc.c +++ b/arch/arm/mach-vexpress/spc.c @@ -250,4 +250,3 @@ int __init ve_spc_init(void) return ve_spc_init_status; } -early_initcall(ve_spc_init); diff --git a/arch/arm/mach-vexpress/tc2_pm.c b/arch/arm/mach-vexpress/tc2_pm.c index dfb55d4..79cf4bc 100644 --- a/arch/arm/mach-vexpress/tc2_pm.c +++ b/arch/arm/mach-vexpress/tc2_pm.c @@ -23,9 +23,10 @@ #include #include -#include #include +#include "spc.h" + /* * We can't use regular spinlocks. In the switcher case, it is possible * for an outbound CPU to call power_down() after its inbound counterpart diff --git a/drivers/platform/Kconfig b/drivers/platform/Kconfig index 449010e..57811ea 100644 --- a/drivers/platform/Kconfig +++ b/drivers/platform/Kconfig @@ -4,6 +4,3 @@ endif if GOLDFISH source "drivers/platform/goldfish/Kconfig" endif -if ARCH_VEXPRESS -source "drivers/platform/vexpress/Kconfig" -endif diff --git a/drivers/platform/Makefile b/drivers/platform/Makefile index c1173d6..8a44a4c 100644 --- a/drivers/platform/Makefile +++ b/drivers/platform/Makefile @@ -5,4 +5,3 @@ obj-$(CONFIG_X86) += x86/ obj-$(CONFIG_OLPC) += olpc/ obj-$(CONFIG_GOLDFISH) += goldfish/ -obj-$(CONFIG_ARCH_VEXPRESS) += vexpress/ diff --git a/drivers/platform/vexpress/Kconfig b/drivers/platform/vexpress/Kconfig deleted file mode 100644 index d09a7c4..0000000 --- a/drivers/platform/vexpress/Kconfig +++ /dev/null @@ -1,9 +0,0 @@ -config VEXPRESS_SPC - bool "Versatile Express SPC driver support" - help - The Serial Power Controller (SPC) for ARM Ltd. test chips, is - an IP that provides a memory mapped interface to power controller - HW. The driver provides an API abstraction meant to be used by - subsystem drivers allowing to program registers controlling - low-level power management features like power down flags, - global and per-cpu wake-up IRQs. diff --git a/drivers/platform/vexpress/Makefile b/drivers/platform/vexpress/Makefile deleted file mode 100644 index d31eca2..0000000 --- a/drivers/platform/vexpress/Makefile +++ /dev/null @@ -1 +0,0 @@ -obj-$(CONFIG_VEXPRESS_SPC) += spc.o diff --git a/include/linux/vexpress.h b/include/linux/vexpress.h index 3e35556..617c01b 100644 --- a/include/linux/vexpress.h +++ b/include/linux/vexpress.h @@ -124,21 +124,4 @@ void vexpress_osc_of_setup(struct device_node *node); void vexpress_clk_init(void __iomem *sp810_base); void vexpress_clk_of_init(void); -/* SPC */ - -#ifdef CONFIG_VEXPRESS_SPC -int __init ve_spc_init(void); -void ve_spc_global_wakeup_irq(bool set); -void ve_spc_cpu_wakeup_irq(u32 cluster, u32 cpu, bool set); -void ve_spc_set_resume_addr(u32 cluster, u32 cpu, u32 addr); -u32 ve_spc_get_nr_cpus(u32 cluster); -void ve_spc_powerdown(u32 cluster, bool enable); -#else -static inline int ve_spc_init(void) { return -ENODEV; } -static inline void ve_spc_global_wakeup_irq(bool set) { } -static inline void ve_spc_cpu_wakeup_irq(u32 cluster, u32 cpu, bool set) { } -static inline void ve_spc_set_resume_addr(u32 cluster, u32 cpu, u32 addr) { } -static inline u32 ve_spc_get_nr_cpus(u32 cluster) { return 0; } -static inline void ve_spc_powerdown(u32 cluster, bool enable) { } -#endif #endif