linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: davidb@codeaurora.org (David Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 10/11] msm: Support for the MSM8960 Simulator target
Date: Wed, 19 Jan 2011 12:25:46 -0800	[thread overview]
Message-ID: <1295468747-22796-11-git-send-email-davidb@codeaurora.org> (raw)
In-Reply-To: <1295468747-22796-1-git-send-email-davidb@codeaurora.org>

From: Stepan Moskovchenko <stepanm@codeaurora.org>

Add the board file, Kconfig options, and Makefile options
needed to build for the MSM8960 Simulator target.

Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
---
 arch/arm/mach-msm/Kconfig         |   16 ++++++++++
 arch/arm/mach-msm/Makefile        |    5 +++
 arch/arm/mach-msm/board-msm8960.c |   58 +++++++++++++++++++++++++++++++++++++
 3 files changed, 79 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-msm/board-msm8960.c

diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig
index 5d3d9ad..adca96c 100644
--- a/arch/arm/mach-msm/Kconfig
+++ b/arch/arm/mach-msm/Kconfig
@@ -48,6 +48,16 @@ config ARCH_MSM8X60
 	select IOMMU_API
 	select MSM_SCM if SMP
 
+config ARCH_MSM8960
+	bool "MSM8960"
+	select ARCH_MSM_SCORPIONMP
+	select MACH_MSM8960_SIM
+	select ARM_GIC
+	select CPU_V7
+	select MSM_V2_TLMM
+	select MSM_GPIOMUX
+	select MSM_SCM if SMP
+
 endchoice
 
 config MSM_SOC_REV_A
@@ -125,6 +135,12 @@ config MACH_MSM8X60_FFA
 	help
 	  Support for the Qualcomm MSM8x60 FFA eval board.
 
+config MACH_MSM8960_SIM
+	depends on ARCH_MSM8960
+	bool "MSM8960 Simulator"
+	help
+	  Support for the Qualcomm MSM8960 simulator.
+
 endmenu
 
 config IOMMU_PGTABLES_L2
diff --git a/arch/arm/mach-msm/Makefile b/arch/arm/mach-msm/Makefile
index 3e15ff3..0229427 100644
--- a/arch/arm/mach-msm/Makefile
+++ b/arch/arm/mach-msm/Makefile
@@ -6,6 +6,7 @@ obj-$(CONFIG_ARCH_MSM7X00A) += dma.o irq.o acpuclock-arm11.o
 obj-$(CONFIG_ARCH_MSM7X30) += dma.o
 obj-$(CONFIG_ARCH_QSD8X50) += dma.o sirc.o
 obj-$(CONFIG_ARCH_MSM8X60) += clock-dummy.o iommu.o iommu_dev.o devices-msm8x60-iommu.o
+obj-$(CONFIG_ARCH_MSM8960) += clock-dummy.o
 
 obj-$(CONFIG_MSM_PROC_COMM) += proc_comm.o clock-pcom.o vreg.o
 obj-$(CONFIG_MSM_PROC_COMM) += clock.o
@@ -23,12 +24,16 @@ 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_MSM8960) += board-msm8960.o
 
 obj-$(CONFIG_ARCH_MSM7X30) += gpiomux-7x30.o gpiomux-v1.o gpiomux.o
 obj-$(CONFIG_ARCH_QSD8X50) += gpiomux-8x50.o gpiomux-v1.o gpiomux.o
 obj-$(CONFIG_ARCH_MSM8X60) += gpiomux-8x60.o gpiomux-v2.o gpiomux.o
 ifdef CONFIG_MSM_V2_TLMM
+ifndef CONFIG_ARCH_MSM8960
+# TODO: TLMM Mapping issues need to be resolved
 obj-y	+= gpio-v2.o
+endif
 else
 obj-y	+= gpio.o
 endif
diff --git a/arch/arm/mach-msm/board-msm8960.c b/arch/arm/mach-msm/board-msm8960.c
new file mode 100644
index 0000000..90efd54
--- /dev/null
+++ b/arch/arm/mach-msm/board-msm8960.c
@@ -0,0 +1,58 @@
+/* Copyright (c) 2011, 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/kernel.h>
+#include <linux/platform_device.h>
+#include <linux/io.h>
+#include <linux/irq.h>
+
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <asm/hardware/gic.h>
+
+#include <mach/board.h>
+#include <mach/msm_iomap.h>
+
+static void __init msm8960_map_io(void)
+{
+	msm_map_msm8960_io();
+}
+
+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);
+
+	/* 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)
+			set_irq_handler(i, handle_percpu_irq);
+	}
+}
+
+MACHINE_START(MSM8960_SIM, "QCT MSM8960 SIMULATOR")
+	.map_io = msm8960_map_io,
+	.init_irq = msm8960_init_irq,
+	.timer = &msm_timer,
+MACHINE_END
-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

  parent reply	other threads:[~2011-01-19 20:25 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-15  3:49 [PATCH 0/7] msm: Support for Qualcomm MSM8960 Stepan Moskovchenko
2010-12-15  3:49 ` [PATCH 1/7] msm: io: I/O register definitions for MSM8960 Stepan Moskovchenko
2010-12-15 15:31   ` Arnd Bergmann
2010-12-15 15:35     ` David Brown
2010-12-15 16:40       ` Arnd Bergmann
2010-12-15 22:03         ` David Brown
2010-12-15 22:37           ` Arnd Bergmann
2010-12-17  0:16             ` David Brown
2010-12-24 13:29               ` Arnd Bergmann
2010-12-25 16:04                 ` Nicolas Pitre
2011-01-03  0:33                   ` Russell King - ARM Linux
2011-01-03  1:04                     ` Nicolas Pitre
2010-12-25 18:40                 ` David Brown
2010-12-15  3:49 ` [PATCH 2/7] msm: Physical offset " Stepan Moskovchenko
2010-12-15 13:17   ` Sergei Shtylyov
2010-12-15 13:55     ` David Brown
2010-12-15 14:40       ` Daniel Walker
2010-12-15 15:38         ` David Brown
2010-12-15 17:53           ` Steve Muckle
2010-12-15 17:55           ` Daniel Walker
2010-12-15 18:07             ` Steve Muckle
2010-12-15 18:21               ` Daniel Walker
2010-12-15  3:49 ` [PATCH 3/7] msm: irqs-8960: Interrupt map " Stepan Moskovchenko
2010-12-15  3:49 ` [PATCH 4/7] msm: Board file for MSM8960 simulator Stepan Moskovchenko
2010-12-15 15:36   ` Arnd Bergmann
2010-12-15  3:49 ` [PATCH 5/7] msm: timer: Timer support for MSM8960 Stepan Moskovchenko
2010-12-15  3:49 ` [PATCH 6/7] msm: Makefile cleanup Stepan Moskovchenko
2010-12-15  3:49 ` [PATCH 7/7] msm: Build support for the MSM8960 target Stepan Moskovchenko
2010-12-15 15:34   ` Arnd Bergmann
     [not found] ` <1295468747-22796-1-git-send-email-davidb@codeaurora.org>
2011-01-19 20:25   ` [PATCH v2 01/11] msm: Add CPU queries David Brown
2011-01-25  0:09     ` Daniel Walker
2011-01-25  0:20       ` David Brown
2011-01-25  0:23         ` Daniel Walker
2011-01-25  0:57           ` David Brown
2011-01-25 17:35             ` Daniel Walker
2011-01-25 19:17               ` David Brown
2011-01-25 19:25                 ` Daniel Walker
2011-01-25 19:45                   ` David Brown
2011-01-25 20:06                     ` Daniel Walker
2011-01-26  4:29                       ` Zhaohui Wang
2011-01-26  6:19                         ` David Brown
2011-01-26  6:32                           ` Stepan Moskovchenko
2011-01-26  6:52                             ` David Brown
2011-01-19 20:25   ` [PATCH v2 02/11] msm: Generalize timer register mappings David Brown
2011-01-24 22:36     ` Daniel Walker
2011-01-24 22:44       ` David Brown
2011-01-24 22:57         ` Daniel Walker
2011-01-24 23:19           ` David Brown
2011-01-26 22:12         ` Dima Zavin
2011-01-26 22:41           ` David Brown
2011-01-26 22:50             ` Dima Zavin
2011-01-26 22:46           ` Russell King - ARM Linux
2011-01-25 18:12     ` Carl Vanderlip
2011-01-25 19:18       ` David Brown
2011-01-19 20:25   ` [PATCH v2 03/11] msm: Generalize QGIC registers David Brown
2011-01-19 20:25   ` [PATCH v2 04/11] msm: io: I/O register definitions for MSM8960 David Brown
2011-01-24 20:49     ` Daniel Walker
2011-01-24 21:31       ` David Brown
2011-01-24 21:36         ` Daniel Walker
2011-01-19 20:25   ` [PATCH v2 05/11] msm: Physical offset " David Brown
2011-01-24 23:31     ` Russell King - ARM Linux
2011-01-19 20:25   ` [PATCH v2 06/11] msm: irqs-8960: Interrupt map " David Brown
2011-01-24 22:45     ` Daniel Walker
2011-01-24 22:49       ` David Brown
2011-01-19 20:25   ` [PATCH v2 07/11] msm: Add MSM 8960 cpu_is check David Brown
2011-01-24 20:46     ` Daniel Walker
2011-01-24 21:30       ` David Brown
2011-01-24 21:35         ` Daniel Walker
2011-01-24 22:13           ` David Brown
2011-01-24 22:16             ` Daniel Walker
2011-01-19 20:25   ` [PATCH v2 08/11] msm: timer: Timer support for MSM8960 David Brown
2011-01-19 20:25   ` [PATCH v2 09/11] msm: Makefile cleanup David Brown
2011-01-19 20:25   ` David Brown [this message]
2011-01-19 20:25   ` [PATCH v2 11/11] msm: Support for the MSM8960 RUMI3 target David Brown
2011-01-24 23:28     ` Russell King - ARM Linux
2011-01-19 22:40 ` [PATCH v2 00/11] msm: Add initial support for MSM8960 David Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1295468747-22796-11-git-send-email-davidb@codeaurora.org \
    --to=davidb@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).