Skip to contentSkip to conversation

Allow MSM DT platforms to be built multi-platform

PATCH Superseded Stephen Boyd 3 participants 9 messages Dec 4, 2013 – Dec 10, 2013

Subsystems (5)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Allow MSM DT platforms to be built multi-platform

These patches allow the MSM code to be built as part of the multi-platform kernel. To be fully functional you need the first patch from Ivan's series[1] so that the usb-phy driver doesn't use mach specific APIs. I'm hoping that we can send these all through arm-soc so driver maintainers please ack the first two changes.

Stephen Boyd (5):
mmc: msm_sdcc: Limit driver to platforms that use it
tty: serial: Limit msm_serial_hs driver to platforms that use it
ARM: msm: Only build clock.c on proc_comm based platforms
ARM: msm: Only build timer.c if required
ARM: msm: Move MSM's DT based hardware to multi-platform support

 arch/arm/Kconfig           |  4 +--
 arch/arm/mach-msm/Kconfig  | 66 ++++++++++++++++++++++++++++------------------
 arch/arm/mach-msm/Makefile |  4 +--
 drivers/mmc/host/Kconfig   |  2 +-
 drivers/tty/serial/Kconfig |  2 +-
 5 files changed, 46 insertions(+), 32 deletions(-)

[1] https://lkml.org/lkml/2013/11/12/722

Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
#1 lore raw

PATCH 1/5 mmc: msm_sdcc: Limit driver to platforms that use it

The msm_sdcc driver uses mach specific dma APIs. This is not compatible with the multi-platform ARM effort. Let's only compile this driver on MSM devices that are prepared to support it, allowing the DT based MSM devices to enter the multi-platform ARM build.

---
 drivers/mmc/host/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/Kconfig +1 -1
index 7fc5099..4e8ca9d 100644
@@ -324,7 +324,7 @@ config MMC_ATMELMCI
 
 config MMC_MSM
 	tristate "Qualcomm SDCC Controller Support"
-	depends on MMC && ARCH_MSM
+	depends on MMC && (ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50)
 	help
 	  This provides support for the SD/MMC cell found in the
 	  MSM and QSD SOCs from Qualcomm. The controller also has
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
#3 lore raw

PATCH 2/5 tty: serial: Limit msm_serial_hs driver to platforms that use it

In reply to Stephen Boyd

The msm_serial_hs driver uses mach specific dma APIs. This is not compatible with the multi-platform ARM effort. Let's only compile this driver on MSM devices that are prepared to support it; allowing the DT based MSM devices to enter the multi-platform ARM build.

Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/tty/serial/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/Kconfig +1 -1
index a3817ab..a53159c 100644
@@ -1035,7 +1035,7 @@ config SERIAL_MSM_CONSOLE
 
 config SERIAL_MSM_HS
 	tristate "MSM UART High Speed: Serial Driver"
-	depends on ARCH_MSM
+	depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50
 	select SERIAL_CORE
 	help
 	  If you have a machine based on MSM family of SoCs, you
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
#5 lore raw

PATCH 3/5 ARM: msm: Only build clock.c on proc_comm based platforms

In reply to Stephen Boyd

The functionality provided by clock.c in mach-msm is only needed on proc_comm based platforms. Only build the file if proc_comm is enabled. This prevents compile failures for platforms that are part of the multi-platform kernel.

---
 arch/arm/mach-msm/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-msm/Makefile +1 -1
index 7ed4c1b..6baae6e 100644
@@ -1,5 +1,5 @@
 obj-y += timer.o
-obj-y += clock.o
+obj-$(CONFIG_MSM_PROC_COMM) += clock.o
 
 obj-$(CONFIG_MSM_VIC) += irq-vic.o
 
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
#6 lore raw

PATCH 4/5 ARM: msm: Only build timer.c if required

In reply to Stephen Boyd

The MSM timer is only used on MSM devices that don't have the architected timers. Introduce a hidden Kconfig option for this driver so that we don't build it on the platforms that don't need it.

---
 arch/arm/mach-msm/Kconfig  | 9 +++++++++
 arch/arm/mach-msm/Makefile | 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)
arch/arm/mach-msm/Kconfig +9 -0
index 2586c28..47cd2df 100644
@@ -16,6 +16,7 @@ config ARCH_MSM7X00A
 	select MACH_TROUT if !MACH_HALIBUT
 	select MSM_PROC_COMM
 	select MSM_SMD
+	select MSM_TIMER
 	select MSM_SMD_PKG3
 
 config ARCH_MSM7X30
@@ -27,6 +28,7 @@ config ARCH_MSM7X30
 	select MSM_GPIOMUX
 	select MSM_PROC_COMM
 	select MSM_SMD
+	select MSM_TIMER
 	select MSM_VIC
 
 config ARCH_QSD8X50
