Skip to contentSkip to conversation

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

PATCH Superseded Kumar Gala 6 participants 16 messages Jan 30, 2014 – Feb 26, 2014

Subsystems (8)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

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

This is the starts of splitting the Qualcomm MSM platform into legacy support that we will not try and convert to multiplatform and multiplatform support. These patches are based on the 'CPU enable method based SMP' patches.

I wanted to get these out for review, will add a few more patches for defconfig updates/additions, as well as some additional driver being enabled for ARCH_QCOM.

- k

 arch/arm/mach-msm/board-dt.c       |   27 --
 arch/arm/mach-msm/hotplug.c        |   51 ----
 arch/arm/mach-msm/platsmp.c        |  371 ------------------------------------
 arch/arm/mach-msm/scm-boot.c       |   39 ---
 arch/arm/mach-msm/scm-boot.h       |   24 --
 arch/arm/mach-msm/scm.c            |  299 -----------------------------
 arch/arm/mach-msm/scm.h            |   25 --
 arch/arm/mach-msm/timer.c          |  333 --------------------------------
 b/MAINTAINERS                      |    7 
 b/arch/arm/Kconfig                 |    7 
 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-qcom/Kconfig       |   34 +++
 b/arch/arm/mach-qcom/Makefile      |    5 
 b/arch/arm/mach-qcom/board.c       |   26 ++
 b/arch/arm/mach-qcom/scm-boot.c    |   39 +++
 b/arch/arm/mach-qcom/scm-boot.h    |   24 ++
 b/arch/arm/mach-qcom/scm.c         |  299 +++++++++++++++++++++++++++++
 b/arch/arm/mach-qcom/scm.h         |   25 ++
 b/arch/arm/mach-qcom/smp.c         |  380 +++++++++++++++++++++++++++++++++++++
 b/drivers/clocksource/Kconfig      |    4 
 b/drivers/clocksource/Makefile     |    1 
 b/drivers/clocksource/qcom-timer.c |  330 ++++++++++++++++++++++++++++++++
 b/drivers/tty/serial/Kconfig       |    2 
 26 files changed, 1188 insertions(+), 1233 deletions(-)
author
#1 lore raw

