Skip to contentSkip to conversation

Split mach-msm into legacy and mach-qcom (multiplatform)

PATCH Superseded Kumar Gala 2 participants 15 messages Feb 4, 2014 – Feb 7, 2014

Subsystems (7)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

v2 cover Split mach-msm into legacy and mach-qcom (multiplatform)

This is the splits the Qualcomm MSM platform into legacy support that we will not try and convert to multiplatform and multiplatform support.

- k

Changes from v1:
* Added patch to remove hotplug.c
* Added patch to rename msm_ to qcom_
* Changes the Kconfig to drop CPU_V7
* used wfi() in cpu_die function
* Added git tree to MAINTAINERS file

Kumar Gala (5):
ARM: msm: kill off hotplug.c
clocksource: qcom: Move clocksource code out of mach-msm
arm: qcom: Split Qualcomm support into legacy and multiplatform
clocksource: qcom: split building of legacy vs multiplatform support
ARM: qcom: Rename various msm prefixed functions to qcom

 arch/arm/mach-msm/board-dt.c       |   41 ----
 arch/arm/mach-msm/hotplug.c        |   51 -----
 arch/arm/mach-msm/platsmp.c        |  130 --------------
 arch/arm/mach-msm/scm-boot.c       |   39 ----
 arch/arm/mach-msm/scm-boot.h       |   22 --
 arch/arm/mach-msm/scm.c            |  299 ---------------------------------
 arch/arm/mach-msm/scm.h            |   25 --
 arch/arm/mach-msm/timer.c          |  333 -------------------------------------
 b/MAINTAINERS                      |    8 
 b/arch/arm/Kconfig                 |    7 
 b/arch/arm/Kconfig.debug           |    2 
 b/arch/arm/Makefile                |    1 
 b/arch/arm/boot/dts/Makefile       |    6 
 b/arch/arm/mach-msm/Kconfig        |   54 ------
 b/arch/arm/mach-msm/Makefile       |    8 
 b/arch/arm/mach-msm/common.h       |    1 
 b/arch/arm/mach-qcom/Kconfig       |   33 +++
 b/arch/arm/mach-qcom/Makefile      |    5 
 b/arch/arm/mach-qcom/board.c       |   40 ++++
 b/arch/arm/mach-qcom/scm-boot.c    |   39 ++++
 b/arch/arm/mach-qcom/scm-boot.h    |   22 ++
 b/arch/arm/mach-qcom/scm.c         |  299 +++++++++++++++++++++++++++++++++
 b/arch/arm/mach-qcom/scm.h         |   25 ++
 b/arch/arm/mach-qcom/smp.c         |  137 +++++++++++++++
 b/drivers/clocksource/Kconfig      |    4 
 b/drivers/clocksource/Makefile     |    1 
 b/drivers/clocksource/qcom-timer.c |  330 ++++++++++++++++++++++++++++++++++++
 27 files changed, 957 insertions(+), 1005 deletions(-)
author
#1 lore raw

PATCH v2 1/5 ARM: msm: kill off hotplug.c

Right now hotplug.c only really implements msm_cpu_die as a wfi. Just move that implementation into platsmp.c. At the same time we use the existing wfi() instead of inline asm.

---
 arch/arm/mach-msm/Makefile  |  1 -
 arch/arm/mach-msm/common.h  |  1 -
 arch/arm/mach-msm/hotplug.c | 51 ---------------------------------------------
 arch/arm/mach-msm/platsmp.c |  7 +++++++
 4 files changed, 7 insertions(+), 53 deletions(-)
 delete mode 100644 arch/arm/mach-msm/hotplug.c
arch/arm/mach-msm/Makefile +0 -1
index 721f27f..8327f60 100644
@@ -18,7 +18,6 @@ obj-$(CONFIG_MSM_SCM) += scm.o scm-boot.o
 
 CFLAGS_scm.o :=$(call as-instr,.arch_extension sec,-DREQUIRES_SEC=1)
 
-obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
 obj-$(CONFIG_SMP) += platsmp.o
 
 obj-$(CONFIG_MACH_TROUT) += board-trout.o board-trout-gpio.o board-trout-mmc.o devices-msm7x00.o
arch/arm/mach-msm/common.h +0 -1
index 33c7725..0a4899b 100644
@@ -24,7 +24,6 @@ extern void __iomem *__msm_ioremap_caller(phys_addr_t phys_addr, size_t size,
 					  unsigned int mtype, void *caller);
 
 extern struct smp_operations msm_smp_ops;
-extern void msm_cpu_die(unsigned int cpu);
 
 struct msm_mmc_platform_data;
 
arch/arm/mach-msm/hotplug.c deleted +0 -51

51 lines not on this page · raw message

arch/arm/mach-msm/platsmp.c +7 -0
index 3721b31..251a91e 100644
@@ -29,6 +29,13 @@ extern void secondary_startup(void);
 
 static DEFINE_SPINLOCK(boot_lock);
 
