diff options
author | Imre Deak <imre.deak@nokia.com> | 2009-05-28 16:23:53 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2009-05-28 16:23:53 -0400 |
commit | 7d8e967f88006ba6bea7f998e9e6745c27b0b664 (patch) | |
tree | 2e0a09d674eb1f102590c163fe3a1abd1bc48d4d /arch/arm/mach-omap2/board-2430sdp.c | |
parent | 1a48e1575188d4023b3428b623caeefe8c599e79 (diff) |
ARM: OMAP2: 2430SDP: Add FB support to board file
Based on an earlier patch by Hunyue Yau <hyau@mvista.com> with
board-*.c changes split to avoid conflicts with other device updates.
Cc: linux-fbdev-devel@lists.sourceforge.net
Signed-off-by: Hunyue Yau <hyau@mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Imre Deak <imre.deak@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-2430sdp.c')
-rw-r--r-- | arch/arm/mach-omap2/board-2430sdp.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c index ef70b79942c..9c3fdcdf76c 100644 --- a/arch/arm/mach-omap2/board-2430sdp.c +++ b/arch/arm/mach-omap2/board-2430sdp.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include "mmc-twl4030.h" | 41 | #include "mmc-twl4030.h" |
42 | 42 | ||
43 | #define SDP2430_CS0_BASE 0x04000000 | 43 | #define SDP2430_CS0_BASE 0x04000000 |
44 | #define SECONDARY_LCD_GPIO 147 | ||
44 | 45 | ||
45 | static struct mtd_partition sdp2430_partitions[] = { | 46 | static struct mtd_partition sdp2430_partitions[] = { |
46 | /* bootloader (U-Boot, etc) in first sector */ | 47 | /* bootloader (U-Boot, etc) in first sector */ |
@@ -96,8 +97,18 @@ static struct platform_device sdp2430_flash_device = { | |||
96 | .resource = &sdp2430_flash_resource, | 97 | .resource = &sdp2430_flash_resource, |
97 | }; | 98 | }; |
98 | 99 | ||
100 | static struct platform_device sdp2430_lcd_device = { | ||
101 | .name = "sdp2430_lcd", | ||
102 | .id = -1, | ||
103 | }; | ||
104 | |||
99 | static struct platform_device *sdp2430_devices[] __initdata = { | 105 | static struct platform_device *sdp2430_devices[] __initdata = { |
100 | &sdp2430_flash_device, | 106 | &sdp2430_flash_device, |
107 | &sdp2430_lcd_device, | ||
108 | }; | ||
109 | |||
110 | static struct omap_lcd_config sdp2430_lcd_config __initdata = { | ||
111 | .ctrl_name = "internal", | ||
101 | }; | 112 | }; |
102 | 113 | ||
103 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91x_MODULE) | 114 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91x_MODULE) |
@@ -141,6 +152,7 @@ static struct omap_uart_config sdp2430_uart_config __initdata = { | |||
141 | 152 | ||
142 | static struct omap_board_config_kernel sdp2430_config[] = { | 153 | static struct omap_board_config_kernel sdp2430_config[] = { |
143 | {OMAP_TAG_UART, &sdp2430_uart_config}, | 154 | {OMAP_TAG_UART, &sdp2430_uart_config}, |
155 | {OMAP_TAG_LCD, &sdp2430_lcd_config}, | ||
144 | }; | 156 | }; |
145 | 157 | ||
146 | 158 | ||
@@ -188,6 +200,8 @@ static struct twl4030_hsmmc_info mmc[] __initdata = { | |||
188 | 200 | ||
189 | static void __init omap_2430sdp_init(void) | 201 | static void __init omap_2430sdp_init(void) |
190 | { | 202 | { |
203 | int ret; | ||
204 | |||
191 | omap2430_i2c_init(); | 205 | omap2430_i2c_init(); |
192 | 206 | ||
193 | platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices)); | 207 | platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices)); |
@@ -197,6 +211,11 @@ static void __init omap_2430sdp_init(void) | |||
197 | twl4030_mmc_init(mmc); | 211 | twl4030_mmc_init(mmc); |
198 | usb_musb_init(); | 212 | usb_musb_init(); |
199 | board_smc91x_init(); | 213 | board_smc91x_init(); |
214 | |||
215 | /* Turn off secondary LCD backlight */ | ||
216 | ret = gpio_request(SECONDARY_LCD_GPIO, "Secondary LCD backlight"); | ||
217 | if (ret == 0) | ||
218 | gpio_direction_output(SECONDARY_LCD_GPIO, 0); | ||
200 | } | 219 | } |
201 | 220 | ||
202 | static void __init omap_2430sdp_map_io(void) | 221 | static void __init omap_2430sdp_map_io(void) |