1 /* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
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.
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.
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
18 #include <linux/kernel.h>
19 #include <linux/platform_device.h>
21 #include <linux/dma-mapping.h>
22 #include <mach/irqs-8960.h>
23 #include <mach/board.h>
27 #define MSM_GSBI2_PHYS 0x16100000
28 #define MSM_UART2DM_PHYS (MSM_GSBI2_PHYS + 0x40000)
30 #define MSM_GSBI5_PHYS 0x16400000
31 #define MSM_UART5DM_PHYS (MSM_GSBI5_PHYS + 0x40000)
33 static struct resource resources_uart_gsbi2
[] = {
35 .start
= GSBI2_UARTDM_IRQ
,
36 .end
= GSBI2_UARTDM_IRQ
,
37 .flags
= IORESOURCE_IRQ
,
40 .start
= MSM_UART2DM_PHYS
,
41 .end
= MSM_UART2DM_PHYS
+ PAGE_SIZE
- 1,
42 .name
= "uart_resource",
43 .flags
= IORESOURCE_MEM
,
46 .start
= MSM_GSBI2_PHYS
,
47 .end
= MSM_GSBI2_PHYS
+ PAGE_SIZE
- 1,
48 .name
= "gsbi_resource",
49 .flags
= IORESOURCE_MEM
,
53 struct platform_device msm8960_device_uart_gsbi2
= {
56 .num_resources
= ARRAY_SIZE(resources_uart_gsbi2
),
57 .resource
= resources_uart_gsbi2
,
60 static struct resource resources_uart_gsbi5
[] = {
62 .start
= GSBI5_UARTDM_IRQ
,
63 .end
= GSBI5_UARTDM_IRQ
,
64 .flags
= IORESOURCE_IRQ
,
67 .start
= MSM_UART5DM_PHYS
,
68 .end
= MSM_UART5DM_PHYS
+ PAGE_SIZE
- 1,
69 .name
= "uart_resource",
70 .flags
= IORESOURCE_MEM
,
73 .start
= MSM_GSBI5_PHYS
,
74 .end
= MSM_GSBI5_PHYS
+ PAGE_SIZE
- 1,
75 .name
= "gsbi_resource",
76 .flags
= IORESOURCE_MEM
,
80 struct platform_device msm8960_device_uart_gsbi5
= {
83 .num_resources
= ARRAY_SIZE(resources_uart_gsbi5
),
84 .resource
= resources_uart_gsbi5
,