PATCH 1/4 clocksource: qcom: Move clocksource code out of mach-msm

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 -
 drivers/clocksource/Kconfig                                 |  4 ++++
 drivers/clocksource/Makefile                                |  1 +
 .../mach-msm/timer.c => drivers/clocksource/qcom-timer.c    |  6 +-----
 5 files changed, 11 insertions(+), 14 deletions(-)
 rename arch/arm/mach-msm/timer.c => drivers/clocksource/qcom-timer.c (98%)
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 721f27f..4baff13 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
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 renamed from arch/arm/mach-msm/timer.c +1 -5
similarity index 98%
rename from arch/arm/mach-msm/timer.c
rename to drivers/clocksource/qcom-timer.c
index fd16449..dca829e 100644
@@ -1,7 +1,7 @@
 /*
  *
  * Copyright (C) 2007 Google, Inc.
- * Copyright (c) 2009-2012, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2009-2012,2014, The Linux Foundation. All rights reserved.
  *
  * This software is licensed under the terms of the GNU General Public
  * License version 2, as published by the Free Software Foundation, and
@@ -26,10 +26,6 @@
 #include <linux/of_irq.h>
 #include <linux/sched_clock.h>
 
-#include <asm/mach/time.h>
-
-#include "common.h"
-
 #define TIMER_MATCH_VAL			0x0000
 #define TIMER_COUNT_VAL			0x0004
 #define TIMER_ENABLE			0x0008
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
author
#2 lore raw

PATCH 2/4 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                                        |  7 +++
 arch/arm/Kconfig                                   |  7 +--
 arch/arm/Makefile                                  |  1 +
 arch/arm/boot/dts/Makefile                         |  6 +--
 arch/arm/mach-msm/Kconfig                          | 45 +------------------
 arch/arm/mach-msm/Makefile                         |  7 ---
 arch/arm/mach-msm/hotplug.c                        | 51 ----------------------
 arch/arm/mach-qcom/Kconfig                         | 34 +++++++++++++++
 arch/arm/mach-qcom/Makefile                        |  5 +++
 .../arm/{mach-msm/board-dt.c => mach-qcom/board.c} |  9 ++--
 arch/arm/{mach-msm => mach-qcom}/scm-boot.c        |  0
 arch/arm/{mach-msm => mach-qcom}/scm-boot.h        |  0
 arch/arm/{mach-msm => mach-qcom}/scm.c             |  0
 arch/arm/{mach-msm => mach-qcom}/scm.h             |  0
 arch/arm/{mach-msm/platsmp.c => mach-qcom/smp.c}   | 11 ++++-
 15 files changed, 70 insertions(+), 113 deletions(-)
 delete mode 100644 arch/arm/mach-msm/hotplug.c
 create mode 100644 arch/arm/mach-qcom/Kconfig
 create mode 100644 arch/arm/mach-qcom/Makefile
 rename arch/arm/{mach-msm/board-dt.c => mach-qcom/board.c} (71%)
 rename arch/arm/{mach-msm => mach-qcom}/scm-boot.c (100%)
 rename arch/arm/{mach-msm => mach-qcom}/scm-boot.h (100%)
 rename arch/arm/{mach-msm => mach-qcom}/scm.c (100%)
 rename arch/arm/{mach-msm => mach-qcom}/scm.h (100%)
 rename arch/arm/{mach-msm/platsmp.c => mach-qcom/smp.c} (97%)
MAINTAINERS +7 -0
index a31a6e3..1817078 100644
@@ -1174,6 +1174,13 @@ 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:	David Brown <[email protected]>
+M:	Kumar Gala <[email protected]>
+L:	linux-arm-msm at vger.kernel.org
+S:	Maintained
+F:	arch/arm/mach-qcom/
+
 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 dc6ef9a..9be7483 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/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 -7
index 4baff13..27c078a 100644
@@ -13,18 +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_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
 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/hotplug.c deleted +0 -51

51 lines not on this page · raw message

arch/arm/mach-qcom/Kconfig new file +34 -0
new file mode 100644
index 0000000..8830431
@@ -0,0 +1,34 @@
+config ARCH_QCOM
+	bool "Qualcomm Support" if ARCH_MULTI_V7
+	select ARCH_REQUIRE_GPIOLIB
+	select CLKSRC_OF
+	select GENERIC_CLOCKEVENTS
+	select ARM_GIC
+	select CPU_V7
+	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 renamed from arch/arm/mach-msm/board-dt.c +4 -5
similarity index 71%
rename from arch/arm/mach-msm/board-dt.c
rename to arch/arm/mach-qcom/board.c
index 1e3af2b..bae617e 100644
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2012,2013 The Linux Foundation. All rights reserved.
+/* 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
@@ -14,14 +14,13 @@
 
 #include <asm/mach/arch.h>
 
-static const char * const msm_dt_match[] __initconst = {
-	"qcom,msm8660-fluid",
+static const char * const qcom_dt_match[] __initconst = {
 	"qcom,msm8660-surf",
 	"qcom,msm8960-cdp",
 	"qcom,apq8074-dragonboard",
 	NULL
 };
 
-DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)")
-	.dt_compat = msm_dt_match,
+DT_MACHINE_START(QCOM_DT, "Qualcomm (Flattened Device Tree)")
+	.dt_compat = qcom_dt_match,
 MACHINE_END
arch/arm/mach-qcom/scm-boot.c renamed from arch/arm/mach-msm/scm-boot.c +0 -0
similarity index 100%
rename from arch/arm/mach-msm/scm-boot.c
rename to arch/arm/mach-qcom/scm-boot.c
arch/arm/mach-qcom/scm-boot.h renamed from arch/arm/mach-msm/scm-boot.h +0 -0
similarity index 100%
rename from arch/arm/mach-msm/scm-boot.h
rename to arch/arm/mach-qcom/scm-boot.h
arch/arm/mach-qcom/scm.c renamed from arch/arm/mach-msm/scm.c +0 -0
similarity index 100%
rename from arch/arm/mach-msm/scm.c
rename to arch/arm/mach-qcom/scm.c
arch/arm/mach-qcom/scm.h renamed from arch/arm/mach-msm/scm.h +0 -0
similarity index 100%
rename from arch/arm/mach-msm/scm.h
rename to arch/arm/mach-qcom/scm.h
arch/arm/mach-qcom/smp.c renamed from arch/arm/mach-msm/platsmp.c +10 -1
similarity index 97%
rename from arch/arm/mach-msm/platsmp.c
rename to arch/arm/mach-qcom/smp.c
index 42eb6b7..28364cb 100644
@@ -2,6 +2,7 @@
  *  Copyright (C) 2002 ARM Ltd.
  *  All Rights Reserved
  *  Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+ *  Copyright (c) 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 as
@@ -20,7 +21,6 @@
 #include <asm/smp_plat.h>
 
 #include "scm-boot.h"
-#include "common.h"
 
 #define VDD_SC1_ARRAY_CLAMP_GFS_CTL	0x35a0
 #define SCSS_CPU1CORE_RESET		0x2d80
@@ -48,6 +48,15 @@ extern void secondary_startup(void);
 
 static DEFINE_SPINLOCK(boot_lock);
 
+static void __ref msm_cpu_die(unsigned int cpu)
+{
+
+	asm("wfi"
+	    :
+	    :
+	    : "memory", "cc");
+}
+
 static void msm_secondary_init(unsigned int cpu)
 {
 	/*
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
#3 lore raw

Re: [PATCH 2/4] arm: qcom: Split Qualcomm support into legacy and multiplatform

Quoted 40 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 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                                        |  7 +++
 arch/arm/Kconfig                                   |  7 +--
 arch/arm/Makefile                                  |  1 +
 arch/arm/boot/dts/Makefile                         |  6 +--
 arch/arm/mach-msm/Kconfig                          | 45 +------------------
 arch/arm/mach-msm/Makefile                         |  7 ---
 arch/arm/mach-msm/hotplug.c                        | 51 ----------------------
 arch/arm/mach-qcom/Kconfig                         | 34 +++++++++++++++
 arch/arm/mach-qcom/Makefile                        |  5 +++
 .../arm/{mach-msm/board-dt.c => mach-qcom/board.c} |  9 ++--
 arch/arm/{mach-msm => mach-qcom}/scm-boot.c        |  0
 arch/arm/{mach-msm => mach-qcom}/scm-boot.h        |  0
 arch/arm/{mach-msm => mach-qcom}/scm.c             |  0
 arch/arm/{mach-msm => mach-qcom}/scm.h             |  0
 arch/arm/{mach-msm/platsmp.c => mach-qcom/smp.c}   | 11 ++++-
 15 files changed, 70 insertions(+), 113 deletions(-)
 delete mode 100644 arch/arm/mach-msm/hotplug.c
 create mode 100644 arch/arm/mach-qcom/Kconfig
 create mode 100644 arch/arm/mach-qcom/Makefile
 rename arch/arm/{mach-msm/board-dt.c => mach-qcom/board.c} (71%)
 rename arch/arm/{mach-msm => mach-qcom}/scm-boot.c (100%)
 rename arch/arm/{mach-msm => mach-qcom}/scm-boot.h (100%)
 rename arch/arm/{mach-msm => mach-qcom}/scm.c (100%)
 rename arch/arm/{mach-msm => mach-qcom}/scm.h (100%)
 rename arch/arm/{mach-msm/platsmp.c => mach-qcom/smp.c} (97%)
MAINTAINERS +0 -0
index a31a6e3..1817078 100644

MAINTAINERS L: linux-arm-kernel at lists.infradead.org (moderated for non-subscribers) · line 1182

Quoted 9 lines
MAINTAINERS +6 -0
@@ -1174,6 +1174,13 @@ 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:	David Brown <[email protected]>
+M:	Kumar Gala <[email protected]>
+L:	linux-arm-msm at vger.kernel.org
+S:	Maintained
+F:	arch/arm/mach-qcom/

Git repo? If you want us to apply patches for us we can do that, but if you prefer to run a tree and do pull requests then you should have an URL to it here.

-Olof

maintainer
#4 lore raw

Re: [PATCH 2/4] arm: qcom: Split Qualcomm support into legacy and multiplatform

In reply to Kumar Gala
Quoted 8 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 support that will not transition over to multiplatform.

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

Quoted 16 lines
---
 MAINTAINERS                                        |  7 +++
 arch/arm/Kconfig                                   |  7 +--
 arch/arm/Makefile                                  |  1 +
 arch/arm/boot/dts/Makefile                         |  6 +--
 arch/arm/mach-msm/Kconfig                          | 45 +------------------
 arch/arm/mach-msm/Makefile                         |  7 ---
 arch/arm/mach-msm/hotplug.c                        | 51 ----------------------
 arch/arm/mach-qcom/Kconfig                         | 34 +++++++++++++++
 arch/arm/mach-qcom/Makefile                        |  5 +++
 .../arm/{mach-msm/board-dt.c => mach-qcom/board.c} |  9 ++--
 arch/arm/{mach-msm => mach-qcom}/scm-boot.c        |  0
 arch/arm/{mach-msm => mach-qcom}/scm-boot.h        |  0
 arch/arm/{mach-msm => mach-qcom}/scm.c             |  0
 arch/arm/{mach-msm => mach-qcom}/scm.h             |  0
 arch/arm/{mach-msm/platsmp.c => mach-qcom/smp.c}   | 11 ++++-

The hotplug.c change sticks out as something that isn't just a move of code to another place, but deletion of unused code. It would be nice to split that out into a separate change, possibly together with the trivial board.c and smp.c changes.

Arnd

author
#5 lore raw

Re: [PATCH 2/4] arm: qcom: Split Qualcomm support into legacy and multiplatform

Quoted 26 lines · Arnd Bergmann
Quoted 9 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 support that will not transition over to multiplatform.

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

---

Quoted 15 lines
MAINTAINERS                                        |  7 +++
arch/arm/Kconfig                                   |  7 +--
arch/arm/Makefile                                  |  1 +
arch/arm/boot/dts/Makefile                         |  6 +--
arch/arm/mach-msm/Kconfig                          | 45 +------------------
arch/arm/mach-msm/Makefile                         |  7 ---
arch/arm/mach-msm/hotplug.c                        | 51 ----------------------
arch/arm/mach-qcom/Kconfig                         | 34 +++++++++++++++
arch/arm/mach-qcom/Makefile                        |  5 +++
.../arm/{mach-msm/board-dt.c => mach-qcom/board.c} |  9 ++--
arch/arm/{mach-msm => mach-qcom}/scm-boot.c        |  0
arch/arm/{mach-msm => mach-qcom}/scm-boot.h        |  0
arch/arm/{mach-msm => mach-qcom}/scm.c             |  0
arch/arm/{mach-msm => mach-qcom}/scm.h             |  0
arch/arm/{mach-msm/platsmp.c => mach-qcom/smp.c}   | 11 ++++-
Quoted 4 lines

The hotplug.c change sticks out as something that isn't just a move of code to another place, but deletion of unused code. It would be nice to split that out into a separate change, possibly together with the trivial board.c and smp.c changes.

That?s not 100% true, the hotplug.c code implemented msm_cpu_die, which moved into smp.c

I can split out scm*/smp* into a patch to enable smp if that is really desired, but not exactly sure what it gets us.

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

