Skip to contentSkip to conversation

firmware: qcom: scm: Move the scm driver to drivers/firmware

PATCH New Kumar Gala 1 participant 1 message Feb 27, 2015

Subsystems (4)
lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

PATCH 4/4 firmware: qcom: scm: Move the scm driver to drivers/firmware

Architectural changes in the ARM Linux kernel tree mandate the eventual removal of the mach-* directories. Move the scm driver to drivers/firmware and the scm header to include/linux to support that removal.

---
v2:
* Moved to -M style diff output
* Added in missing include of drivers/firmware/Kconfig into arch/arm/Kconfig

 MAINTAINERS                                             | 1 +
 arch/arm/Kconfig                                        | 2 ++
 arch/arm/mach-qcom/Kconfig                              | 3 ---
 arch/arm/mach-qcom/Makefile                             | 3 ---
 arch/arm/mach-qcom/platsmp.c                            | 2 +-
 drivers/firmware/Kconfig                                | 4 ++++
 drivers/firmware/Makefile                               | 2 ++
 arch/arm/mach-qcom/scm.c => drivers/firmware/qcom_scm.c | 2 +-
 arch/arm/mach-qcom/scm.h => include/linux/qcom_scm.h    | 0
 9 files changed, 11 insertions(+), 8 deletions(-)
 rename arch/arm/mach-qcom/scm.c => drivers/firmware/qcom_scm.c (99%)
 rename arch/arm/mach-qcom/scm.h => include/linux/qcom_scm.h (100%)
MAINTAINERS +1 -0
index ddc5a8c..beb8aa4 100644
@@ -1317,6 +1317,7 @@ L:	linux-soc at vger.kernel.org
 S:	Maintained
 F:	arch/arm/mach-qcom/
 F:	drivers/soc/qcom/
+F:	drivers/firmware/qcom_scm.c
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/galak/linux-qcom.git
 
 ARM/RADISYS ENP2611 MACHINE SUPPORT
arch/arm/Kconfig +2 -0
index 9f1f09a..7ffd151 100644
@@ -2160,6 +2160,8 @@ source "net/Kconfig"
 
 source "drivers/Kconfig"
 
+source "drivers/firmware/Kconfig"
+
 source "fs/Kconfig"
 
 source "arch/arm/Kconfig.debug"
arch/arm/mach-qcom/Kconfig +0 -3
index 48003ea..2256cd1 100644
@@ -22,7 +22,4 @@ config ARCH_MSM8974
 	bool "Enable support for MSM8974"
 	select HAVE_ARM_ARCH_TIMER
 
-config QCOM_SCM
-	bool
-
 endif
arch/arm/mach-qcom/Makefile +0 -3
index 10b6841..e324375 100644
@@ -1,5 +1,2 @@
 obj-y			:= board.o
 obj-$(CONFIG_SMP)	+= platsmp.o
-obj-$(CONFIG_QCOM_SCM)	+= scm.o
-
-CFLAGS_scm.o :=$(call as-instr,.arch_extension sec,-DREQUIRES_SEC=1)
arch/arm/mach-qcom/platsmp.c +1 -1
index 596e623..4b67e56 100644
@@ -17,10 +17,10 @@
 #include <linux/of_address.h>
 #include <linux/smp.h>
 #include <linux/io.h>
+#include <linux/qcom_scm.h>
 
 #include <asm/smp_plat.h>
 
-#include "scm.h"
 
 #define VDD_SC1_ARRAY_CLAMP_GFS_CTL	0x35a0
 #define SCSS_CPU1CORE_RESET		0x2d80
drivers/firmware/Kconfig +4 -0
index 41983883..6517132 100644
@@ -132,6 +132,10 @@ config ISCSI_IBFT
 	  detect iSCSI boot parameters dynamically during system boot, say Y.
 	  Otherwise, say N.
 
+config QCOM_SCM
+	bool
+	depends on ARM || ARM64
+
 source "drivers/firmware/google/Kconfig"
 source "drivers/firmware/efi/Kconfig"
 
drivers/firmware/Makefile +2 -0
index 5373dc5..3fdd391 100644
@@ -11,6 +11,8 @@ obj-$(CONFIG_DMIID)		+= dmi-id.o
 obj-$(CONFIG_ISCSI_IBFT_FIND)	+= iscsi_ibft_find.o
 obj-$(CONFIG_ISCSI_IBFT)	+= iscsi_ibft.o
 obj-$(CONFIG_FIRMWARE_MEMMAP)	+= memmap.o
+obj-$(CONFIG_QCOM_SCM)		+= qcom_scm.o
+CFLAGS_qcom_scm.o :=$(call as-instr,.arch_extension sec,-DREQUIRES_SEC=1)
 
 obj-$(CONFIG_GOOGLE_FIRMWARE)	+= google/
 obj-$(CONFIG_EFI)		+= efi/
drivers/firmware/qcom_scm.c renamed from arch/arm/mach-qcom/scm.c +1 -1
similarity index 99%
rename from arch/arm/mach-qcom/scm.c
rename to drivers/firmware/qcom_scm.c
index 3e0e334..6e7a72b 100644
@@ -21,11 +21,11 @@
 #include <linux/mutex.h>
 #include <linux/errno.h>
 #include <linux/err.h>
+#include <linux/qcom_scm.h>
 
 #include <asm/outercache.h>
 #include <asm/cacheflush.h>
 
-#include "scm.h"
 
 #define QCOM_SCM_ENOMEM		-5
 #define QCOM_SCM_EOPNOTSUPP	-4
include/linux/qcom_scm.h renamed from arch/arm/mach-qcom/scm.h +0 -0
similarity index 100%
rename from arch/arm/mach-qcom/scm.h
rename to include/linux/qcom_scm.h
Signature · 3 lines
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project