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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
|
/* Copyright (c) 2013-2014, The Linux Foundation. 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.
*/
#include <linux/kernel.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_platform.h>
#include <linux/of_fdt.h>
#include <linux/of_irq.h>
#include <asm/mach/arch.h>
#include <soc/qcom/socinfo.h>
#include <mach/board.h>
#include <mach/msm_memtypes.h>
#include <soc/qcom/rpm-smd.h>
#include <soc/qcom/smd.h>
#include <soc/qcom/smem.h>
#include <soc/qcom/spm.h>
#include <soc/qcom/pm.h>
#include "board-dt.h"
#include "platsmp.h"
static void __init msm8916_dt_reserve(void)
{
of_scan_flat_dt(dt_scan_for_memory_reserve, NULL);
}
static void __init msm8916_map_io(void)
{
msm_map_msm8916_io();
}
static struct of_dev_auxdata msm8916_auxdata_lookup[] __initdata = {
{}
};
/*
* Used to satisfy dependencies for devices that need to be
* run early or in a particular order. Most likely your device doesn't fall
* into this category, and thus the driver should not be added here. The
* EPROBE_DEFER can satisfy most dependency problems.
*/
void __init msm8916_add_drivers(void)
{
msm_smd_init();
msm_rpm_driver_init();
msm_spm_device_init();
msm_pm_sleep_status_init();
}
static void __init msm8916_init(void)
{
struct of_dev_auxdata *adata = msm8916_auxdata_lookup;
/*
* populate devices from DT first so smem probe will get called as part
* of msm_smem_init. socinfo_init needs smem support so call
* msm_smem_init before it.
*/
of_platform_populate(NULL, of_default_bus_match_table, adata, NULL);
msm_smem_init();
if (socinfo_init() < 0)
pr_err("%s: socinfo_init() failed\n", __func__);
msm8916_add_drivers();
}
static const char *msm8916_dt_match[] __initconst = {
"qcom,msm8916",
"qcom,apq8016",
NULL
};
static const char *msm8936_dt_match[] __initconst = {
"qcom,msm8936",
NULL
};
static const char *msm8939_dt_match[] __initconst = {
"qcom,msm8939",
NULL
};
static const char *msm8929_dt_match[] __initconst = {
"qcom,msm8929",
NULL
};
static const char *msmtellurium_dt_match[] __initconst = {
"qcom,msmtellurium",
NULL
};
DT_MACHINE_START(MSM8916_DT,
"Qualcomm Technologies, Inc. MSM 8916 (Flattened Device Tree)")
.map_io = msm8916_map_io,
.init_machine = msm8916_init,
.dt_compat = msm8916_dt_match,
.reserve = msm8916_dt_reserve,
.smp = &msm8916_smp_ops,
MACHINE_END
DT_MACHINE_START(MSM8939_DT,
"Qualcomm Technologies, Inc. MSM 8939 (Flattened Device Tree)")
.map_io = msm8916_map_io,
.init_machine = msm8916_init,
.dt_compat = msm8939_dt_match,
.reserve = msm8916_dt_reserve,
.smp = &msm8936_smp_ops,
MACHINE_END
DT_MACHINE_START(MSM8936_DT,
"Qualcomm Technologies, Inc. MSM 8936 (Flattened Device Tree)")
.map_io = msm8916_map_io,
.init_machine = msm8916_init,
.dt_compat = msm8936_dt_match,
.reserve = msm8916_dt_reserve,
.smp = &msm8936_smp_ops,
MACHINE_END
DT_MACHINE_START(MSM8929_DT,
"Qualcomm Technologies, Inc. MSM 8929 (Flattened Device Tree)")
.map_io = msm8916_map_io,
.init_machine = msm8916_init,
.dt_compat = msm8929_dt_match,
.reserve = msm8916_dt_reserve,
.smp = &msm8936_smp_ops,
MACHINE_END
DT_MACHINE_START(MSMTellurium_DT,
"Qualcomm Technologies, Inc. MSM Tellurium (Flattened Device Tree)")
.map_io = msm8916_map_io,
.init_machine = msm8916_init,
.dt_compat = msmtellurium_dt_match,
.reserve = msm8916_dt_reserve,
.smp = &msm8936_smp_ops,
MACHINE_END
|