diff options
author | Mark A. Greer <mgreer@mvista.com> | 2009-09-15 21:14:19 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2009-11-25 13:21:22 -0500 |
commit | b9e6342b2b796c2f7fdc98cefd17df16892b035e (patch) | |
tree | c9d5de627ff4b4dfcf4d6b282378068b6373af64 /arch/arm | |
parent | 2eb30c81ce91f646f6f2e6cdfd36b79a492002ce (diff) |
davinci: Add support for Sharp LCD035Q3DG01 graphical LCD
Add support for the Sharp LCD035Q3DG01 graphical LCD. This
requires a minor interface change to da8xx_register_lcdc()
so that the board code can pass in the platform_data which
describes the lcd controller that's to be used.
Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-davinci/board-da850-evm.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-davinci/devices-da8xx.c | 25 | ||||
-rw-r--r-- | arch/arm/mach-davinci/include/mach/da8xx.h | 6 |
3 files changed, 20 insertions, 13 deletions
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index fbc7aae4b6a4..da1a6fba28c1 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c | |||
@@ -377,7 +377,7 @@ static __init void da850_evm_init(void) | |||
377 | pr_warning("da850_evm_init: lcd initialization failed: %d\n", | 377 | pr_warning("da850_evm_init: lcd initialization failed: %d\n", |
378 | ret); | 378 | ret); |
379 | 379 | ||
380 | ret = da8xx_register_lcdc(); | 380 | ret = da8xx_register_lcdc(&sharp_lk043t1dg01_pdata); |
381 | if (ret) | 381 | if (ret) |
382 | pr_warning("da850_evm_init: lcdc registration failed: %d\n", | 382 | pr_warning("da850_evm_init: lcdc registration failed: %d\n", |
383 | ret); | 383 | ret); |
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c index 0102e0a55578..55956135cdf4 100644 --- a/arch/arm/mach-davinci/devices-da8xx.c +++ b/arch/arm/mach-davinci/devices-da8xx.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <mach/common.h> | 21 | #include <mach/common.h> |
22 | #include <mach/time.h> | 22 | #include <mach/time.h> |
23 | #include <mach/da8xx.h> | 23 | #include <mach/da8xx.h> |
24 | #include <video/da8xx-fb.h> | ||
25 | 24 | ||
26 | #include "clock.h" | 25 | #include "clock.h" |
27 | 26 | ||
@@ -381,10 +380,16 @@ static struct lcd_ctrl_config lcd_cfg = { | |||
381 | .raster_order = 0, | 380 | .raster_order = 0, |
382 | }; | 381 | }; |
383 | 382 | ||
384 | static struct da8xx_lcdc_platform_data da850_evm_lcdc_pdata = { | 383 | struct da8xx_lcdc_platform_data sharp_lcd035q3dg01_pdata = { |
385 | .manu_name = "sharp", | 384 | .manu_name = "sharp", |
386 | .controller_data = &lcd_cfg, | 385 | .controller_data = &lcd_cfg, |
387 | .type = "Sharp_LK043T1DG01", | 386 | .type = "Sharp_LCD035Q3DG01", |
387 | }; | ||
388 | |||
389 | struct da8xx_lcdc_platform_data sharp_lk043t1dg01_pdata = { | ||
390 | .manu_name = "sharp", | ||
391 | .controller_data = &lcd_cfg, | ||
392 | .type = "Sharp_LK043T1DG01", | ||
388 | }; | 393 | }; |
389 | 394 | ||
390 | static struct resource da8xx_lcdc_resources[] = { | 395 | static struct resource da8xx_lcdc_resources[] = { |
@@ -400,19 +405,17 @@ static struct resource da8xx_lcdc_resources[] = { | |||
400 | }, | 405 | }, |
401 | }; | 406 | }; |
402 | 407 | ||
403 | static struct platform_device da850_lcdc_device = { | 408 | static struct platform_device da8xx_lcdc_device = { |
404 | .name = "da8xx_lcdc", | 409 | .name = "da8xx_lcdc", |
405 | .id = 0, | 410 | .id = 0, |
406 | .num_resources = ARRAY_SIZE(da8xx_lcdc_resources), | 411 | .num_resources = ARRAY_SIZE(da8xx_lcdc_resources), |
407 | .resource = da8xx_lcdc_resources, | 412 | .resource = da8xx_lcdc_resources, |
408 | .dev = { | ||
409 | .platform_data = &da850_evm_lcdc_pdata, | ||
410 | } | ||
411 | }; | 413 | }; |
412 | 414 | ||
413 | int __init da8xx_register_lcdc(void) | 415 | int __init da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata) |
414 | { | 416 | { |
415 | return platform_device_register(&da850_lcdc_device); | 417 | da8xx_lcdc_device.dev.platform_data = pdata; |
418 | return platform_device_register(&da8xx_lcdc_device); | ||
416 | } | 419 | } |
417 | 420 | ||
418 | static struct resource da8xx_mmcsd0_resources[] = { | 421 | static struct resource da8xx_mmcsd0_resources[] = { |
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h index ec2821bc38d2..375a3f7af03d 100644 --- a/arch/arm/mach-davinci/include/mach/da8xx.h +++ b/arch/arm/mach-davinci/include/mach/da8xx.h | |||
@@ -11,6 +11,8 @@ | |||
11 | #ifndef __ASM_ARCH_DAVINCI_DA8XX_H | 11 | #ifndef __ASM_ARCH_DAVINCI_DA8XX_H |
12 | #define __ASM_ARCH_DAVINCI_DA8XX_H | 12 | #define __ASM_ARCH_DAVINCI_DA8XX_H |
13 | 13 | ||
14 | #include <video/da8xx-fb.h> | ||
15 | |||
14 | #include <mach/serial.h> | 16 | #include <mach/serial.h> |
15 | #include <mach/edma.h> | 17 | #include <mach/edma.h> |
16 | #include <mach/i2c.h> | 18 | #include <mach/i2c.h> |
@@ -76,12 +78,14 @@ int da8xx_register_edma(void); | |||
76 | int da8xx_register_i2c(int instance, struct davinci_i2c_platform_data *pdata); | 78 | int da8xx_register_i2c(int instance, struct davinci_i2c_platform_data *pdata); |
77 | int da8xx_register_watchdog(void); | 79 | int da8xx_register_watchdog(void); |
78 | int da8xx_register_emac(void); | 80 | int da8xx_register_emac(void); |
79 | int da8xx_register_lcdc(void); | 81 | int da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata); |
80 | int da8xx_register_mmcsd0(struct davinci_mmc_config *config); | 82 | int da8xx_register_mmcsd0(struct davinci_mmc_config *config); |
81 | void __init da8xx_register_mcasp(int id, struct snd_platform_data *pdata); | 83 | void __init da8xx_register_mcasp(int id, struct snd_platform_data *pdata); |
82 | 84 | ||
83 | extern struct platform_device da8xx_serial_device; | 85 | extern struct platform_device da8xx_serial_device; |
84 | extern struct emac_platform_data da8xx_emac_pdata; | 86 | extern struct emac_platform_data da8xx_emac_pdata; |
87 | extern struct da8xx_lcdc_platform_data sharp_lcd035q3dg01_pdata; | ||
88 | extern struct da8xx_lcdc_platform_data sharp_lk043t1dg01_pdata; | ||
85 | 89 | ||
86 | extern const short da830_emif25_pins[]; | 90 | extern const short da830_emif25_pins[]; |
87 | extern const short da830_spi0_pins[]; | 91 | extern const short da830_spi0_pins[]; |