+#ifdef CONFIG_HOTPLUG_CPU
+static void __ref msm_cpu_die(unsigned int cpu)
+{
+	wfi();
+}
+#endif
+
 static inline int get_core_count(void)
 {
 	/* 1 + the PART[1:0] field of MIDR */
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
#2 lore raw

Re: [PATCH v2 1/5] ARM: msm: kill off hotplug.c

arch/arm/mach-msm/platsmp.c extern void secondary_startup(void); · line 33

Quoted 10 lines · Kumar Gala
arch/arm/mach-msm/platsmp.c +2 -0
index 3721b31..251a91e 100644
@@ -29,6 +29,13 @@ extern void secondary_startup(void);
 
 static DEFINE_SPINLOCK(boot_lock);
 
+#ifdef CONFIG_HOTPLUG_CPU
+static void __ref msm_cpu_die(unsigned int cpu)

We shouldn't need __ref anymore either right?

Quoted 8 lines
arch/arm/mach-msm/platsmp.c +5 -0
+{
+	wfi();
+}
+#endif
+
 static inline int get_core_count(void)
 {
 	/* 1 + the PART[1:0] field of MIDR */
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
author
#3 lore raw

Re: [PATCH v2 1/5] ARM: msm: kill off hotplug.c

Quoted 7 lines · Stephen Boyd
Quoted 6 lines · Kumar Gala
arch/arm/mach-msm/platsmp.c +0 -0
index 3721b31..251a91e 100644
@@ -29,6 +29,13 @@ extern void secondary_startup(void);
 
Quoted 6 lines

arch/arm/mach-msm/platsmp.c extern void secondary_startup(void); · line 33

Quoted 4 lines
arch/arm/mach-msm/platsmp.c +2 -0
 static DEFINE_SPINLOCK(boot_lock);
 
+#ifdef CONFIG_HOTPLUG_CPU
+static void __ref msm_cpu_die(unsigned int cpu)

We shouldn't need __ref anymore either right?

I think we might as cpu_die is still marked __ref so I think we need it.

Quoted 16 lines
Quoted 9 lines
arch/arm/mach-msm/platsmp.c +5 -0
+{
+	wfi();
+}
+#endif
+
 static inline int get_core_count(void)
 {
 	/* 1 + the PART[1:0] field of MIDR */
Signature · 6 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
#4 lore raw

Re: [PATCH v2 1/5] ARM: msm: kill off hotplug.c

Quoted 10 lines · Kumar Gala
Quoted 7 lines · Stephen Boyd
Quoted 6 lines · Kumar Gala
arch/arm/mach-msm/platsmp.c +0 -0
index 3721b31..251a91e 100644
@@ -29,6 +29,13 @@ extern void secondary_startup(void);
 
Quoted 9 lines
Quoted 6 lines

arch/arm/mach-msm/platsmp.c extern void secondary_startup(void); · line 33

Quoted 4 lines
arch/arm/mach-msm/platsmp.c +2 -0
 static DEFINE_SPINLOCK(boot_lock);
 
+#ifdef CONFIG_HOTPLUG_CPU
+static void __ref msm_cpu_die(unsigned int cpu)

We shouldn't need __ref anymore either right?

I think we might as cpu_die is still marked __ref so I think we need it.

Someone should remove __ref from cpu_die() as well. It was only ever there for __cpuinit but now that __cpuinit is gone it's useless.

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

PATCH v2 2/5 clocksource: qcom: Move clocksource code out of mach-msm

In reply to Kumar Gala

We intent to share the clocksource code for MSM platforms between legacy and multiplatform supported qcom SoCs.

---
 arch/arm/mach-msm/Kconfig        |  13 +-
 arch/arm/mach-msm/Makefile       |   1 -
 arch/arm/mach-msm/timer.c        | 333 ---------------------------------------
 drivers/clocksource/Kconfig      |   4 +
 drivers/clocksource/Makefile     |   1 +
 drivers/clocksource/qcom-timer.c | 329 ++++++++++++++++++++++++++++++++++++++
 6 files changed, 339 insertions(+), 342 deletions(-)
 delete mode 100644 arch/arm/mach-msm/timer.c
 create mode 100644 drivers/clocksource/qcom-timer.c
arch/arm/mach-msm/Kconfig +5 -8
index 9625cf3..3c4eca7 100644
@@ -21,7 +21,7 @@ config ARCH_MSM8X60
 	select CPU_V7
 	select HAVE_SMP
 	select MSM_SCM if SMP
-	select MSM_TIMER
+	select CLKSRC_QCOM
 
 config ARCH_MSM8960
 	bool "Enable support for MSM8960"
@@ -29,7 +29,7 @@ config ARCH_MSM8960
 	select CPU_V7
 	select HAVE_SMP
 	select MSM_SCM if SMP
-	select MSM_TIMER
+	select CLKSRC_QCOM
 
 config ARCH_MSM8974
 	bool "Enable support for MSM8974"
@@ -54,7 +54,7 @@ config ARCH_MSM7X00A
 	select MACH_TROUT if !MACH_HALIBUT
 	select MSM_PROC_COMM
 	select MSM_SMD
-	select MSM_TIMER
+	select CLKSRC_QCOM
 	select MSM_SMD_PKG3
 
 config ARCH_MSM7X30
@@ -66,7 +66,7 @@ config ARCH_MSM7X30
 	select MSM_GPIOMUX
 	select MSM_PROC_COMM
 	select MSM_SMD
-	select MSM_TIMER
+	select CLKSRC_QCOM
 	select MSM_VIC
 
 config ARCH_QSD8X50
@@ -78,7 +78,7 @@ config ARCH_QSD8X50
 	select MSM_GPIOMUX
 	select MSM_PROC_COMM
 	select MSM_SMD
-	select MSM_TIMER
+	select CLKSRC_QCOM
 	select MSM_VIC
 
 endchoice
@@ -153,7 +153,4 @@ config MSM_GPIOMUX
 config MSM_SCM
 	bool
 
-config MSM_TIMER
-	bool
-
 endif
arch/arm/mach-msm/Makefile +0 -1
index 8327f60..04b1bee 100644
@@ -1,4 +1,3 @@
-obj-$(CONFIG_MSM_TIMER) += timer.o
 obj-$(CONFIG_MSM_PROC_COMM) += clock.o
 
 obj-$(CONFIG_MSM_VIC) += irq-vic.o
arch/arm/mach-msm/timer.c deleted +0 -333

333 lines not on this page · raw message

drivers/clocksource/Kconfig +4 -0
index cd6950f..81caa16 100644
@@ -140,3 +140,7 @@ config VF_PIT_TIMER
 	bool
 	help
 	  Support for Period Interrupt Timer on Freescale Vybrid Family SoCs.
+
+config CLKSRC_QCOM
+	bool
+	depends on ARCH_MSM
drivers/clocksource/Makefile +1 -0
index c7ca50a..2e0c0cc 100644
@@ -32,6 +32,7 @@ obj-$(CONFIG_CLKSRC_EFM32)	+= time-efm32.o
 obj-$(CONFIG_CLKSRC_EXYNOS_MCT)	+= exynos_mct.o
 obj-$(CONFIG_CLKSRC_SAMSUNG_PWM)	+= samsung_pwm_timer.o
 obj-$(CONFIG_VF_PIT_TIMER)	+= vf_pit_timer.o
+obj-$(CONFIG_CLKSRC_QCOM)	+= qcom-timer.o
 
 obj-$(CONFIG_ARM_ARCH_TIMER)		+= arm_arch_timer.o
 obj-$(CONFIG_ARM_GLOBAL_TIMER)		+= arm_global_timer.o
drivers/clocksource/qcom-timer.c new file +329 -0

329 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
#6 lore raw

Re: [PATCH v2 2/5] clocksource: qcom: Move clocksource code out of mach-msm

Quoted 1 line · Kumar Gala

We intent to share the clocksource code for MSM platforms between legacy

s/intent/intend/

Quoted 10 lines

and multiplatform supported qcom SoCs.

drivers/clocksource/Kconfig +0 -0
index cd6950f..81caa16 100644

drivers/clocksource/Kconfig config VF_PIT_TIMER · line 146

Quoted 7 lines
drivers/clocksource/Kconfig +4 -0
@@ -140,3 +140,7 @@ config VF_PIT_TIMER
 	bool
 	help
 	  Support for Period Interrupt Timer on Freescale Vybrid Family SoCs.
+
+config CLKSRC_QCOM
+	bool
+	depends on ARCH_MSM

It would be a a little less noisy if you left this as MSM_TIMER (msm is all over the code in that file anyway). Also, why do we care about depending on ARCH_MSM here? This is a hidden Kconfig option anyway.

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

Re: [PATCH v2 2/5] clocksource: qcom: Move clocksource code out of mach-msm

Quoted 19 lines · Stephen Boyd
Quoted 1 line · Kumar Gala

We intent to share the clocksource code for MSM platforms between legacy

s/intent/intend/

Quoted 14 lines

and multiplatform supported qcom SoCs.

drivers/clocksource/Kconfig +1 -0
index cd6950f..81caa16 100644
@@ -140,3 +140,7 @@ config VF_PIT_TIMER
 	bool
 	help
 	  Support for Period Interrupt Timer on Freescale Vybrid Family SoCs.
+
Quoted 8 lines

drivers/clocksource/Kconfig config VF_PIT_TIMER · line 146

Quoted 3 lines
drivers/clocksource/Kconfig +3 -0
+config CLKSRC_QCOM
+	bool
+	depends on ARCH_MSM

It would be a a little less noisy if you left this as MSM_TIMER (msm is all over the code in that file anyway). Also, why do we care about depending on ARCH_MSM here? This is a hidden Kconfig option anyway.

I will drop the depends, but not sure what point in leaving this as MSM_TIMER.

- k

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

Re: [PATCH v2 2/5] clocksource: qcom: Move clocksource code out of mach-msm

Quoted 22 lines · Kumar Gala
Quoted 10 lines · Stephen Boyd
Quoted 9 lines · Kumar Gala
drivers/clocksource/Kconfig +1 -0
index cd6950f..81caa16 100644
@@ -140,3 +140,7 @@ config VF_PIT_TIMER
 	bool
 	help
 	  Support for Period Interrupt Timer on Freescale Vybrid Family SoCs.
+
Quoted 8 lines

drivers/clocksource/Kconfig config VF_PIT_TIMER · line 146

Quoted 3 lines
drivers/clocksource/Kconfig +3 -0
+config CLKSRC_QCOM
+	bool
+	depends on ARCH_MSM

It would be a a little less noisy if you left this as MSM_TIMER (msm is all over the code in that file anyway). Also, why do we care about depending on ARCH_MSM here? This is a hidden Kconfig option anyway.

Quoted 2 lines

I will drop the depends, but not sure what point in leaving this as MSM_TIMER.

Less changes to the Kconfig files if you do that. It's a minor thing.

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

PATCH v2 3/5 arm: qcom: Split Qualcomm support into legacy and multiplatform

In reply to Kumar Gala

Introduce a new mach-qcom that will support SoCs that intend to be multiplatform compatiable while keeping mach-msm to legacy SoC/board support that will not transition over to multiplatform.

As part of this, we move support for MSM8X60, MSM8960 and MSM8974 over to mach-qcom.

---
 MAINTAINERS                   |   8 ++
 arch/arm/Kconfig              |   7 +-
 arch/arm/Kconfig.debug        |   2 +-
 arch/arm/Makefile             |   1 +
 arch/arm/boot/dts/Makefile    |   6 +-
 arch/arm/mach-msm/Kconfig     |  45 +------
 arch/arm/mach-msm/Makefile    |   6 -
 arch/arm/mach-msm/board-dt.c  |  41 ------
 arch/arm/mach-msm/platsmp.c   | 137 -------------------
 arch/arm/mach-msm/scm-boot.c  |  39 ------
 arch/arm/mach-msm/scm-boot.h  |  22 ----
 arch/arm/mach-msm/scm.c       | 299 ------------------------------------------
 arch/arm/mach-msm/scm.h       |  25 ----
 arch/arm/mach-qcom/Kconfig    |  33 +++++
 arch/arm/mach-qcom/Makefile   |   5 +
 arch/arm/mach-qcom/board.c    |  40 ++++++
 arch/arm/mach-qcom/scm-boot.c |  39 ++++++
 arch/arm/mach-qcom/scm-boot.h |  22 ++++
 arch/arm/mach-qcom/scm.c      | 299 ++++++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-qcom/scm.h      |  25 ++++
 arch/arm/mach-qcom/smp.c      | 137 +++++++++++++++++++
 21 files changed, 619 insertions(+), 619 deletions(-)
 delete mode 100644 arch/arm/mach-msm/board-dt.c
 delete mode 100644 arch/arm/mach-msm/platsmp.c
 delete mode 100644 arch/arm/mach-msm/scm-boot.c
 delete mode 100644 arch/arm/mach-msm/scm-boot.h
 delete mode 100644 arch/arm/mach-msm/scm.c
 delete mode 100644 arch/arm/mach-msm/scm.h
 create mode 100644 arch/arm/mach-qcom/Kconfig
 create mode 100644 arch/arm/mach-qcom/Makefile
 create mode 100644 arch/arm/mach-qcom/board.c
 create mode 100644 arch/arm/mach-qcom/scm-boot.c
 create mode 100644 arch/arm/mach-qcom/scm-boot.h
 create mode 100644 arch/arm/mach-qcom/scm.c
 create mode 100644 arch/arm/mach-qcom/scm.h
 create mode 100644 arch/arm/mach-qcom/smp.c
MAINTAINERS +8 -0
index b2cf5cf..402be60 100644
@@ -1167,6 +1167,14 @@ L:	linux-arm-kernel at lists.infradead.org (moderated for non-subscribers)
 W:	http://www.arm.linux.org.uk/
 S:	Maintained
 
+ARM/QUALCOMM SUPPORT
+M:	Kumar Gala <[email protected]>
+M:	David Brown <[email protected]>
+L:	linux-arm-msm at vger.kernel.org
+S:	Maintained
+F:	arch/arm/mach-qcom/
+T:	git git://git.kernel.org/pub/scm/linux/kernel/git/galak/linux-qcom.git
+
 ARM/RADISYS ENP2611 MACHINE SUPPORT
 M:	Lennert Buytenhek <[email protected]>
 L:	linux-arm-kernel at lists.infradead.org (moderated for non-subscribers)
arch/arm/Kconfig +4 -3
index e254198..f093f20 100644
@@ -657,9 +657,8 @@ config ARCH_PXA
 	help
 	  Support for Intel/Marvell's PXA2xx/PXA3xx processor line.
 
-config ARCH_MSM_NODT
-	bool "Qualcomm MSM"
-	select ARCH_MSM
+config ARCH_MSM
+	bool "Qualcomm MSM (non-multiplatform)"
 	select ARCH_REQUIRE_GPIOLIB
 	select COMMON_CLK
 	select GENERIC_CLOCKEVENTS
@@ -1005,6 +1004,8 @@ source "arch/arm/plat-pxa/Kconfig"
 
 source "arch/arm/mach-mmp/Kconfig"
 
+source "arch/arm/mach-qcom/Kconfig"
+
 source "arch/arm/mach-realview/Kconfig"
 
 source "arch/arm/mach-rockchip/Kconfig"
arch/arm/Kconfig.debug +1 -1
index 0531da8..4491c7b 100644
@@ -956,7 +956,7 @@ config DEBUG_STI_UART
 
 config DEBUG_MSM_UART
 	bool
-	depends on ARCH_MSM
+	depends on ARCH_MSM || ARCH_QCOM
 
 config DEBUG_LL_INCLUDE
 	string
arch/arm/Makefile +1 -0
index 08a9ef5..51e5bed 100644
@@ -180,6 +180,7 @@ machine-$(CONFIG_ARCH_OMAP2PLUS)	+= omap2
 machine-$(CONFIG_ARCH_ORION5X)		+= orion5x
 machine-$(CONFIG_ARCH_PICOXCELL)	+= picoxcell
 machine-$(CONFIG_ARCH_PXA)		+= pxa
+machine-$(CONFIG_ARCH_QCOM)		+= qcom
 machine-$(CONFIG_ARCH_REALVIEW)		+= realview
 machine-$(CONFIG_ARCH_ROCKCHIP)		+= rockchip
 machine-$(CONFIG_ARCH_RPC)		+= rpc
arch/arm/boot/dts/Makefile +3 -3
index b9d6a8b..c9eaf1f 100644
@@ -118,9 +118,6 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-cloudbox.dtb \
 	kirkwood-ts219-6282.dtb
 dtb-$(CONFIG_ARCH_MARCO) += marco-evb.dtb
 dtb-$(CONFIG_ARCH_MOXART) += moxart-uc7112lx.dtb
-dtb-$(CONFIG_ARCH_MSM) += qcom-msm8660-surf.dtb \
-	qcom-msm8960-cdp.dtb \
-	qcom-apq8074-dragonboard.dtb
 dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \
 	armada-370-mirabox.dtb \
 	armada-370-netgear-rn102.dtb \
@@ -232,6 +229,9 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \
 	dra7-evm.dtb
 dtb-$(CONFIG_ARCH_ORION5X) += orion5x-lacie-ethernet-disk-mini-v2.dtb
 dtb-$(CONFIG_ARCH_PRIMA2) += prima2-evb.dtb
+dtb-$(CONFIG_ARCH_QCOM) += qcom-msm8660-surf.dtb \
+	qcom-msm8960-cdp.dtb \
+	qcom-apq8074-dragonboard.dtb
 dtb-$(CONFIG_ARCH_U8500) += ste-snowball.dtb \
 	ste-hrefprev60-stuib.dtb \
 	ste-hrefprev60-tvk.dtb \
arch/arm/mach-msm/Kconfig +2 -43

59 lines not on this page · raw message

arch/arm/mach-msm/Makefile +0 -6
index 04b1bee..27c078a 100644
@@ -13,17 +13,11 @@ obj-$(CONFIG_ARCH_QSD8X50) += dma.o io.o
 
 obj-$(CONFIG_MSM_SMD) += smd.o smd_debug.o
 obj-$(CONFIG_MSM_SMD) += last_radio_log.o
-obj-$(CONFIG_MSM_SCM) += scm.o scm-boot.o
-
-CFLAGS_scm.o :=$(call as-instr,.arch_extension sec,-DREQUIRES_SEC=1)
-
-obj-$(CONFIG_SMP) += platsmp.o
 
 obj-$(CONFIG_MACH_TROUT) += board-trout.o board-trout-gpio.o board-trout-mmc.o devices-msm7x00.o
 obj-$(CONFIG_MACH_TROUT) += board-trout.o board-trout-gpio.o board-trout-mmc.o board-trout-panel.o devices-msm7x00.o
 obj-$(CONFIG_MACH_HALIBUT) += board-halibut.o devices-msm7x00.o
 obj-$(CONFIG_ARCH_MSM7X30) += board-msm7x30.o devices-msm7x30.o
 obj-$(CONFIG_ARCH_QSD8X50) += board-qsd8x50.o devices-qsd8x50.o
-obj-$(CONFIG_ARCH_MSM_DT) += board-dt.o
 obj-$(CONFIG_MSM_GPIOMUX) += gpiomux.o
 obj-$(CONFIG_ARCH_QSD8X50) += gpiomux-8x50.o
arch/arm/mach-msm/board-dt.c deleted +0 -41

41 lines not on this page · raw message

arch/arm/mach-msm/platsmp.c deleted +0 -137

137 lines not on this page · raw message

arch/arm/mach-msm/scm-boot.c deleted +0 -39
deleted file mode 100644
index 45cee3e..0000000
@@ -1,39 +0,0 @@
-/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 and
- * only version 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- */
-
-#include <linux/module.h>
-#include <linux/slab.h>
-
-#include "scm.h"
-#include "scm-boot.h"
-
-/*
- * Set the cold/warm boot address for one of the CPU cores.
- */
-int scm_set_boot_addr(phys_addr_t addr, int flags)
-{
-	struct {
-		unsigned int flags;
-		phys_addr_t  addr;
-	} cmd;
-
-	cmd.addr = addr;
-	cmd.flags = flags;
-	return scm_call(SCM_SVC_BOOT, SCM_BOOT_ADDR,
-			&cmd, sizeof(cmd), NULL, 0);
-}
-EXPORT_SYMBOL(scm_set_boot_addr);
arch/arm/mach-msm/scm-boot.h deleted +0 -22
deleted file mode 100644
index 7be32ff..0000000
@@ -1,22 +0,0 @@
-/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 and
- * only version 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-#ifndef __MACH_SCM_BOOT_H
-#define __MACH_SCM_BOOT_H
-
-#define SCM_BOOT_ADDR			0x1
-#define SCM_FLAG_COLDBOOT_CPU1		0x1
-#define SCM_FLAG_WARMBOOT_CPU1		0x2
-#define SCM_FLAG_WARMBOOT_CPU0		0x4
-
-int scm_set_boot_addr(phys_addr_t addr, int flags);
-
-#endif
arch/arm/mach-msm/scm.c deleted +0 -299

299 lines not on this page · raw message

arch/arm/mach-msm/scm.h deleted +0 -25
deleted file mode 100644
index 00b31ea..0000000
@@ -1,25 +0,0 @@
-/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 and
- * only version 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-#ifndef __MACH_SCM_H
-#define __MACH_SCM_H
-
-#define SCM_SVC_BOOT			0x1
-#define SCM_SVC_PIL			0x2
-
-extern int scm_call(u32 svc_id, u32 cmd_id, const void *cmd_buf, size_t cmd_len,
-		void *resp_buf, size_t resp_len);
-
-#define SCM_VERSION(major, minor) (((major) << 16) | ((minor) & 0xFF))
-
-extern u32 scm_get_version(void);
-
-#endif
arch/arm/mach-qcom/Kconfig new file +33 -0
new file mode 100644
index 0000000..755b0db
@@ -0,0 +1,33 @@
+config ARCH_QCOM
+	bool "Qualcomm Support" if ARCH_MULTI_V7
+	select ARCH_REQUIRE_GPIOLIB
+	select CLKSRC_OF
+	select GENERIC_CLOCKEVENTS
+	select ARM_GIC
+	select HAVE_SMP
+	select QCOM_SCM if SMP
+	help
+	  Support for Qualcomm's devicetree based systems.
+
+if ARCH_QCOM
+
+menu "Qualcomm SoC Selection"
+
+config ARCH_MSM8X60
+	bool "Enable support for MSM8X60"
+	select CLKSRC_QCOM
+
+config ARCH_MSM8960
+	bool "Enable support for MSM8960"
+	select CLKSRC_QCOM
+
+config ARCH_MSM8974
+	bool "Enable support for MSM8974"
+	select HAVE_ARM_ARCH_TIMER
+
+endmenu
+
+config QCOM_SCM
+	bool
+
+endif
arch/arm/mach-qcom/Makefile new file +5 -0
new file mode 100644
index 0000000..c0ba0ef
@@ -0,0 +1,5 @@
+obj-y			:= board.o
+obj-$(CONFIG_SMP)	+= smp.o
+obj-$(CONFIG_QCOM_SCM)	+= scm.o scm-boot.o
+
+CFLAGS_scm.o :=$(call as-instr,.arch_extension sec,-DREQUIRES_SEC=1)
arch/arm/mach-qcom/board.c new file +40 -0
new file mode 100644
index 0000000..4529f6b
@@ -0,0 +1,40 @@
+/* Copyright (c) 2010-2014 The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include <linux/init.h>
+#include <linux/of.h>
+#include <linux/of_platform.h>
+
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+
+extern struct smp_operations msm_smp_ops;
+
+static const char * const qcom_dt_match[] __initconst = {
+	"qcom,msm8660-surf",
+	"qcom,msm8960-cdp",
+	NULL
+};
+
+static const char * const apq8074_dt_match[] __initconst = {
+	"qcom,apq8074-dragonboard",
+	NULL
+};
+
+DT_MACHINE_START(QCOM_DT, "Qualcomm (Flattened Device Tree)")
+	.smp = smp_ops(msm_smp_ops),
+	.dt_compat = qcom_dt_match,
+MACHINE_END
+
+DT_MACHINE_START(APQ_DT, "Qualcomm (Flattened Device Tree)")
+	.dt_compat = apq8074_dt_match,
+MACHINE_END
arch/arm/mach-qcom/scm-boot.c new file +39 -0
new file mode 100644
index 0000000..45cee3e
@@ -0,0 +1,39 @@
+/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ */
+
+#include <linux/module.h>
+#include <linux/slab.h>
+
+#include "scm.h"
+#include "scm-boot.h"
+
+/*
+ * Set the cold/warm boot address for one of the CPU cores.
+ */
+int scm_set_boot_addr(phys_addr_t addr, int flags)
+{
+	struct {
+		unsigned int flags;
+		phys_addr_t  addr;
+	} cmd;
+
+	cmd.addr = addr;
+	cmd.flags = flags;
+	return scm_call(SCM_SVC_BOOT, SCM_BOOT_ADDR,
+			&cmd, sizeof(cmd), NULL, 0);
+}
+EXPORT_SYMBOL(scm_set_boot_addr);
arch/arm/mach-qcom/scm-boot.h new file +22 -0
new file mode 100644
index 0000000..7be32ff
@@ -0,0 +1,22 @@
+/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+#ifndef __MACH_SCM_BOOT_H
+#define __MACH_SCM_BOOT_H
+
+#define SCM_BOOT_ADDR			0x1
+#define SCM_FLAG_COLDBOOT_CPU1		0x1
+#define SCM_FLAG_WARMBOOT_CPU1		0x2
+#define SCM_FLAG_WARMBOOT_CPU0		0x4
+
+int scm_set_boot_addr(phys_addr_t addr, int flags);
+
+#endif
arch/arm/mach-qcom/scm.c new file +299 -0

299 lines not on this page · raw message

arch/arm/mach-qcom/scm.h new file +25 -0
new file mode 100644
index 0000000..00b31ea
@@ -0,0 +1,25 @@
+/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+#ifndef __MACH_SCM_H
+#define __MACH_SCM_H
+
+#define SCM_SVC_BOOT			0x1
+#define SCM_SVC_PIL			0x2
+
+extern int scm_call(u32 svc_id, u32 cmd_id, const void *cmd_buf, size_t cmd_len,
+		void *resp_buf, size_t resp_len);
+
+#define SCM_VERSION(major, minor) (((major) << 16) | ((minor) & 0xFF))
+
+extern u32 scm_get_version(void);
+
+#endif
arch/arm/mach-qcom/smp.c new file +137 -0

137 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
#10 lore raw

Re: [PATCH v2 3/5] arm: qcom: Split Qualcomm support into legacy and multiplatform

Quoted 2 lines · Kumar Gala

Introduce a new mach-qcom that will support SoCs that intend to be multiplatform compatiable while keeping mach-msm to legacy SoC/board

s/compatiable/compatible/

Quoted 13 lines

support that will not transition over to multiplatform.

As part of this, we move support for MSM8X60, MSM8960 and MSM8974 over to mach-qcom.

arch/arm/mach-qcom/Kconfig new file +0 -0
new file mode 100644
index 0000000..755b0db

arch/arm/mach-qcom/Kconfig line 5

Quoted 5 lines
arch/arm/mach-qcom/Kconfig new file +5 -0
@@ -0,0 +1,33 @@
+config ARCH_QCOM
+	bool "Qualcomm Support" if ARCH_MULTI_V7
+	select ARCH_REQUIRE_GPIOLIB
+	select CLKSRC_OF
+	select GENERIC_CLOCKEVENTS

I wonder why this isn't part of CONFIG_ARCH_MULTIPLATFORM.

arch/arm/mach-qcom/Kconfig line 8

Quoted 3 lines
arch/arm/mach-qcom/Kconfig new file +3 -0
+	select ARM_GIC
+	select HAVE_SMP
+	select QCOM_SCM if SMP

Please sort this alphabetically.

arch/arm/mach-qcom/Makefile line 2

Quoted 13 lines
arch/arm/mach-qcom/Kconfig new file +5 -0
+	help
+	  Support for Qualcomm's devicetree based systems.
+
+if ARCH_QCOM
+
arch/arm/mach-qcom/Makefile new file +2 -0
new file mode 100644
index 0000000..c0ba0ef
@@ -0,0 +1,5 @@
+obj-y			:= board.o
+obj-$(CONFIG_SMP)	+= smp.o

Everyone else on ARM calls it platsmp.c. Why differ?

Quoted 3 lines
arch/arm/mach-qcom/Makefile new file +3 -0
+obj-$(CONFIG_QCOM_SCM)	+= scm.o scm-boot.o
+
+CFLAGS_scm.o :=$(call as-instr,.arch_extension sec,-DREQUIRES_SEC=1)
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
author
#11 lore raw

PATCH v2 4/5 clocksource: qcom: split building of legacy vs multiplatform support

In reply to Kumar Gala

The majority of the clocksource code for the Qualcomm platform is shared between newer (multiplatform) and older platforms. However there is a bit of code that isn't, so only build it for the appropriate config.

---
 drivers/clocksource/qcom-timer.c | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)
drivers/clocksource/qcom-timer.c +12 -11
index dca829e..e807acf 100644
@@ -106,15 +106,6 @@ static notrace cycle_t msm_read_timer_count(struct clocksource *cs)
 	return readl_relaxed(source_base + TIMER_COUNT_VAL);
 }
 
-static notrace cycle_t msm_read_timer_count_shift(struct clocksource *cs)
-{
-	/*
-	 * Shift timer count down by a constant due to unreliable lower bits
-	 * on some targets.
-	 */
-	return msm_read_timer_count(cs) >> MSM_DGT_SHIFT;
-}
-
 static struct clocksource msm_clocksource = {
 	.name	= "dg_timer",
 	.rating	= 300,
@@ -228,7 +219,7 @@ err:
 	sched_clock_register(msm_sched_clock_read, sched_bits, dgt_hz);
 }
 
-#ifdef CONFIG_OF
+#ifdef CONFIG_ARCH_QCOM
 static void __init msm_dt_timer_init(struct device_node *np)
 {
 	u32 freq;
@@ -281,7 +272,7 @@ static void __init msm_dt_timer_init(struct device_node *np)
 }
 CLOCKSOURCE_OF_DECLARE(kpss_timer, "qcom,kpss-timer", msm_dt_timer_init);
 CLOCKSOURCE_OF_DECLARE(scss_timer, "qcom,scss-timer", msm_dt_timer_init);
-#endif
+#else
 
 static int __init msm_timer_map(phys_addr_t addr, u32 event, u32 source,
 				u32 sts)
@@ -301,6 +292,15 @@ static int __init msm_timer_map(phys_addr_t addr, u32 event, u32 source,
 	return 0;
 }
 
+static notrace cycle_t msm_read_timer_count_shift(struct clocksource *cs)
+{
+	/*
+	 * Shift timer count down by a constant due to unreliable lower bits
+	 * on some targets.
+	 */
+	return msm_read_timer_count(cs) >> MSM_DGT_SHIFT;
+}
+
 void __init msm7x01_timer_init(void)
 {
 	struct clocksource *cs = &msm_clocksource;
@@ -327,3 +327,4 @@ void __init qsd8x50_timer_init(void)
 		return;
 	msm_timer_init(19200000 / 4, 32, 7, false);
 }
+#endif
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
author
#12 lore raw

PATCH v2 5/5 ARM: qcom: Rename various msm prefixed functions to qcom

In reply to Kumar Gala

As mach-qcom will support a number of different Qualcomm SoC platforms we replace the msm prefix on function names with qcom to be a bit more generic.

---
 arch/arm/mach-qcom/board.c |  4 ++--
 arch/arm/mach-qcom/smp.c   | 22 +++++++++++-----------
 2 files changed, 13 insertions(+), 13 deletions(-)
arch/arm/mach-qcom/board.c +2 -2
index 4529f6b..830f69c 100644
@@ -17,7 +17,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-extern struct smp_operations msm_smp_ops;
+extern struct smp_operations qcom_smp_ops;
 
 static const char * const qcom_dt_match[] __initconst = {
 	"qcom,msm8660-surf",
@@ -31,7 +31,7 @@ static const char * const apq8074_dt_match[] __initconst = {
 };
 
 DT_MACHINE_START(QCOM_DT, "Qualcomm (Flattened Device Tree)")
-	.smp = smp_ops(msm_smp_ops),
+	.smp = smp_ops(qcom_smp_ops),
 	.dt_compat = qcom_dt_match,
 MACHINE_END
 
arch/arm/mach-qcom/smp.c +11 -11
index 67823a7..9c53ea7 100644
@@ -30,7 +30,7 @@ extern void secondary_startup(void);
 static DEFINE_SPINLOCK(boot_lock);
 
 #ifdef CONFIG_HOTPLUG_CPU
-static void __ref msm_cpu_die(unsigned int cpu)
+static void __ref qcom_cpu_die(unsigned int cpu)
 {
 	wfi();
 }
@@ -42,7 +42,7 @@ static inline int get_core_count(void)
 	return ((read_cpuid_id() >> 4) & 3) + 1;
 }
 
-static void msm_secondary_init(unsigned int cpu)
+static void qcom_secondary_init(unsigned int cpu)
 {
 	/*
 	 * Synchronise with the boot thread.
@@ -70,7 +70,7 @@ static void prepare_cold_cpu(unsigned int cpu)
 				  "address\n");
 }
 
-static int msm_boot_secondary(unsigned int cpu, struct task_struct *idle)
+static int qcom_boot_secondary(unsigned int cpu, struct task_struct *idle)
 {
 	static int cold_boot_done;
 
@@ -108,7 +108,7 @@ static int msm_boot_secondary(unsigned int cpu, struct task_struct *idle)
  * does not support the ARM SCU, so just set the possible cpu mask to
  * NR_CPUS.
  */
-static void __init msm_smp_init_cpus(void)
+static void __init qcom_smp_init_cpus(void)
 {
 	unsigned int i, ncores = get_core_count();
 
@@ -122,16 +122,16 @@ static void __init msm_smp_init_cpus(void)
 		set_cpu_possible(i, true);
 }
 
-static void __init msm_smp_prepare_cpus(unsigned int max_cpus)
+static void __init qcom_smp_prepare_cpus(unsigned int max_cpus)
 {
 }
 
-struct smp_operations msm_smp_ops __initdata = {
-	.smp_init_cpus		= msm_smp_init_cpus,
-	.smp_prepare_cpus	= msm_smp_prepare_cpus,
-	.smp_secondary_init	= msm_secondary_init,
-	.smp_boot_secondary	= msm_boot_secondary,
+struct smp_operations qcom_smp_ops __initdata = {
+	.smp_init_cpus		= qcom_smp_init_cpus,
+	.smp_prepare_cpus	= qcom_smp_prepare_cpus,
+	.smp_secondary_init	= qcom_secondary_init,
+	.smp_boot_secondary	= qcom_boot_secondary,
 #ifdef CONFIG_HOTPLUG_CPU
-	.cpu_die		= msm_cpu_die,
+	.cpu_die		= qcom_cpu_die,
 #endif
 };
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
#13 lore raw
In reply to Kumar Gala
Quoted 11 lines · Kumar Gala

This is the splits the Qualcomm MSM platform into legacy support that we will not try and convert to multiplatform and multiplatform support.

- k

Changes from v1:
* Added patch to remove hotplug.c
* Added patch to rename msm_ to qcom_
* Changes the Kconfig to drop CPU_V7
* used wfi() in cpu_die function
* Added git tree to MAINTAINERS file

What's the plan for this series combined with my SMP series? It looks like this isn't based on those patches, so we'll have some conflicts with the msm to qcom rename but it should be fairly minor.

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
author
#14 lore raw
Quoted 13 lines · Stephen Boyd
Quoted 11 lines · Kumar Gala

This is the splits the Qualcomm MSM platform into legacy support that we will not try and convert to multiplatform and multiplatform support.

- k

Changes from v1:
* Added patch to remove hotplug.c
* Added patch to rename msm_ to qcom_
* Changes the Kconfig to drop CPU_V7
* used wfi() in cpu_die function
* Added git tree to MAINTAINERS file

Quoted 4 lines

What's the plan for this series combined with my SMP series? It looks like this isn't based on those patches, so we'll have some conflicts with the msm to qcom rename but it should be fairly minor.

I?ve rebased the smp patch series on top of this set, so will post the new version short (hopefully once we close on these).

- k

Signature · 2 lines
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation