Skip to contentSkip to conversation

Move closer to single 8660/8960 zImage

PATCH In review Stephen Boyd 2 participants 17 messages Sep 5, 2012 – Sep 12, 2012

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover Move closer to single 8660/8960 zImage

The first half of this series adds devicetree support to the msm timer. The second half moves 8660 and 8960 to be devicetree only. After this patch series it should be possible to compile 8660 and 8960 together in one zImage (although Kconfig doesn't allow it right now).

This relies on the previous 8660 dt fixlets patches I sent and it also assumes that 'ARM: msm: Remove call to missing FPGA init on 8660' has been applied.

Stephen Boyd (9):
ARM: msm: Don't touch GIC registers outside of GIC code
ARM: msm: Allow timer.c to compile on multiple targets
ARM: msm: Add DT support to msm_timer
ARM: msm: Move 8660 to DT timer
ARM: msm: Make 8660 a DT only target
ARM: msm: Rename board-msm8x60 to signify its DT only status
ARM: msm: Move io mapping prototypes to common.h
ARM: msm: Add DT support for 8960
ARM: msm: Remove non-DT targets from 8960

 .../devicetree/bindings/arm/msm/timer.txt          |  38 +++++
 arch/arm/boot/dts/msm8660-surf.dts                 |  17 ++
 arch/arm/boot/dts/msm8960-cdp.dts                  |  41 +++++
 arch/arm/mach-msm/Kconfig                          |  41 +----
 arch/arm/mach-msm/Makefile                         |   4 +-
 arch/arm/mach-msm/Makefile.boot                    |   1 +
 arch/arm/mach-msm/board-dt-8660.c                  |  63 +++++++
 arch/arm/mach-msm/board-dt-8960.c                  |  49 ++++++
 arch/arm/mach-msm/board-halibut.c                  |   5 +-
 arch/arm/mach-msm/board-msm7x30.c                  |   9 +-
 arch/arm/mach-msm/board-msm8960.c                  | 122 --------------
 arch/arm/mach-msm/board-msm8x60.c                  | 162 ------------------
 arch/arm/mach-msm/board-qsd8x50.c                  |   7 +-
 arch/arm/mach-msm/board-trout.c                    |   5 +-
 arch/arm/mach-msm/common.h                         |  30 ++++
 arch/arm/mach-msm/devices-msm8960.c                |  85 ----------
 arch/arm/mach-msm/include/mach/board.h             |   3 -
 arch/arm/mach-msm/include/mach/msm_iomap-7x00.h    |   7 -
 arch/arm/mach-msm/include/mach/msm_iomap-7x30.h    |   4 -
 arch/arm/mach-msm/include/mach/msm_iomap-8960.h    |   4 -
 arch/arm/mach-msm/include/mach/msm_iomap-8x50.h    |   4 -
 arch/arm/mach-msm/include/mach/msm_iomap-8x60.h    |   4 -
 arch/arm/mach-msm/io.c                             |   2 +
 arch/arm/mach-msm/platsmp.c                        |   8 -
 arch/arm/mach-msm/timer.c                          | 186 ++++++++++++++++-----
 25 files changed, 404 insertions(+), 497 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/msm/timer.txt
 create mode 100644 arch/arm/boot/dts/msm8960-cdp.dts
 create mode 100644 arch/arm/mach-msm/board-dt-8660.c
 create mode 100644 arch/arm/mach-msm/board-dt-8960.c
 delete mode 100644 arch/arm/mach-msm/board-msm8960.c
 delete mode 100644 arch/arm/mach-msm/board-msm8x60.c
 create mode 100644 arch/arm/mach-msm/common.h
 delete mode 100644 arch/arm/mach-msm/devices-msm8960.c
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/9 ARM: msm: Don't touch GIC registers outside of GIC code

The MSM code has some antiquated register writes to set up the PPIs to be edge triggered. Now that we have the percpu irq interface we don't need this code so let's remove it and update the percpu irq user (msm_timer) to set the irq type.

---
 arch/arm/mach-msm/board-msm8960.c | 13 -------------
 arch/arm/mach-msm/board-msm8x60.c |  3 ---
 arch/arm/mach-msm/platsmp.c       |  8 --------
 arch/arm/mach-msm/timer.c         |  4 ++--
 4 files changed, 2 insertions(+), 26 deletions(-)
arch/arm/mach-msm/board-msm8960.c +0 -13
index 65f4a1d..bdafe79 100644
@@ -55,24 +55,11 @@ static void __init msm8960_map_io(void)
 
 static void __init msm8960_init_irq(void)
 {
-	unsigned int i;
 	gic_init(0, GIC_PPI_START, MSM_QGIC_DIST_BASE,
 		 (void *)MSM_QGIC_CPU_BASE);
 
-	/* Edge trigger PPIs except AVS_SVICINT and AVS_SVICINTSWDONE */
-	writel(0xFFFFD7FF, MSM_QGIC_DIST_BASE + GIC_DIST_CONFIG + 4);
-
 	if (machine_is_msm8960_rumi3())
 		writel(0x0000FFFF, MSM_QGIC_DIST_BASE + GIC_DIST_ENABLE_SET);
-
-	/* FIXME: Not installing AVS_SVICINT and AVS_SVICINTSWDONE yet
-	 * as they are configured as level, which does not play nice with
-	 * handle_percpu_irq.
-	 */
-	for (i = GIC_PPI_START; i < GIC_SPI_START; i++) {
-		if (i != AVS_SVICINT && i != AVS_SVICINTSWDONE)
-			irq_set_handler(i, handle_percpu_irq);
-	}
 }
 
 static struct platform_device *sim_devices[] __initdata = {
arch/arm/mach-msm/board-msm8x60.c +0 -3
index ad87207..64ae269 100644
@@ -67,9 +67,6 @@ static void __init msm8x60_init_irq(void)
 		of_irq_init(msm_dt_gic_match);
 #endif
 
-	/* Edge trigger PPIs except AVS_SVICINT and AVS_SVICINTSWDONE */
-	writel(0xFFFFD7FF, MSM_QGIC_DIST_BASE + GIC_DIST_CONFIG + 4);
-
 	/* RUMI does not adhere to GIC spec by enabling STIs by default.
 	 * Enable/clear is supposed to be RO for STIs, but is RW on RUMI.
 	 */
arch/arm/mach-msm/platsmp.c +0 -8
index e012dc8..2d791e6 100644
@@ -22,17 +22,12 @@
 #include <asm/mach-types.h>
 #include <asm/smp_plat.h>
 
-#include <mach/msm_iomap.h>
-
 #include "scm-boot.h"
 
 #define VDD_SC1_ARRAY_CLAMP_GFS_CTL 0x15A0
 #define SCSS_CPU1CORE_RESET 0xD80
 #define SCSS_DBG_STATUS_CORE_PWRDUP 0xE64
 
-/* Mask for edge trigger PPIs except AVS_SVICINT and AVS_SVICINTSWDONE */
-#define GIC_PPI_EDGE_MASK 0xFFFFD7FF
-
 extern void msm_secondary_startup(void);
 /*
  * control for which core is the next to come out of the secondary
@@ -50,9 +45,6 @@ static inline int get_core_count(void)
 
 void __cpuinit platform_secondary_init(unsigned int cpu)
 {
-	/* Configure edge-triggered PPIs */
-	writel(GIC_PPI_EDGE_MASK, MSM_QGIC_DIST_BASE + GIC_DIST_CONFIG + 4);
-
 	/*
 	 * if any interrupts are already enabled for the primary
 	 * core (e.g. timer irq), then they will not have been enabled
arch/arm/mach-msm/timer.c +2 -2
index 81280825..36bbc60 100644
@@ -151,7 +151,7 @@ static int __cpuinit msm_local_timer_setup(struct clock_event_device *evt)
 
 	*__this_cpu_ptr(msm_evt.percpu_evt) = evt;
 	clockevents_register_device(evt);
-	enable_percpu_irq(evt->irq, 0);
+	enable_percpu_irq(evt->irq, IRQ_TYPE_EDGE_RISING);
 	return 0;
 }
 
@@ -219,7 +219,7 @@ static void __init msm_timer_init(void)
 		res = request_percpu_irq(ce->irq, msm_timer_interrupt,
 					 ce->name, msm_evt.percpu_evt);
 		if (!res) {
-			enable_percpu_irq(ce->irq, 0);
+			enable_percpu_irq(ce->irq, IRQ_TYPE_EDGE_RISING);
 #ifdef CONFIG_LOCAL_TIMERS
 			local_timer_register(&msm_local_timer_ops);
 #endif
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
#2 lore raw

PATCH 2/9 ARM: msm: Allow timer.c to compile on multiple targets

In reply to Stephen Boyd

The timer code relies on #defines from mach/iomap.h, cpu_is_*() checks, and a global irq #define. All this makes this file impossible to compile in a mult-target build. Therefore, make a sys_timer struct for each SoC so that machine descriptors can reference the correct timer. Then go through and replace all the defines with raw values that are passed to a common initialization function.

This paves the way to adding DT support to this code as well as allows us to compile this file on multiple targets at the same time.

---
 arch/arm/mach-msm/board-halibut.c      |   5 +-
 arch/arm/mach-msm/board-msm7x30.c      |   9 ++-
 arch/arm/mach-msm/board-msm8960.c      |   5 +-
 arch/arm/mach-msm/board-msm8x60.c      |  11 +--
 arch/arm/mach-msm/board-qsd8x50.c      |   7 +-
 arch/arm/mach-msm/board-trout.c        |   5 +-
 arch/arm/mach-msm/common.h             |  21 ++++++
 arch/arm/mach-msm/include/mach/board.h |   2 -
 arch/arm/mach-msm/timer.c              | 120 +++++++++++++++++++++++----------
 9 files changed, 125 insertions(+), 60 deletions(-)
 create mode 100644 arch/arm/mach-msm/common.h
arch/arm/mach-msm/board-halibut.c +2 -3
index 4fa3e99..6ce542e 100644
@@ -36,6 +36,7 @@
 #include <linux/mtd/partitions.h>
 
 #include "devices.h"
+#include "common.h"
 
 static struct resource smc91x_resources[] = {
 	[0] = {
@@ -66,8 +67,6 @@ static struct platform_device *devices[] __initdata = {
 	&smc91x_device,
 };
 
-extern struct sys_timer msm_timer;
-
 static void __init halibut_init_early(void)
 {
 	arch_ioremap_caller = __msm_ioremap_caller;
@@ -107,5 +106,5 @@ MACHINE_START(HALIBUT, "Halibut Board (QCT SURF7200A)")
 	.init_irq	= halibut_init_irq,
 	.init_machine	= halibut_init,
 	.init_late	= halibut_init_late,
-	.timer		= &msm_timer,
+	.timer		= &msm7x01_timer,
 MACHINE_END
arch/arm/mach-msm/board-msm7x30.c +4 -5
index a500137..effa6f4 100644
@@ -38,8 +38,7 @@
 #include "devices.h"
 #include "gpiomux.h"
 #include "proc_comm.h"
-
-extern struct sys_timer msm_timer;
+#include "common.h"
 
 static void __init msm7x30_fixup(struct tag *tag, char **cmdline,
 		struct meminfo *mi)
@@ -132,7 +131,7 @@ MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF")
 	.init_irq = msm7x30_init_irq,
 	.init_machine = msm7x30_init,
 	.init_late = msm7x30_init_late,
-	.timer = &msm_timer,
+	.timer = &msm7x30_timer,
 MACHINE_END
 
 MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA")
@@ -143,7 +142,7 @@ MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA")
 	.init_irq = msm7x30_init_irq,
 	.init_machine = msm7x30_init,
 	.init_late = msm7x30_init_late,
-	.timer = &msm_timer,
+	.timer = &msm7x30_timer,
 MACHINE_END
 
 MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID")
@@ -154,5 +153,5 @@ MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID")
 	.init_irq = msm7x30_init_irq,
 	.init_machine = msm7x30_init,
 	.init_late = msm7x30_init_late,
-	.timer = &msm_timer,
+	.timer = &msm7x30_timer,
 MACHINE_END
arch/arm/mach-msm/board-msm8960.c +3 -2
index bdafe79..fafead2 100644
@@ -31,6 +31,7 @@
 #include <mach/msm_iomap.h>
 
 #include "devices.h"
+#include "common.h"
 
 static void __init msm8960_fixup(struct tag *tag, char **cmdline,
 		struct meminfo *mi)
@@ -90,7 +91,7 @@ MACHINE_START(MSM8960_SIM, "QCT MSM8960 SIMULATOR")
 	.reserve = msm8960_reserve,
 	.map_io = msm8960_map_io,
 	.init_irq = msm8960_init_irq,
-	.timer = &msm_timer,
+	.timer = &msm8960_timer,
 	.handle_irq = gic_handle_irq,
 	.init_machine = msm8960_sim_init,
 	.init_late = msm8960_init_late,
@@ -101,7 +102,7 @@ MACHINE_START(MSM8960_RUMI3, "QCT MSM8960 RUMI3")
 	.reserve = msm8960_reserve,
 	.map_io = msm8960_map_io,
 	.init_irq = msm8960_init_irq,
-	.timer = &msm_timer,
+	.timer = &msm8960_timer,
 	.handle_irq = gic_handle_irq,
 	.init_machine = msm8960_rumi3_init,
 	.init_late = msm8960_init_late,
arch/arm/mach-msm/board-msm8x60.c +6 -5
index 64ae269..97db3cd 100644
@@ -28,6 +28,7 @@
 
 #include <mach/board.h>
 #include <mach/msm_iomap.h>
+#include "common.h"
 
 static void __init msm8x60_fixup(struct tag *tag, char **cmdline,
 		struct meminfo *mi)
@@ -109,7 +110,7 @@ MACHINE_START(MSM8X60_RUMI3, "QCT MSM8X60 RUMI3")
 	.handle_irq = gic_handle_irq,
 	.init_machine = msm8x60_init,
 	.init_late = msm8x60_init_late,
-	.timer = &msm_timer,
+	.timer = &msm8x60_timer,
 MACHINE_END
 
 MACHINE_START(MSM8X60_SURF, "QCT MSM8X60 SURF")
@@ -120,7 +121,7 @@ MACHINE_START(MSM8X60_SURF, "QCT MSM8X60 SURF")
 	.handle_irq = gic_handle_irq,
 	.init_machine = msm8x60_init,
 	.init_late = msm8x60_init_late,
-	.timer = &msm_timer,
+	.timer = &msm8x60_timer,
 MACHINE_END
 
 MACHINE_START(MSM8X60_SIM, "QCT MSM8X60 SIMULATOR")
@@ -131,7 +132,7 @@ MACHINE_START(MSM8X60_SIM, "QCT MSM8X60 SIMULATOR")
 	.handle_irq = gic_handle_irq,
 	.init_machine = msm8x60_init,
 	.init_late = msm8x60_init_late,
-	.timer = &msm_timer,
+	.timer = &msm8x60_timer,
 MACHINE_END
 
 MACHINE_START(MSM8X60_FFA, "QCT MSM8X60 FFA")
@@ -142,7 +143,7 @@ MACHINE_START(MSM8X60_FFA, "QCT MSM8X60 FFA")
 	.handle_irq = gic_handle_irq,
 	.init_machine = msm8x60_init,
 	.init_late = msm8x60_init_late,
-	.timer = &msm_timer,
+	.timer = &msm8x60_timer,
 MACHINE_END
 
 #ifdef CONFIG_OF
@@ -153,7 +154,7 @@ DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)")
 	.handle_irq = gic_handle_irq,
 	.init_machine = msm8x60_dt_init,
 	.init_late = msm8x60_init_late,
-	.timer = &msm_timer,
+	.timer = &msm8x60_timer,
 	.dt_compat = msm8x60_fluid_match,
 MACHINE_END
 #endif /* CONFIG_OF */
arch/arm/mach-msm/board-qsd8x50.c +3 -4
index c8fe0ed..b16b71a 100644
@@ -35,8 +35,7 @@
 #include <mach/mmc.h>
 
 #include "devices.h"
-
-extern struct sys_timer msm_timer;
+#include "common.h"
 
 static const resource_size_t qsd8x50_surf_smc91x_base __initdata = 0x70000300;
 static const unsigned        qsd8x50_surf_smc91x_gpio __initdata = 156;
@@ -201,7 +200,7 @@ MACHINE_START(QSD8X50_SURF, "QCT QSD8X50 SURF")
 	.init_irq = qsd8x50_init_irq,
 	.init_machine = qsd8x50_init,
 	.init_late = qsd8x50_init_late,
-	.timer = &msm_timer,
+	.timer = &qsd8x50_timer,
 MACHINE_END
 
 MACHINE_START(QSD8X50A_ST1_5, "QCT QSD8X50A ST1.5")
@@ -210,5 +209,5 @@ MACHINE_START(QSD8X50A_ST1_5, "QCT QSD8X50A ST1.5")
 	.init_irq = qsd8x50_init_irq,
 	.init_machine = qsd8x50_init,
 	.init_late = qsd8x50_init_late,
-	.timer = &msm_timer,
+	.timer = &qsd8x50_timer,
 MACHINE_END
arch/arm/mach-msm/board-trout.c +2 -3
index bbe13f1..4ba0800 100644
@@ -31,6 +31,7 @@
 
 #include "devices.h"
 #include "board-trout.h"
+#include "common.h"
 
 extern int trout_init_mmc(unsigned int);
 
@@ -42,8 +43,6 @@ static struct platform_device *devices[] __initdata = {
 	&msm_device_i2c,
 };
 
-extern struct sys_timer msm_timer;
-
 static void __init trout_init_early(void)
 {
 	arch_ioremap_caller = __msm_ioremap_caller;
@@ -111,5 +110,5 @@ MACHINE_START(TROUT, "HTC Dream")
 	.init_irq	= trout_init_irq,
 	.init_machine	= trout_init,
 	.init_late	= trout_init_late,
-	.timer		= &msm_timer,
+	.timer		= &msm7x01_timer,
 MACHINE_END
arch/arm/mach-msm/common.h new file +21 -0
new file mode 100644
index 0000000..4c2dd16
@@ -0,0 +1,21 @@
+/* Copyright (c) 2012, 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.
+ */
+#ifndef __MACH_COMMON_H
+#define __MACH_COMMON_H
+
+extern struct sys_timer msm7x01_timer;
+extern struct sys_timer msm7x30_timer;
+extern struct sys_timer msm8x60_timer;
+extern struct sys_timer msm8960_timer;
+extern struct sys_timer qsd8x50_timer;
+
+#endif
arch/arm/mach-msm/include/mach/board.h +0 -2
index 435f8ed..fc40bbc 100644
@@ -33,8 +33,6 @@ struct msm_acpu_clock_platform_data
 
 struct clk_lookup;
 
-extern struct sys_timer msm_timer;
-
 /* common init routines for use by arch/arm/mach-msm/board-*.c */
 
 void __init msm_add_devices(void);
arch/arm/mach-msm/timer.c +84 -36

161 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
#3 lore raw

PATCH 3/9 ARM: msm: Add DT support to msm_timer

In reply to Stephen Boyd

Add support to setup the MSM timer via information obtained from the devicetree.

---
 .../devicetree/bindings/arm/msm/timer.txt          | 38 ++++++++++
 arch/arm/mach-msm/common.h                         |  1 +
 arch/arm/mach-msm/timer.c                          | 87 ++++++++++++++++++++++
 3 files changed, 126 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/msm/timer.txt
Documentation/devicetree/bindings/arm/msm/timer.txt new file +38 -0
new file mode 100644
index 0000000..a9c0748
@@ -0,0 +1,38 @@
+* MSM Timer
+
+Properties:
+
+- compatible : Should at least contain "qcom,msm-timer". More specific
+  properties such as "qcom,msm-gpt" and "qcom,msm-dgt" specify a general
+  purpose timer and a debug timer respectively.
+
+- interrupts : Interrupt indicating a match event.
+
+- reg : Specifies the base address of the timer registers. The second region
+  specifies an optional register used to configure the clock divider.
+
+- clock-frequency : The frequency of the timer in Hz.
+
+Optional:
+
+- cpu-offset : per-cpu offset used when the timer is accessed without the
+  CPU remapping facilities. The offset is cpu-offset * cpu-nr.
+
+Example:
+
+       timer at 0200a004 {
+               compatible = "qcom,msm-gpt", "qcom,msm-timer";
+               interrupts = <1 2 0x301>;
+               reg = <0x0200a004 0x10>;
+               clock-frequency = <32768>;
+               cpu-offset = <0x40000>;
+       };
+
+       timer at 0200a024 {
+               compatible = "qcom,msm-dgt", "qcom,msm-timer";
+               interrupts = <1 3 0x301>;
+               reg = <0x0200a024 0x10>,
+                     <0x0200a034 0x4>;
+               clock-frequency = <6750000>;
+               cpu-offset = <0x40000>;
+       };
arch/arm/mach-msm/common.h +1 -0
index 4c2dd16..7d57fb0 100644
@@ -16,6 +16,7 @@ extern struct sys_timer msm7x01_timer;
 extern struct sys_timer msm7x30_timer;
 extern struct sys_timer msm8x60_timer;
 extern struct sys_timer msm8960_timer;
+extern struct sys_timer msm_dt_timer;
 extern struct sys_timer qsd8x50_timer;
 
 #endif
arch/arm/mach-msm/timer.c +87 -0

99 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
#4 lore raw

Re: [PATCH 3/9] ARM: msm: Add DT support to msm_timer

Quoted 8 lines · Stephen Boyd
Documentation/devicetree/bindings/arm/msm/timer.txt +6 -0
 
+       timer at 0200a004 {
+               compatible = "qcom,msm-gpt", "qcom,msm-timer";
+               interrupts = <1 2 0x301>;
+               reg = <0x0200a004 0x10>;
+               clock-frequency = <32768>;
+               cpu-offset = <0x40000>;

Documentation/devicetree/bindings/arm/msm/timer.txt line 38

Quoted 10 lines
Documentation/devicetree/bindings/arm/msm/timer.txt +10 -0
+       };
+
+       timer at 0200a024 {
+               compatible = "qcom,msm-dgt", "qcom,msm-timer";
+               interrupts = <1 3 0x301>;
+               reg = <0x0200a024 0x10>,
+                     <0x0200a034 0x4>;
+               clock-frequency = <6750000>;
+               cpu-offset = <0x40000>;
+       };

The names should be timer at 200a004 and timer at 200a024, without the leading zero. If there are no other concerns, I can just fix these up when I pull the patch in. No need to resend.

Thanks,
David

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 4/9 ARM: msm: Move 8660 to DT timer

In reply to Stephen Boyd

Add the timer entry and point the machine descriptor to the device tree based msm timer.

---
 arch/arm/boot/dts/msm8660-surf.dts | 17 +++++++++++++++++
 arch/arm/mach-msm/board-msm8x60.c  |  2 +-
 2 files changed, 18 insertions(+), 1 deletion(-)
arch/arm/boot/dts/msm8660-surf.dts +17 -0
index 45bc4bb..93a15ab 100644
@@ -15,6 +15,23 @@
 		      < 0x02081000 0x1000 >;
 	};
 
+	timer at 02000004 {
+		compatible = "qcom,msm-gpt", "qcom,msm-timer";
+		interrupts = <1 1 0x301>;
+		reg = <0x02000004 0x10>;
+		clock-frequency = <32768>;
+		cpu-offset = <0x40000>;
+	};
+
+	timer at 02000024 {
+		compatible = "qcom,msm-dgt", "qcom,msm-timer";
+		interrupts = <1 0 0x301>;
+		reg = <0x02000024 0x10>,
+		      <0x02000034 0x4>;
+		clock-frequency = <6750000>;
+		cpu-offset = <0x40000>;
+	};
+
 	serial at 19c400000 {
 		compatible = "qcom,msm-hsuart", "qcom,msm-uart";
 		reg = <0x19c40000 0x1000>,
arch/arm/mach-msm/board-msm8x60.c +1 -1
index 97db3cd..64c981d 100644
@@ -154,7 +154,7 @@ DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)")
 	.handle_irq = gic_handle_irq,
 	.init_machine = msm8x60_dt_init,
 	.init_late = msm8x60_init_late,
-	.timer = &msm8x60_timer,
+	.timer = &msm_dt_timer,
 	.dt_compat = msm8x60_fluid_match,
 MACHINE_END
 #endif /* CONFIG_OF */
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 5/9 ARM: msm: Make 8660 a DT only target

In reply to Stephen Boyd

We don't plan to support anything besides devicetree on these targets so remove all other machine support.

---
 arch/arm/mach-msm/Kconfig         |  27 +---------
 arch/arm/mach-msm/board-msm8x60.c | 106 ++------------------------------------
 arch/arm/mach-msm/common.h        |   1 -
 arch/arm/mach-msm/timer.c         |  12 -----
 4 files changed, 6 insertions(+), 140 deletions(-)
arch/arm/mach-msm/Kconfig +1 -26
index 1cd40ad..cd78427 100644
@@ -38,8 +38,6 @@ config ARCH_QSD8X50
 
 config ARCH_MSM8X60
 	bool "MSM8X60"
-	select MACH_MSM8X60_SURF if (!MACH_MSM8X60_RUMI3 && !MACH_MSM8X60_SIM \
-				  && !MACH_MSM8X60_FFA)
 	select ARCH_MSM_SCORPIONMP
 	select ARM_GIC
 	select CPU_V7
@@ -47,6 +45,7 @@ config ARCH_MSM8X60
 	select GPIO_MSM_V2
 	select MSM_GPIOMUX
 	select MSM_SCM if SMP
+	select USE_OF
 
 config ARCH_MSM8960
 	bool "MSM8960"
@@ -112,30 +111,6 @@ config MACH_QSD8X50A_ST1_5
 	help
 	  Support for the Qualcomm ST1.5.
 
-config MACH_MSM8X60_RUMI3
-	depends on ARCH_MSM8X60
-	bool "MSM8x60 RUMI3"
-	help
-	  Support for the Qualcomm MSM8x60 RUMI3 emulator.
-
-config MACH_MSM8X60_SURF
-	depends on ARCH_MSM8X60
-	bool "MSM8x60 SURF"
-	help
-	  Support for the Qualcomm MSM8x60 SURF eval board.
-
-config MACH_MSM8X60_SIM
-	depends on ARCH_MSM8X60
-	bool "MSM8x60 Simulator"
-	help
-	  Support for the Qualcomm MSM8x60 simulator.
-
-config MACH_MSM8X60_FFA
-	depends on ARCH_MSM8X60
-	bool "MSM8x60 FFA"
-	help
-	  Support for the Qualcomm MSM8x60 FFA eval board.
-
 config MACH_MSM8960_SIM
 	depends on ARCH_MSM8960
 	bool "MSM8960 Simulator"
arch/arm/mach-msm/board-msm8x60.c +5 -101

149 lines not on this page · raw message

arch/arm/mach-msm/common.h +0 -1
index 7d57fb0..a20e78e 100644
@@ -14,7 +14,6 @@
 
 extern struct sys_timer msm7x01_timer;
 extern struct sys_timer msm7x30_timer;
-extern struct sys_timer msm8x60_timer;
 extern struct sys_timer msm8960_timer;
 extern struct sys_timer msm_dt_timer;
 extern struct sys_timer qsd8x50_timer;
arch/arm/mach-msm/timer.c +0 -12
index b17a39d..27ade4f 100644
@@ -346,18 +346,6 @@ struct sys_timer msm7x30_timer = {
 	.init = msm7x30_timer_init
 };
 
-static void __init msm8x60_timer_init(void)
-{
-	if (msm_timer_map(0x02000004, 0x02040024))
-		return;
-	writel_relaxed(DGT_CLK_CTL_DIV_4, event_base + DGT_CLK_CTL);
-	msm_timer_init(27000000 / 4, 32, 17, true);
-}
-
-struct sys_timer msm8x60_timer = {
-	.init = msm8x60_timer_init
-};
-
 static void __init msm8960_timer_init(void)
 {
 	if (msm_timer_map(0x0200A004, 0x0208A024))
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 6/9 ARM: msm: Rename board-msm8x60 to signify its DT only status

In reply to Stephen Boyd

Rename this file to signify that this board is only supported via devicetree.

---
 arch/arm/mach-msm/Makefile                             | 2 +-
 arch/arm/mach-msm/{board-msm8x60.c => board-dt-8660.c} | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename arch/arm/mach-msm/{board-msm8x60.c => board-dt-8660.c} (100%)
arch/arm/mach-msm/Makefile +1 -1
index 4ad3969..c4f5169 100644
@@ -25,7 +25,7 @@ obj-$(CONFIG_MACH_TROUT) += board-trout.o board-trout-gpio.o board-trout-mmc.o b
 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_MSM8X60) += board-msm8x60.o
+obj-$(CONFIG_ARCH_MSM8X60) += board-dt-8660.o
 obj-$(CONFIG_ARCH_MSM8960) += board-msm8960.o devices-msm8960.o
 
 obj-$(CONFIG_ARCH_MSM7X30) += gpiomux-v1.o gpiomux.o
arch/arm/mach-msm/board-dt-8660.c renamed from arch/arm/mach-msm/board-msm8x60.c +0 -0
similarity index 100%
rename from arch/arm/mach-msm/board-msm8x60.c
rename to arch/arm/mach-msm/board-dt-8660.c
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
#8 lore raw

PATCH 7/9 ARM: msm: Move io mapping prototypes to common.h

In reply to Stephen Boyd

Consolidate the handful of iomapping functions into common.h so that board files don't need to include mach/msm_iomap.h if they don't need static virtual mapping addresses.

---
 arch/arm/mach-msm/board-dt-8660.c               |  1 -
 arch/arm/mach-msm/common.h                      | 10 ++++++++++
 arch/arm/mach-msm/include/mach/board.h          |  1 -
 arch/arm/mach-msm/include/mach/msm_iomap-7x00.h |  7 -------
 arch/arm/mach-msm/include/mach/msm_iomap-7x30.h |  4 ----
 arch/arm/mach-msm/include/mach/msm_iomap-8960.h |  4 ----
 arch/arm/mach-msm/include/mach/msm_iomap-8x50.h |  4 ----
 arch/arm/mach-msm/include/mach/msm_iomap-8x60.h |  4 ----
 arch/arm/mach-msm/io.c                          |  2 ++
 9 files changed, 12 insertions(+), 25 deletions(-)
arch/arm/mach-msm/board-dt-8660.c +0 -1
index 0d32464..f77f57f 100644
@@ -19,7 +19,6 @@
 #include <asm/hardware/gic.h>
 
 #include <mach/board.h>
-#include <mach/msm_iomap.h>
 #include "common.h"
 
 static const struct of_device_id msm_dt_gic_match[] __initconst = {
arch/arm/mach-msm/common.h +10 -0
index a20e78e..9975575 100644
@@ -18,4 +18,14 @@ extern struct sys_timer msm8960_timer;
 extern struct sys_timer msm_dt_timer;
 extern struct sys_timer qsd8x50_timer;
 
+extern void msm_map_common_io(void);
+extern void msm_map_msm7x30_io(void);
+extern void msm_map_msm8x60_io(void);
+extern void msm_map_msm8960_io(void);
+extern void msm_map_qsd8x50_io(void);
+
+extern void __iomem *__msm_ioremap_caller(unsigned long phys_addr, size_t size,
+					  unsigned int mtype, void *caller);
+
+
 #endif
arch/arm/mach-msm/include/mach/board.h +0 -1
index fc40bbc..09654ac 100644
@@ -36,7 +36,6 @@ struct clk_lookup;
 /* common init routines for use by arch/arm/mach-msm/board-*.c */
 
 void __init msm_add_devices(void);
-void __init msm_map_common_io(void);
 void __init msm_init_irq(void);
 void __init msm_init_gpio(void);
 void __init msm_clock_init(struct clk_lookup *clock_tbl, unsigned num_clocks);
arch/arm/mach-msm/include/mach/msm_iomap-7x00.h +0 -7
index 6c4046c..67dc0e9 100644
@@ -105,11 +105,4 @@
 #define MSM_AD5_PHYS          0xAC000000
 #define MSM_AD5_SIZE          (SZ_1M*13)
 
-#ifndef __ASSEMBLY__
-
-extern void __iomem *__msm_ioremap_caller(unsigned long phys_addr, size_t size,
-					  unsigned int mtype, void *caller);
-
-#endif
-
 #endif
arch/arm/mach-msm/include/mach/msm_iomap-7x30.h +0 -4
index f944fe6..198202c 100644
@@ -100,8 +100,4 @@
 #define MSM_HSUSB_PHYS        0xA3600000
 #define MSM_HSUSB_SIZE        SZ_1K
 
-#ifndef __ASSEMBLY__
-extern void msm_map_msm7x30_io(void);
-#endif
-
 #endif
arch/arm/mach-msm/include/mach/msm_iomap-8960.h +0 -4
index a1752c0..800b557 100644
@@ -50,8 +50,4 @@
 #define MSM_DEBUG_UART_PHYS	0x16440000
 #endif
 
-#ifndef __ASSEMBLY__
-extern void msm_map_msm8960_io(void);
-#endif
-
 #endif
arch/arm/mach-msm/include/mach/msm_iomap-8x50.h +0 -4
index da77cc1..0faa894 100644
@@ -122,8 +122,4 @@
 #define MSM_SDC4_PHYS          0xA0600000
 #define MSM_SDC4_SIZE          SZ_4K
 
-#ifndef __ASSEMBLY__
-extern void msm_map_qsd8x50_io(void);
-#endif
-
 #endif
arch/arm/mach-msm/include/mach/msm_iomap-8x60.h +0 -4
index 5aed57d..54e12ca 100644
@@ -67,8 +67,4 @@
 #define MSM_DEBUG_UART_PHYS	0x19C40000
 #endif
 
-#ifndef __ASSEMBLY__
-extern void msm_map_msm8x60_io(void);
-#endif
-
 #endif
arch/arm/mach-msm/io.c +2 -0
index a1e7b11..3cbe74a 100644
@@ -29,6 +29,8 @@
 
 #include <mach/board.h>
 
+#include "common.h"
+
 #define MSM_CHIP_DEVICE(name, chip) {			      \
 		.virtual = (unsigned long) MSM_##name##_BASE, \
 		.pfn = __phys_to_pfn(chip##_##name##_PHYS), \
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
#9 lore raw

PATCH 8/9 ARM: msm: Add DT support for 8960

In reply to Stephen Boyd

Add basic support to boot 8960 with device tree. For now just support a basic machine with a uart device.

---
 arch/arm/boot/dts/msm8960-cdp.dts | 41 ++++++++++++++++++++++++++++++++
 arch/arm/mach-msm/Kconfig         |  1 +
 arch/arm/mach-msm/Makefile        |  1 +
 arch/arm/mach-msm/Makefile.boot   |  1 +
 arch/arm/mach-msm/board-dt-8960.c | 49 +++++++++++++++++++++++++++++++++++++++
 5 files changed, 93 insertions(+)
 create mode 100644 arch/arm/boot/dts/msm8960-cdp.dts
 create mode 100644 arch/arm/mach-msm/board-dt-8960.c
arch/arm/boot/dts/msm8960-cdp.dts new file +41 -0
new file mode 100644
index 0000000..76635d5
@@ -0,0 +1,41 @@
+/dts-v1/;
+
+/include/ "skeleton.dtsi"
+
+/ {
+	model = "Qualcomm MSM8960 CDP";
+	compatible = "qcom,msm8960-cdp", "qcom,msm8960";
+	interrupt-parent = <&intc>;
+
+	intc: interrupt-controller at 02000000 {
+		compatible = "qcom,msm-qgic2";
+		interrupt-controller;
+		#interrupt-cells = <3>;
+		reg = < 0x02000000 0x1000 >,
+		      < 0x02002000 0x1000 >;
+	};
+
+	timer at 0200a004 {
+		compatible = "qcom,msm-gpt", "qcom,msm-timer";
+		interrupts = <1 2 0x301>;
+		reg = <0x0200a004 0x10>;
+		clock-frequency = <32768>;
+		cpu-offset = <0x80000>;
+	};
+
+	timer at 0200a024 {
+		compatible = "qcom,msm-dgt", "qcom,msm-timer";
+		interrupts = <1 1 0x301>;
+		reg = <0x0200a024 0x10>,
+		      <0x0200a034 0x4>;
+		clock-frequency = <6750000>;
+		cpu-offset = <0x80000>;
+	};
+
+	serial at 19c400000 {
+		compatible = "qcom,msm-hsuart", "qcom,msm-uart";
+		reg = <0x16440000 0x1000>,
+		      <0x16400000 0x1000>;
+		interrupts = <0 154 0x0>;
+	};
+};
arch/arm/mach-msm/Kconfig +1 -0
index cd78427..2e5a27e 100644
@@ -56,6 +56,7 @@ config ARCH_MSM8960
 	select MSM_V2_TLMM
 	select MSM_GPIOMUX
 	select MSM_SCM if SMP
+	select USE_OF
 
 endchoice
 
arch/arm/mach-msm/Makefile +1 -0
index c4f5169..bc2a3cc 100644
@@ -27,6 +27,7 @@ obj-$(CONFIG_ARCH_MSM7X30) += board-msm7x30.o devices-msm7x30.o
 obj-$(CONFIG_ARCH_QSD8X50) += board-qsd8x50.o devices-qsd8x50.o
 obj-$(CONFIG_ARCH_MSM8X60) += board-dt-8660.o
 obj-$(CONFIG_ARCH_MSM8960) += board-msm8960.o devices-msm8960.o
+obj-$(CONFIG_ARCH_MSM8960) += board-dt-8960.o
 
 obj-$(CONFIG_ARCH_MSM7X30) += gpiomux-v1.o gpiomux.o
 obj-$(CONFIG_ARCH_QSD8X50) += gpiomux-8x50.o gpiomux-v1.o gpiomux.o
arch/arm/mach-msm/Makefile.boot +1 -0
index 8de0678..f7d6ae9 100644
@@ -3,3 +3,4 @@ params_phys-y		:= 0x10000100
 initrd_phys-y		:= 0x10800000
 
 dtb-$(CONFIG_ARCH_MSM8X60) += msm8660-surf.dtb
+dtb-$(CONFIG_ARCH_MSM8960) += msm8960-cdp.dtb
arch/arm/mach-msm/board-dt-8960.c new file +49 -0

49 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 8/9] ARM: msm: Add DT support for 8960

Quoted 1 line · Stephen Boyd

+DT_MACHINE_START(MSM8960_DT, "Qualcomm MSM (Flattened Device Tree)")

The description string should specify the general name of what this is suspporting. Right now, with these patches, it would list

Qualcomm MSM (Flattened Device Tree)

twice as the two targets we support (and isn't helpful when you see which one it picks). I'd put the "MSM" name by itself without thinking about it too much. It wasn't that confusing, since there was only one at the time.

Perhaps make the 8660 one "Qualcomm MSM8660 (Flattened Device Tree)" and the 8960 one "Qualcomm MSM8960 (Flattened Device Tree)"

I realize that the chip numbers are a bit confusing, so probably best to pick a canonical name for the description.

David

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

Re: [PATCH 8/9] ARM: msm: Add DT support for 8960

Quoted 13 lines · David Brown
Quoted 1 line · Stephen Boyd

+DT_MACHINE_START(MSM8960_DT, "Qualcomm MSM (Flattened Device Tree)")

The description string should specify the general name of what this is suspporting. Right now, with these patches, it would list

Qualcomm MSM (Flattened Device Tree)

twice as the two targets we support (and isn't helpful when you see which one it picks). I'd put the "MSM" name by itself without thinking about it too much. It wasn't that confusing, since there was only one at the time.

Quoted 6 lines

Perhaps make the 8660 one "Qualcomm MSM8660 (Flattened Device Tree)" and the 8960 one "Qualcomm MSM8960 (Flattened Device Tree)"

I realize that the chip numbers are a bit confusing, so probably best to pick a canonical name for the description.

I think we don't need to do anything. Basically machine name is always "Qualcomm MSM (Flattened Device Tree)" but then the model name in the devicetree blob says a more descriptive value "Qualcomm MSM8960 CDP" or "Qualcomm MSM8660 SURF", etc. All this info is printed in the kernel log upon boot:

[    0.000000] Machine: Qualcomm MSM (Flattened Device Tree), model: Qualcomm MSM8960 CDP

In fact, it should be possible to put the two dt board files together at some point if we can somehow drive the map_io routine from devicetree. In this case we could even have the same machine descriptor used for both machines.

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

Re: [PATCH 8/9] ARM: msm: Add DT support for 8960

In reply to Stephen Boyd

arch/arm/boot/dts/msm8960-cdp.dts line 18

Quoted 11 lines · Stephen Boyd
arch/arm/boot/dts/msm8960-cdp.dts +9 -0
+
+	intc: interrupt-controller at 02000000 {
+		compatible = "qcom,msm-qgic2";
+		interrupt-controller;
+		#interrupt-cells = <3>;
+		reg = < 0x02000000 0x1000 >,
+		      < 0x02002000 0x1000 >;
+	};
 
+	timer at 0200a004 {
	...

arch/arm/boot/dts/msm8960-cdp.dts line 26

Quoted 1 line
arch/arm/boot/dts/msm8960-cdp.dts +1 -0
+	timer at 0200a024 {

Likewise here, the leading zeros need to be removed on the names. I can also take care of this one when I pull it in.

David

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

Re: [PATCH 8/9] ARM: msm: Add DT support for 8960

In reply to Stephen Boyd

arch/arm/boot/dts/msm8960-cdp.dts line 26

Quoted 5 lines · Stephen Boyd
arch/arm/boot/dts/msm8960-cdp.dts +3 -0
 
+	intc: interrupt-controller at 02000000 {
+	timer at 0200a004 {
+	timer at 0200a024 {

Same here. Again, I'll fix these when I pull the patch in.

I guess a question: According to
https://lists.ozlabs.org/pipermail/devicetree-discuss/2012-February/012412.html

these leading zeros shouldn't be there, but I do find a few hundred of them in our existing devicetree files. There are also a handful that have a @0xnnn form of address.

David

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

PATCH 9/9 ARM: msm: Remove non-DT targets from 8960

In reply to Stephen Boyd

Remove the non-DT targets supported by 8960. This makes 8960 a device tree only target.

---
 arch/arm/mach-msm/Kconfig           |  13 -----
 arch/arm/mach-msm/Makefile          |   1 -
 arch/arm/mach-msm/board-msm8960.c   | 110 ------------------------------------
 arch/arm/mach-msm/common.h          |   1 -
 arch/arm/mach-msm/devices-msm8960.c |  85 ----------------------------
 arch/arm/mach-msm/timer.c           |  13 -----
 6 files changed, 223 deletions(-)
 delete mode 100644 arch/arm/mach-msm/board-msm8960.c
 delete mode 100644 arch/arm/mach-msm/devices-msm8960.c
arch/arm/mach-msm/Kconfig +0 -13
index 2e5a27e..b2740c8 100644
@@ -50,7 +50,6 @@ config ARCH_MSM8X60
 config ARCH_MSM8960
 	bool "MSM8960"
 	select ARCH_MSM_SCORPIONMP
-	select MACH_MSM8960_SIM if (!MACH_MSM8960_RUMI3)
 	select ARM_GIC
 	select CPU_V7
 	select MSM_V2_TLMM
@@ -112,18 +111,6 @@ config MACH_QSD8X50A_ST1_5
 	help
 	  Support for the Qualcomm ST1.5.
 
-config MACH_MSM8960_SIM
-	depends on ARCH_MSM8960
-	bool "MSM8960 Simulator"
-	help
-	  Support for the Qualcomm MSM8960 simulator.
-
-config MACH_MSM8960_RUMI3
-	depends on ARCH_MSM8960
-	bool "MSM8960 RUMI3"
-	help
-	  Support for the Qualcomm MSM8960 RUMI3 emulator.
-
 endmenu
 
 config MSM_SMD_PKG3
arch/arm/mach-msm/Makefile +0 -1
index bc2a3cc..c7720cf 100644
@@ -26,7 +26,6 @@ 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_MSM8X60) += board-dt-8660.o
-obj-$(CONFIG_ARCH_MSM8960) += board-msm8960.o devices-msm8960.o
 obj-$(CONFIG_ARCH_MSM8960) += board-dt-8960.o
 
 obj-$(CONFIG_ARCH_MSM7X30) += gpiomux-v1.o gpiomux.o
arch/arm/mach-msm/board-msm8960.c deleted +0 -110

110 lines not on this page · raw message

arch/arm/mach-msm/common.h +0 -1
index 9975575..d68e5d7 100644
@@ -14,7 +14,6 @@
 
 extern struct sys_timer msm7x01_timer;
 extern struct sys_timer msm7x30_timer;
-extern struct sys_timer msm8960_timer;
 extern struct sys_timer msm_dt_timer;
 extern struct sys_timer qsd8x50_timer;
 
arch/arm/mach-msm/devices-msm8960.c deleted +0 -85

85 lines not on this page · raw message

arch/arm/mach-msm/timer.c +0 -13
index 27ade4f..7a49195 100644
@@ -37,7 +37,6 @@
 #define TIMER_ENABLE_CLR_ON_MATCH_EN    BIT(1)
 #define TIMER_ENABLE_EN                 BIT(0)
 #define TIMER_CLEAR             0x000C
-#define DGT_CLK_CTL             0x0030
 #define DGT_CLK_CTL_DIV_4	0x3
 
 #define GPT_HZ 32768
@@ -346,18 +345,6 @@ struct sys_timer msm7x30_timer = {
 	.init = msm7x30_timer_init
 };
 
-static void __init msm8960_timer_init(void)
-{
-	if (msm_timer_map(0x0200A004, 0x0208A024))
-		return;
-	writel_relaxed(DGT_CLK_CTL_DIV_4, event_base + DGT_CLK_CTL);
-	msm_timer_init(27000000 / 4, 32, 17, true);
-}
-
-struct sys_timer msm8960_timer = {
-	.init = msm8960_timer_init
-};
-
 static void __init qsd8x50_timer_init(void)
 {
 	if (msm_timer_map(0xAC100000, 0xAC100010))
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
#15 lore raw

[PATCH 10/9] ARM: msm: Allow msm_iomap-8x60 and msm_iomap-8960 to coexist

In reply to Stephen Boyd

Remove the unused GCC, ACC, and shared memory definitions in the 8660 static mappings. This allows the 8660 header file to be included in msm_iomap.h unconditionally.

---
 arch/arm/mach-msm/include/mach/msm_iomap-8x60.h | 11 -----------
 arch/arm/mach-msm/include/mach/msm_iomap.h      |  3 +--
 arch/arm/mach-msm/io.c                          |  2 --
 3 files changed, 1 insertion(+), 15 deletions(-)
arch/arm/mach-msm/include/mach/msm_iomap-8x60.h +0 -11
index c6d38f1..199372e 100644
@@ -41,21 +41,10 @@
 #define MSM8X60_QGIC_CPU_PHYS	0x02081000
 #define MSM8X60_QGIC_CPU_SIZE	SZ_4K
 
-#define MSM_ACC_BASE		IOMEM(0xF0002000)
-#define MSM_ACC_PHYS		0x02001000
-#define MSM_ACC_SIZE		SZ_4K
-
-#define MSM_GCC_BASE		IOMEM(0xF0003000)
-#define MSM_GCC_PHYS		0x02082000
-#define MSM_GCC_SIZE		SZ_4K
-
 #define MSM_TLMM_BASE		IOMEM(0xF0004000)
 #define MSM_TLMM_PHYS		0x00800000
 #define MSM_TLMM_SIZE		SZ_16K
 
-#define MSM_SHARED_RAM_BASE	IOMEM(0xF0100000)
-#define MSM_SHARED_RAM_SIZE	SZ_1M
-
 #define MSM8X60_TMR_PHYS	0x02000000
 #define MSM8X60_TMR_SIZE	SZ_4K
 
arch/arm/mach-msm/include/mach/msm_iomap.h +1 -2
index 00afdfb..2ab7cf0 100644
@@ -41,12 +41,11 @@
 #include "msm_iomap-7x30.h"
 #elif defined(CONFIG_ARCH_QSD8X50)
 #include "msm_iomap-8x50.h"
-#elif defined(CONFIG_ARCH_MSM8X60)
-#include "msm_iomap-8x60.h"
 #else
 #include "msm_iomap-7x00.h"
 #endif
 
+#include "msm_iomap-8x60.h"
 #include "msm_iomap-8960.h"
 
 #define MSM_DEBUG_UART_SIZE	SZ_4K
arch/arm/mach-msm/io.c +0 -2
index 35d6926..e674b59 100644
@@ -112,8 +112,6 @@ static struct map_desc msm8x60_io_desc[] __initdata = {
 	MSM_CHIP_DEVICE(QGIC_CPU, MSM8X60),
 	MSM_CHIP_DEVICE(TMR, MSM8X60),
 	MSM_CHIP_DEVICE(TMR0, MSM8X60),
-	MSM_DEVICE(ACC),
-	MSM_DEVICE(GCC),
 #ifdef CONFIG_DEBUG_MSM8660_UART
 	MSM_DEVICE(DEBUG_UART),
 #endif
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
#16 lore raw

[PATCH 11/9] ARM: msm: Allow 8960 and 8660 to compile together

Modify the Kconfig to allow the MSM 8660 and MSM 8960 targets to compile together in the same build. As long as one of these two targets is selected the choice menu used to select which SoC to support will be hidden. Deselecting both of these targets will reintroduce the choice menu, and allow users to select targets that must be compiled in isolation.

---
 arch/arm/mach-msm/Kconfig | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
arch/arm/mach-msm/Kconfig +6 -2
index b2740c8..7902de15 100644
@@ -1,8 +1,12 @@
 if ARCH_MSM
 
+comment "Qualcomm MSM SoC Type"
+	depends on (ARCH_MSM8X60 || ARCH_MSM8960)
+
 choice
 	prompt "Qualcomm MSM SoC Type"
 	default ARCH_MSM7X00A
+	depends on !(ARCH_MSM8X60 || ARCH_MSM8960)
 
 config ARCH_MSM7X00A
 	bool "MSM7x00A / MSM7x01A"
@@ -36,6 +40,8 @@ config ARCH_QSD8X50
 	select GPIO_MSM_V1
 	select MSM_PROC_COMM
 
+endchoice
+
 config ARCH_MSM8X60
 	bool "MSM8X60"
 	select ARCH_MSM_SCORPIONMP
@@ -57,8 +63,6 @@ config ARCH_MSM8960
 	select MSM_SCM if SMP
 	select USE_OF
 
-endchoice
-
 config MSM_HAS_DEBUG_UART_HS
 	bool
 
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation