diff options
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r-- | arch/arm/mach-pxa/corgi.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-pxa/corgi_lcd.c | 23 | ||||
-rw-r--r-- | arch/arm/mach-pxa/generic.c | 26 | ||||
-rw-r--r-- | arch/arm/mach-pxa/spitz.c | 4 |
4 files changed, 49 insertions, 5 deletions
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index be37586cb1b0..60c8b9d8bb9c 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <asm/arch/mmc.h> | 36 | #include <asm/arch/mmc.h> |
37 | #include <asm/arch/udc.h> | 37 | #include <asm/arch/udc.h> |
38 | #include <asm/arch/corgi.h> | 38 | #include <asm/arch/corgi.h> |
39 | #include <asm/arch/sharpsl.h> | ||
39 | 40 | ||
40 | #include <asm/mach/sharpsl_param.h> | 41 | #include <asm/mach/sharpsl_param.h> |
41 | #include <asm/hardware/scoop.h> | 42 | #include <asm/hardware/scoop.h> |
diff --git a/arch/arm/mach-pxa/corgi_lcd.c b/arch/arm/mach-pxa/corgi_lcd.c index c5efcd04fcbc..370df113dc06 100644 --- a/arch/arm/mach-pxa/corgi_lcd.c +++ b/arch/arm/mach-pxa/corgi_lcd.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/device.h> | 20 | #include <linux/device.h> |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <asm/mach-types.h> | ||
23 | #include <asm/arch/akita.h> | 22 | #include <asm/arch/akita.h> |
24 | #include <asm/arch/corgi.h> | 23 | #include <asm/arch/corgi.h> |
25 | #include <asm/arch/hardware.h> | 24 | #include <asm/arch/hardware.h> |
@@ -468,6 +467,7 @@ void corgi_put_hsync(void) | |||
468 | { | 467 | { |
469 | if (get_hsync_time) | 468 | if (get_hsync_time) |
470 | symbol_put(w100fb_get_hsynclen); | 469 | symbol_put(w100fb_get_hsynclen); |
470 | get_hsync_time = NULL; | ||
471 | } | 471 | } |
472 | 472 | ||
473 | void corgi_wait_hsync(void) | 473 | void corgi_wait_hsync(void) |
@@ -477,20 +477,39 @@ void corgi_wait_hsync(void) | |||
477 | #endif | 477 | #endif |
478 | 478 | ||
479 | #ifdef CONFIG_PXA_SHARP_Cxx00 | 479 | #ifdef CONFIG_PXA_SHARP_Cxx00 |
480 | static struct device *spitz_pxafb_dev; | ||
481 | |||
482 | static int is_pxafb_device(struct device * dev, void * data) | ||
483 | { | ||
484 | struct platform_device *pdev = container_of(dev, struct platform_device, dev); | ||
485 | |||
486 | return (strncmp(pdev->name, "pxa2xx-fb", 9) == 0); | ||
487 | } | ||
488 | |||
480 | unsigned long spitz_get_hsync_len(void) | 489 | unsigned long spitz_get_hsync_len(void) |
481 | { | 490 | { |
491 | #ifdef CONFIG_FB_PXA | ||
492 | if (!spitz_pxafb_dev) { | ||
493 | spitz_pxafb_dev = bus_find_device(&platform_bus_type, NULL, NULL, is_pxafb_device); | ||
494 | if (!spitz_pxafb_dev) | ||
495 | return 0; | ||
496 | } | ||
482 | if (!get_hsync_time) | 497 | if (!get_hsync_time) |
483 | get_hsync_time = symbol_get(pxafb_get_hsync_time); | 498 | get_hsync_time = symbol_get(pxafb_get_hsync_time); |
484 | if (!get_hsync_time) | 499 | if (!get_hsync_time) |
500 | #endif | ||
485 | return 0; | 501 | return 0; |
486 | 502 | ||
487 | return pxafb_get_hsync_time(&pxafb_device.dev); | 503 | return pxafb_get_hsync_time(spitz_pxafb_dev); |
488 | } | 504 | } |
489 | 505 | ||
490 | void spitz_put_hsync(void) | 506 | void spitz_put_hsync(void) |
491 | { | 507 | { |
508 | put_device(spitz_pxafb_dev); | ||
492 | if (get_hsync_time) | 509 | if (get_hsync_time) |
493 | symbol_put(pxafb_get_hsync_time); | 510 | symbol_put(pxafb_get_hsync_time); |
511 | spitz_pxafb_dev = NULL; | ||
512 | get_hsync_time = NULL; | ||
494 | } | 513 | } |
495 | 514 | ||
496 | void spitz_wait_hsync(void) | 515 | void spitz_wait_hsync(void) |
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index a45aaa115a76..1d7677669a76 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <asm/arch/udc.h> | 34 | #include <asm/arch/udc.h> |
35 | #include <asm/arch/pxafb.h> | 35 | #include <asm/arch/pxafb.h> |
36 | #include <asm/arch/mmc.h> | 36 | #include <asm/arch/mmc.h> |
37 | #include <asm/arch/i2c.h> | ||
37 | 38 | ||
38 | #include "generic.h" | 39 | #include "generic.h" |
39 | 40 | ||
@@ -207,6 +208,11 @@ static struct platform_device pxafb_device = { | |||
207 | .resource = pxafb_resources, | 208 | .resource = pxafb_resources, |
208 | }; | 209 | }; |
209 | 210 | ||
211 | void __init set_pxa_fb_parent(struct device *parent_dev) | ||
212 | { | ||
213 | pxafb_device.dev.parent = parent_dev; | ||
214 | } | ||
215 | |||
210 | static struct platform_device ffuart_device = { | 216 | static struct platform_device ffuart_device = { |
211 | .name = "pxa2xx-uart", | 217 | .name = "pxa2xx-uart", |
212 | .id = 0, | 218 | .id = 0, |
@@ -244,6 +250,25 @@ void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info) | |||
244 | i2c_device.dev.platform_data = info; | 250 | i2c_device.dev.platform_data = info; |
245 | } | 251 | } |
246 | 252 | ||
253 | static struct resource i2s_resources[] = { | ||
254 | { | ||
255 | .start = 0x40400000, | ||
256 | .end = 0x40400083, | ||
257 | .flags = IORESOURCE_MEM, | ||
258 | }, { | ||
259 | .start = IRQ_I2S, | ||
260 | .end = IRQ_I2S, | ||
261 | .flags = IORESOURCE_IRQ, | ||
262 | }, | ||
263 | }; | ||
264 | |||
265 | static struct platform_device i2s_device = { | ||
266 | .name = "pxa2xx-i2s", | ||
267 | .id = -1, | ||
268 | .resource = i2c_resources, | ||
269 | .num_resources = ARRAY_SIZE(i2s_resources), | ||
270 | }; | ||
271 | |||
247 | static struct platform_device *devices[] __initdata = { | 272 | static struct platform_device *devices[] __initdata = { |
248 | &pxamci_device, | 273 | &pxamci_device, |
249 | &udc_device, | 274 | &udc_device, |
@@ -252,6 +277,7 @@ static struct platform_device *devices[] __initdata = { | |||
252 | &btuart_device, | 277 | &btuart_device, |
253 | &stuart_device, | 278 | &stuart_device, |
254 | &i2c_device, | 279 | &i2c_device, |
280 | &i2s_device, | ||
255 | }; | 281 | }; |
256 | 282 | ||
257 | static int __init pxa_init(void) | 283 | static int __init pxa_init(void) |
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index 568afe3d6e1a..d0ab428c2d7d 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <asm/arch/irq.h> | 36 | #include <asm/arch/irq.h> |
37 | #include <asm/arch/mmc.h> | 37 | #include <asm/arch/mmc.h> |
38 | #include <asm/arch/udc.h> | 38 | #include <asm/arch/udc.h> |
39 | #include <asm/arch/ohci.h> | ||
40 | #include <asm/arch/pxafb.h> | 39 | #include <asm/arch/pxafb.h> |
41 | #include <asm/arch/akita.h> | 40 | #include <asm/arch/akita.h> |
42 | #include <asm/arch/spitz.h> | 41 | #include <asm/arch/spitz.h> |
@@ -304,7 +303,6 @@ static struct platform_device *devices[] __initdata = { | |||
304 | &spitzkbd_device, | 303 | &spitzkbd_device, |
305 | &spitzts_device, | 304 | &spitzts_device, |
306 | &spitzbl_device, | 305 | &spitzbl_device, |
307 | &spitzbattery_device, | ||
308 | }; | 306 | }; |
309 | 307 | ||
310 | static void __init common_init(void) | 308 | static void __init common_init(void) |
@@ -328,7 +326,7 @@ static void __init common_init(void) | |||
328 | 326 | ||
329 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 327 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
330 | pxa_set_mci_info(&spitz_mci_platform_data); | 328 | pxa_set_mci_info(&spitz_mci_platform_data); |
331 | pxafb_device.dev.parent = &spitzssp_device.dev; | 329 | set_pxa_fb_parent(&spitzssp_device.dev); |
332 | set_pxa_fb_info(&spitz_pxafb_info); | 330 | set_pxa_fb_info(&spitz_pxafb_info); |
333 | } | 331 | } |
334 | 332 | ||