n810: Add retu/tahvo userspace interface debugging
[openwrt.git] / target / linux / omap24xx / patches-2.6.35 / 300-nokia-board.patch
1 Index: linux-2.6.35/arch/arm/mach-omap1/board-nokia770.c
2 ===================================================================
3 --- linux-2.6.35.orig/arch/arm/mach-omap1/board-nokia770.c 2010-08-08 12:56:15.000000000 +0200
4 +++ linux-2.6.35/arch/arm/mach-omap1/board-nokia770.c 2010-08-08 12:56:30.000000000 +0200
5 @@ -37,6 +37,7 @@
6 #include <plat/lcd_mipid.h>
7 #include <plat/mmc.h>
8 #include <plat/clock.h>
9 +#include <plat/cbus.h>
10
11 #define ADS7846_PENDOWN_GPIO 15
12
13 @@ -96,8 +97,23 @@ static struct platform_device nokia770_k
14 .resource = nokia770_kp_resources,
15 };
16
17 +static struct cbus_host_platform_data nokia770_cbus_data = {
18 + .clk_gpio = OMAP_MPUIO(11),
19 + .dat_gpio = OMAP_MPUIO(10),
20 + .sel_gpio = OMAP_MPUIO(9),
21 +};
22 +
23 +static struct platform_device nokia770_cbus_device = {
24 + .name = "cbus",
25 + .id = -1,
26 + .dev = {
27 + .platform_data = &nokia770_cbus_data,
28 + },
29 +};
30 +
31 static struct platform_device *nokia770_devices[] __initdata = {
32 &nokia770_kp_device,
33 + &nokia770_cbus_device,
34 };
35
36 static void mipid_shutdown(struct mipid_platform_data *pdata)
37 Index: linux-2.6.35/arch/arm/mach-omap2/board-n8x0.c
38 ===================================================================
39 --- linux-2.6.35.orig/arch/arm/mach-omap2/board-n8x0.c 2010-08-08 12:56:15.000000000 +0200
40 +++ linux-2.6.35/arch/arm/mach-omap2/board-n8x0.c 2010-08-08 12:56:30.000000000 +0200
41 @@ -18,8 +18,12 @@
42 #include <linux/io.h>
43 #include <linux/stddef.h>
44 #include <linux/i2c.h>
45 +#include <linux/platform_device.h>
46 #include <linux/spi/spi.h>
47 +#include <linux/spi/tsc2005.h>
48 +#include <linux/input.h>
49 #include <linux/usb/musb.h>
50 +#include <linux/i2c/lm8323.h>
51
52 #include <asm/mach/arch.h>
53 #include <asm/mach-types.h>
54 @@ -32,6 +36,117 @@
55 #include <plat/onenand.h>
56 #include <plat/mmc.h>
57 #include <plat/serial.h>
58 +#include <plat/cbus.h>
59 +
60 +#define RX51_TSC2005_RESET_GPIO 94
61 +#define RX51_TSC2005_IRQ_GPIO 106
62 +#define OMAP_TAG_NOKIA_BT 0x4e01
63 +
64 +static s16 rx44_keymap[LM8323_KEYMAP_SIZE] = {
65 + [0x01] = KEY_Q,
66 + [0x02] = KEY_K,
67 + [0x03] = KEY_O,
68 + [0x04] = KEY_P,
69 + [0x05] = KEY_BACKSPACE,
70 + [0x06] = KEY_A,
71 + [0x07] = KEY_S,
72 + [0x08] = KEY_D,
73 + [0x09] = KEY_F,
74 + [0x0a] = KEY_G,
75 + [0x0b] = KEY_H,
76 + [0x0c] = KEY_J,
77 +
78 + [0x11] = KEY_W,
79 + [0x12] = KEY_F4,
80 + [0x13] = KEY_L,
81 + [0x14] = KEY_APOSTROPHE,
82 + [0x16] = KEY_Z,
83 + [0x17] = KEY_X,
84 + [0x18] = KEY_C,
85 + [0x19] = KEY_V,
86 + [0x1a] = KEY_B,
87 + [0x1b] = KEY_N,
88 + [0x1c] = KEY_LEFTSHIFT, /* Actually, this is both shift keys */
89 + [0x1f] = KEY_F7,
90 +
91 + [0x21] = KEY_E,
92 + [0x22] = KEY_SEMICOLON,
93 + [0x23] = KEY_MINUS,
94 + [0x24] = KEY_EQUAL,
95 + [0x2b] = KEY_FN,
96 + [0x2c] = KEY_M,
97 + [0x2f] = KEY_F8,
98 +
99 + [0x31] = KEY_R,
100 + [0x32] = KEY_RIGHTCTRL,
101 + [0x34] = KEY_SPACE,
102 + [0x35] = KEY_COMMA,
103 + [0x37] = KEY_UP,
104 + [0x3c] = KEY_COMPOSE,
105 + [0x3f] = KEY_F6,
106 +
107 + [0x41] = KEY_T,
108 + [0x44] = KEY_DOT,
109 + [0x46] = KEY_RIGHT,
110 + [0x4f] = KEY_F5,
111 + [0x51] = KEY_Y,
112 + [0x53] = KEY_DOWN,
113 + [0x55] = KEY_ENTER,
114 + [0x5f] = KEY_ESC,
115 +
116 + [0x61] = KEY_U,
117 + [0x64] = KEY_LEFT,
118 +
119 + [0x71] = KEY_I,
120 + [0x75] = KEY_KPENTER,
121 +};
122 +
123 +static struct lm8323_platform_data lm8323_pdata = {
124 + .repeat = 0, /* Repeat is handled in userspace for now. */
125 + .keymap = rx44_keymap,
126 + .size_x = 8,
127 + .size_y = 12,
128 + .debounce_time = 12,
129 + .active_time = 500,
130 +
131 + .name = "Internal keyboard",
132 + .pwm_names[0] = "n810::keyboard",
133 + .pwm_names[1] = "n810::cover",
134 + //.pwm1_name = "n810::keyboard",
135 + //.pwm2_name = "n810::cover",
136 +};
137 +
138 +struct omap_bluetooth_config {
139 + u8 chip_type;
140 + u8 bt_wakeup_gpio;
141 + u8 host_wakeup_gpio;
142 + u8 reset_gpio;
143 + u8 bt_uart;
144 + u8 bd_addr[6];
145 + u8 bt_sysclk;
146 +};
147 +
148 +static struct platform_device n8x0_bt_device = {
149 + .name = "hci_h4p",
150 + .id = -1,
151 + .num_resources = 0,
152 +};
153 +
154 +void __init n8x0_bt_init(void)
155 +{
156 + const struct omap_bluetooth_config *bt_config;
157 +
158 + bt_config = (void *) omap_get_config(OMAP_TAG_NOKIA_BT,
159 + struct omap_bluetooth_config);
160 + n8x0_bt_device.dev.platform_data = (void *) bt_config;
161 + if (platform_device_register(&n8x0_bt_device) < 0)
162 + BUG();
163 +}
164 +
165 +static struct omap2_mcspi_device_config mipid_mcspi_config = {
166 + .turbo_mode = 0,
167 + .single_channel = 1,
168 +};
169
170 static int slot1_cover_open;
171 static int slot2_cover_open;
172 @@ -139,7 +254,34 @@ static struct omap2_mcspi_device_config
173 .single_channel = 1,
174 };
175
176 +#ifdef CONFIG_MACH_NOKIA_N8X0_LCD
177 +extern struct mipid_platform_data n8x0_mipid_platform_data;
178 +#endif
179 +
180 +#ifdef CONFIG_TOUCHSCREEN_TSC2005
181 +static struct tsc2005_platform_data tsc2005_config;
182 +static void rx51_tsc2005_set_reset(bool enable)
183 +{
184 + gpio_set_value(RX51_TSC2005_RESET_GPIO, enable);
185 +}
186 +
187 +static struct omap2_mcspi_device_config tsc2005_mcspi_config = {
188 + .turbo_mode = 0,
189 + .single_channel = 1,
190 +};
191 +#endif
192 +
193 static struct spi_board_info n800_spi_board_info[] __initdata = {
194 +#ifdef CONFIG_MACH_NOKIA_N8X0_LCD
195 + {
196 + .modalias = "lcd_mipid",
197 + .bus_num = 1,
198 + .chip_select = 1,
199 + .max_speed_hz = 4000000,
200 + .controller_data= &mipid_mcspi_config,
201 + .platform_data = &n8x0_mipid_platform_data,
202 + },
203 +#endif
204 {
205 .modalias = "p54spi",
206 .bus_num = 2,
207 @@ -147,6 +289,68 @@ static struct spi_board_info n800_spi_bo
208 .max_speed_hz = 48000000,
209 .controller_data = &p54spi_mcspi_config,
210 },
211 + {
212 + .modalias = "tsc2005",
213 + .bus_num = 1,
214 + .chip_select = 0,
215 + .irq = OMAP_GPIO_IRQ(RX51_TSC2005_IRQ_GPIO),
216 + .max_speed_hz = 6000000,
217 + .controller_data = &tsc2005_mcspi_config,
218 + .platform_data = &tsc2005_config,
219 + },
220 +};
221 +
222 +static void __init tsc2005_set_config(void)
223 +{
224 + const struct omap_lcd_config *conf;
225 +
226 + conf = omap_get_config(OMAP_TAG_LCD, struct omap_lcd_config);
227 + if (conf != NULL) {
228 +#ifdef CONFIG_TOUCHSCREEN_TSC2005
229 + if (strcmp(conf->panel_name, "lph8923") == 0) {
230 + tsc2005_config.ts_x_plate_ohm = 180;
231 + tsc2005_config.ts_hw_avg = 0;
232 + tsc2005_config.ts_ignore_last = 0;
233 + tsc2005_config.ts_touch_pressure = 1500;
234 + tsc2005_config.ts_stab_time = 100;
235 + tsc2005_config.ts_pressure_max = 2048;
236 + tsc2005_config.ts_pressure_fudge = 2;
237 + tsc2005_config.ts_x_max = 4096;
238 + tsc2005_config.ts_x_fudge = 4;
239 + tsc2005_config.ts_y_max = 4096;
240 + tsc2005_config.ts_y_fudge = 7;
241 + tsc2005_config.set_reset = rx51_tsc2005_set_reset;
242 + } else if (strcmp(conf->panel_name, "ls041y3") == 0) {
243 + tsc2005_config.ts_x_plate_ohm = 280;
244 + tsc2005_config.ts_hw_avg = 0;
245 + tsc2005_config.ts_ignore_last = 0;
246 + tsc2005_config.ts_touch_pressure = 1500;
247 + tsc2005_config.ts_stab_time = 1000;
248 + tsc2005_config.ts_pressure_max = 2048;
249 + tsc2005_config.ts_pressure_fudge = 2;
250 + tsc2005_config.ts_x_max = 4096;
251 + tsc2005_config.ts_x_fudge = 4;
252 + tsc2005_config.ts_y_max = 4096;
253 + tsc2005_config.ts_y_fudge = 7;
254 + tsc2005_config.set_reset = rx51_tsc2005_set_reset;
255 + } else {
256 + printk(KERN_ERR "Unknown panel type, set default "
257 + "touchscreen configuration\n");
258 + tsc2005_config.ts_x_plate_ohm = 200;
259 + tsc2005_config.ts_stab_time = 100;
260 + }
261 +#endif
262 + }
263 +}
264 +
265 +static struct i2c_board_info __initdata_or_module n8x0_i2c_board_info_2[] = {};
266 +
267 +static struct i2c_board_info __initdata_or_module n810_i2c_board_info_2[] = {
268 + {
269 + I2C_BOARD_INFO("lm8323", 0x45),
270 + .irq = OMAP_GPIO_IRQ(109),
271 + .platform_data = &lm8323_pdata,
272 + },
273 };
274
275 #if defined(CONFIG_MTD_ONENAND_OMAP2) || \
276 @@ -181,6 +385,20 @@ static struct mtd_partition onenand_part
277 },
278 };
279
280 +static struct cbus_host_platform_data n8x0_cbus_data = {
281 + .clk_gpio = 66,
282 + .dat_gpio = 65,
283 + .sel_gpio = 64,
284 +};
285 +
286 +static struct platform_device n8x0_cbus_device = {
287 + .name = "cbus",
288 + .id = -1,
289 + .dev = {
290 + .platform_data = &n8x0_cbus_data,
291 + },
292 +};
293 +
294 static struct omap_onenand_platform_data board_onenand_data = {
295 .cs = 0,
296 .gpio_irq = 26,
297 @@ -649,14 +867,37 @@ static void __init n8x0_init_irq(void)
298 omap_gpio_init();
299 }
300
301 +#ifdef CONFIG_MACH_NOKIA_N8X0_LCD
302 +extern void n8x0_mipid_init(void);
303 +extern void n8x0_blizzard_init(void);
304 +#else
305 +#define n8x0_mipid_init() 0
306 +#define n8x0_blizzard_init() 0
307 +#endif
308 +
309 static void __init n8x0_init_machine(void)
310 {
311 + platform_device_register(&n8x0_cbus_device);
312 +
313 + n8x0_bt_init();
314 +
315 /* FIXME: add n810 spi devices */
316 + tsc2005_set_config();
317 spi_register_board_info(n800_spi_board_info,
318 ARRAY_SIZE(n800_spi_board_info));
319
320 omap_serial_init();
321 n8x0_menelaus_init();
322 +
323 + omap_register_i2c_bus(2, 400, n8x0_i2c_board_info_2,
324 + ARRAY_SIZE(n8x0_i2c_board_info_2));
325 +
326 + i2c_register_board_info(2, n810_i2c_board_info_2,
327 + ARRAY_SIZE(n810_i2c_board_info_2));
328 +
329 + n8x0_mipid_init();
330 + n8x0_blizzard_init();
331 +
332 n8x0_onenand_init();
333 n8x0_mmc_init();
334 n8x0_usb_init();
335 Index: linux-2.6.35/arch/arm/mach-omap2/board-n8x0-lcd.c
336 ===================================================================
337 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
338 +++ linux-2.6.35/arch/arm/mach-omap2/board-n8x0-lcd.c 2010-08-08 12:56:31.000000000 +0200
339 @@ -0,0 +1,127 @@
340 +/*
341 + * linux/arch/arm/mach-omap2/board-n8x0.c
342 + *
343 + * Copyright (C) 2005-2009 Nokia Corporation
344 + * Author: Juha Yrjola <juha.yrjola@nokia.com>
345 + *
346 + * Modified from mach-omap2/board-generic.c
347 + *
348 + * This program is free software; you can redistribute it and/or modify
349 + * it under the terms of the GNU General Public License version 2 as
350 + * published by the Free Software Foundation.
351 + */
352 +
353 +#include <linux/clk.h>
354 +#include <linux/delay.h>
355 +#include <linux/gpio.h>
356 +#include <linux/omapfb.h>
357 +
358 +#include <plat/lcd_mipid.h>
359 +#include <plat/blizzard.h>
360 +
361 +#include <../drivers/cbus/tahvo.h>
362 +
363 +#define N8X0_BLIZZARD_POWERDOWN_GPIO 15
364 +
365 +// MIPID LCD Panel
366 +
367 +static void mipid_shutdown(struct mipid_platform_data *pdata)
368 +{
369 + if (pdata->nreset_gpio != -1) {
370 + pr_info("shutdown LCD\n");
371 + gpio_set_value(pdata->nreset_gpio, 0);
372 + msleep(120);
373 + }
374 +}
375 +
376 +struct mipid_platform_data n8x0_mipid_platform_data = {
377 + .shutdown = mipid_shutdown,
378 +};
379 +
380 +void __init n8x0_mipid_init(void)
381 +{
382 + const struct omap_lcd_config *conf;
383 +
384 + conf = omap_get_config(OMAP_TAG_LCD, struct omap_lcd_config);
385 + if (conf != NULL) {
386 + n8x0_mipid_platform_data.nreset_gpio = conf->nreset_gpio;
387 + n8x0_mipid_platform_data.data_lines = conf->data_lines;
388 + printk(KERN_INFO "N8x0 MIPID config loaded");
389 + }
390 + else
391 + printk(KERN_INFO "N8x0 MIPID config not provided");
392 +}
393 +
394 +
395 +// Epson Blizzard LCD Controller
396 +
397 +static struct {
398 + struct clk *sys_ck;
399 +} blizzard;
400 +
401 +static int blizzard_get_clocks(void)
402 +{
403 + blizzard.sys_ck = clk_get(0, "osc_ck");
404 + if (IS_ERR(blizzard.sys_ck)) {
405 + printk(KERN_ERR "can't get Blizzard clock\n");
406 + return PTR_ERR(blizzard.sys_ck);
407 + }
408 + return 0;
409 +}
410 +
411 +static unsigned long blizzard_get_clock_rate(struct device *dev)
412 +{
413 + return clk_get_rate(blizzard.sys_ck);
414 +}
415 +
416 +static void blizzard_enable_clocks(int enable)
417 +{
418 + if (enable)
419 + clk_enable(blizzard.sys_ck);
420 + else
421 + clk_disable(blizzard.sys_ck);
422 +}
423 +
424 +static void blizzard_power_up(struct device *dev)
425 +{
426 + /* Vcore to 1.475V */
427 + tahvo_set_clear_reg_bits(0x07, 0, 0xf);
428 + msleep(10);
429 +
430 + blizzard_enable_clocks(1);
431 + gpio_set_value(N8X0_BLIZZARD_POWERDOWN_GPIO, 1);
432 +}
433 +
434 +static void blizzard_power_down(struct device *dev)
435 +{
436 + gpio_set_value(N8X0_BLIZZARD_POWERDOWN_GPIO, 0);
437 + blizzard_enable_clocks(0);
438 +
439 + /* Vcore to 1.005V */
440 + tahvo_set_clear_reg_bits(0x07, 0xf, 0);
441 +}
442 +
443 +static struct blizzard_platform_data n8x0_blizzard_data = {
444 + .power_up = blizzard_power_up,
445 + .power_down = blizzard_power_down,
446 + .get_clock_rate = blizzard_get_clock_rate,
447 + .te_connected = 1,
448 +};
449 +
450 +void __init n8x0_blizzard_init(void)
451 +{
452 + int r;
453 +
454 + r = gpio_request(N8X0_BLIZZARD_POWERDOWN_GPIO, "Blizzard pd");
455 + if (r < 0)
456 + {
457 + printk(KERN_ERR "Can't get N8x0 Blizzard powerdown GPIO %d\n", N8X0_BLIZZARD_POWERDOWN_GPIO);
458 + return;
459 + }
460 + gpio_direction_output(N8X0_BLIZZARD_POWERDOWN_GPIO, 1);
461 +
462 + blizzard_get_clocks();
463 + omapfb_set_ctrl_platform_data(&n8x0_blizzard_data);
464 +
465 + printk(KERN_INFO "N8x0 Blizzard initialized");
466 +}
467 Index: linux-2.6.35/arch/arm/mach-omap2/board-n8x0-usb.c
468 ===================================================================
469 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
470 +++ linux-2.6.35/arch/arm/mach-omap2/board-n8x0-usb.c 2010-08-08 12:56:31.000000000 +0200
471 @@ -0,0 +1,175 @@
472 +/*
473 + * linux/arch/arm/mach-omap2/board-n8x0-usb.c
474 + *
475 + * Copyright (C) 2006 Nokia Corporation
476 + * Author: Juha Yrjola
477 + *
478 + * This program is free software; you can redistribute it and/or modify
479 + * it under the terms of the GNU General Public License version 2 as
480 + * published by the Free Software Foundation.
481 + */
482 +
483 +#include <linux/types.h>
484 +#include <linux/delay.h>
485 +#include <linux/platform_device.h>
486 +#include <linux/clk.h>
487 +#include <linux/err.h>
488 +#include <linux/gpio.h>
489 +#include <linux/usb/musb.h>
490 +
491 +#include <plat/gpmc.h>
492 +
493 +#define TUSB_ASYNC_CS 1
494 +#define TUSB_SYNC_CS 4
495 +#define GPIO_TUSB_INT 58
496 +#define GPIO_TUSB_ENABLE 0
497 +
498 +static int tusb_set_power(int state);
499 +static int tusb_set_clock(struct clk *osc_ck, int state);
500 +
501 +#if defined(CONFIG_USB_MUSB_OTG)
502 +# define BOARD_MODE MUSB_OTG
503 +#elif defined(CONFIG_USB_MUSB_PERIPHERAL)
504 +# define BOARD_MODE MUSB_PERIPHERAL
505 +#else /* defined(CONFIG_USB_MUSB_HOST) */
506 +# define BOARD_MODE MUSB_HOST
507 +#endif
508 +
509 +static struct musb_hdrc_eps_bits musb_eps[] = {
510 + { "ep1_tx", 5, },
511 + { "ep1_rx", 5, },
512 + { "ep2_tx", 5, },
513 + { "ep2_rx", 5, },
514 + { "ep3_tx", 3, },
515 + { "ep3_rx", 3, },
516 + { "ep4_tx", 3, },
517 + { "ep4_rx", 3, },
518 + { "ep5_tx", 2, },
519 + { "ep5_rx", 2, },
520 + { "ep6_tx", 2, },
521 + { "ep6_rx", 2, },
522 + { "ep7_tx", 2, },
523 + { "ep7_rx", 2, },
524 + { "ep8_tx", 2, },
525 + { "ep8_rx", 2, },
526 + { "ep9_tx", 2, },
527 + { "ep9_rx", 2, },
528 + { "ep10_tx", 2, },
529 + { "ep10_rx", 2, },
530 + { "ep11_tx", 2, },
531 + { "ep11_rx", 2, },
532 + { "ep12_tx", 2, },
533 + { "ep12_rx", 2, },
534 + { "ep13_tx", 2, },
535 + { "ep13_rx", 2, },
536 + { "ep14_tx", 2, },
537 + { "ep14_rx", 2, },
538 + { "ep15_tx", 2, },
539 + { "ep15_rx", 2, },
540 +};
541 +
542 +static struct musb_hdrc_config musb_config = {
543 + .multipoint = 1,
544 + .dyn_fifo = 1,
545 + .soft_con = 1,
546 + .dma = 1,
547 + .num_eps = 16,
548 + .dma_channels = 7,
549 + .ram_bits = 12,
550 + .eps_bits = musb_eps,
551 +};
552 +
553 +static struct musb_hdrc_platform_data tusb_data = {
554 + .mode = BOARD_MODE,
555 + .set_power = tusb_set_power,
556 + .set_clock = tusb_set_clock,
557 + .min_power = 25, /* x2 = 50 mA drawn from VBUS as peripheral */
558 + .power = 100, /* Max 100 mA VBUS for host mode */
559 + .clock = "osc_ck",
560 + .config = &musb_config,
561 +};
562 +
563 +/*
564 + * Enable or disable power to TUSB6010. When enabling, turn on 3.3 V and
565 + * 1.5 V voltage regulators of PM companion chip. Companion chip will then
566 + * provide then PGOOD signal to TUSB6010 which will release it from reset.
567 + */
568 +static int tusb_set_power(int state)
569 +{
570 + int i, retval = 0;
571 +
572 + if (state) {
573 + gpio_set_value(GPIO_TUSB_ENABLE, 1);
574 + msleep(1);
575 +
576 + /* Wait until TUSB6010 pulls INT pin down */
577 + i = 100;
578 + while (i && gpio_get_value(GPIO_TUSB_INT)) {
579 + msleep(1);
580 + i--;
581 + }
582 +
583 + if (!i) {
584 + printk(KERN_ERR "tusb: powerup failed\n");
585 + retval = -ENODEV;
586 + }
587 + } else {
588 + gpio_set_value(GPIO_TUSB_ENABLE, 0);
589 + msleep(10);
590 + }
591 +
592 + return retval;
593 +}
594 +
595 +static int osc_ck_on;
596 +
597 +static int tusb_set_clock(struct clk *osc_ck, int state)
598 +{
599 + if (state) {
600 + if (osc_ck_on > 0)
601 + return -ENODEV;
602 +
603 + //omap2_block_sleep();
604 + clk_enable(osc_ck);
605 + osc_ck_on = 1;
606 + } else {
607 + if (osc_ck_on == 0)
608 + return -ENODEV;
609 +
610 + clk_disable(osc_ck);
611 + osc_ck_on = 0;
612 + //omap2_allow_sleep();
613 + }
614 +
615 + return 0;
616 +}
617 +
618 +void __init n8x0_usb_init(void)
619 +{
620 + int ret = 0;
621 + static char announce[] __initdata = KERN_INFO "TUSB 6010\n";
622 +
623 + /* PM companion chip power control pin */
624 + ret = gpio_request(GPIO_TUSB_ENABLE, "TUSB6010 enable");
625 + if (ret != 0) {
626 + printk(KERN_ERR "Could not get TUSB power GPIO%i\n",
627 + GPIO_TUSB_ENABLE);
628 + return;
629 + }
630 + gpio_direction_output(GPIO_TUSB_ENABLE, 0);
631 +
632 + tusb_set_power(0);
633 +
634 + ret = tusb6010_setup_interface(&tusb_data, TUSB6010_REFCLK_19, 2,
635 + TUSB_ASYNC_CS, TUSB_SYNC_CS,
636 + GPIO_TUSB_INT, 0x3f);
637 + if (ret != 0)
638 + goto err;
639 +
640 + printk(announce);
641 +
642 + return;
643 +
644 +err:
645 + gpio_free(GPIO_TUSB_ENABLE);
646 +}
647 Index: linux-2.6.35/arch/arm/mach-omap2/control.c
648 ===================================================================
649 --- linux-2.6.35.orig/arch/arm/mach-omap2/control.c 2010-08-08 12:56:15.000000000 +0200
650 +++ linux-2.6.35/arch/arm/mach-omap2/control.c 2010-08-08 12:56:32.000000000 +0200
651 @@ -162,6 +162,7 @@ u16 omap_ctrl_readw(u16 offset)
652 return __raw_readw(OMAP_CTRL_REGADDR(offset));
653 }
654
655 +EXPORT_SYMBOL_GPL(omap_ctrl_readl);
656 u32 omap_ctrl_readl(u16 offset)
657 {
658 return __raw_readl(OMAP_CTRL_REGADDR(offset));
659 @@ -177,6 +178,7 @@ void omap_ctrl_writew(u16 val, u16 offse
660 __raw_writew(val, OMAP_CTRL_REGADDR(offset));
661 }
662
663 +EXPORT_SYMBOL_GPL(omap_ctrl_writel);
664 void omap_ctrl_writel(u32 val, u16 offset)
665 {
666 __raw_writel(val, OMAP_CTRL_REGADDR(offset));
667 Index: linux-2.6.35/arch/arm/mach-omap2/Kconfig
668 ===================================================================
669 --- linux-2.6.35.orig/arch/arm/mach-omap2/Kconfig 2010-08-08 12:56:15.000000000 +0200
670 +++ linux-2.6.35/arch/arm/mach-omap2/Kconfig 2010-08-08 12:56:33.000000000 +0200
671 @@ -116,6 +116,16 @@ config MACH_NOKIA_N8X0
672 select MACH_NOKIA_N810
673 select MACH_NOKIA_N810_WIMAX
674
675 +config MACH_NOKIA_N8X0_LCD
676 + bool
677 + depends on MACH_NOKIA_N8X0 && FB_OMAP_LCDC_BLIZZARD && FB_OMAP_LCD_MIPID
678 + default y
679 +
680 +config MACH_NOKIA_N8X0_USB
681 + bool
682 + depends on MACH_NOKIA_N8X0 && MACH_OMAP2_TUSB6010
683 + default y
684 +
685 config MACH_NOKIA_RX51
686 bool "Nokia RX-51 board"
687 depends on ARCH_OMAP3
688 Index: linux-2.6.35/arch/arm/mach-omap2/Makefile
689 ===================================================================
690 --- linux-2.6.35.orig/arch/arm/mach-omap2/Makefile 2010-08-08 12:56:15.000000000 +0200
691 +++ linux-2.6.35/arch/arm/mach-omap2/Makefile 2010-08-08 12:56:33.000000000 +0200
692 @@ -116,6 +116,8 @@ obj-$(CONFIG_MACH_OMAP_3430SDP) += boar
693 hsmmc.o \
694 board-sdp-flash.o
695 obj-$(CONFIG_MACH_NOKIA_N8X0) += board-n8x0.o
696 +obj-$(CONFIG_MACH_NOKIA_N8X0_LCD) += board-n8x0-lcd.o
697 +obj-$(CONFIG_MACH_NOKIA_N8X0_USB) += board-n8x0-usb.o
698 obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \
699 board-rx51-sdram.o \
700 board-rx51-peripherals.o \
701 Index: linux-2.6.35/arch/arm/mach-omap2/serial.c
702 ===================================================================
703 --- linux-2.6.35.orig/arch/arm/mach-omap2/serial.c 2010-08-08 12:56:15.000000000 +0200
704 +++ linux-2.6.35/arch/arm/mach-omap2/serial.c 2010-08-08 12:56:34.000000000 +0200
705 @@ -495,10 +495,10 @@ static void omap_uart_idle_init(struct o
706 uart->padconf = 0;
707 }
708
709 - p->irqflags |= IRQF_SHARED;
710 +/* p->irqflags |= IRQF_SHARED;
711 ret = request_irq(p->irq, omap_uart_interrupt, IRQF_SHARED,
712 "serial idle", (void *)uart);
713 - WARN_ON(ret);
714 + WARN_ON(ret); */
715 }
716
717 void omap_uart_enable_irqs(int enable)
718 @@ -506,13 +506,13 @@ void omap_uart_enable_irqs(int enable)
719 int ret;
720 struct omap_uart_state *uart;
721
722 - list_for_each_entry(uart, &uart_list, node) {
723 +/* list_for_each_entry(uart, &uart_list, node) {
724 if (enable)
725 ret = request_irq(uart->p->irq, omap_uart_interrupt,
726 IRQF_SHARED, "serial idle", (void *)uart);
727 else
728 free_irq(uart->p->irq, (void *)uart);
729 - }
730 + } */
731 }
732
733 static ssize_t sleep_timeout_show(struct device *dev,
This page took 0.101939 seconds and 5 git commands to generate.