Commit 0e70156de4c8465bfb8cb45cdc1bbc2fa474ce14

Authored by Tony Lindgren
1 parent 957988c7d5

ARM: OMAP2+: Make omap4-keypad.h local

This can be local to mach-omap2.

Signed-off-by: Tony Lindgren <tony@atomide.com>

Showing 4 changed files with 10 additions and 10 deletions Inline Diff

arch/arm/mach-omap2/board-4430sdp.c
1 /* 1 /*
2 * Board support file for OMAP4430 SDP. 2 * Board support file for OMAP4430 SDP.
3 * 3 *
4 * Copyright (C) 2009 Texas Instruments 4 * Copyright (C) 2009 Texas Instruments
5 * 5 *
6 * Author: Santosh Shilimkar <santosh.shilimkar@ti.com> 6 * Author: Santosh Shilimkar <santosh.shilimkar@ti.com>
7 * 7 *
8 * Based on mach-omap2/board-3430sdp.c 8 * Based on mach-omap2/board-3430sdp.c
9 * 9 *
10 * This program is free software; you can redistribute it and/or modify 10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as 11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation. 12 * published by the Free Software Foundation.
13 */ 13 */
14 14
15 #include <linux/kernel.h> 15 #include <linux/kernel.h>
16 #include <linux/init.h> 16 #include <linux/init.h>
17 #include <linux/platform_device.h> 17 #include <linux/platform_device.h>
18 #include <linux/io.h> 18 #include <linux/io.h>
19 #include <linux/gpio.h> 19 #include <linux/gpio.h>
20 #include <linux/usb/otg.h> 20 #include <linux/usb/otg.h>
21 #include <linux/spi/spi.h> 21 #include <linux/spi/spi.h>
22 #include <linux/i2c/twl.h> 22 #include <linux/i2c/twl.h>
23 #include <linux/mfd/twl6040.h> 23 #include <linux/mfd/twl6040.h>
24 #include <linux/gpio_keys.h> 24 #include <linux/gpio_keys.h>
25 #include <linux/regulator/machine.h> 25 #include <linux/regulator/machine.h>
26 #include <linux/regulator/fixed.h> 26 #include <linux/regulator/fixed.h>
27 #include <linux/leds.h> 27 #include <linux/leds.h>
28 #include <linux/leds_pwm.h> 28 #include <linux/leds_pwm.h>
29 #include <linux/platform_data/omap4-keypad.h> 29 #include <linux/platform_data/omap4-keypad.h>
30 30
31 #include <asm/hardware/gic.h> 31 #include <asm/hardware/gic.h>
32 #include <asm/mach-types.h> 32 #include <asm/mach-types.h>
33 #include <asm/mach/arch.h> 33 #include <asm/mach/arch.h>
34 #include <asm/mach/map.h> 34 #include <asm/mach/map.h>
35 35
36 #include "common.h" 36 #include "common.h"
37 #include <plat/usb.h> 37 #include <plat/usb.h>
38 #include <plat/mmc.h> 38 #include <plat/mmc.h>
39 #include <plat/omap4-keypad.h> 39 #include "omap4-keypad.h"
40 #include <video/omapdss.h> 40 #include <video/omapdss.h>
41 #include <video/omap-panel-nokia-dsi.h> 41 #include <video/omap-panel-nokia-dsi.h>
42 #include <video/omap-panel-picodlp.h> 42 #include <video/omap-panel-picodlp.h>
43 #include <linux/wl12xx.h> 43 #include <linux/wl12xx.h>
44 #include <linux/platform_data/omap-abe-twl6040.h> 44 #include <linux/platform_data/omap-abe-twl6040.h>
45 45
46 #include "soc.h" 46 #include "soc.h"
47 #include "mux.h" 47 #include "mux.h"
48 #include "hsmmc.h" 48 #include "hsmmc.h"
49 #include "control.h" 49 #include "control.h"
50 #include "common-board-devices.h" 50 #include "common-board-devices.h"
51 51
52 #define ETH_KS8851_IRQ 34 52 #define ETH_KS8851_IRQ 34
53 #define ETH_KS8851_POWER_ON 48 53 #define ETH_KS8851_POWER_ON 48
54 #define ETH_KS8851_QUART 138 54 #define ETH_KS8851_QUART 138
55 #define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184 55 #define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184
56 #define OMAP4_SFH7741_ENABLE_GPIO 188 56 #define OMAP4_SFH7741_ENABLE_GPIO 188
57 #define HDMI_GPIO_CT_CP_HPD 60 /* HPD mode enable/disable */ 57 #define HDMI_GPIO_CT_CP_HPD 60 /* HPD mode enable/disable */
58 #define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */ 58 #define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */
59 #define HDMI_GPIO_HPD 63 /* Hotplug detect */ 59 #define HDMI_GPIO_HPD 63 /* Hotplug detect */
60 #define DISPLAY_SEL_GPIO 59 /* LCD2/PicoDLP switch */ 60 #define DISPLAY_SEL_GPIO 59 /* LCD2/PicoDLP switch */
61 #define DLP_POWER_ON_GPIO 40 61 #define DLP_POWER_ON_GPIO 40
62 62
63 #define GPIO_WIFI_PMENA 54 63 #define GPIO_WIFI_PMENA 54
64 #define GPIO_WIFI_IRQ 53 64 #define GPIO_WIFI_IRQ 53
65 65
66 static const int sdp4430_keymap[] = { 66 static const int sdp4430_keymap[] = {
67 KEY(0, 0, KEY_E), 67 KEY(0, 0, KEY_E),
68 KEY(0, 1, KEY_R), 68 KEY(0, 1, KEY_R),
69 KEY(0, 2, KEY_T), 69 KEY(0, 2, KEY_T),
70 KEY(0, 3, KEY_HOME), 70 KEY(0, 3, KEY_HOME),
71 KEY(0, 4, KEY_F5), 71 KEY(0, 4, KEY_F5),
72 KEY(0, 5, KEY_UNKNOWN), 72 KEY(0, 5, KEY_UNKNOWN),
73 KEY(0, 6, KEY_I), 73 KEY(0, 6, KEY_I),
74 KEY(0, 7, KEY_LEFTSHIFT), 74 KEY(0, 7, KEY_LEFTSHIFT),
75 75
76 KEY(1, 0, KEY_D), 76 KEY(1, 0, KEY_D),
77 KEY(1, 1, KEY_F), 77 KEY(1, 1, KEY_F),
78 KEY(1, 2, KEY_G), 78 KEY(1, 2, KEY_G),
79 KEY(1, 3, KEY_SEND), 79 KEY(1, 3, KEY_SEND),
80 KEY(1, 4, KEY_F6), 80 KEY(1, 4, KEY_F6),
81 KEY(1, 5, KEY_UNKNOWN), 81 KEY(1, 5, KEY_UNKNOWN),
82 KEY(1, 6, KEY_K), 82 KEY(1, 6, KEY_K),
83 KEY(1, 7, KEY_ENTER), 83 KEY(1, 7, KEY_ENTER),
84 84
85 KEY(2, 0, KEY_X), 85 KEY(2, 0, KEY_X),
86 KEY(2, 1, KEY_C), 86 KEY(2, 1, KEY_C),
87 KEY(2, 2, KEY_V), 87 KEY(2, 2, KEY_V),
88 KEY(2, 3, KEY_END), 88 KEY(2, 3, KEY_END),
89 KEY(2, 4, KEY_F7), 89 KEY(2, 4, KEY_F7),
90 KEY(2, 5, KEY_UNKNOWN), 90 KEY(2, 5, KEY_UNKNOWN),
91 KEY(2, 6, KEY_DOT), 91 KEY(2, 6, KEY_DOT),
92 KEY(2, 7, KEY_CAPSLOCK), 92 KEY(2, 7, KEY_CAPSLOCK),
93 93
94 KEY(3, 0, KEY_Z), 94 KEY(3, 0, KEY_Z),
95 KEY(3, 1, KEY_KPPLUS), 95 KEY(3, 1, KEY_KPPLUS),
96 KEY(3, 2, KEY_B), 96 KEY(3, 2, KEY_B),
97 KEY(3, 3, KEY_F1), 97 KEY(3, 3, KEY_F1),
98 KEY(3, 4, KEY_F8), 98 KEY(3, 4, KEY_F8),
99 KEY(3, 5, KEY_UNKNOWN), 99 KEY(3, 5, KEY_UNKNOWN),
100 KEY(3, 6, KEY_O), 100 KEY(3, 6, KEY_O),
101 KEY(3, 7, KEY_SPACE), 101 KEY(3, 7, KEY_SPACE),
102 102
103 KEY(4, 0, KEY_W), 103 KEY(4, 0, KEY_W),
104 KEY(4, 1, KEY_Y), 104 KEY(4, 1, KEY_Y),
105 KEY(4, 2, KEY_U), 105 KEY(4, 2, KEY_U),
106 KEY(4, 3, KEY_F2), 106 KEY(4, 3, KEY_F2),
107 KEY(4, 4, KEY_VOLUMEUP), 107 KEY(4, 4, KEY_VOLUMEUP),
108 KEY(4, 5, KEY_UNKNOWN), 108 KEY(4, 5, KEY_UNKNOWN),
109 KEY(4, 6, KEY_L), 109 KEY(4, 6, KEY_L),
110 KEY(4, 7, KEY_LEFT), 110 KEY(4, 7, KEY_LEFT),
111 111
112 KEY(5, 0, KEY_S), 112 KEY(5, 0, KEY_S),
113 KEY(5, 1, KEY_H), 113 KEY(5, 1, KEY_H),
114 KEY(5, 2, KEY_J), 114 KEY(5, 2, KEY_J),
115 KEY(5, 3, KEY_F3), 115 KEY(5, 3, KEY_F3),
116 KEY(5, 4, KEY_F9), 116 KEY(5, 4, KEY_F9),
117 KEY(5, 5, KEY_VOLUMEDOWN), 117 KEY(5, 5, KEY_VOLUMEDOWN),
118 KEY(5, 6, KEY_M), 118 KEY(5, 6, KEY_M),
119 KEY(5, 7, KEY_RIGHT), 119 KEY(5, 7, KEY_RIGHT),
120 120
121 KEY(6, 0, KEY_Q), 121 KEY(6, 0, KEY_Q),
122 KEY(6, 1, KEY_A), 122 KEY(6, 1, KEY_A),
123 KEY(6, 2, KEY_N), 123 KEY(6, 2, KEY_N),
124 KEY(6, 3, KEY_BACK), 124 KEY(6, 3, KEY_BACK),
125 KEY(6, 4, KEY_BACKSPACE), 125 KEY(6, 4, KEY_BACKSPACE),
126 KEY(6, 5, KEY_UNKNOWN), 126 KEY(6, 5, KEY_UNKNOWN),
127 KEY(6, 6, KEY_P), 127 KEY(6, 6, KEY_P),
128 KEY(6, 7, KEY_UP), 128 KEY(6, 7, KEY_UP),
129 129
130 KEY(7, 0, KEY_PROG1), 130 KEY(7, 0, KEY_PROG1),
131 KEY(7, 1, KEY_PROG2), 131 KEY(7, 1, KEY_PROG2),
132 KEY(7, 2, KEY_PROG3), 132 KEY(7, 2, KEY_PROG3),
133 KEY(7, 3, KEY_PROG4), 133 KEY(7, 3, KEY_PROG4),
134 KEY(7, 4, KEY_F4), 134 KEY(7, 4, KEY_F4),
135 KEY(7, 5, KEY_UNKNOWN), 135 KEY(7, 5, KEY_UNKNOWN),
136 KEY(7, 6, KEY_OK), 136 KEY(7, 6, KEY_OK),
137 KEY(7, 7, KEY_DOWN), 137 KEY(7, 7, KEY_DOWN),
138 }; 138 };
139 static struct omap_device_pad keypad_pads[] = { 139 static struct omap_device_pad keypad_pads[] = {
140 { .name = "kpd_col1.kpd_col1", 140 { .name = "kpd_col1.kpd_col1",
141 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, 141 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
142 }, 142 },
143 { .name = "kpd_col1.kpd_col1", 143 { .name = "kpd_col1.kpd_col1",
144 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, 144 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
145 }, 145 },
146 { .name = "kpd_col2.kpd_col2", 146 { .name = "kpd_col2.kpd_col2",
147 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, 147 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
148 }, 148 },
149 { .name = "kpd_col3.kpd_col3", 149 { .name = "kpd_col3.kpd_col3",
150 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, 150 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
151 }, 151 },
152 { .name = "kpd_col4.kpd_col4", 152 { .name = "kpd_col4.kpd_col4",
153 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, 153 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
154 }, 154 },
155 { .name = "kpd_col5.kpd_col5", 155 { .name = "kpd_col5.kpd_col5",
156 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, 156 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
157 }, 157 },
158 { .name = "gpmc_a23.kpd_col7", 158 { .name = "gpmc_a23.kpd_col7",
159 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, 159 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
160 }, 160 },
161 { .name = "gpmc_a22.kpd_col6", 161 { .name = "gpmc_a22.kpd_col6",
162 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, 162 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
163 }, 163 },
164 { .name = "kpd_row0.kpd_row0", 164 { .name = "kpd_row0.kpd_row0",
165 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | 165 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
166 OMAP_MUX_MODE1 | OMAP_INPUT_EN, 166 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
167 }, 167 },
168 { .name = "kpd_row1.kpd_row1", 168 { .name = "kpd_row1.kpd_row1",
169 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | 169 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
170 OMAP_MUX_MODE1 | OMAP_INPUT_EN, 170 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
171 }, 171 },
172 { .name = "kpd_row2.kpd_row2", 172 { .name = "kpd_row2.kpd_row2",
173 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | 173 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
174 OMAP_MUX_MODE1 | OMAP_INPUT_EN, 174 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
175 }, 175 },
176 { .name = "kpd_row3.kpd_row3", 176 { .name = "kpd_row3.kpd_row3",
177 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | 177 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
178 OMAP_MUX_MODE1 | OMAP_INPUT_EN, 178 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
179 }, 179 },
180 { .name = "kpd_row4.kpd_row4", 180 { .name = "kpd_row4.kpd_row4",
181 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | 181 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
182 OMAP_MUX_MODE1 | OMAP_INPUT_EN, 182 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
183 }, 183 },
184 { .name = "kpd_row5.kpd_row5", 184 { .name = "kpd_row5.kpd_row5",
185 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | 185 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
186 OMAP_MUX_MODE1 | OMAP_INPUT_EN, 186 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
187 }, 187 },
188 { .name = "gpmc_a18.kpd_row6", 188 { .name = "gpmc_a18.kpd_row6",
189 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | 189 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
190 OMAP_MUX_MODE1 | OMAP_INPUT_EN, 190 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
191 }, 191 },
192 { .name = "gpmc_a19.kpd_row7", 192 { .name = "gpmc_a19.kpd_row7",
193 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | 193 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
194 OMAP_MUX_MODE1 | OMAP_INPUT_EN, 194 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
195 }, 195 },
196 }; 196 };
197 197
198 static struct matrix_keymap_data sdp4430_keymap_data = { 198 static struct matrix_keymap_data sdp4430_keymap_data = {
199 .keymap = sdp4430_keymap, 199 .keymap = sdp4430_keymap,
200 .keymap_size = ARRAY_SIZE(sdp4430_keymap), 200 .keymap_size = ARRAY_SIZE(sdp4430_keymap),
201 }; 201 };
202 202
203 static struct omap4_keypad_platform_data sdp4430_keypad_data = { 203 static struct omap4_keypad_platform_data sdp4430_keypad_data = {
204 .keymap_data = &sdp4430_keymap_data, 204 .keymap_data = &sdp4430_keymap_data,
205 .rows = 8, 205 .rows = 8,
206 .cols = 8, 206 .cols = 8,
207 }; 207 };
208 208
209 static struct omap_board_data keypad_data = { 209 static struct omap_board_data keypad_data = {
210 .id = 1, 210 .id = 1,
211 .pads = keypad_pads, 211 .pads = keypad_pads,
212 .pads_cnt = ARRAY_SIZE(keypad_pads), 212 .pads_cnt = ARRAY_SIZE(keypad_pads),
213 }; 213 };
214 214
215 static struct gpio_led sdp4430_gpio_leds[] = { 215 static struct gpio_led sdp4430_gpio_leds[] = {
216 { 216 {
217 .name = "omap4:green:debug0", 217 .name = "omap4:green:debug0",
218 .gpio = 61, 218 .gpio = 61,
219 }, 219 },
220 { 220 {
221 .name = "omap4:green:debug1", 221 .name = "omap4:green:debug1",
222 .gpio = 30, 222 .gpio = 30,
223 }, 223 },
224 { 224 {
225 .name = "omap4:green:debug2", 225 .name = "omap4:green:debug2",
226 .gpio = 7, 226 .gpio = 7,
227 }, 227 },
228 { 228 {
229 .name = "omap4:green:debug3", 229 .name = "omap4:green:debug3",
230 .gpio = 8, 230 .gpio = 8,
231 }, 231 },
232 { 232 {
233 .name = "omap4:green:debug4", 233 .name = "omap4:green:debug4",
234 .gpio = 50, 234 .gpio = 50,
235 }, 235 },
236 { 236 {
237 .name = "omap4:blue:user", 237 .name = "omap4:blue:user",
238 .gpio = 169, 238 .gpio = 169,
239 }, 239 },
240 { 240 {
241 .name = "omap4:red:user", 241 .name = "omap4:red:user",
242 .gpio = 170, 242 .gpio = 170,
243 }, 243 },
244 { 244 {
245 .name = "omap4:green:user", 245 .name = "omap4:green:user",
246 .gpio = 139, 246 .gpio = 139,
247 }, 247 },
248 248
249 }; 249 };
250 250
251 static struct gpio_keys_button sdp4430_gpio_keys[] = { 251 static struct gpio_keys_button sdp4430_gpio_keys[] = {
252 { 252 {
253 .desc = "Proximity Sensor", 253 .desc = "Proximity Sensor",
254 .type = EV_SW, 254 .type = EV_SW,
255 .code = SW_FRONT_PROXIMITY, 255 .code = SW_FRONT_PROXIMITY,
256 .gpio = OMAP4_SFH7741_SENSOR_OUTPUT_GPIO, 256 .gpio = OMAP4_SFH7741_SENSOR_OUTPUT_GPIO,
257 .active_low = 0, 257 .active_low = 0,
258 } 258 }
259 }; 259 };
260 260
261 static struct gpio_led_platform_data sdp4430_led_data = { 261 static struct gpio_led_platform_data sdp4430_led_data = {
262 .leds = sdp4430_gpio_leds, 262 .leds = sdp4430_gpio_leds,
263 .num_leds = ARRAY_SIZE(sdp4430_gpio_leds), 263 .num_leds = ARRAY_SIZE(sdp4430_gpio_leds),
264 }; 264 };
265 265
266 static struct led_pwm sdp4430_pwm_leds[] = { 266 static struct led_pwm sdp4430_pwm_leds[] = {
267 { 267 {
268 .name = "omap4:green:chrg", 268 .name = "omap4:green:chrg",
269 .pwm_id = 1, 269 .pwm_id = 1,
270 .max_brightness = 255, 270 .max_brightness = 255,
271 .pwm_period_ns = 7812500, 271 .pwm_period_ns = 7812500,
272 }, 272 },
273 }; 273 };
274 274
275 static struct led_pwm_platform_data sdp4430_pwm_data = { 275 static struct led_pwm_platform_data sdp4430_pwm_data = {
276 .num_leds = ARRAY_SIZE(sdp4430_pwm_leds), 276 .num_leds = ARRAY_SIZE(sdp4430_pwm_leds),
277 .leds = sdp4430_pwm_leds, 277 .leds = sdp4430_pwm_leds,
278 }; 278 };
279 279
280 static struct platform_device sdp4430_leds_pwm = { 280 static struct platform_device sdp4430_leds_pwm = {
281 .name = "leds_pwm", 281 .name = "leds_pwm",
282 .id = -1, 282 .id = -1,
283 .dev = { 283 .dev = {
284 .platform_data = &sdp4430_pwm_data, 284 .platform_data = &sdp4430_pwm_data,
285 }, 285 },
286 }; 286 };
287 287
288 static int omap_prox_activate(struct device *dev) 288 static int omap_prox_activate(struct device *dev)
289 { 289 {
290 gpio_set_value(OMAP4_SFH7741_ENABLE_GPIO , 1); 290 gpio_set_value(OMAP4_SFH7741_ENABLE_GPIO , 1);
291 return 0; 291 return 0;
292 } 292 }
293 293
294 static void omap_prox_deactivate(struct device *dev) 294 static void omap_prox_deactivate(struct device *dev)
295 { 295 {
296 gpio_set_value(OMAP4_SFH7741_ENABLE_GPIO , 0); 296 gpio_set_value(OMAP4_SFH7741_ENABLE_GPIO , 0);
297 } 297 }
298 298
299 static struct gpio_keys_platform_data sdp4430_gpio_keys_data = { 299 static struct gpio_keys_platform_data sdp4430_gpio_keys_data = {
300 .buttons = sdp4430_gpio_keys, 300 .buttons = sdp4430_gpio_keys,
301 .nbuttons = ARRAY_SIZE(sdp4430_gpio_keys), 301 .nbuttons = ARRAY_SIZE(sdp4430_gpio_keys),
302 .enable = omap_prox_activate, 302 .enable = omap_prox_activate,
303 .disable = omap_prox_deactivate, 303 .disable = omap_prox_deactivate,
304 }; 304 };
305 305
306 static struct platform_device sdp4430_gpio_keys_device = { 306 static struct platform_device sdp4430_gpio_keys_device = {
307 .name = "gpio-keys", 307 .name = "gpio-keys",
308 .id = -1, 308 .id = -1,
309 .dev = { 309 .dev = {
310 .platform_data = &sdp4430_gpio_keys_data, 310 .platform_data = &sdp4430_gpio_keys_data,
311 }, 311 },
312 }; 312 };
313 313
314 static struct platform_device sdp4430_leds_gpio = { 314 static struct platform_device sdp4430_leds_gpio = {
315 .name = "leds-gpio", 315 .name = "leds-gpio",
316 .id = -1, 316 .id = -1,
317 .dev = { 317 .dev = {
318 .platform_data = &sdp4430_led_data, 318 .platform_data = &sdp4430_led_data,
319 }, 319 },
320 }; 320 };
321 static struct spi_board_info sdp4430_spi_board_info[] __initdata = { 321 static struct spi_board_info sdp4430_spi_board_info[] __initdata = {
322 { 322 {
323 .modalias = "ks8851", 323 .modalias = "ks8851",
324 .bus_num = 1, 324 .bus_num = 1,
325 .chip_select = 0, 325 .chip_select = 0,
326 .max_speed_hz = 24000000, 326 .max_speed_hz = 24000000,
327 /* 327 /*
328 * .irq is set to gpio_to_irq(ETH_KS8851_IRQ) 328 * .irq is set to gpio_to_irq(ETH_KS8851_IRQ)
329 * in omap_4430sdp_init 329 * in omap_4430sdp_init
330 */ 330 */
331 }, 331 },
332 }; 332 };
333 333
334 static struct gpio sdp4430_eth_gpios[] __initdata = { 334 static struct gpio sdp4430_eth_gpios[] __initdata = {
335 { ETH_KS8851_POWER_ON, GPIOF_OUT_INIT_HIGH, "eth_power" }, 335 { ETH_KS8851_POWER_ON, GPIOF_OUT_INIT_HIGH, "eth_power" },
336 { ETH_KS8851_QUART, GPIOF_OUT_INIT_HIGH, "quart" }, 336 { ETH_KS8851_QUART, GPIOF_OUT_INIT_HIGH, "quart" },
337 { ETH_KS8851_IRQ, GPIOF_IN, "eth_irq" }, 337 { ETH_KS8851_IRQ, GPIOF_IN, "eth_irq" },
338 }; 338 };
339 339
340 static int __init omap_ethernet_init(void) 340 static int __init omap_ethernet_init(void)
341 { 341 {
342 int status; 342 int status;
343 343
344 /* Request of GPIO lines */ 344 /* Request of GPIO lines */
345 status = gpio_request_array(sdp4430_eth_gpios, 345 status = gpio_request_array(sdp4430_eth_gpios,
346 ARRAY_SIZE(sdp4430_eth_gpios)); 346 ARRAY_SIZE(sdp4430_eth_gpios));
347 if (status) 347 if (status)
348 pr_err("Cannot request ETH GPIOs\n"); 348 pr_err("Cannot request ETH GPIOs\n");
349 349
350 return status; 350 return status;
351 } 351 }
352 352
353 static struct regulator_consumer_supply sdp4430_vbat_supply[] = { 353 static struct regulator_consumer_supply sdp4430_vbat_supply[] = {
354 REGULATOR_SUPPLY("vddvibl", "twl6040-vibra"), 354 REGULATOR_SUPPLY("vddvibl", "twl6040-vibra"),
355 REGULATOR_SUPPLY("vddvibr", "twl6040-vibra"), 355 REGULATOR_SUPPLY("vddvibr", "twl6040-vibra"),
356 }; 356 };
357 357
358 static struct regulator_init_data sdp4430_vbat_data = { 358 static struct regulator_init_data sdp4430_vbat_data = {
359 .constraints = { 359 .constraints = {
360 .always_on = 1, 360 .always_on = 1,
361 }, 361 },
362 .num_consumer_supplies = ARRAY_SIZE(sdp4430_vbat_supply), 362 .num_consumer_supplies = ARRAY_SIZE(sdp4430_vbat_supply),
363 .consumer_supplies = sdp4430_vbat_supply, 363 .consumer_supplies = sdp4430_vbat_supply,
364 }; 364 };
365 365
366 static struct fixed_voltage_config sdp4430_vbat_pdata = { 366 static struct fixed_voltage_config sdp4430_vbat_pdata = {
367 .supply_name = "VBAT", 367 .supply_name = "VBAT",
368 .microvolts = 3750000, 368 .microvolts = 3750000,
369 .init_data = &sdp4430_vbat_data, 369 .init_data = &sdp4430_vbat_data,
370 .gpio = -EINVAL, 370 .gpio = -EINVAL,
371 }; 371 };
372 372
373 static struct platform_device sdp4430_vbat = { 373 static struct platform_device sdp4430_vbat = {
374 .name = "reg-fixed-voltage", 374 .name = "reg-fixed-voltage",
375 .id = -1, 375 .id = -1,
376 .dev = { 376 .dev = {
377 .platform_data = &sdp4430_vbat_pdata, 377 .platform_data = &sdp4430_vbat_pdata,
378 }, 378 },
379 }; 379 };
380 380
381 static struct platform_device sdp4430_dmic_codec = { 381 static struct platform_device sdp4430_dmic_codec = {
382 .name = "dmic-codec", 382 .name = "dmic-codec",
383 .id = -1, 383 .id = -1,
384 }; 384 };
385 385
386 static struct platform_device sdp4430_hdmi_audio_codec = { 386 static struct platform_device sdp4430_hdmi_audio_codec = {
387 .name = "hdmi-audio-codec", 387 .name = "hdmi-audio-codec",
388 .id = -1, 388 .id = -1,
389 }; 389 };
390 390
391 static struct omap_abe_twl6040_data sdp4430_abe_audio_data = { 391 static struct omap_abe_twl6040_data sdp4430_abe_audio_data = {
392 .card_name = "SDP4430", 392 .card_name = "SDP4430",
393 .has_hs = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT, 393 .has_hs = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
394 .has_hf = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT, 394 .has_hf = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
395 .has_ep = 1, 395 .has_ep = 1,
396 .has_aux = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT, 396 .has_aux = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
397 .has_vibra = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT, 397 .has_vibra = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
398 398
399 .has_dmic = 1, 399 .has_dmic = 1,
400 .has_hsmic = 1, 400 .has_hsmic = 1,
401 .has_mainmic = 1, 401 .has_mainmic = 1,
402 .has_submic = 1, 402 .has_submic = 1,
403 .has_afm = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT, 403 .has_afm = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
404 404
405 .jack_detection = 1, 405 .jack_detection = 1,
406 /* MCLK input is 38.4MHz */ 406 /* MCLK input is 38.4MHz */
407 .mclk_freq = 38400000, 407 .mclk_freq = 38400000,
408 }; 408 };
409 409
410 static struct platform_device sdp4430_abe_audio = { 410 static struct platform_device sdp4430_abe_audio = {
411 .name = "omap-abe-twl6040", 411 .name = "omap-abe-twl6040",
412 .id = -1, 412 .id = -1,
413 .dev = { 413 .dev = {
414 .platform_data = &sdp4430_abe_audio_data, 414 .platform_data = &sdp4430_abe_audio_data,
415 }, 415 },
416 }; 416 };
417 417
418 static struct platform_device *sdp4430_devices[] __initdata = { 418 static struct platform_device *sdp4430_devices[] __initdata = {
419 &sdp4430_gpio_keys_device, 419 &sdp4430_gpio_keys_device,
420 &sdp4430_leds_gpio, 420 &sdp4430_leds_gpio,
421 &sdp4430_leds_pwm, 421 &sdp4430_leds_pwm,
422 &sdp4430_vbat, 422 &sdp4430_vbat,
423 &sdp4430_dmic_codec, 423 &sdp4430_dmic_codec,
424 &sdp4430_abe_audio, 424 &sdp4430_abe_audio,
425 &sdp4430_hdmi_audio_codec, 425 &sdp4430_hdmi_audio_codec,
426 }; 426 };
427 427
428 static struct omap_musb_board_data musb_board_data = { 428 static struct omap_musb_board_data musb_board_data = {
429 .interface_type = MUSB_INTERFACE_UTMI, 429 .interface_type = MUSB_INTERFACE_UTMI,
430 .mode = MUSB_OTG, 430 .mode = MUSB_OTG,
431 .power = 100, 431 .power = 100,
432 }; 432 };
433 433
434 static struct omap2_hsmmc_info mmc[] = { 434 static struct omap2_hsmmc_info mmc[] = {
435 { 435 {
436 .mmc = 2, 436 .mmc = 2,
437 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, 437 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
438 .gpio_cd = -EINVAL, 438 .gpio_cd = -EINVAL,
439 .gpio_wp = -EINVAL, 439 .gpio_wp = -EINVAL,
440 .nonremovable = true, 440 .nonremovable = true,
441 .ocr_mask = MMC_VDD_29_30, 441 .ocr_mask = MMC_VDD_29_30,
442 .no_off_init = true, 442 .no_off_init = true,
443 }, 443 },
444 { 444 {
445 .mmc = 1, 445 .mmc = 1,
446 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, 446 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
447 .gpio_cd = -EINVAL, 447 .gpio_cd = -EINVAL,
448 .gpio_wp = -EINVAL, 448 .gpio_wp = -EINVAL,
449 }, 449 },
450 { 450 {
451 .mmc = 5, 451 .mmc = 5,
452 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD, 452 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
453 .pm_caps = MMC_PM_KEEP_POWER, 453 .pm_caps = MMC_PM_KEEP_POWER,
454 .gpio_cd = -EINVAL, 454 .gpio_cd = -EINVAL,
455 .gpio_wp = -EINVAL, 455 .gpio_wp = -EINVAL,
456 .ocr_mask = MMC_VDD_165_195, 456 .ocr_mask = MMC_VDD_165_195,
457 .nonremovable = true, 457 .nonremovable = true,
458 }, 458 },
459 {} /* Terminator */ 459 {} /* Terminator */
460 }; 460 };
461 461
462 static struct regulator_consumer_supply sdp4430_vaux_supply[] = { 462 static struct regulator_consumer_supply sdp4430_vaux_supply[] = {
463 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"), 463 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
464 }; 464 };
465 465
466 static struct regulator_consumer_supply omap4_sdp4430_vmmc5_supply = { 466 static struct regulator_consumer_supply omap4_sdp4430_vmmc5_supply = {
467 .supply = "vmmc", 467 .supply = "vmmc",
468 .dev_name = "omap_hsmmc.4", 468 .dev_name = "omap_hsmmc.4",
469 }; 469 };
470 470
471 static struct regulator_init_data sdp4430_vmmc5 = { 471 static struct regulator_init_data sdp4430_vmmc5 = {
472 .constraints = { 472 .constraints = {
473 .valid_ops_mask = REGULATOR_CHANGE_STATUS, 473 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
474 }, 474 },
475 .num_consumer_supplies = 1, 475 .num_consumer_supplies = 1,
476 .consumer_supplies = &omap4_sdp4430_vmmc5_supply, 476 .consumer_supplies = &omap4_sdp4430_vmmc5_supply,
477 }; 477 };
478 478
479 static struct fixed_voltage_config sdp4430_vwlan = { 479 static struct fixed_voltage_config sdp4430_vwlan = {
480 .supply_name = "vwl1271", 480 .supply_name = "vwl1271",
481 .microvolts = 1800000, /* 1.8V */ 481 .microvolts = 1800000, /* 1.8V */
482 .gpio = GPIO_WIFI_PMENA, 482 .gpio = GPIO_WIFI_PMENA,
483 .startup_delay = 70000, /* 70msec */ 483 .startup_delay = 70000, /* 70msec */
484 .enable_high = 1, 484 .enable_high = 1,
485 .enabled_at_boot = 0, 485 .enabled_at_boot = 0,
486 .init_data = &sdp4430_vmmc5, 486 .init_data = &sdp4430_vmmc5,
487 }; 487 };
488 488
489 static struct platform_device omap_vwlan_device = { 489 static struct platform_device omap_vwlan_device = {
490 .name = "reg-fixed-voltage", 490 .name = "reg-fixed-voltage",
491 .id = 1, 491 .id = 1,
492 .dev = { 492 .dev = {
493 .platform_data = &sdp4430_vwlan, 493 .platform_data = &sdp4430_vwlan,
494 }, 494 },
495 }; 495 };
496 496
497 static struct regulator_init_data sdp4430_vaux1 = { 497 static struct regulator_init_data sdp4430_vaux1 = {
498 .constraints = { 498 .constraints = {
499 .min_uV = 1000000, 499 .min_uV = 1000000,
500 .max_uV = 3000000, 500 .max_uV = 3000000,
501 .apply_uV = true, 501 .apply_uV = true,
502 .valid_modes_mask = REGULATOR_MODE_NORMAL 502 .valid_modes_mask = REGULATOR_MODE_NORMAL
503 | REGULATOR_MODE_STANDBY, 503 | REGULATOR_MODE_STANDBY,
504 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE 504 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
505 | REGULATOR_CHANGE_MODE 505 | REGULATOR_CHANGE_MODE
506 | REGULATOR_CHANGE_STATUS, 506 | REGULATOR_CHANGE_STATUS,
507 }, 507 },
508 .num_consumer_supplies = ARRAY_SIZE(sdp4430_vaux_supply), 508 .num_consumer_supplies = ARRAY_SIZE(sdp4430_vaux_supply),
509 .consumer_supplies = sdp4430_vaux_supply, 509 .consumer_supplies = sdp4430_vaux_supply,
510 }; 510 };
511 511
512 static struct regulator_init_data sdp4430_vusim = { 512 static struct regulator_init_data sdp4430_vusim = {
513 .constraints = { 513 .constraints = {
514 .min_uV = 1200000, 514 .min_uV = 1200000,
515 .max_uV = 2900000, 515 .max_uV = 2900000,
516 .apply_uV = true, 516 .apply_uV = true,
517 .valid_modes_mask = REGULATOR_MODE_NORMAL 517 .valid_modes_mask = REGULATOR_MODE_NORMAL
518 | REGULATOR_MODE_STANDBY, 518 | REGULATOR_MODE_STANDBY,
519 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE 519 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
520 | REGULATOR_CHANGE_MODE 520 | REGULATOR_CHANGE_MODE
521 | REGULATOR_CHANGE_STATUS, 521 | REGULATOR_CHANGE_STATUS,
522 }, 522 },
523 }; 523 };
524 524
525 static struct twl6040_codec_data twl6040_codec = { 525 static struct twl6040_codec_data twl6040_codec = {
526 /* single-step ramp for headset and handsfree */ 526 /* single-step ramp for headset and handsfree */
527 .hs_left_step = 0x0f, 527 .hs_left_step = 0x0f,
528 .hs_right_step = 0x0f, 528 .hs_right_step = 0x0f,
529 .hf_left_step = 0x1d, 529 .hf_left_step = 0x1d,
530 .hf_right_step = 0x1d, 530 .hf_right_step = 0x1d,
531 }; 531 };
532 532
533 static struct twl6040_vibra_data twl6040_vibra = { 533 static struct twl6040_vibra_data twl6040_vibra = {
534 .vibldrv_res = 8, 534 .vibldrv_res = 8,
535 .vibrdrv_res = 3, 535 .vibrdrv_res = 3,
536 .viblmotor_res = 10, 536 .viblmotor_res = 10,
537 .vibrmotor_res = 10, 537 .vibrmotor_res = 10,
538 .vddvibl_uV = 0, /* fixed volt supply - VBAT */ 538 .vddvibl_uV = 0, /* fixed volt supply - VBAT */
539 .vddvibr_uV = 0, /* fixed volt supply - VBAT */ 539 .vddvibr_uV = 0, /* fixed volt supply - VBAT */
540 }; 540 };
541 541
542 static struct twl6040_platform_data twl6040_data = { 542 static struct twl6040_platform_data twl6040_data = {
543 .codec = &twl6040_codec, 543 .codec = &twl6040_codec,
544 .vibra = &twl6040_vibra, 544 .vibra = &twl6040_vibra,
545 .audpwron_gpio = 127, 545 .audpwron_gpio = 127,
546 }; 546 };
547 547
548 static struct twl4030_platform_data sdp4430_twldata = { 548 static struct twl4030_platform_data sdp4430_twldata = {
549 /* Regulators */ 549 /* Regulators */
550 .vusim = &sdp4430_vusim, 550 .vusim = &sdp4430_vusim,
551 .vaux1 = &sdp4430_vaux1, 551 .vaux1 = &sdp4430_vaux1,
552 }; 552 };
553 553
554 static struct i2c_board_info __initdata sdp4430_i2c_3_boardinfo[] = { 554 static struct i2c_board_info __initdata sdp4430_i2c_3_boardinfo[] = {
555 { 555 {
556 I2C_BOARD_INFO("tmp105", 0x48), 556 I2C_BOARD_INFO("tmp105", 0x48),
557 }, 557 },
558 { 558 {
559 I2C_BOARD_INFO("bh1780", 0x29), 559 I2C_BOARD_INFO("bh1780", 0x29),
560 }, 560 },
561 }; 561 };
562 static struct i2c_board_info __initdata sdp4430_i2c_4_boardinfo[] = { 562 static struct i2c_board_info __initdata sdp4430_i2c_4_boardinfo[] = {
563 { 563 {
564 I2C_BOARD_INFO("hmc5843", 0x1e), 564 I2C_BOARD_INFO("hmc5843", 0x1e),
565 }, 565 },
566 }; 566 };
567 static int __init omap4_i2c_init(void) 567 static int __init omap4_i2c_init(void)
568 { 568 {
569 omap4_pmic_get_config(&sdp4430_twldata, TWL_COMMON_PDATA_USB, 569 omap4_pmic_get_config(&sdp4430_twldata, TWL_COMMON_PDATA_USB,
570 TWL_COMMON_REGULATOR_VDAC | 570 TWL_COMMON_REGULATOR_VDAC |
571 TWL_COMMON_REGULATOR_VAUX2 | 571 TWL_COMMON_REGULATOR_VAUX2 |
572 TWL_COMMON_REGULATOR_VAUX3 | 572 TWL_COMMON_REGULATOR_VAUX3 |
573 TWL_COMMON_REGULATOR_VMMC | 573 TWL_COMMON_REGULATOR_VMMC |
574 TWL_COMMON_REGULATOR_VPP | 574 TWL_COMMON_REGULATOR_VPP |
575 TWL_COMMON_REGULATOR_VANA | 575 TWL_COMMON_REGULATOR_VANA |
576 TWL_COMMON_REGULATOR_VCXIO | 576 TWL_COMMON_REGULATOR_VCXIO |
577 TWL_COMMON_REGULATOR_VUSB | 577 TWL_COMMON_REGULATOR_VUSB |
578 TWL_COMMON_REGULATOR_CLK32KG | 578 TWL_COMMON_REGULATOR_CLK32KG |
579 TWL_COMMON_REGULATOR_V1V8 | 579 TWL_COMMON_REGULATOR_V1V8 |
580 TWL_COMMON_REGULATOR_V2V1); 580 TWL_COMMON_REGULATOR_V2V1);
581 omap4_pmic_init("twl6030", &sdp4430_twldata, 581 omap4_pmic_init("twl6030", &sdp4430_twldata,
582 &twl6040_data, 119 + OMAP44XX_IRQ_GIC_START); 582 &twl6040_data, 119 + OMAP44XX_IRQ_GIC_START);
583 omap_register_i2c_bus(2, 400, NULL, 0); 583 omap_register_i2c_bus(2, 400, NULL, 0);
584 omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo, 584 omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo,
585 ARRAY_SIZE(sdp4430_i2c_3_boardinfo)); 585 ARRAY_SIZE(sdp4430_i2c_3_boardinfo));
586 omap_register_i2c_bus(4, 400, sdp4430_i2c_4_boardinfo, 586 omap_register_i2c_bus(4, 400, sdp4430_i2c_4_boardinfo,
587 ARRAY_SIZE(sdp4430_i2c_4_boardinfo)); 587 ARRAY_SIZE(sdp4430_i2c_4_boardinfo));
588 return 0; 588 return 0;
589 } 589 }
590 590
591 static void __init omap_sfh7741prox_init(void) 591 static void __init omap_sfh7741prox_init(void)
592 { 592 {
593 int error; 593 int error;
594 594
595 error = gpio_request_one(OMAP4_SFH7741_ENABLE_GPIO, 595 error = gpio_request_one(OMAP4_SFH7741_ENABLE_GPIO,
596 GPIOF_OUT_INIT_LOW, "sfh7741"); 596 GPIOF_OUT_INIT_LOW, "sfh7741");
597 if (error < 0) 597 if (error < 0)
598 pr_err("%s:failed to request GPIO %d, error %d\n", 598 pr_err("%s:failed to request GPIO %d, error %d\n",
599 __func__, OMAP4_SFH7741_ENABLE_GPIO, error); 599 __func__, OMAP4_SFH7741_ENABLE_GPIO, error);
600 } 600 }
601 601
602 static struct gpio sdp4430_hdmi_gpios[] = { 602 static struct gpio sdp4430_hdmi_gpios[] = {
603 { HDMI_GPIO_CT_CP_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ct_cp_hpd" }, 603 { HDMI_GPIO_CT_CP_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ct_cp_hpd" },
604 { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" }, 604 { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" },
605 { HDMI_GPIO_HPD, GPIOF_DIR_IN, "hdmi_gpio_hpd" }, 605 { HDMI_GPIO_HPD, GPIOF_DIR_IN, "hdmi_gpio_hpd" },
606 }; 606 };
607 607
608 static int sdp4430_panel_enable_hdmi(struct omap_dss_device *dssdev) 608 static int sdp4430_panel_enable_hdmi(struct omap_dss_device *dssdev)
609 { 609 {
610 int status; 610 int status;
611 611
612 status = gpio_request_array(sdp4430_hdmi_gpios, 612 status = gpio_request_array(sdp4430_hdmi_gpios,
613 ARRAY_SIZE(sdp4430_hdmi_gpios)); 613 ARRAY_SIZE(sdp4430_hdmi_gpios));
614 if (status) 614 if (status)
615 pr_err("%s: Cannot request HDMI GPIOs\n", __func__); 615 pr_err("%s: Cannot request HDMI GPIOs\n", __func__);
616 616
617 return status; 617 return status;
618 } 618 }
619 619
620 static void sdp4430_panel_disable_hdmi(struct omap_dss_device *dssdev) 620 static void sdp4430_panel_disable_hdmi(struct omap_dss_device *dssdev)
621 { 621 {
622 gpio_free_array(sdp4430_hdmi_gpios, ARRAY_SIZE(sdp4430_hdmi_gpios)); 622 gpio_free_array(sdp4430_hdmi_gpios, ARRAY_SIZE(sdp4430_hdmi_gpios));
623 } 623 }
624 624
625 static struct nokia_dsi_panel_data dsi1_panel = { 625 static struct nokia_dsi_panel_data dsi1_panel = {
626 .name = "taal", 626 .name = "taal",
627 .reset_gpio = 102, 627 .reset_gpio = 102,
628 .use_ext_te = false, 628 .use_ext_te = false,
629 .ext_te_gpio = 101, 629 .ext_te_gpio = 101,
630 .esd_interval = 0, 630 .esd_interval = 0,
631 .pin_config = { 631 .pin_config = {
632 .num_pins = 6, 632 .num_pins = 6,
633 .pins = { 0, 1, 2, 3, 4, 5 }, 633 .pins = { 0, 1, 2, 3, 4, 5 },
634 }, 634 },
635 }; 635 };
636 636
637 static struct omap_dss_device sdp4430_lcd_device = { 637 static struct omap_dss_device sdp4430_lcd_device = {
638 .name = "lcd", 638 .name = "lcd",
639 .driver_name = "taal", 639 .driver_name = "taal",
640 .type = OMAP_DISPLAY_TYPE_DSI, 640 .type = OMAP_DISPLAY_TYPE_DSI,
641 .data = &dsi1_panel, 641 .data = &dsi1_panel,
642 .phy.dsi = { 642 .phy.dsi = {
643 .module = 0, 643 .module = 0,
644 }, 644 },
645 645
646 .clocks = { 646 .clocks = {
647 .dispc = { 647 .dispc = {
648 .channel = { 648 .channel = {
649 /* Logic Clock = 172.8 MHz */ 649 /* Logic Clock = 172.8 MHz */
650 .lck_div = 1, 650 .lck_div = 1,
651 /* Pixel Clock = 34.56 MHz */ 651 /* Pixel Clock = 34.56 MHz */
652 .pck_div = 5, 652 .pck_div = 5,
653 .lcd_clk_src = OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC, 653 .lcd_clk_src = OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC,
654 }, 654 },
655 .dispc_fclk_src = OMAP_DSS_CLK_SRC_FCK, 655 .dispc_fclk_src = OMAP_DSS_CLK_SRC_FCK,
656 }, 656 },
657 657
658 .dsi = { 658 .dsi = {
659 .regn = 16, /* Fint = 2.4 MHz */ 659 .regn = 16, /* Fint = 2.4 MHz */
660 .regm = 180, /* DDR Clock = 216 MHz */ 660 .regm = 180, /* DDR Clock = 216 MHz */
661 .regm_dispc = 5, /* PLL1_CLK1 = 172.8 MHz */ 661 .regm_dispc = 5, /* PLL1_CLK1 = 172.8 MHz */
662 .regm_dsi = 5, /* PLL1_CLK2 = 172.8 MHz */ 662 .regm_dsi = 5, /* PLL1_CLK2 = 172.8 MHz */
663 663
664 .lp_clk_div = 10, /* LP Clock = 8.64 MHz */ 664 .lp_clk_div = 10, /* LP Clock = 8.64 MHz */
665 .dsi_fclk_src = OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI, 665 .dsi_fclk_src = OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI,
666 }, 666 },
667 }, 667 },
668 .channel = OMAP_DSS_CHANNEL_LCD, 668 .channel = OMAP_DSS_CHANNEL_LCD,
669 }; 669 };
670 670
671 static struct nokia_dsi_panel_data dsi2_panel = { 671 static struct nokia_dsi_panel_data dsi2_panel = {
672 .name = "taal", 672 .name = "taal",
673 .reset_gpio = 104, 673 .reset_gpio = 104,
674 .use_ext_te = false, 674 .use_ext_te = false,
675 .ext_te_gpio = 103, 675 .ext_te_gpio = 103,
676 .esd_interval = 0, 676 .esd_interval = 0,
677 .pin_config = { 677 .pin_config = {
678 .num_pins = 6, 678 .num_pins = 6,
679 .pins = { 0, 1, 2, 3, 4, 5 }, 679 .pins = { 0, 1, 2, 3, 4, 5 },
680 }, 680 },
681 }; 681 };
682 682
683 static struct omap_dss_device sdp4430_lcd2_device = { 683 static struct omap_dss_device sdp4430_lcd2_device = {
684 .name = "lcd2", 684 .name = "lcd2",
685 .driver_name = "taal", 685 .driver_name = "taal",
686 .type = OMAP_DISPLAY_TYPE_DSI, 686 .type = OMAP_DISPLAY_TYPE_DSI,
687 .data = &dsi2_panel, 687 .data = &dsi2_panel,
688 .phy.dsi = { 688 .phy.dsi = {
689 689
690 .module = 1, 690 .module = 1,
691 }, 691 },
692 692
693 .clocks = { 693 .clocks = {
694 .dispc = { 694 .dispc = {
695 .channel = { 695 .channel = {
696 /* Logic Clock = 172.8 MHz */ 696 /* Logic Clock = 172.8 MHz */
697 .lck_div = 1, 697 .lck_div = 1,
698 /* Pixel Clock = 34.56 MHz */ 698 /* Pixel Clock = 34.56 MHz */
699 .pck_div = 5, 699 .pck_div = 5,
700 .lcd_clk_src = OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DISPC, 700 .lcd_clk_src = OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DISPC,
701 }, 701 },
702 .dispc_fclk_src = OMAP_DSS_CLK_SRC_FCK, 702 .dispc_fclk_src = OMAP_DSS_CLK_SRC_FCK,
703 }, 703 },
704 704
705 .dsi = { 705 .dsi = {
706 .regn = 16, /* Fint = 2.4 MHz */ 706 .regn = 16, /* Fint = 2.4 MHz */
707 .regm = 180, /* DDR Clock = 216 MHz */ 707 .regm = 180, /* DDR Clock = 216 MHz */
708 .regm_dispc = 5, /* PLL1_CLK1 = 172.8 MHz */ 708 .regm_dispc = 5, /* PLL1_CLK1 = 172.8 MHz */
709 .regm_dsi = 5, /* PLL1_CLK2 = 172.8 MHz */ 709 .regm_dsi = 5, /* PLL1_CLK2 = 172.8 MHz */
710 710
711 .lp_clk_div = 10, /* LP Clock = 8.64 MHz */ 711 .lp_clk_div = 10, /* LP Clock = 8.64 MHz */
712 .dsi_fclk_src = OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DSI, 712 .dsi_fclk_src = OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DSI,
713 }, 713 },
714 }, 714 },
715 .channel = OMAP_DSS_CHANNEL_LCD2, 715 .channel = OMAP_DSS_CHANNEL_LCD2,
716 }; 716 };
717 717
718 static struct omap_dss_hdmi_data sdp4430_hdmi_data = { 718 static struct omap_dss_hdmi_data sdp4430_hdmi_data = {
719 .hpd_gpio = HDMI_GPIO_HPD, 719 .hpd_gpio = HDMI_GPIO_HPD,
720 }; 720 };
721 721
722 static struct omap_dss_device sdp4430_hdmi_device = { 722 static struct omap_dss_device sdp4430_hdmi_device = {
723 .name = "hdmi", 723 .name = "hdmi",
724 .driver_name = "hdmi_panel", 724 .driver_name = "hdmi_panel",
725 .type = OMAP_DISPLAY_TYPE_HDMI, 725 .type = OMAP_DISPLAY_TYPE_HDMI,
726 .platform_enable = sdp4430_panel_enable_hdmi, 726 .platform_enable = sdp4430_panel_enable_hdmi,
727 .platform_disable = sdp4430_panel_disable_hdmi, 727 .platform_disable = sdp4430_panel_disable_hdmi,
728 .channel = OMAP_DSS_CHANNEL_DIGIT, 728 .channel = OMAP_DSS_CHANNEL_DIGIT,
729 .data = &sdp4430_hdmi_data, 729 .data = &sdp4430_hdmi_data,
730 }; 730 };
731 731
732 static struct picodlp_panel_data sdp4430_picodlp_pdata = { 732 static struct picodlp_panel_data sdp4430_picodlp_pdata = {
733 .picodlp_adapter_id = 2, 733 .picodlp_adapter_id = 2,
734 .emu_done_gpio = 44, 734 .emu_done_gpio = 44,
735 .pwrgood_gpio = 45, 735 .pwrgood_gpio = 45,
736 }; 736 };
737 737
738 static void sdp4430_picodlp_init(void) 738 static void sdp4430_picodlp_init(void)
739 { 739 {
740 int r; 740 int r;
741 const struct gpio picodlp_gpios[] = { 741 const struct gpio picodlp_gpios[] = {
742 {DLP_POWER_ON_GPIO, GPIOF_OUT_INIT_LOW, 742 {DLP_POWER_ON_GPIO, GPIOF_OUT_INIT_LOW,
743 "DLP POWER ON"}, 743 "DLP POWER ON"},
744 {sdp4430_picodlp_pdata.emu_done_gpio, GPIOF_IN, 744 {sdp4430_picodlp_pdata.emu_done_gpio, GPIOF_IN,
745 "DLP EMU DONE"}, 745 "DLP EMU DONE"},
746 {sdp4430_picodlp_pdata.pwrgood_gpio, GPIOF_OUT_INIT_LOW, 746 {sdp4430_picodlp_pdata.pwrgood_gpio, GPIOF_OUT_INIT_LOW,
747 "DLP PWRGOOD"}, 747 "DLP PWRGOOD"},
748 }; 748 };
749 749
750 r = gpio_request_array(picodlp_gpios, ARRAY_SIZE(picodlp_gpios)); 750 r = gpio_request_array(picodlp_gpios, ARRAY_SIZE(picodlp_gpios));
751 if (r) 751 if (r)
752 pr_err("Cannot request PicoDLP GPIOs, error %d\n", r); 752 pr_err("Cannot request PicoDLP GPIOs, error %d\n", r);
753 } 753 }
754 754
755 static int sdp4430_panel_enable_picodlp(struct omap_dss_device *dssdev) 755 static int sdp4430_panel_enable_picodlp(struct omap_dss_device *dssdev)
756 { 756 {
757 gpio_set_value(DISPLAY_SEL_GPIO, 0); 757 gpio_set_value(DISPLAY_SEL_GPIO, 0);
758 gpio_set_value(DLP_POWER_ON_GPIO, 1); 758 gpio_set_value(DLP_POWER_ON_GPIO, 1);
759 759
760 return 0; 760 return 0;
761 } 761 }
762 762
763 static void sdp4430_panel_disable_picodlp(struct omap_dss_device *dssdev) 763 static void sdp4430_panel_disable_picodlp(struct omap_dss_device *dssdev)
764 { 764 {
765 gpio_set_value(DLP_POWER_ON_GPIO, 0); 765 gpio_set_value(DLP_POWER_ON_GPIO, 0);
766 gpio_set_value(DISPLAY_SEL_GPIO, 1); 766 gpio_set_value(DISPLAY_SEL_GPIO, 1);
767 } 767 }
768 768
769 static struct omap_dss_device sdp4430_picodlp_device = { 769 static struct omap_dss_device sdp4430_picodlp_device = {
770 .name = "picodlp", 770 .name = "picodlp",
771 .driver_name = "picodlp_panel", 771 .driver_name = "picodlp_panel",
772 .type = OMAP_DISPLAY_TYPE_DPI, 772 .type = OMAP_DISPLAY_TYPE_DPI,
773 .phy.dpi.data_lines = 24, 773 .phy.dpi.data_lines = 24,
774 .channel = OMAP_DSS_CHANNEL_LCD2, 774 .channel = OMAP_DSS_CHANNEL_LCD2,
775 .platform_enable = sdp4430_panel_enable_picodlp, 775 .platform_enable = sdp4430_panel_enable_picodlp,
776 .platform_disable = sdp4430_panel_disable_picodlp, 776 .platform_disable = sdp4430_panel_disable_picodlp,
777 .data = &sdp4430_picodlp_pdata, 777 .data = &sdp4430_picodlp_pdata,
778 }; 778 };
779 779
780 static struct omap_dss_device *sdp4430_dss_devices[] = { 780 static struct omap_dss_device *sdp4430_dss_devices[] = {
781 &sdp4430_lcd_device, 781 &sdp4430_lcd_device,
782 &sdp4430_lcd2_device, 782 &sdp4430_lcd2_device,
783 &sdp4430_hdmi_device, 783 &sdp4430_hdmi_device,
784 &sdp4430_picodlp_device, 784 &sdp4430_picodlp_device,
785 }; 785 };
786 786
787 static struct omap_dss_board_info sdp4430_dss_data = { 787 static struct omap_dss_board_info sdp4430_dss_data = {
788 .num_devices = ARRAY_SIZE(sdp4430_dss_devices), 788 .num_devices = ARRAY_SIZE(sdp4430_dss_devices),
789 .devices = sdp4430_dss_devices, 789 .devices = sdp4430_dss_devices,
790 .default_device = &sdp4430_lcd_device, 790 .default_device = &sdp4430_lcd_device,
791 }; 791 };
792 792
793 static void __init omap_4430sdp_display_init(void) 793 static void __init omap_4430sdp_display_init(void)
794 { 794 {
795 int r; 795 int r;
796 796
797 /* Enable LCD2 by default (instead of Pico DLP) */ 797 /* Enable LCD2 by default (instead of Pico DLP) */
798 r = gpio_request_one(DISPLAY_SEL_GPIO, GPIOF_OUT_INIT_HIGH, 798 r = gpio_request_one(DISPLAY_SEL_GPIO, GPIOF_OUT_INIT_HIGH,
799 "display_sel"); 799 "display_sel");
800 if (r) 800 if (r)
801 pr_err("%s: Could not get display_sel GPIO\n", __func__); 801 pr_err("%s: Could not get display_sel GPIO\n", __func__);
802 802
803 sdp4430_picodlp_init(); 803 sdp4430_picodlp_init();
804 omap_display_init(&sdp4430_dss_data); 804 omap_display_init(&sdp4430_dss_data);
805 /* 805 /*
806 * OMAP4460SDP/Blaze and OMAP4430 ES2.3 SDP/Blaze boards and 806 * OMAP4460SDP/Blaze and OMAP4430 ES2.3 SDP/Blaze boards and
807 * later have external pull up on the HDMI I2C lines 807 * later have external pull up on the HDMI I2C lines
808 */ 808 */
809 if (cpu_is_omap446x() || omap_rev() > OMAP4430_REV_ES2_2) 809 if (cpu_is_omap446x() || omap_rev() > OMAP4430_REV_ES2_2)
810 omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP); 810 omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP);
811 else 811 else
812 omap_hdmi_init(0); 812 omap_hdmi_init(0);
813 813
814 omap_mux_init_gpio(HDMI_GPIO_LS_OE, OMAP_PIN_OUTPUT); 814 omap_mux_init_gpio(HDMI_GPIO_LS_OE, OMAP_PIN_OUTPUT);
815 omap_mux_init_gpio(HDMI_GPIO_CT_CP_HPD, OMAP_PIN_OUTPUT); 815 omap_mux_init_gpio(HDMI_GPIO_CT_CP_HPD, OMAP_PIN_OUTPUT);
816 omap_mux_init_gpio(HDMI_GPIO_HPD, OMAP_PIN_INPUT_PULLDOWN); 816 omap_mux_init_gpio(HDMI_GPIO_HPD, OMAP_PIN_INPUT_PULLDOWN);
817 } 817 }
818 818
819 #ifdef CONFIG_OMAP_MUX 819 #ifdef CONFIG_OMAP_MUX
820 static struct omap_board_mux board_mux[] __initdata = { 820 static struct omap_board_mux board_mux[] __initdata = {
821 OMAP4_MUX(USBB2_ULPITLL_CLK, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), 821 OMAP4_MUX(USBB2_ULPITLL_CLK, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
822 /* NIRQ2 for twl6040 */ 822 /* NIRQ2 for twl6040 */
823 OMAP4_MUX(SYS_NIRQ2, OMAP_MUX_MODE0 | 823 OMAP4_MUX(SYS_NIRQ2, OMAP_MUX_MODE0 |
824 OMAP_PIN_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE), 824 OMAP_PIN_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE),
825 { .reg_offset = OMAP_MUX_TERMINATOR }, 825 { .reg_offset = OMAP_MUX_TERMINATOR },
826 }; 826 };
827 827
828 #else 828 #else
829 #define board_mux NULL 829 #define board_mux NULL
830 #endif 830 #endif
831 831
832 static void __init omap4_sdp4430_wifi_mux_init(void) 832 static void __init omap4_sdp4430_wifi_mux_init(void)
833 { 833 {
834 omap_mux_init_gpio(GPIO_WIFI_IRQ, OMAP_PIN_INPUT | 834 omap_mux_init_gpio(GPIO_WIFI_IRQ, OMAP_PIN_INPUT |
835 OMAP_PIN_OFF_WAKEUPENABLE); 835 OMAP_PIN_OFF_WAKEUPENABLE);
836 omap_mux_init_gpio(GPIO_WIFI_PMENA, OMAP_PIN_OUTPUT); 836 omap_mux_init_gpio(GPIO_WIFI_PMENA, OMAP_PIN_OUTPUT);
837 837
838 omap_mux_init_signal("sdmmc5_cmd.sdmmc5_cmd", 838 omap_mux_init_signal("sdmmc5_cmd.sdmmc5_cmd",
839 OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP); 839 OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP);
840 omap_mux_init_signal("sdmmc5_clk.sdmmc5_clk", 840 omap_mux_init_signal("sdmmc5_clk.sdmmc5_clk",
841 OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP); 841 OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP);
842 omap_mux_init_signal("sdmmc5_dat0.sdmmc5_dat0", 842 omap_mux_init_signal("sdmmc5_dat0.sdmmc5_dat0",
843 OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP); 843 OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP);
844 omap_mux_init_signal("sdmmc5_dat1.sdmmc5_dat1", 844 omap_mux_init_signal("sdmmc5_dat1.sdmmc5_dat1",
845 OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP); 845 OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP);
846 omap_mux_init_signal("sdmmc5_dat2.sdmmc5_dat2", 846 omap_mux_init_signal("sdmmc5_dat2.sdmmc5_dat2",
847 OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP); 847 OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP);
848 omap_mux_init_signal("sdmmc5_dat3.sdmmc5_dat3", 848 omap_mux_init_signal("sdmmc5_dat3.sdmmc5_dat3",
849 OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP); 849 OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP);
850 850
851 } 851 }
852 852
853 static struct wl12xx_platform_data omap4_sdp4430_wlan_data __initdata = { 853 static struct wl12xx_platform_data omap4_sdp4430_wlan_data __initdata = {
854 .board_ref_clock = WL12XX_REFCLOCK_26, 854 .board_ref_clock = WL12XX_REFCLOCK_26,
855 .board_tcxo_clock = WL12XX_TCXOCLOCK_26, 855 .board_tcxo_clock = WL12XX_TCXOCLOCK_26,
856 }; 856 };
857 857
858 static void __init omap4_sdp4430_wifi_init(void) 858 static void __init omap4_sdp4430_wifi_init(void)
859 { 859 {
860 int ret; 860 int ret;
861 861
862 omap4_sdp4430_wifi_mux_init(); 862 omap4_sdp4430_wifi_mux_init();
863 omap4_sdp4430_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ); 863 omap4_sdp4430_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
864 ret = wl12xx_set_platform_data(&omap4_sdp4430_wlan_data); 864 ret = wl12xx_set_platform_data(&omap4_sdp4430_wlan_data);
865 if (ret) 865 if (ret)
866 pr_err("Error setting wl12xx data: %d\n", ret); 866 pr_err("Error setting wl12xx data: %d\n", ret);
867 ret = platform_device_register(&omap_vwlan_device); 867 ret = platform_device_register(&omap_vwlan_device);
868 if (ret) 868 if (ret)
869 pr_err("Error registering wl12xx device: %d\n", ret); 869 pr_err("Error registering wl12xx device: %d\n", ret);
870 } 870 }
871 871
872 static void __init omap_4430sdp_init(void) 872 static void __init omap_4430sdp_init(void)
873 { 873 {
874 int status; 874 int status;
875 int package = OMAP_PACKAGE_CBS; 875 int package = OMAP_PACKAGE_CBS;
876 876
877 if (omap_rev() == OMAP4430_REV_ES1_0) 877 if (omap_rev() == OMAP4430_REV_ES1_0)
878 package = OMAP_PACKAGE_CBL; 878 package = OMAP_PACKAGE_CBL;
879 omap4_mux_init(board_mux, NULL, package); 879 omap4_mux_init(board_mux, NULL, package);
880 880
881 omap4_i2c_init(); 881 omap4_i2c_init();
882 omap_sfh7741prox_init(); 882 omap_sfh7741prox_init();
883 platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices)); 883 platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
884 omap_serial_init(); 884 omap_serial_init();
885 omap_sdrc_init(NULL, NULL); 885 omap_sdrc_init(NULL, NULL);
886 omap4_sdp4430_wifi_init(); 886 omap4_sdp4430_wifi_init();
887 omap4_twl6030_hsmmc_init(mmc); 887 omap4_twl6030_hsmmc_init(mmc);
888 888
889 usb_musb_init(&musb_board_data); 889 usb_musb_init(&musb_board_data);
890 890
891 status = omap_ethernet_init(); 891 status = omap_ethernet_init();
892 if (status) { 892 if (status) {
893 pr_err("Ethernet initialization failed: %d\n", status); 893 pr_err("Ethernet initialization failed: %d\n", status);
894 } else { 894 } else {
895 sdp4430_spi_board_info[0].irq = gpio_to_irq(ETH_KS8851_IRQ); 895 sdp4430_spi_board_info[0].irq = gpio_to_irq(ETH_KS8851_IRQ);
896 spi_register_board_info(sdp4430_spi_board_info, 896 spi_register_board_info(sdp4430_spi_board_info,
897 ARRAY_SIZE(sdp4430_spi_board_info)); 897 ARRAY_SIZE(sdp4430_spi_board_info));
898 } 898 }
899 899
900 status = omap4_keyboard_init(&sdp4430_keypad_data, &keypad_data); 900 status = omap4_keyboard_init(&sdp4430_keypad_data, &keypad_data);
901 if (status) 901 if (status)
902 pr_err("Keypad initialization failed: %d\n", status); 902 pr_err("Keypad initialization failed: %d\n", status);
903 903
904 omap_4430sdp_display_init(); 904 omap_4430sdp_display_init();
905 } 905 }
906 906
907 MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board") 907 MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
908 /* Maintainer: Santosh Shilimkar - Texas Instruments Inc */ 908 /* Maintainer: Santosh Shilimkar - Texas Instruments Inc */
909 .atag_offset = 0x100, 909 .atag_offset = 0x100,
910 .reserve = omap_reserve, 910 .reserve = omap_reserve,
911 .map_io = omap4_map_io, 911 .map_io = omap4_map_io,
912 .init_early = omap4430_init_early, 912 .init_early = omap4430_init_early,
913 .init_irq = gic_init_irq, 913 .init_irq = gic_init_irq,
914 .handle_irq = gic_handle_irq, 914 .handle_irq = gic_handle_irq,
915 .init_machine = omap_4430sdp_init, 915 .init_machine = omap_4430sdp_init,
916 .init_late = omap4430_init_late, 916 .init_late = omap4430_init_late,
917 .timer = &omap4_timer, 917 .timer = &omap4_timer,
918 .restart = omap_prcm_restart, 918 .restart = omap_prcm_restart,
919 MACHINE_END 919 MACHINE_END
920 920
arch/arm/mach-omap2/devices.c
1 /* 1 /*
2 * linux/arch/arm/mach-omap2/devices.c 2 * linux/arch/arm/mach-omap2/devices.c
3 * 3 *
4 * OMAP2 platform device setup/initialization 4 * OMAP2 platform device setup/initialization
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or 8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version. 9 * (at your option) any later version.
10 */ 10 */
11 #include <linux/gpio.h> 11 #include <linux/gpio.h>
12 #include <linux/kernel.h> 12 #include <linux/kernel.h>
13 #include <linux/init.h> 13 #include <linux/init.h>
14 #include <linux/platform_device.h> 14 #include <linux/platform_device.h>
15 #include <linux/io.h> 15 #include <linux/io.h>
16 #include <linux/clk.h> 16 #include <linux/clk.h>
17 #include <linux/err.h> 17 #include <linux/err.h>
18 #include <linux/slab.h> 18 #include <linux/slab.h>
19 #include <linux/of.h> 19 #include <linux/of.h>
20 #include <linux/pinctrl/machine.h> 20 #include <linux/pinctrl/machine.h>
21 #include <linux/platform_data/omap4-keypad.h> 21 #include <linux/platform_data/omap4-keypad.h>
22 22
23 #include <asm/mach-types.h> 23 #include <asm/mach-types.h>
24 #include <asm/mach/map.h> 24 #include <asm/mach/map.h>
25 25
26 #include "iomap.h" 26 #include "iomap.h"
27 #include <plat/dma.h> 27 #include <plat/dma.h>
28 #include <plat/omap_hwmod.h> 28 #include <plat/omap_hwmod.h>
29 #include <plat/omap_device.h> 29 #include <plat/omap_device.h>
30 #include <plat/omap4-keypad.h> 30 #include "omap4-keypad.h"
31 31
32 #include "soc.h" 32 #include "soc.h"
33 #include "common.h" 33 #include "common.h"
34 #include "mux.h" 34 #include "mux.h"
35 #include "control.h" 35 #include "control.h"
36 #include "devices.h" 36 #include "devices.h"
37 37
38 #define L3_MODULES_MAX_LEN 12 38 #define L3_MODULES_MAX_LEN 12
39 #define L3_MODULES 3 39 #define L3_MODULES 3
40 40
41 static int __init omap3_l3_init(void) 41 static int __init omap3_l3_init(void)
42 { 42 {
43 struct omap_hwmod *oh; 43 struct omap_hwmod *oh;
44 struct platform_device *pdev; 44 struct platform_device *pdev;
45 char oh_name[L3_MODULES_MAX_LEN]; 45 char oh_name[L3_MODULES_MAX_LEN];
46 46
47 /* 47 /*
48 * To avoid code running on other OMAPs in 48 * To avoid code running on other OMAPs in
49 * multi-omap builds 49 * multi-omap builds
50 */ 50 */
51 if (!(cpu_is_omap34xx())) 51 if (!(cpu_is_omap34xx()))
52 return -ENODEV; 52 return -ENODEV;
53 53
54 snprintf(oh_name, L3_MODULES_MAX_LEN, "l3_main"); 54 snprintf(oh_name, L3_MODULES_MAX_LEN, "l3_main");
55 55
56 oh = omap_hwmod_lookup(oh_name); 56 oh = omap_hwmod_lookup(oh_name);
57 57
58 if (!oh) 58 if (!oh)
59 pr_err("could not look up %s\n", oh_name); 59 pr_err("could not look up %s\n", oh_name);
60 60
61 pdev = omap_device_build("omap_l3_smx", 0, oh, NULL, 0, 61 pdev = omap_device_build("omap_l3_smx", 0, oh, NULL, 0,
62 NULL, 0, 0); 62 NULL, 0, 0);
63 63
64 WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name); 64 WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name);
65 65
66 return IS_ERR(pdev) ? PTR_ERR(pdev) : 0; 66 return IS_ERR(pdev) ? PTR_ERR(pdev) : 0;
67 } 67 }
68 postcore_initcall(omap3_l3_init); 68 postcore_initcall(omap3_l3_init);
69 69
70 static int __init omap4_l3_init(void) 70 static int __init omap4_l3_init(void)
71 { 71 {
72 int i; 72 int i;
73 struct omap_hwmod *oh[3]; 73 struct omap_hwmod *oh[3];
74 struct platform_device *pdev; 74 struct platform_device *pdev;
75 char oh_name[L3_MODULES_MAX_LEN]; 75 char oh_name[L3_MODULES_MAX_LEN];
76 76
77 /* If dtb is there, the devices will be created dynamically */ 77 /* If dtb is there, the devices will be created dynamically */
78 if (of_have_populated_dt()) 78 if (of_have_populated_dt())
79 return -ENODEV; 79 return -ENODEV;
80 80
81 /* 81 /*
82 * To avoid code running on other OMAPs in 82 * To avoid code running on other OMAPs in
83 * multi-omap builds 83 * multi-omap builds
84 */ 84 */
85 if (!cpu_is_omap44xx() && !soc_is_omap54xx()) 85 if (!cpu_is_omap44xx() && !soc_is_omap54xx())
86 return -ENODEV; 86 return -ENODEV;
87 87
88 for (i = 0; i < L3_MODULES; i++) { 88 for (i = 0; i < L3_MODULES; i++) {
89 snprintf(oh_name, L3_MODULES_MAX_LEN, "l3_main_%d", i+1); 89 snprintf(oh_name, L3_MODULES_MAX_LEN, "l3_main_%d", i+1);
90 90
91 oh[i] = omap_hwmod_lookup(oh_name); 91 oh[i] = omap_hwmod_lookup(oh_name);
92 if (!(oh[i])) 92 if (!(oh[i]))
93 pr_err("could not look up %s\n", oh_name); 93 pr_err("could not look up %s\n", oh_name);
94 } 94 }
95 95
96 pdev = omap_device_build_ss("omap_l3_noc", 0, oh, 3, NULL, 96 pdev = omap_device_build_ss("omap_l3_noc", 0, oh, 3, NULL,
97 0, NULL, 0, 0); 97 0, NULL, 0, 0);
98 98
99 WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name); 99 WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name);
100 100
101 return IS_ERR(pdev) ? PTR_ERR(pdev) : 0; 101 return IS_ERR(pdev) ? PTR_ERR(pdev) : 0;
102 } 102 }
103 postcore_initcall(omap4_l3_init); 103 postcore_initcall(omap4_l3_init);
104 104
105 #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE) 105 #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE)
106 106
107 static struct resource omap2cam_resources[] = { 107 static struct resource omap2cam_resources[] = {
108 { 108 {
109 .start = OMAP24XX_CAMERA_BASE, 109 .start = OMAP24XX_CAMERA_BASE,
110 .end = OMAP24XX_CAMERA_BASE + 0xfff, 110 .end = OMAP24XX_CAMERA_BASE + 0xfff,
111 .flags = IORESOURCE_MEM, 111 .flags = IORESOURCE_MEM,
112 }, 112 },
113 { 113 {
114 .start = 24 + OMAP_INTC_START, 114 .start = 24 + OMAP_INTC_START,
115 .flags = IORESOURCE_IRQ, 115 .flags = IORESOURCE_IRQ,
116 } 116 }
117 }; 117 };
118 118
119 static struct platform_device omap2cam_device = { 119 static struct platform_device omap2cam_device = {
120 .name = "omap24xxcam", 120 .name = "omap24xxcam",
121 .id = -1, 121 .id = -1,
122 .num_resources = ARRAY_SIZE(omap2cam_resources), 122 .num_resources = ARRAY_SIZE(omap2cam_resources),
123 .resource = omap2cam_resources, 123 .resource = omap2cam_resources,
124 }; 124 };
125 #endif 125 #endif
126 126
127 #if defined(CONFIG_IOMMU_API) 127 #if defined(CONFIG_IOMMU_API)
128 128
129 #include <plat/iommu.h> 129 #include <plat/iommu.h>
130 130
131 static struct resource omap3isp_resources[] = { 131 static struct resource omap3isp_resources[] = {
132 { 132 {
133 .start = OMAP3430_ISP_BASE, 133 .start = OMAP3430_ISP_BASE,
134 .end = OMAP3430_ISP_END, 134 .end = OMAP3430_ISP_END,
135 .flags = IORESOURCE_MEM, 135 .flags = IORESOURCE_MEM,
136 }, 136 },
137 { 137 {
138 .start = OMAP3430_ISP_CCP2_BASE, 138 .start = OMAP3430_ISP_CCP2_BASE,
139 .end = OMAP3430_ISP_CCP2_END, 139 .end = OMAP3430_ISP_CCP2_END,
140 .flags = IORESOURCE_MEM, 140 .flags = IORESOURCE_MEM,
141 }, 141 },
142 { 142 {
143 .start = OMAP3430_ISP_CCDC_BASE, 143 .start = OMAP3430_ISP_CCDC_BASE,
144 .end = OMAP3430_ISP_CCDC_END, 144 .end = OMAP3430_ISP_CCDC_END,
145 .flags = IORESOURCE_MEM, 145 .flags = IORESOURCE_MEM,
146 }, 146 },
147 { 147 {
148 .start = OMAP3430_ISP_HIST_BASE, 148 .start = OMAP3430_ISP_HIST_BASE,
149 .end = OMAP3430_ISP_HIST_END, 149 .end = OMAP3430_ISP_HIST_END,
150 .flags = IORESOURCE_MEM, 150 .flags = IORESOURCE_MEM,
151 }, 151 },
152 { 152 {
153 .start = OMAP3430_ISP_H3A_BASE, 153 .start = OMAP3430_ISP_H3A_BASE,
154 .end = OMAP3430_ISP_H3A_END, 154 .end = OMAP3430_ISP_H3A_END,
155 .flags = IORESOURCE_MEM, 155 .flags = IORESOURCE_MEM,
156 }, 156 },
157 { 157 {
158 .start = OMAP3430_ISP_PREV_BASE, 158 .start = OMAP3430_ISP_PREV_BASE,
159 .end = OMAP3430_ISP_PREV_END, 159 .end = OMAP3430_ISP_PREV_END,
160 .flags = IORESOURCE_MEM, 160 .flags = IORESOURCE_MEM,
161 }, 161 },
162 { 162 {
163 .start = OMAP3430_ISP_RESZ_BASE, 163 .start = OMAP3430_ISP_RESZ_BASE,
164 .end = OMAP3430_ISP_RESZ_END, 164 .end = OMAP3430_ISP_RESZ_END,
165 .flags = IORESOURCE_MEM, 165 .flags = IORESOURCE_MEM,
166 }, 166 },
167 { 167 {
168 .start = OMAP3430_ISP_SBL_BASE, 168 .start = OMAP3430_ISP_SBL_BASE,
169 .end = OMAP3430_ISP_SBL_END, 169 .end = OMAP3430_ISP_SBL_END,
170 .flags = IORESOURCE_MEM, 170 .flags = IORESOURCE_MEM,
171 }, 171 },
172 { 172 {
173 .start = OMAP3430_ISP_CSI2A_REGS1_BASE, 173 .start = OMAP3430_ISP_CSI2A_REGS1_BASE,
174 .end = OMAP3430_ISP_CSI2A_REGS1_END, 174 .end = OMAP3430_ISP_CSI2A_REGS1_END,
175 .flags = IORESOURCE_MEM, 175 .flags = IORESOURCE_MEM,
176 }, 176 },
177 { 177 {
178 .start = OMAP3430_ISP_CSIPHY2_BASE, 178 .start = OMAP3430_ISP_CSIPHY2_BASE,
179 .end = OMAP3430_ISP_CSIPHY2_END, 179 .end = OMAP3430_ISP_CSIPHY2_END,
180 .flags = IORESOURCE_MEM, 180 .flags = IORESOURCE_MEM,
181 }, 181 },
182 { 182 {
183 .start = OMAP3630_ISP_CSI2A_REGS2_BASE, 183 .start = OMAP3630_ISP_CSI2A_REGS2_BASE,
184 .end = OMAP3630_ISP_CSI2A_REGS2_END, 184 .end = OMAP3630_ISP_CSI2A_REGS2_END,
185 .flags = IORESOURCE_MEM, 185 .flags = IORESOURCE_MEM,
186 }, 186 },
187 { 187 {
188 .start = OMAP3630_ISP_CSI2C_REGS1_BASE, 188 .start = OMAP3630_ISP_CSI2C_REGS1_BASE,
189 .end = OMAP3630_ISP_CSI2C_REGS1_END, 189 .end = OMAP3630_ISP_CSI2C_REGS1_END,
190 .flags = IORESOURCE_MEM, 190 .flags = IORESOURCE_MEM,
191 }, 191 },
192 { 192 {
193 .start = OMAP3630_ISP_CSIPHY1_BASE, 193 .start = OMAP3630_ISP_CSIPHY1_BASE,
194 .end = OMAP3630_ISP_CSIPHY1_END, 194 .end = OMAP3630_ISP_CSIPHY1_END,
195 .flags = IORESOURCE_MEM, 195 .flags = IORESOURCE_MEM,
196 }, 196 },
197 { 197 {
198 .start = OMAP3630_ISP_CSI2C_REGS2_BASE, 198 .start = OMAP3630_ISP_CSI2C_REGS2_BASE,
199 .end = OMAP3630_ISP_CSI2C_REGS2_END, 199 .end = OMAP3630_ISP_CSI2C_REGS2_END,
200 .flags = IORESOURCE_MEM, 200 .flags = IORESOURCE_MEM,
201 }, 201 },
202 { 202 {
203 .start = 24 + OMAP_INTC_START, 203 .start = 24 + OMAP_INTC_START,
204 .flags = IORESOURCE_IRQ, 204 .flags = IORESOURCE_IRQ,
205 } 205 }
206 }; 206 };
207 207
208 static struct platform_device omap3isp_device = { 208 static struct platform_device omap3isp_device = {
209 .name = "omap3isp", 209 .name = "omap3isp",
210 .id = -1, 210 .id = -1,
211 .num_resources = ARRAY_SIZE(omap3isp_resources), 211 .num_resources = ARRAY_SIZE(omap3isp_resources),
212 .resource = omap3isp_resources, 212 .resource = omap3isp_resources,
213 }; 213 };
214 214
215 static struct omap_iommu_arch_data omap3_isp_iommu = { 215 static struct omap_iommu_arch_data omap3_isp_iommu = {
216 .name = "isp", 216 .name = "isp",
217 }; 217 };
218 218
219 int omap3_init_camera(struct isp_platform_data *pdata) 219 int omap3_init_camera(struct isp_platform_data *pdata)
220 { 220 {
221 omap3isp_device.dev.platform_data = pdata; 221 omap3isp_device.dev.platform_data = pdata;
222 omap3isp_device.dev.archdata.iommu = &omap3_isp_iommu; 222 omap3isp_device.dev.archdata.iommu = &omap3_isp_iommu;
223 223
224 return platform_device_register(&omap3isp_device); 224 return platform_device_register(&omap3isp_device);
225 } 225 }
226 226
227 #else /* !CONFIG_IOMMU_API */ 227 #else /* !CONFIG_IOMMU_API */
228 228
229 int omap3_init_camera(struct isp_platform_data *pdata) 229 int omap3_init_camera(struct isp_platform_data *pdata)
230 { 230 {
231 return 0; 231 return 0;
232 } 232 }
233 233
234 #endif 234 #endif
235 235
236 static inline void omap_init_camera(void) 236 static inline void omap_init_camera(void)
237 { 237 {
238 #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE) 238 #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE)
239 if (cpu_is_omap24xx()) 239 if (cpu_is_omap24xx())
240 platform_device_register(&omap2cam_device); 240 platform_device_register(&omap2cam_device);
241 #endif 241 #endif
242 } 242 }
243 243
244 int __init omap4_keyboard_init(struct omap4_keypad_platform_data 244 int __init omap4_keyboard_init(struct omap4_keypad_platform_data
245 *sdp4430_keypad_data, struct omap_board_data *bdata) 245 *sdp4430_keypad_data, struct omap_board_data *bdata)
246 { 246 {
247 struct platform_device *pdev; 247 struct platform_device *pdev;
248 struct omap_hwmod *oh; 248 struct omap_hwmod *oh;
249 struct omap4_keypad_platform_data *keypad_data; 249 struct omap4_keypad_platform_data *keypad_data;
250 unsigned int id = -1; 250 unsigned int id = -1;
251 char *oh_name = "kbd"; 251 char *oh_name = "kbd";
252 char *name = "omap4-keypad"; 252 char *name = "omap4-keypad";
253 253
254 oh = omap_hwmod_lookup(oh_name); 254 oh = omap_hwmod_lookup(oh_name);
255 if (!oh) { 255 if (!oh) {
256 pr_err("Could not look up %s\n", oh_name); 256 pr_err("Could not look up %s\n", oh_name);
257 return -ENODEV; 257 return -ENODEV;
258 } 258 }
259 259
260 keypad_data = sdp4430_keypad_data; 260 keypad_data = sdp4430_keypad_data;
261 261
262 pdev = omap_device_build(name, id, oh, keypad_data, 262 pdev = omap_device_build(name, id, oh, keypad_data,
263 sizeof(struct omap4_keypad_platform_data), NULL, 0, 0); 263 sizeof(struct omap4_keypad_platform_data), NULL, 0, 0);
264 264
265 if (IS_ERR(pdev)) { 265 if (IS_ERR(pdev)) {
266 WARN(1, "Can't build omap_device for %s:%s.\n", 266 WARN(1, "Can't build omap_device for %s:%s.\n",
267 name, oh->name); 267 name, oh->name);
268 return PTR_ERR(pdev); 268 return PTR_ERR(pdev);
269 } 269 }
270 oh->mux = omap_hwmod_mux_init(bdata->pads, bdata->pads_cnt); 270 oh->mux = omap_hwmod_mux_init(bdata->pads, bdata->pads_cnt);
271 271
272 return 0; 272 return 0;
273 } 273 }
274 274
275 #if defined(CONFIG_OMAP_MBOX_FWK) || defined(CONFIG_OMAP_MBOX_FWK_MODULE) 275 #if defined(CONFIG_OMAP_MBOX_FWK) || defined(CONFIG_OMAP_MBOX_FWK_MODULE)
276 static inline void __init omap_init_mbox(void) 276 static inline void __init omap_init_mbox(void)
277 { 277 {
278 struct omap_hwmod *oh; 278 struct omap_hwmod *oh;
279 struct platform_device *pdev; 279 struct platform_device *pdev;
280 280
281 oh = omap_hwmod_lookup("mailbox"); 281 oh = omap_hwmod_lookup("mailbox");
282 if (!oh) { 282 if (!oh) {
283 pr_err("%s: unable to find hwmod\n", __func__); 283 pr_err("%s: unable to find hwmod\n", __func__);
284 return; 284 return;
285 } 285 }
286 286
287 pdev = omap_device_build("omap-mailbox", -1, oh, NULL, 0, NULL, 0, 0); 287 pdev = omap_device_build("omap-mailbox", -1, oh, NULL, 0, NULL, 0, 0);
288 WARN(IS_ERR(pdev), "%s: could not build device, err %ld\n", 288 WARN(IS_ERR(pdev), "%s: could not build device, err %ld\n",
289 __func__, PTR_ERR(pdev)); 289 __func__, PTR_ERR(pdev));
290 } 290 }
291 #else 291 #else
292 static inline void omap_init_mbox(void) { } 292 static inline void omap_init_mbox(void) { }
293 #endif /* CONFIG_OMAP_MBOX_FWK */ 293 #endif /* CONFIG_OMAP_MBOX_FWK */
294 294
295 static inline void omap_init_sti(void) {} 295 static inline void omap_init_sti(void) {}
296 296
297 #if defined(CONFIG_SND_SOC) || defined(CONFIG_SND_SOC_MODULE) 297 #if defined(CONFIG_SND_SOC) || defined(CONFIG_SND_SOC_MODULE)
298 298
299 static struct platform_device omap_pcm = { 299 static struct platform_device omap_pcm = {
300 .name = "omap-pcm-audio", 300 .name = "omap-pcm-audio",
301 .id = -1, 301 .id = -1,
302 }; 302 };
303 303
304 static void omap_init_audio(void) 304 static void omap_init_audio(void)
305 { 305 {
306 platform_device_register(&omap_pcm); 306 platform_device_register(&omap_pcm);
307 } 307 }
308 308
309 #else 309 #else
310 static inline void omap_init_audio(void) {} 310 static inline void omap_init_audio(void) {}
311 #endif 311 #endif
312 312
313 #if defined(CONFIG_SND_OMAP_SOC_MCPDM) || \ 313 #if defined(CONFIG_SND_OMAP_SOC_MCPDM) || \
314 defined(CONFIG_SND_OMAP_SOC_MCPDM_MODULE) 314 defined(CONFIG_SND_OMAP_SOC_MCPDM_MODULE)
315 315
316 static void __init omap_init_mcpdm(void) 316 static void __init omap_init_mcpdm(void)
317 { 317 {
318 struct omap_hwmod *oh; 318 struct omap_hwmod *oh;
319 struct platform_device *pdev; 319 struct platform_device *pdev;
320 320
321 oh = omap_hwmod_lookup("mcpdm"); 321 oh = omap_hwmod_lookup("mcpdm");
322 if (!oh) { 322 if (!oh) {
323 printk(KERN_ERR "Could not look up mcpdm hw_mod\n"); 323 printk(KERN_ERR "Could not look up mcpdm hw_mod\n");
324 return; 324 return;
325 } 325 }
326 326
327 pdev = omap_device_build("omap-mcpdm", -1, oh, NULL, 0, NULL, 0, 0); 327 pdev = omap_device_build("omap-mcpdm", -1, oh, NULL, 0, NULL, 0, 0);
328 WARN(IS_ERR(pdev), "Can't build omap_device for omap-mcpdm.\n"); 328 WARN(IS_ERR(pdev), "Can't build omap_device for omap-mcpdm.\n");
329 } 329 }
330 #else 330 #else
331 static inline void omap_init_mcpdm(void) {} 331 static inline void omap_init_mcpdm(void) {}
332 #endif 332 #endif
333 333
334 #if defined(CONFIG_SND_OMAP_SOC_DMIC) || \ 334 #if defined(CONFIG_SND_OMAP_SOC_DMIC) || \
335 defined(CONFIG_SND_OMAP_SOC_DMIC_MODULE) 335 defined(CONFIG_SND_OMAP_SOC_DMIC_MODULE)
336 336
337 static void __init omap_init_dmic(void) 337 static void __init omap_init_dmic(void)
338 { 338 {
339 struct omap_hwmod *oh; 339 struct omap_hwmod *oh;
340 struct platform_device *pdev; 340 struct platform_device *pdev;
341 341
342 oh = omap_hwmod_lookup("dmic"); 342 oh = omap_hwmod_lookup("dmic");
343 if (!oh) { 343 if (!oh) {
344 printk(KERN_ERR "Could not look up mcpdm hw_mod\n"); 344 printk(KERN_ERR "Could not look up mcpdm hw_mod\n");
345 return; 345 return;
346 } 346 }
347 347
348 pdev = omap_device_build("omap-dmic", -1, oh, NULL, 0, NULL, 0, 0); 348 pdev = omap_device_build("omap-dmic", -1, oh, NULL, 0, NULL, 0, 0);
349 WARN(IS_ERR(pdev), "Can't build omap_device for omap-dmic.\n"); 349 WARN(IS_ERR(pdev), "Can't build omap_device for omap-dmic.\n");
350 } 350 }
351 #else 351 #else
352 static inline void omap_init_dmic(void) {} 352 static inline void omap_init_dmic(void) {}
353 #endif 353 #endif
354 354
355 #if defined(CONFIG_SND_OMAP_SOC_OMAP_HDMI) || \ 355 #if defined(CONFIG_SND_OMAP_SOC_OMAP_HDMI) || \
356 defined(CONFIG_SND_OMAP_SOC_OMAP_HDMI_MODULE) 356 defined(CONFIG_SND_OMAP_SOC_OMAP_HDMI_MODULE)
357 357
358 static struct platform_device omap_hdmi_audio = { 358 static struct platform_device omap_hdmi_audio = {
359 .name = "omap-hdmi-audio", 359 .name = "omap-hdmi-audio",
360 .id = -1, 360 .id = -1,
361 }; 361 };
362 362
363 static void __init omap_init_hdmi_audio(void) 363 static void __init omap_init_hdmi_audio(void)
364 { 364 {
365 struct omap_hwmod *oh; 365 struct omap_hwmod *oh;
366 struct platform_device *pdev; 366 struct platform_device *pdev;
367 367
368 oh = omap_hwmod_lookup("dss_hdmi"); 368 oh = omap_hwmod_lookup("dss_hdmi");
369 if (!oh) { 369 if (!oh) {
370 printk(KERN_ERR "Could not look up dss_hdmi hw_mod\n"); 370 printk(KERN_ERR "Could not look up dss_hdmi hw_mod\n");
371 return; 371 return;
372 } 372 }
373 373
374 pdev = omap_device_build("omap-hdmi-audio-dai", 374 pdev = omap_device_build("omap-hdmi-audio-dai",
375 -1, oh, NULL, 0, NULL, 0, 0); 375 -1, oh, NULL, 0, NULL, 0, 0);
376 WARN(IS_ERR(pdev), 376 WARN(IS_ERR(pdev),
377 "Can't build omap_device for omap-hdmi-audio-dai.\n"); 377 "Can't build omap_device for omap-hdmi-audio-dai.\n");
378 378
379 platform_device_register(&omap_hdmi_audio); 379 platform_device_register(&omap_hdmi_audio);
380 } 380 }
381 #else 381 #else
382 static inline void omap_init_hdmi_audio(void) {} 382 static inline void omap_init_hdmi_audio(void) {}
383 #endif 383 #endif
384 384
385 #if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE) 385 #if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE)
386 386
387 #include <linux/platform_data/spi-omap2-mcspi.h> 387 #include <linux/platform_data/spi-omap2-mcspi.h>
388 388
389 static int __init omap_mcspi_init(struct omap_hwmod *oh, void *unused) 389 static int __init omap_mcspi_init(struct omap_hwmod *oh, void *unused)
390 { 390 {
391 struct platform_device *pdev; 391 struct platform_device *pdev;
392 char *name = "omap2_mcspi"; 392 char *name = "omap2_mcspi";
393 struct omap2_mcspi_platform_config *pdata; 393 struct omap2_mcspi_platform_config *pdata;
394 static int spi_num; 394 static int spi_num;
395 struct omap2_mcspi_dev_attr *mcspi_attrib = oh->dev_attr; 395 struct omap2_mcspi_dev_attr *mcspi_attrib = oh->dev_attr;
396 396
397 pdata = kzalloc(sizeof(*pdata), GFP_KERNEL); 397 pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
398 if (!pdata) { 398 if (!pdata) {
399 pr_err("Memory allocation for McSPI device failed\n"); 399 pr_err("Memory allocation for McSPI device failed\n");
400 return -ENOMEM; 400 return -ENOMEM;
401 } 401 }
402 402
403 pdata->num_cs = mcspi_attrib->num_chipselect; 403 pdata->num_cs = mcspi_attrib->num_chipselect;
404 switch (oh->class->rev) { 404 switch (oh->class->rev) {
405 case OMAP2_MCSPI_REV: 405 case OMAP2_MCSPI_REV:
406 case OMAP3_MCSPI_REV: 406 case OMAP3_MCSPI_REV:
407 pdata->regs_offset = 0; 407 pdata->regs_offset = 0;
408 break; 408 break;
409 case OMAP4_MCSPI_REV: 409 case OMAP4_MCSPI_REV:
410 pdata->regs_offset = OMAP4_MCSPI_REG_OFFSET; 410 pdata->regs_offset = OMAP4_MCSPI_REG_OFFSET;
411 break; 411 break;
412 default: 412 default:
413 pr_err("Invalid McSPI Revision value\n"); 413 pr_err("Invalid McSPI Revision value\n");
414 kfree(pdata); 414 kfree(pdata);
415 return -EINVAL; 415 return -EINVAL;
416 } 416 }
417 417
418 spi_num++; 418 spi_num++;
419 pdev = omap_device_build(name, spi_num, oh, pdata, 419 pdev = omap_device_build(name, spi_num, oh, pdata,
420 sizeof(*pdata), NULL, 0, 0); 420 sizeof(*pdata), NULL, 0, 0);
421 WARN(IS_ERR(pdev), "Can't build omap_device for %s:%s\n", 421 WARN(IS_ERR(pdev), "Can't build omap_device for %s:%s\n",
422 name, oh->name); 422 name, oh->name);
423 kfree(pdata); 423 kfree(pdata);
424 return 0; 424 return 0;
425 } 425 }
426 426
427 static void omap_init_mcspi(void) 427 static void omap_init_mcspi(void)
428 { 428 {
429 omap_hwmod_for_each_by_class("mcspi", omap_mcspi_init, NULL); 429 omap_hwmod_for_each_by_class("mcspi", omap_mcspi_init, NULL);
430 } 430 }
431 431
432 #else 432 #else
433 static inline void omap_init_mcspi(void) {} 433 static inline void omap_init_mcspi(void) {}
434 #endif 434 #endif
435 435
436 static struct resource omap2_pmu_resource = { 436 static struct resource omap2_pmu_resource = {
437 .start = 3 + OMAP_INTC_START, 437 .start = 3 + OMAP_INTC_START,
438 .flags = IORESOURCE_IRQ, 438 .flags = IORESOURCE_IRQ,
439 }; 439 };
440 440
441 static struct resource omap3_pmu_resource = { 441 static struct resource omap3_pmu_resource = {
442 .start = 3 + OMAP_INTC_START, 442 .start = 3 + OMAP_INTC_START,
443 .flags = IORESOURCE_IRQ, 443 .flags = IORESOURCE_IRQ,
444 }; 444 };
445 445
446 static struct platform_device omap_pmu_device = { 446 static struct platform_device omap_pmu_device = {
447 .name = "arm-pmu", 447 .name = "arm-pmu",
448 .id = -1, 448 .id = -1,
449 .num_resources = 1, 449 .num_resources = 1,
450 }; 450 };
451 451
452 static void omap_init_pmu(void) 452 static void omap_init_pmu(void)
453 { 453 {
454 if (cpu_is_omap24xx()) 454 if (cpu_is_omap24xx())
455 omap_pmu_device.resource = &omap2_pmu_resource; 455 omap_pmu_device.resource = &omap2_pmu_resource;
456 else if (cpu_is_omap34xx()) 456 else if (cpu_is_omap34xx())
457 omap_pmu_device.resource = &omap3_pmu_resource; 457 omap_pmu_device.resource = &omap3_pmu_resource;
458 else 458 else
459 return; 459 return;
460 460
461 platform_device_register(&omap_pmu_device); 461 platform_device_register(&omap_pmu_device);
462 } 462 }
463 463
464 464
465 #if defined(CONFIG_CRYPTO_DEV_OMAP_SHAM) || defined(CONFIG_CRYPTO_DEV_OMAP_SHAM_MODULE) 465 #if defined(CONFIG_CRYPTO_DEV_OMAP_SHAM) || defined(CONFIG_CRYPTO_DEV_OMAP_SHAM_MODULE)
466 466
467 #ifdef CONFIG_ARCH_OMAP2 467 #ifdef CONFIG_ARCH_OMAP2
468 static struct resource omap2_sham_resources[] = { 468 static struct resource omap2_sham_resources[] = {
469 { 469 {
470 .start = OMAP24XX_SEC_SHA1MD5_BASE, 470 .start = OMAP24XX_SEC_SHA1MD5_BASE,
471 .end = OMAP24XX_SEC_SHA1MD5_BASE + 0x64, 471 .end = OMAP24XX_SEC_SHA1MD5_BASE + 0x64,
472 .flags = IORESOURCE_MEM, 472 .flags = IORESOURCE_MEM,
473 }, 473 },
474 { 474 {
475 .start = 51 + OMAP_INTC_START, 475 .start = 51 + OMAP_INTC_START,
476 .flags = IORESOURCE_IRQ, 476 .flags = IORESOURCE_IRQ,
477 } 477 }
478 }; 478 };
479 static int omap2_sham_resources_sz = ARRAY_SIZE(omap2_sham_resources); 479 static int omap2_sham_resources_sz = ARRAY_SIZE(omap2_sham_resources);
480 #else 480 #else
481 #define omap2_sham_resources NULL 481 #define omap2_sham_resources NULL
482 #define omap2_sham_resources_sz 0 482 #define omap2_sham_resources_sz 0
483 #endif 483 #endif
484 484
485 #ifdef CONFIG_ARCH_OMAP3 485 #ifdef CONFIG_ARCH_OMAP3
486 static struct resource omap3_sham_resources[] = { 486 static struct resource omap3_sham_resources[] = {
487 { 487 {
488 .start = OMAP34XX_SEC_SHA1MD5_BASE, 488 .start = OMAP34XX_SEC_SHA1MD5_BASE,
489 .end = OMAP34XX_SEC_SHA1MD5_BASE + 0x64, 489 .end = OMAP34XX_SEC_SHA1MD5_BASE + 0x64,
490 .flags = IORESOURCE_MEM, 490 .flags = IORESOURCE_MEM,
491 }, 491 },
492 { 492 {
493 .start = 49 + OMAP_INTC_START, 493 .start = 49 + OMAP_INTC_START,
494 .flags = IORESOURCE_IRQ, 494 .flags = IORESOURCE_IRQ,
495 }, 495 },
496 { 496 {
497 .start = OMAP34XX_DMA_SHA1MD5_RX, 497 .start = OMAP34XX_DMA_SHA1MD5_RX,
498 .flags = IORESOURCE_DMA, 498 .flags = IORESOURCE_DMA,
499 } 499 }
500 }; 500 };
501 static int omap3_sham_resources_sz = ARRAY_SIZE(omap3_sham_resources); 501 static int omap3_sham_resources_sz = ARRAY_SIZE(omap3_sham_resources);
502 #else 502 #else
503 #define omap3_sham_resources NULL 503 #define omap3_sham_resources NULL
504 #define omap3_sham_resources_sz 0 504 #define omap3_sham_resources_sz 0
505 #endif 505 #endif
506 506
507 static struct platform_device sham_device = { 507 static struct platform_device sham_device = {
508 .name = "omap-sham", 508 .name = "omap-sham",
509 .id = -1, 509 .id = -1,
510 }; 510 };
511 511
512 static void omap_init_sham(void) 512 static void omap_init_sham(void)
513 { 513 {
514 if (cpu_is_omap24xx()) { 514 if (cpu_is_omap24xx()) {
515 sham_device.resource = omap2_sham_resources; 515 sham_device.resource = omap2_sham_resources;
516 sham_device.num_resources = omap2_sham_resources_sz; 516 sham_device.num_resources = omap2_sham_resources_sz;
517 } else if (cpu_is_omap34xx()) { 517 } else if (cpu_is_omap34xx()) {
518 sham_device.resource = omap3_sham_resources; 518 sham_device.resource = omap3_sham_resources;
519 sham_device.num_resources = omap3_sham_resources_sz; 519 sham_device.num_resources = omap3_sham_resources_sz;
520 } else { 520 } else {
521 pr_err("%s: platform not supported\n", __func__); 521 pr_err("%s: platform not supported\n", __func__);
522 return; 522 return;
523 } 523 }
524 platform_device_register(&sham_device); 524 platform_device_register(&sham_device);
525 } 525 }
526 #else 526 #else
527 static inline void omap_init_sham(void) { } 527 static inline void omap_init_sham(void) { }
528 #endif 528 #endif
529 529
530 #if defined(CONFIG_CRYPTO_DEV_OMAP_AES) || defined(CONFIG_CRYPTO_DEV_OMAP_AES_MODULE) 530 #if defined(CONFIG_CRYPTO_DEV_OMAP_AES) || defined(CONFIG_CRYPTO_DEV_OMAP_AES_MODULE)
531 531
532 #ifdef CONFIG_ARCH_OMAP2 532 #ifdef CONFIG_ARCH_OMAP2
533 static struct resource omap2_aes_resources[] = { 533 static struct resource omap2_aes_resources[] = {
534 { 534 {
535 .start = OMAP24XX_SEC_AES_BASE, 535 .start = OMAP24XX_SEC_AES_BASE,
536 .end = OMAP24XX_SEC_AES_BASE + 0x4C, 536 .end = OMAP24XX_SEC_AES_BASE + 0x4C,
537 .flags = IORESOURCE_MEM, 537 .flags = IORESOURCE_MEM,
538 }, 538 },
539 { 539 {
540 .start = OMAP24XX_DMA_AES_TX, 540 .start = OMAP24XX_DMA_AES_TX,
541 .flags = IORESOURCE_DMA, 541 .flags = IORESOURCE_DMA,
542 }, 542 },
543 { 543 {
544 .start = OMAP24XX_DMA_AES_RX, 544 .start = OMAP24XX_DMA_AES_RX,
545 .flags = IORESOURCE_DMA, 545 .flags = IORESOURCE_DMA,
546 } 546 }
547 }; 547 };
548 static int omap2_aes_resources_sz = ARRAY_SIZE(omap2_aes_resources); 548 static int omap2_aes_resources_sz = ARRAY_SIZE(omap2_aes_resources);
549 #else 549 #else
550 #define omap2_aes_resources NULL 550 #define omap2_aes_resources NULL
551 #define omap2_aes_resources_sz 0 551 #define omap2_aes_resources_sz 0
552 #endif 552 #endif
553 553
554 #ifdef CONFIG_ARCH_OMAP3 554 #ifdef CONFIG_ARCH_OMAP3
555 static struct resource omap3_aes_resources[] = { 555 static struct resource omap3_aes_resources[] = {
556 { 556 {
557 .start = OMAP34XX_SEC_AES_BASE, 557 .start = OMAP34XX_SEC_AES_BASE,
558 .end = OMAP34XX_SEC_AES_BASE + 0x4C, 558 .end = OMAP34XX_SEC_AES_BASE + 0x4C,
559 .flags = IORESOURCE_MEM, 559 .flags = IORESOURCE_MEM,
560 }, 560 },
561 { 561 {
562 .start = OMAP34XX_DMA_AES2_TX, 562 .start = OMAP34XX_DMA_AES2_TX,
563 .flags = IORESOURCE_DMA, 563 .flags = IORESOURCE_DMA,
564 }, 564 },
565 { 565 {
566 .start = OMAP34XX_DMA_AES2_RX, 566 .start = OMAP34XX_DMA_AES2_RX,
567 .flags = IORESOURCE_DMA, 567 .flags = IORESOURCE_DMA,
568 } 568 }
569 }; 569 };
570 static int omap3_aes_resources_sz = ARRAY_SIZE(omap3_aes_resources); 570 static int omap3_aes_resources_sz = ARRAY_SIZE(omap3_aes_resources);
571 #else 571 #else
572 #define omap3_aes_resources NULL 572 #define omap3_aes_resources NULL
573 #define omap3_aes_resources_sz 0 573 #define omap3_aes_resources_sz 0
574 #endif 574 #endif
575 575
576 static struct platform_device aes_device = { 576 static struct platform_device aes_device = {
577 .name = "omap-aes", 577 .name = "omap-aes",
578 .id = -1, 578 .id = -1,
579 }; 579 };
580 580
581 static void omap_init_aes(void) 581 static void omap_init_aes(void)
582 { 582 {
583 if (cpu_is_omap24xx()) { 583 if (cpu_is_omap24xx()) {
584 aes_device.resource = omap2_aes_resources; 584 aes_device.resource = omap2_aes_resources;
585 aes_device.num_resources = omap2_aes_resources_sz; 585 aes_device.num_resources = omap2_aes_resources_sz;
586 } else if (cpu_is_omap34xx()) { 586 } else if (cpu_is_omap34xx()) {
587 aes_device.resource = omap3_aes_resources; 587 aes_device.resource = omap3_aes_resources;
588 aes_device.num_resources = omap3_aes_resources_sz; 588 aes_device.num_resources = omap3_aes_resources_sz;
589 } else { 589 } else {
590 pr_err("%s: platform not supported\n", __func__); 590 pr_err("%s: platform not supported\n", __func__);
591 return; 591 return;
592 } 592 }
593 platform_device_register(&aes_device); 593 platform_device_register(&aes_device);
594 } 594 }
595 595
596 #else 596 #else
597 static inline void omap_init_aes(void) { } 597 static inline void omap_init_aes(void) { }
598 #endif 598 #endif
599 599
600 /*-------------------------------------------------------------------------*/ 600 /*-------------------------------------------------------------------------*/
601 601
602 #if defined(CONFIG_VIDEO_OMAP2_VOUT) || \ 602 #if defined(CONFIG_VIDEO_OMAP2_VOUT) || \
603 defined(CONFIG_VIDEO_OMAP2_VOUT_MODULE) 603 defined(CONFIG_VIDEO_OMAP2_VOUT_MODULE)
604 #if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) 604 #if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
605 static struct resource omap_vout_resource[3 - CONFIG_FB_OMAP2_NUM_FBS] = { 605 static struct resource omap_vout_resource[3 - CONFIG_FB_OMAP2_NUM_FBS] = {
606 }; 606 };
607 #else 607 #else
608 static struct resource omap_vout_resource[2] = { 608 static struct resource omap_vout_resource[2] = {
609 }; 609 };
610 #endif 610 #endif
611 611
612 static struct platform_device omap_vout_device = { 612 static struct platform_device omap_vout_device = {
613 .name = "omap_vout", 613 .name = "omap_vout",
614 .num_resources = ARRAY_SIZE(omap_vout_resource), 614 .num_resources = ARRAY_SIZE(omap_vout_resource),
615 .resource = &omap_vout_resource[0], 615 .resource = &omap_vout_resource[0],
616 .id = -1, 616 .id = -1,
617 }; 617 };
618 static void omap_init_vout(void) 618 static void omap_init_vout(void)
619 { 619 {
620 if (platform_device_register(&omap_vout_device) < 0) 620 if (platform_device_register(&omap_vout_device) < 0)
621 printk(KERN_ERR "Unable to register OMAP-VOUT device\n"); 621 printk(KERN_ERR "Unable to register OMAP-VOUT device\n");
622 } 622 }
623 #else 623 #else
624 static inline void omap_init_vout(void) {} 624 static inline void omap_init_vout(void) {}
625 #endif 625 #endif
626 626
627 /*-------------------------------------------------------------------------*/ 627 /*-------------------------------------------------------------------------*/
628 628
629 static int __init omap2_init_devices(void) 629 static int __init omap2_init_devices(void)
630 { 630 {
631 /* Enable dummy states for those platforms without pinctrl support */ 631 /* Enable dummy states for those platforms without pinctrl support */
632 if (!of_have_populated_dt()) 632 if (!of_have_populated_dt())
633 pinctrl_provide_dummies(); 633 pinctrl_provide_dummies();
634 634
635 /* 635 /*
636 * please keep these calls, and their implementations above, 636 * please keep these calls, and their implementations above,
637 * in alphabetical order so they're easier to sort through. 637 * in alphabetical order so they're easier to sort through.
638 */ 638 */
639 omap_init_audio(); 639 omap_init_audio();
640 omap_init_camera(); 640 omap_init_camera();
641 omap_init_hdmi_audio(); 641 omap_init_hdmi_audio();
642 omap_init_mbox(); 642 omap_init_mbox();
643 /* If dtb is there, the devices will be created dynamically */ 643 /* If dtb is there, the devices will be created dynamically */
644 if (!of_have_populated_dt()) { 644 if (!of_have_populated_dt()) {
645 omap_init_dmic(); 645 omap_init_dmic();
646 omap_init_mcpdm(); 646 omap_init_mcpdm();
647 omap_init_mcspi(); 647 omap_init_mcspi();
648 } 648 }
649 omap_init_pmu(); 649 omap_init_pmu();
650 omap_init_sti(); 650 omap_init_sti();
651 omap_init_sham(); 651 omap_init_sham();
652 omap_init_aes(); 652 omap_init_aes();
653 omap_init_vout(); 653 omap_init_vout();
654 654
655 return 0; 655 return 0;
656 } 656 }
657 arch_initcall(omap2_init_devices); 657 arch_initcall(omap2_init_devices);
658 658
659 #if defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE) 659 #if defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE)
660 static int __init omap_init_wdt(void) 660 static int __init omap_init_wdt(void)
661 { 661 {
662 int id = -1; 662 int id = -1;
663 struct platform_device *pdev; 663 struct platform_device *pdev;
664 struct omap_hwmod *oh; 664 struct omap_hwmod *oh;
665 char *oh_name = "wd_timer2"; 665 char *oh_name = "wd_timer2";
666 char *dev_name = "omap_wdt"; 666 char *dev_name = "omap_wdt";
667 667
668 if (!cpu_class_is_omap2() || of_have_populated_dt()) 668 if (!cpu_class_is_omap2() || of_have_populated_dt())
669 return 0; 669 return 0;
670 670
671 oh = omap_hwmod_lookup(oh_name); 671 oh = omap_hwmod_lookup(oh_name);
672 if (!oh) { 672 if (!oh) {
673 pr_err("Could not look up wd_timer%d hwmod\n", id); 673 pr_err("Could not look up wd_timer%d hwmod\n", id);
674 return -EINVAL; 674 return -EINVAL;
675 } 675 }
676 676
677 pdev = omap_device_build(dev_name, id, oh, NULL, 0, NULL, 0, 0); 677 pdev = omap_device_build(dev_name, id, oh, NULL, 0, NULL, 0, 0);
678 WARN(IS_ERR(pdev), "Can't build omap_device for %s:%s.\n", 678 WARN(IS_ERR(pdev), "Can't build omap_device for %s:%s.\n",
679 dev_name, oh->name); 679 dev_name, oh->name);
680 return 0; 680 return 0;
681 } 681 }
682 subsys_initcall(omap_init_wdt); 682 subsys_initcall(omap_init_wdt);
683 #endif 683 #endif
684 684
arch/arm/mach-omap2/omap4-keypad.h
File was created 1 #ifndef ARCH_ARM_PLAT_OMAP4_KEYPAD_H
2 #define ARCH_ARM_PLAT_OMAP4_KEYPAD_H
3
4 struct omap_board_data;
5
6 extern int omap4_keyboard_init(struct omap4_keypad_platform_data *,
7 struct omap_board_data *);
8 #endif
9
arch/arm/plat-omap/include/plat/omap4-keypad.h
1 #ifndef ARCH_ARM_PLAT_OMAP4_KEYPAD_H File was deleted
2 #define ARCH_ARM_PLAT_OMAP4_KEYPAD_H
3
4 struct omap_board_data;
5
6 extern int omap4_keyboard_init(struct omap4_keypad_platform_data *,
7 struct omap_board_data *);
8 #endif
9 1 #ifndef ARCH_ARM_PLAT_OMAP4_KEYPAD_H