aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-msm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-msm')
-rw-r--r--arch/arm/mach-msm/Makefile2
-rw-r--r--arch/arm/mach-msm/board-msm8960.c22
-rw-r--r--arch/arm/mach-msm/devices-msm8960.c85
-rw-r--r--arch/arm/mach-msm/devices.h3
4 files changed, 111 insertions, 1 deletions
diff --git a/arch/arm/mach-msm/Makefile b/arch/arm/mach-msm/Makefile
index c7964417daed..ea8c74f56eaf 100644
--- a/arch/arm/mach-msm/Makefile
+++ b/arch/arm/mach-msm/Makefile
@@ -27,7 +27,7 @@ obj-$(CONFIG_MACH_HALIBUT) += board-halibut.o devices-msm7x00.o
27obj-$(CONFIG_ARCH_MSM7X30) += board-msm7x30.o devices-msm7x30.o 27obj-$(CONFIG_ARCH_MSM7X30) += board-msm7x30.o devices-msm7x30.o
28obj-$(CONFIG_ARCH_QSD8X50) += board-qsd8x50.o devices-qsd8x50.o 28obj-$(CONFIG_ARCH_QSD8X50) += board-qsd8x50.o devices-qsd8x50.o
29obj-$(CONFIG_ARCH_MSM8X60) += board-msm8x60.o 29obj-$(CONFIG_ARCH_MSM8X60) += board-msm8x60.o
30obj-$(CONFIG_ARCH_MSM8960) += board-msm8960.o 30obj-$(CONFIG_ARCH_MSM8960) += board-msm8960.o devices-msm8960.o
31 31
32obj-$(CONFIG_ARCH_MSM7X30) += gpiomux-v1.o gpiomux.o 32obj-$(CONFIG_ARCH_MSM7X30) += gpiomux-v1.o gpiomux.o
33obj-$(CONFIG_ARCH_QSD8X50) += gpiomux-8x50.o gpiomux-v1.o gpiomux.o 33obj-$(CONFIG_ARCH_QSD8X50) += gpiomux-8x50.o gpiomux-v1.o gpiomux.o
diff --git a/arch/arm/mach-msm/board-msm8960.c b/arch/arm/mach-msm/board-msm8960.c
index 2b095735f142..ef80f46d6cb3 100644
--- a/arch/arm/mach-msm/board-msm8960.c
+++ b/arch/arm/mach-msm/board-msm8960.c
@@ -27,6 +27,8 @@
27#include <mach/board.h> 27#include <mach/board.h>
28#include <mach/msm_iomap.h> 28#include <mach/msm_iomap.h>
29 29
30#include "devices.h"
31
30static void __init msm8960_map_io(void) 32static void __init msm8960_map_io(void)
31{ 33{
32 msm_map_msm8960_io(); 34 msm_map_msm8960_io();
@@ -54,15 +56,35 @@ static void __init msm8960_init_irq(void)
54 } 56 }
55} 57}
56 58
59static struct platform_device *sim_devices[] __initdata = {
60 &msm8960_device_uart_gsbi2,
61};
62
63static struct platform_device *rumi3_devices[] __initdata = {
64 &msm8960_device_uart_gsbi5,
65};
66
67static void __init msm8960_sim_init(void)
68{
69 platform_add_devices(sim_devices, ARRAY_SIZE(sim_devices));
70}
71
72static void __init msm8960_rumi3_init(void)
73{
74 platform_add_devices(rumi3_devices, ARRAY_SIZE(rumi3_devices));
75}
76
57MACHINE_START(MSM8960_SIM, "QCT MSM8960 SIMULATOR") 77MACHINE_START(MSM8960_SIM, "QCT MSM8960 SIMULATOR")
58 .map_io = msm8960_map_io, 78 .map_io = msm8960_map_io,
59 .init_irq = msm8960_init_irq, 79 .init_irq = msm8960_init_irq,
60 .timer = &msm_timer, 80 .timer = &msm_timer,
81 .init_machine = msm8960_sim_init,
61MACHINE_END 82MACHINE_END
62 83
63MACHINE_START(MSM8960_RUMI3, "QCT MSM8960 RUMI3") 84MACHINE_START(MSM8960_RUMI3, "QCT MSM8960 RUMI3")
64 .map_io = msm8960_map_io, 85 .map_io = msm8960_map_io,
65 .init_irq = msm8960_init_irq, 86 .init_irq = msm8960_init_irq,
66 .timer = &msm_timer, 87 .timer = &msm_timer,
88 .init_machine = msm8960_rumi3_init,
67MACHINE_END 89MACHINE_END
68 90
diff --git a/arch/arm/mach-msm/devices-msm8960.c b/arch/arm/mach-msm/devices-msm8960.c
new file mode 100644
index 000000000000..d9e1f26475de
--- /dev/null
+++ b/arch/arm/mach-msm/devices-msm8960.c
@@ -0,0 +1,85 @@
1/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15 * 02110-1301, USA.
16 */
17
18#include <linux/kernel.h>
19#include <linux/platform_device.h>
20
21#include <linux/dma-mapping.h>
22#include <mach/irqs-8960.h>
23#include <mach/board.h>
24
25#include "devices.h"
26
27#define MSM_GSBI2_PHYS 0x16100000
28#define MSM_UART2DM_PHYS (MSM_GSBI2_PHYS + 0x40000)
29
30#define MSM_GSBI5_PHYS 0x16400000
31#define MSM_UART5DM_PHYS (MSM_GSBI5_PHYS + 0x40000)
32
33static struct resource resources_uart_gsbi2[] = {
34 {
35 .start = GSBI2_UARTDM_IRQ,
36 .end = GSBI2_UARTDM_IRQ,
37 .flags = IORESOURCE_IRQ,
38 },
39 {
40 .start = MSM_UART2DM_PHYS,
41 .end = MSM_UART2DM_PHYS + PAGE_SIZE - 1,
42 .name = "uart_resource",
43 .flags = IORESOURCE_MEM,
44 },
45 {
46 .start = MSM_GSBI2_PHYS,
47 .end = MSM_GSBI2_PHYS + PAGE_SIZE - 1,
48 .name = "gsbi_resource",
49 .flags = IORESOURCE_MEM,
50 },
51};
52
53struct platform_device msm8960_device_uart_gsbi2 = {
54 .name = "msm_serial",
55 .id = 0,
56 .num_resources = ARRAY_SIZE(resources_uart_gsbi2),
57 .resource = resources_uart_gsbi2,
58};
59
60static struct resource resources_uart_gsbi5[] = {
61 {
62 .start = GSBI5_UARTDM_IRQ,
63 .end = GSBI5_UARTDM_IRQ,
64 .flags = IORESOURCE_IRQ,
65 },
66 {
67 .start = MSM_UART5DM_PHYS,
68 .end = MSM_UART5DM_PHYS + PAGE_SIZE - 1,
69 .name = "uart_resource",
70 .flags = IORESOURCE_MEM,
71 },
72 {
73 .start = MSM_GSBI5_PHYS,
74 .end = MSM_GSBI5_PHYS + PAGE_SIZE - 1,
75 .name = "gsbi_resource",
76 .flags = IORESOURCE_MEM,
77 },
78};
79
80struct platform_device msm8960_device_uart_gsbi5 = {
81 .name = "msm_serial",
82 .id = 0,
83 .num_resources = ARRAY_SIZE(resources_uart_gsbi5),
84 .resource = resources_uart_gsbi5,
85};
diff --git a/arch/arm/mach-msm/devices.h b/arch/arm/mach-msm/devices.h
index 87c70bfce2bd..e2643b340b2a 100644
--- a/arch/arm/mach-msm/devices.h
+++ b/arch/arm/mach-msm/devices.h
@@ -22,6 +22,9 @@ extern struct platform_device msm_device_uart1;
22extern struct platform_device msm_device_uart2; 22extern struct platform_device msm_device_uart2;
23extern struct platform_device msm_device_uart3; 23extern struct platform_device msm_device_uart3;
24 24
25extern struct platform_device msm8960_device_uart_gsbi2;
26extern struct platform_device msm8960_device_uart_gsbi5;
27
25extern struct platform_device msm_device_sdc1; 28extern struct platform_device msm_device_sdc1;
26extern struct platform_device msm_device_sdc2; 29extern struct platform_device msm_device_sdc2;
27extern struct platform_device msm_device_sdc3; 30extern struct platform_device msm_device_sdc3;