@@ -38,6 +40,7 @@ config ARCH_QSD8X50
 	select MSM_GPIOMUX
 	select MSM_PROC_COMM
 	select MSM_SMD
+	select MSM_TIMER
 	select MSM_VIC
 
 endchoice
@@ -49,6 +52,7 @@ config ARCH_MSM8X60
 	select GPIO_MSM_V2
 	select HAVE_SMP
 	select MSM_SCM if SMP
+	select MSM_TIMER
 
 config ARCH_MSM8960
 	bool "MSM8960"
@@ -57,6 +61,7 @@ config ARCH_MSM8960
 	select HAVE_SMP
 	select GPIO_MSM_V2
 	select MSM_SCM if SMP
+	select MSM_TIMER
 
 config ARCH_MSM_DT
 	def_bool y
@@ -134,4 +139,8 @@ config MSM_GPIOMUX
 
 config MSM_SCM
 	bool
+
+config MSM_TIMER
+	bool
+
 endif
arch/arm/mach-msm/Makefile +1 -1
index 6baae6e..8e307a10 100644
@@ -1,4 +1,4 @@
-obj-y += timer.o
+obj-$(CONFIG_MSM_TIMER) += timer.o
 obj-$(CONFIG_MSM_PROC_COMM) += clock.o
 
 obj-$(CONFIG_MSM_VIC) += irq-vic.o
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
#7 lore raw

PATCH 5/5 ARM: msm: Move MSM's DT based hardware to multi-platform support

In reply to Stephen Boyd

The DT based MSM platforms can join the multi-platform builds, so introduce a DT based ARCH_MSM option. This option allows DT based MSM platforms to be built into the multi-platform kernel. Also introduce a hidden ARCH_MSM config that both the DT and non-DT platform support code select to avoid churn in places that depend on CONFIG_ARCH_MSM.

---
 arch/arm/Kconfig          |  4 ++--
 arch/arm/mach-msm/Kconfig | 61 +++++++++++++++++++++++++----------------------
 2 files changed, 35 insertions(+), 30 deletions(-)
arch/arm/Kconfig +2 -2
index 603d661..d056118 100644
@@ -630,10 +630,10 @@ config ARCH_PXA
 	help
 	  Support for Intel/Marvell's PXA2xx/PXA3xx processor line.
 
-config ARCH_MSM
+config ARCH_MSM_NODT
 	bool "Qualcomm MSM"
+	select ARCH_MSM
 	select ARCH_REQUIRE_GPIOLIB
-	select CLKSRC_OF if OF
 	select COMMON_CLK
 	select GENERIC_CLOCKEVENTS
 	help
arch/arm/mach-msm/Kconfig +33 -28

89 lines not on this page · raw message

Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
maintainer Acked-by on v1 2/5
#4 lore raw

Re: [PATCH 2/5] tty: serial: Limit msm_serial_hs driver to platforms that use it

In reply to Stephen Boyd
Quoted 8 lines · Stephen Boyd

The msm_serial_hs driver uses mach specific dma APIs. This is not compatible with the multi-platform ARM effort. Let's only compile this driver on MSM devices that are prepared to support it; allowing the DT based MSM devices to enter the multi-platform ARM build.

Cc Greg Kroah-Hartman <[email protected]>
Acked-by on v1 5/5
#8 lore raw

Re: [PATCH 5/5] ARM: msm: Move MSM's DT based hardware to multi-platform support

In reply to Stephen Boyd
Quoted 9 lines · Stephen Boyd

The DT based MSM platforms can join the multi-platform builds, so introduce a DT based ARCH_MSM option. This option allows DT based MSM platforms to be built into the multi-platform kernel. Also introduce a hidden ARCH_MSM config that both the DT and non-DT platform support code select to avoid churn in places that depend on CONFIG_ARCH_MSM.

Nice!

#2 lore raw

Re: [PATCH 1/5] mmc: msm_sdcc: Limit driver to platforms that use it

In reply to Stephen Boyd
Quoted 9 lines · Stephen Boyd

The msm_sdcc driver uses mach specific dma APIs. This is not compatible with the multi-platform ARM effort. Let's only compile this driver on MSM devices that are prepared to support it, allowing the DT based MSM devices to enter the multi-platform ARM build.

---

Chris, can you please ack/review this change?

Quoted 16 lines
 drivers/mmc/host/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/Kconfig +1 -1
index 7fc5099..4e8ca9d 100644
@@ -324,7 +324,7 @@ config MMC_ATMELMCI
 
 config MMC_MSM
 	tristate "Qualcomm SDCC Controller Support"
-	depends on MMC && ARCH_MSM
+	depends on MMC && (ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50)
 	help
 	  This provides support for the SD/MMC cell found in the
 	  MSM and QSD SOCs from Qualcomm. The controller also has
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation