1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
/* linux/arch/arm/mach-s5pv210/dev-herring-phone.c
* Copyright (C) 2010 Samsung Electronics. All rights reserved.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* 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.
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/irq.h>
#include <mach/map.h>
#include <mach/gpio.h>
#include <mach/gpio-herring.h>
#include "../../../drivers/misc/samsung_modemctl/modem_ctl.h"
#include "herring.h"
/* Modem control */
static struct modemctl_data mdmctl_data = {
.name = "xmm",
.gpio_phone_active = GPIO_PHONE_ACTIVE,
.gpio_pda_active = GPIO_PDA_ACTIVE,
.gpio_cp_reset = GPIO_CP_RST,
.gpio_phone_on = GPIO_PHONE_ON,
.is_cdma_modem = 0,
.num_pdp_contexts = 3,
};
static struct resource mdmctl_res[] = {
[0] = {
.name = "active",
.start = IRQ_EINT15,
.end = IRQ_EINT15,
.flags = IORESOURCE_IRQ,
},
[1] = {
.name = "onedram",
.start = IRQ_EINT11,
.end = IRQ_EINT11,
.flags = IORESOURCE_IRQ,
},
[2] = {
.name = "onedram",
.start = (S5PV210_PA_SDRAM + 0x05000000),
.end = (S5PV210_PA_SDRAM + 0x05000000 + SZ_16M - 1),
.flags = IORESOURCE_MEM,
},
};
static struct platform_device modemctl = {
.name = "modemctl",
.id = -1,
.num_resources = ARRAY_SIZE(mdmctl_res),
.resource = mdmctl_res,
.dev = {
.platform_data = &mdmctl_data,
},
};
static int __init herring_init_phone_interface(void)
{
/* CDMA device */
if (herring_is_cdma_wimax_dev()) {
mdmctl_data.is_cdma_modem = 1;
mdmctl_data.num_pdp_contexts = 1;
}
platform_device_register(&modemctl);
return 0;
}
device_initcall(herring_init_phone_interface);
|