Re: [PATCH 2/4] arm: qcom: Split Qualcomm support into legacy and multiplatform

Quoted 9 lines · On Friday 31 January 2014 13:25:25 Kumar Gala wrote:
Quoted 4 lines

The hotplug.c change sticks out as something that isn't just a move of code to another place, but deletion of unused code. It would be nice to split that out into a separate change, possibly together with the trivial board.c and smp.c changes.

That?s not 100% true, the hotplug.c code implemented msm_cpu_die, which moved into smp.c

I can split out scm*/smp* into a patch to enable smp if that is really desired, but not exactly sure what it gets us.

It's not extremely important, I just prefer splitting patches that have any kind of functional change from trivial moves.

If something happens to break for an unforseen reason, it's easier to bisect to the patch that does the change.

Arnd

author
#7 lore raw

Re: [PATCH 2/4] arm: qcom: Split Qualcomm support into legacy and multiplatform

Quoted 11 lines · Arnd Bergmann
Quoted 9 lines · On Friday 31 January 2014 13:25:25 Kumar Gala wrote:
Quoted 4 lines

The hotplug.c change sticks out as something that isn't just a move of code to another place, but deletion of unused code. It would be nice to split that out into a separate change, possibly together with the trivial board.c and smp.c changes.

That?s not 100% true, the hotplug.c code implemented msm_cpu_die, which moved into smp.c

I can split out scm*/smp* into a patch to enable smp if that is really desired, but not exactly sure what it gets us.

Quoted 7 lines

It's not extremely important, I just prefer splitting patches that have any kind of functional change from trivial moves.

If something happens to break for an unforseen reason, it's easier to bisect to the patch that does the change.

Arnd

I?ll push my change to hotplug.c into the SMP patch set that Stephen started.

- 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 2/4] arm: qcom: Split Qualcomm support into legacy and multiplatform

In reply to Kumar Gala
Quoted 9 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 support that will not transition over to multiplatform.

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

---

[snip]

arch/arm/mach-qcom/Kconfig line 7

Quoted 13 lines
arch/arm/mach-qcom/Kconfig new file +7 -0
new file mode 100644
index 0000000..8830431
@@ -0,0 +1,34 @@
+config ARCH_QCOM
+       bool "Qualcomm Support" if ARCH_MULTI_V7
+       select ARCH_REQUIRE_GPIOLIB
+       select CLKSRC_OF
+       select GENERIC_CLOCKEVENTS
+       select ARM_GIC
+       select CPU_V7

CPU_V7 is already selected by MULTI_V7.

[snip]

Quoted 25 lines
arch/arm/mach-qcom/smp.c renamed from arch/arm/mach-msm/platsmp.c +1 -1
similarity index 97%
rename from arch/arm/mach-msm/platsmp.c
rename to arch/arm/mach-qcom/smp.c
index 42eb6b7..28364cb 100644
@@ -2,6 +2,7 @@
  *  Copyright (C) 2002 ARM Ltd.
  *  All Rights Reserved
  *  Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+ *  Copyright (c) 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 as
@@ -20,7 +21,6 @@
 #include <asm/smp_plat.h>
 
 #include "scm-boot.h"
-#include "common.h"
 
 #define VDD_SC1_ARRAY_CLAMP_GFS_CTL    0x35a0
 #define SCSS_CPU1CORE_RESET            0x2d80
@@ -48,6 +48,15 @@ extern void secondary_startup(void);
 

arch/arm/mach-qcom/smp.c extern void secondary_startup(void); · line 58

Quoted 10 lines
arch/arm/mach-qcom/smp.c renamed from arch/arm/mach-msm/platsmp.c +8 -0
 static DEFINE_SPINLOCK(boot_lock);
 
+static void __ref msm_cpu_die(unsigned int cpu)
+{
+
+       asm("wfi"
+           :
+           :
+           : "memory", "cc");
+}

I realize this is just a move, but there is a wfi() macro that can be used here instead.

Rob

#9 lore raw

Re: [PATCH 2/4] arm: qcom: Split Qualcomm support into legacy and multiplatform

In reply to Kumar Gala
Quoted 8 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 support that will not transition over to multiplatform.

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

Having a closer look at this after seeing the multi_v7_defconfig change, I have a minor nit on the new ARCH_QCOM name.

For new additions, we've been trying to move towards using SOC_foo instead of ARCH_foo. Any reason not to do that here also?

Kevin

author
#10 lore raw

Re: [PATCH 2/4] arm: qcom: Split Qualcomm support into legacy and multiplatform

Quoted 11 lines · Kevin Hilman
Quoted 8 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 support that will not transition over to multiplatform.

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

Quoted 7 lines

Having a closer look at this after seeing the multi_v7_defconfig change, I have a minor nit on the new ARCH_QCOM name.

For new additions, we've been trying to move towards using SOC_foo instead of ARCH_foo. Any reason not to do that here also?

Kevin

No reason, just wasn?t aware and no one said anything til now. Hmm, how to handle this now, can we do this as a 3.16 cleanup?

- 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
#11 lore raw

Re: [PATCH 2/4] arm: qcom: Split Qualcomm support into legacy and multiplatform

Quoted 16 lines · Kumar Gala
Quoted 14 lines · Kevin Hilman
Quoted 8 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 support that will not transition over to multiplatform.

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

Having a closer look at this after seeing the multi_v7_defconfig change, I have a minor nit on the new ARCH_QCOM name.

Quoted 6 lines
Quoted 4 lines

For new additions, we've been trying to move towards using SOC_foo instead of ARCH_foo. Any reason not to do that here also?

Kevin

No reason, just wasn?t aware and no one said anything til now.

Yeah, sorry for not reviewiing sooner.

Quoted 1 line

Hmm, how to handle this now, can we do this as a 3.16 cleanup?

Yes, we've already merged it, so doing it as a cleanup should be fine.

Thanks,

Kevin

author
#12 lore raw

PATCH 3/4 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
#13 lore raw

PATCH 4/4 tty: serial: msm: Enable building msm_serial for ARCH_QCOM

In reply to Kumar Gala

We've split Qualcomm MSM support into legacy and multiplatform. So add the ability to build the serial driver on the newer ARCH_QCOM multiplatform.

---
Greg,

If we can get an ack on this, will probably go via the arm-soc tree to keep the patchset together.

thanks

- k

 drivers/tty/serial/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/Kconfig +1 -1
index a3815ea..ce9b12d 100644
@@ -1024,7 +1024,7 @@ config SERIAL_SGI_IOC3
 
 config SERIAL_MSM
 	bool "MSM on-chip serial port support"
-	depends on ARCH_MSM
+	depends on ARCH_MSM || ARCH_QCOM
 	select SERIAL_CORE
 
 config SERIAL_MSM_CONSOLE
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 4/4
#14 lore raw

Re: [PATCH 4/4] tty: serial: msm: Enable building msm_serial for ARCH_QCOM

Quoted 10 lines · Kumar Gala

We've split Qualcomm MSM support into legacy and multiplatform. So add the ability to build the serial driver on the newer ARCH_QCOM multiplatform.

---
Greg,

If we can get an ack on this, will probably go via the arm-soc tree to keep the patchset together.

Acked-by on the v1 series
#15 lore raw
In reply to Kumar Gala
Quoted 6 lines · Kumar Gala

This is the starts of splitting the Qualcomm MSM platform into legacy support that we will not try and convert to multiplatform and multiplatform support. These patches are based on the 'CPU enable method based SMP' patches.

I wanted to get these out for review, will add a few more patches for defconfig updates/additions, as well as some additional driver being enabled for ARCH_QCOM.

Series:

See comment on the MAINTAINERS addition; let me know how you prefer to send us patches. We can apply from mailing lists we just need to know your preference.

-Olof