
#
# Patch managed by http://www.holgerschurig.de/patcher.html
#

--- linux-2.6.11-rc1/arch/arm/mach-pxa/corgi.c~corgi_baseextras-r2
+++ linux-2.6.11-rc1/arch/arm/mach-pxa/corgi.c
@@ -35,6 +35,7 @@
 #include <asm/arch/corgi.h>
 
 #include <asm/hardware/scoop.h>
+#include <video/w100fb.h>
 
 #include "generic.h"
 
@@ -45,6 +46,50 @@
 	pxa_init_irq();
 }
 
+static struct w100fb_mach_info corgi_fb_info = {
+	.w100fb_ssp_send 	= corgi_ssp_lcdtg_send,
+	.comadj 			= -1,
+	.phadadj 			= -1,
+};
+
+static struct resource corgi_fb_resources[] = {
+	[0] = {
+		.start		= 0x08000000,
+		.end		= 0x08ffffff,
+		.flags		= IORESOURCE_MEM,
+	},
+};
+
+static struct platform_device corgifb_device = {
+	.name		= "w100fb",
+	.id		= -1,
+	.dev		= {
+ 		.platform_data	= &corgi_fb_info,
+	},
+	.num_resources	= ARRAY_SIZE(corgi_fb_resources),
+	.resource	= corgi_fb_resources,
+};
+
+static struct platform_device corgibl_device = {
+	.name		= "corgi-bl",
+	.id		= -1,
+};
+
+static struct platform_device corgibattery_device = {
+	.name		= "corgi-battery",
+	.id		= -1,
+};
+
+static struct platform_device corgikbd_device = {
+	.name		= "corgi-keyboard",
+	.id		= -1,
+};
+
+static struct platform_device corgits_device = {
+	.name		= "corgi-ts",
+	.id		= -1,
+};
+
 static struct resource corgi_scoop_resources[] = {
 	[0] = {
 		.start		= 0x10800000,
@@ -74,8 +119,13 @@
 };
 
 static struct platform_device *devices[] __initdata = {
+ 	&corgibattery_device,
+ 	&corgibl_device,
+	&corgifb_device,
+ 	&corgikbd_device,
 	&corgiscoop_device,
 	&corgissp_device,
+ 	&corgits_device,
 };
 
 static struct sharpsl_flash_param_info sharpsl_flash_param;
@@ -91,6 +141,16 @@
 
 static void __init corgi_init(void)
 {
+	if (sharpsl_flash_param.comadj_keyword == FLASH_COMADJ_MAJIC) 
+		corgi_fb_info.comadj=sharpsl_flash_param.comadj;
+	else
+		corgi_fb_info.comadj=-1;
+
+	if (sharpsl_flash_param.phad_keyword == FLASH_PHAD_MAJIC) 
+		corgi_fb_info.phadadj=sharpsl_flash_param.phadadj;
+	else
+		corgi_fb_info.phadadj=-1;
+		
 	platform_add_devices(devices, ARRAY_SIZE(devices));
 }
 

