From a55df6edcfc42354ae5f828c31d9236b8a7bbea7 Mon Sep 17 00:00:00 2001 From: Steve Muckle Date: Thu, 7 Jan 2010 12:43:24 -0800 Subject: msm: MSM8X60 RUMI3 board support Board configuration for MSM8X60 emulation on RUMI3. Signed-off-by: Steve Muckle Signed-off-by: Daniel Walker --- arch/arm/mach-msm/board-msm8x60.c | 58 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 arch/arm/mach-msm/board-msm8x60.c (limited to 'arch/arm/mach-msm/board-msm8x60.c') diff --git a/arch/arm/mach-msm/board-msm8x60.c b/arch/arm/mach-msm/board-msm8x60.c new file mode 100644 index 000000000000..d30ead145001 --- /dev/null +++ b/arch/arm/mach-msm/board-msm8x60.c @@ -0,0 +1,58 @@ +/* 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 +#include +#include + +#include +#include +#include + +#include +#include + +void __iomem *gic_cpu_base_addr; + +unsigned long clk_get_max_axi_khz(void) +{ + return 0; +} + +static void __init msm8x60_map_io(void) +{ + msm_map_msm8x60_io(); +} + +static void __init msm8x60_init_irq(void) +{ + gic_dist_init(0, MSM_QGIC_DIST_BASE, 1); + gic_cpu_base_addr = (void *)MSM_QGIC_CPU_BASE; + gic_cpu_init(0, MSM_QGIC_CPU_BASE); +} + +static void __init msm8x60_init(void) +{ +} + +MACHINE_START(MSM8X60_RUMI3, "QCT MSM8X60 RUMI3") + .map_io = msm8x60_map_io, + .init_irq = msm8x60_init_irq, + .init_machine = msm8x60_init, + .timer = &msm_timer, +MACHINE_END -- cgit v1.2.3 From 9161d303af547653c66dab4e235b6fd0c3ac6148 Mon Sep 17 00:00:00 2001 From: Steve Muckle Date: Thu, 11 Feb 2010 11:50:40 -0800 Subject: msm: 8x60: gic initialization fixup for RUMI On RUMI platform STIs are not enabled by default, contrary to the GIC spec. The bits for STIs in the enable/enable clear registers are also RW instead of RO. STIs need to be enabled at initialization time. Signed-off-by: Steve Muckle Signed-off-by: Daniel Walker --- arch/arm/mach-msm/board-msm8x60.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'arch/arm/mach-msm/board-msm8x60.c') diff --git a/arch/arm/mach-msm/board-msm8x60.c b/arch/arm/mach-msm/board-msm8x60.c index d30ead145001..e7feb99b5cfe 100644 --- a/arch/arm/mach-msm/board-msm8x60.c +++ b/arch/arm/mach-msm/board-msm8x60.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -41,9 +42,28 @@ static void __init msm8x60_map_io(void) static void __init msm8x60_init_irq(void) { + unsigned int i; + gic_dist_init(0, MSM_QGIC_DIST_BASE, 1); gic_cpu_base_addr = (void *)MSM_QGIC_CPU_BASE; gic_cpu_init(0, MSM_QGIC_CPU_BASE); + + /* 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. + */ + 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) + set_irq_handler(i, handle_percpu_irq); + } } static void __init msm8x60_init(void) -- cgit v1.2.3 From e4fbb68f4594388367e4e4595abf9330d9875704 Mon Sep 17 00:00:00 2001 From: Abhijeet Dharmapurikar Date: Mon, 1 Feb 2010 12:30:28 -0800 Subject: msm: 8x60: setup correct handlers for private interrupts Private Peripheral interrupts could be edge triggered or level triggered depending on the platform. Initialize handlers for these in board file. Signed-off-by: Abhijeet Dharmapurikar Signed-off-by: Daniel Walker --- arch/arm/mach-msm/board-msm8x60.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-msm/board-msm8x60.c') diff --git a/arch/arm/mach-msm/board-msm8x60.c b/arch/arm/mach-msm/board-msm8x60.c index e7feb99b5cfe..70087cad6731 100644 --- a/arch/arm/mach-msm/board-msm8x60.c +++ b/arch/arm/mach-msm/board-msm8x60.c @@ -44,7 +44,7 @@ static void __init msm8x60_init_irq(void) { unsigned int i; - gic_dist_init(0, MSM_QGIC_DIST_BASE, 1); + gic_dist_init(0, MSM_QGIC_DIST_BASE, GIC_PPI_START); gic_cpu_base_addr = (void *)MSM_QGIC_CPU_BASE; gic_cpu_init(0, MSM_QGIC_CPU_BASE); -- cgit v1.2.3 From 49b76f718d634599693e18efe169adfa2d5b75e8 Mon Sep 17 00:00:00 2001 From: Steve Muckle Date: Fri, 19 Mar 2010 17:00:08 -0700 Subject: msm: add msm8x60_surf machine Signed-off-by: Steve Muckle Signed-off-by: Daniel Walker --- arch/arm/mach-msm/Kconfig | 8 +++++++- arch/arm/mach-msm/board-msm8x60.c | 7 +++++++ 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'arch/arm/mach-msm/board-msm8x60.c') diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig index 75b8c3d26068..e0db899d118a 100644 --- a/arch/arm/mach-msm/Kconfig +++ b/arch/arm/mach-msm/Kconfig @@ -41,7 +41,7 @@ config ARCH_MSM8X60 select CPU_V7 select MSM_V2_TLMM select MSM_GPIOMUX - select MACH_MSM8X60_RUMI3 if (!MACH_MSM8X60_RUMI3) + select MACH_MSM8X60_SURF if (!MACH_MSM8X60_RUMI3) endchoice @@ -100,6 +100,12 @@ config MACH_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. + endmenu config MSM_DEBUG_UART diff --git a/arch/arm/mach-msm/board-msm8x60.c b/arch/arm/mach-msm/board-msm8x60.c index 70087cad6731..a8a4d8d0ae31 100644 --- a/arch/arm/mach-msm/board-msm8x60.c +++ b/arch/arm/mach-msm/board-msm8x60.c @@ -76,3 +76,10 @@ MACHINE_START(MSM8X60_RUMI3, "QCT MSM8X60 RUMI3") .init_machine = msm8x60_init, .timer = &msm_timer, MACHINE_END + +MACHINE_START(MSM8X60_SURF, "QCT MSM8X60 SURF") + .map_io = msm8x60_map_io, + .init_irq = msm8x60_init_irq, + .init_machine = msm8x60_init, + .timer = &msm_timer, +MACHINE_END -- cgit v1.2.3 From 57bbf1cc8c265f9d4c6831d9e3f07a72cf16ee27 Mon Sep 17 00:00:00 2001 From: Steve Muckle Date: Thu, 7 Jan 2010 12:51:10 -0800 Subject: msm: MSM8X60 simulator board support Board configuration for MSM8X60 simulation. Signed-off-by: Steve Muckle Signed-off-by: Daniel Walker --- arch/arm/mach-msm/Kconfig | 8 +++++++- arch/arm/mach-msm/board-msm8x60.c | 10 +++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'arch/arm/mach-msm/board-msm8x60.c') diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig index e0db899d118a..6cedfef480f0 100644 --- a/arch/arm/mach-msm/Kconfig +++ b/arch/arm/mach-msm/Kconfig @@ -41,7 +41,7 @@ config ARCH_MSM8X60 select CPU_V7 select MSM_V2_TLMM select MSM_GPIOMUX - select MACH_MSM8X60_SURF if (!MACH_MSM8X60_RUMI3) + select MACH_MSM8X60_SURF if (!MACH_MSM8X60_RUMI3 && !MACH_MSM8X60_SIM) endchoice @@ -106,6 +106,12 @@ config MACH_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. + endmenu config MSM_DEBUG_UART diff --git a/arch/arm/mach-msm/board-msm8x60.c b/arch/arm/mach-msm/board-msm8x60.c index a8a4d8d0ae31..95b0e369feab 100644 --- a/arch/arm/mach-msm/board-msm8x60.c +++ b/arch/arm/mach-msm/board-msm8x60.c @@ -54,7 +54,8 @@ static void __init msm8x60_init_irq(void) /* 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. */ - writel(0x0000FFFF, MSM_QGIC_DIST_BASE + GIC_DIST_ENABLE_SET); + if (!machine_is_msm8x60_sim()) + 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 @@ -83,3 +84,10 @@ MACHINE_START(MSM8X60_SURF, "QCT MSM8X60 SURF") .init_machine = msm8x60_init, .timer = &msm_timer, MACHINE_END + +MACHINE_START(MSM8X60_SIM, "QCT MSM8X60 SIMULATOR") + .map_io = msm8x60_map_io, + .init_irq = msm8x60_init_irq, + .init_machine = msm8x60_init, + .timer = &msm_timer, +MACHINE_END -- cgit v1.2.3 From 69b7f6ff855e32ec353475ce7b7246d293816078 Mon Sep 17 00:00:00 2001 From: Gregory Bean Date: Sun, 4 Apr 2010 22:29:02 -0700 Subject: msm: add MSM8x60 FFA support The MSM8X60 FFA contains different components than the MSM8X60 SURF, and therefore requires a different ARCH type and machine ID. Signed-off-by: Gregory Bean Signed-off-by: Daniel Walker --- arch/arm/mach-msm/Kconfig | 9 ++++++++- arch/arm/mach-msm/board-msm8x60.c | 7 +++++++ 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'arch/arm/mach-msm/board-msm8x60.c') diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig index 6cedfef480f0..3115a29dec4e 100644 --- a/arch/arm/mach-msm/Kconfig +++ b/arch/arm/mach-msm/Kconfig @@ -41,7 +41,8 @@ config ARCH_MSM8X60 select CPU_V7 select MSM_V2_TLMM select MSM_GPIOMUX - select MACH_MSM8X60_SURF if (!MACH_MSM8X60_RUMI3 && !MACH_MSM8X60_SIM) + select MACH_MSM8X60_SURF if (!MACH_MSM8X60_RUMI3 && !MACH_MSM8X60_SIM \ + && !MACH_MSM8X60_FFA) endchoice @@ -112,6 +113,12 @@ config MACH_MSM8X60_SIM 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. + endmenu config MSM_DEBUG_UART diff --git a/arch/arm/mach-msm/board-msm8x60.c b/arch/arm/mach-msm/board-msm8x60.c index 95b0e369feab..7486a681cc71 100644 --- a/arch/arm/mach-msm/board-msm8x60.c +++ b/arch/arm/mach-msm/board-msm8x60.c @@ -91,3 +91,10 @@ MACHINE_START(MSM8X60_SIM, "QCT MSM8X60 SIMULATOR") .init_machine = msm8x60_init, .timer = &msm_timer, MACHINE_END + +MACHINE_START(MSM8X60_FFA, "QCT MSM8X60 FFA") + .map_io = msm8x60_map_io, + .init_irq = msm8x60_init_irq, + .init_machine = msm8x60_init, + .timer = &msm_timer, +MACHINE_END -- cgit v1.2.3