Binary files linux-2.6.18-vanilla/arch/arm/boot/Image and linux-2.6.18/arch/arm/boot/Image differ
diff -uprN -X dontdiff linux-2.6.18-vanilla/arch/arm/mach-pxa/idp.c linux-2.6.18/arch/arm/mach-pxa/idp.c
--- linux-2.6.18-vanilla/arch/arm/mach-pxa/idp.c	2006-09-20 05:42:06.000000000 +0200
+++ linux-2.6.18/arch/arm/mach-pxa/idp.c	2006-09-30 11:52:00.000000000 +0200
@@ -18,7 +18,6 @@
 
 #include <linux/init.h>
 #include <linux/interrupt.h>
-#include <linux/irq.h>
 #include <linux/platform_device.h>
 #include <linux/fb.h>
 
@@ -39,92 +38,40 @@
 
 #include "generic.h"
 
-/* TODO:
- * - add pxa2xx_audio_ops_t device structure
- * - Ethernet interrupt
- */
-
-static struct resource smc91x_resources[] = {
-	[0] = {
-		.start	= (IDP_ETH_PHYS + 0x300),
-		.end	= (IDP_ETH_PHYS + 0xfffff),
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_GPIO(4),
-		.end	= IRQ_GPIO(4),
-		.flags	= IORESOURCE_IRQ,
-	}
-};
-
-static struct platform_device smc91x_device = {
-	.name		= "smc91x",
-	.id		= 0,
-	.num_resources	= ARRAY_SIZE(smc91x_resources),
-	.resource	= smc91x_resources,
-};
-
 static void idp_backlight_power(int on)
 {
-	if (on) {
-		IDP_CPLD_LCD |= (1<<1);
-	} else {
-		IDP_CPLD_LCD &= ~(1<<1);
-	}
-}
-
-static void idp_vlcd(int on)
-{
-	if (on) {
-		IDP_CPLD_LCD |= (1<<2);
-	} else {
-		IDP_CPLD_LCD &= ~(1<<2);
-	}
 }
 
 static void idp_lcd_power(int on)
 {
-	if (on) {
-		IDP_CPLD_LCD |= (1<<0);
-	} else {
-		IDP_CPLD_LCD &= ~(1<<0);
-	}
-
-	/* call idp_vlcd for now as core driver does not support
-	 * both power and vlcd hooks.  Note, this is not technically
-	 * the correct sequence, but seems to work.  Disclaimer:
-	 * this may eventually damage the display.
-	 */
-
-	idp_vlcd(on);
 }
 
 static struct pxafb_mach_info sharp_lm8v31 __initdata = {
-	.pixclock	= 270000,
-	.xres		= 640,
-	.yres		= 480,
+	.pixclock	= 0,
+	.xres		= 240,
+	.yres		= 320,
 	.bpp		= 16,
-	.hsync_len	= 1,
-	.left_margin	= 3,
-	.right_margin	= 3,
+	.hsync_len	= 3,
+	.left_margin	= 7,
+	.right_margin	= 7,
 	.vsync_len	= 1,
-	.upper_margin	= 0,
-	.lower_margin	= 0,
+	.upper_margin	= 8,
+	.lower_margin	= 8,
 	.sync		= FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
 	.cmap_greyscale	= 0,
 	.cmap_inverse	= 0,
 	.cmap_static	= 0,
-	.lccr0		= LCCR0_SDS,
-	.lccr3		= LCCR3_PCP | LCCR3_Acb(255),
+	.lccr0		= 0x001000f9,
+	.lccr3		= 0x04b0ff09,
 	.pxafb_backlight_power = &idp_backlight_power,
 	.pxafb_lcd_power = &idp_lcd_power
 };
 
 static int idp_mci_init(struct device *dev, irqreturn_t (*idp_detect_int)(int, void *, struct pt_regs *), void *data)
 {
-	/* setup GPIO for PXA25x MMC controller	*/
-	pxa_gpio_mode(GPIO6_MMCCLK_MD);
-	pxa_gpio_mode(GPIO8_MMCCS0_MD);
+        /* setup GPIO for PXA25x MMC controller */
+        pxa_gpio_mode(GPIO6_MMCCLK_MD);
+        pxa_gpio_mode(GPIO8_MMCCS0_MD);
 
 	return 0;
 }
@@ -138,7 +85,6 @@ static void __init idp_init(void)
 {
 	printk("idp_init()\n");
 
-	platform_device_register(&smc91x_device);
 	//platform_device_register(&mst_audio_device);
 	set_pxa_fb_info(&sharp_lm8v31);
 	pxa_set_mci_info(&idp_mci_platform_data);
@@ -148,37 +94,11 @@ static void __init idp_init_irq(void)
 {
 
 	pxa_init_irq();
-
-	set_irq_type(TOUCH_PANEL_IRQ, TOUCH_PANEL_IRQ_EDGE);
 }
 
-static struct map_desc idp_io_desc[] __initdata = {
-  	{
-		.virtual	=  IDP_COREVOLT_VIRT,
-		.pfn		= __phys_to_pfn(IDP_COREVOLT_PHYS),
-		.length		= IDP_COREVOLT_SIZE,
-		.type		= MT_DEVICE
-	}, {
-		.virtual	=  IDP_CPLD_VIRT,
-		.pfn		= __phys_to_pfn(IDP_CPLD_PHYS),
-		.length		= IDP_CPLD_SIZE,
-		.type		= MT_DEVICE
-	}
-};
-
 static void __init idp_map_io(void)
 {
 	pxa_map_io();
-	iotable_init(idp_io_desc, ARRAY_SIZE(idp_io_desc));
-
-	// serial ports 2 & 3
-	pxa_gpio_mode(GPIO42_BTRXD_MD);
-	pxa_gpio_mode(GPIO43_BTTXD_MD);
-	pxa_gpio_mode(GPIO44_BTCTS_MD);
-	pxa_gpio_mode(GPIO45_BTRTS_MD);
-	pxa_gpio_mode(GPIO46_STRXD_MD);
-	pxa_gpio_mode(GPIO47_STTXD_MD);
-
 }
 
 
diff -uprN -X dontdiff linux-2.6.18-vanilla/drivers/input/keyboard/icn330kbd.c linux-2.6.18/drivers/input/keyboard/icn330kbd.c
--- linux-2.6.18-vanilla/drivers/input/keyboard/icn330kbd.c	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.18/drivers/input/keyboard/icn330kbd.c	2006-10-03 18:45:55.000000000 +0200
@@ -0,0 +1,139 @@
+/*
+ *  Keyboard driver for Navman iCN 330
+ *
+ *  Based on spitzkbd.c
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ */
+
+#include <linux/delay.h>
+#include <linux/init.h>
+#include <linux/input.h>
+#include <linux/interrupt.h>
+#include <linux/module.h>
+#include <linux/slab.h>
+#include <linux/irq.h>
+
+#include <asm/arch/hardware.h>
+#include <asm/arch/pxa-regs.h>
+#include <asm/arch/spitz.h>
+
+#define NUM_SENSES 4
+
+#define POWER_BUTTON 3
+#define ARROW_LEFT 19
+#define ARROW_RIGHT 20
+#define ARROW_DOWN 21
+#define ARROW_UP 22
+
+#define POWER_OFF 13
+
+#define NR_SCANCODES (NUM_SENSES+2)
+
+static int icn_senses[] = {
+  ARROW_UP,
+  ARROW_RIGHT,
+  ARROW_LEFT,
+  ARROW_DOWN,
+};
+
+
+
+static unsigned char icnkbd_keycode[NR_SCANCODES] = {
+  0, 0, KEY_1, KEY_2, KEY_3, KEY_4
+};
+
+static struct input_dev *input_dev;
+
+static irqreturn_t icn330kbd_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+	int i;
+
+	if(irq == IRQ_GPIO(POWER_BUTTON)) {
+	  // Power off
+	  pxa_gpio_mode(POWER_OFF | GPIO_IN);
+	  while(1);
+	}       
+
+	for(i=0; i<NUM_SENSES; i++)
+	  if(IRQ_GPIO(icn_senses[i]) == irq)
+	    break;
+
+	if (GPLR(icn_senses[i]) & GPIO_bit(icn_senses[i]))
+	{
+		input_report_key(input_dev, i+2, 0);
+	} else {
+		input_report_key(input_dev, i+2, 1);
+	}
+
+//	printk(" - %08x\n", GPIO_bit(i));
+
+	return IRQ_HANDLED;
+}
+
+
+static int __devinit icn330kbd_init(void)
+{
+	int i;
+
+	input_dev = input_allocate_device();
+	if (!input_dev) {
+		return -ENOMEM;
+	}
+
+	input_dev->name = "iCN 330 Keyboard";
+	input_dev->phys = "icnkbd/input0";
+
+	input_dev->id.bustype = BUS_HOST;
+	input_dev->id.vendor = 0x0001;
+	input_dev->id.product = 0x0001;
+	input_dev->id.version = 0x0100;
+
+	input_dev->evbit[0] = BIT(EV_KEY);
+	input_dev->keycodemax	= NR_SCANCODES;
+	input_dev->keycodesize	= sizeof(icnkbd_keycode[0]);
+	input_dev->keycode	= icnkbd_keycode;
+
+	for (i = 0; i < NR_SCANCODES; i++)
+		set_bit(icnkbd_keycode[i], input_dev->keybit);
+	clear_bit(0, input_dev->keybit);
+
+	input_register_device(input_dev);
+
+	// Register power off handler
+	pxa_gpio_mode(POWER_BUTTON | GPIO_IN);	
+	request_irq(IRQ_GPIO(POWER_BUTTON), icn330kbd_interrupt,
+		    IRQF_DISABLED|IRQF_TRIGGER_RISING,
+		    "Power Off", input_dev);
+
+	for (i = 0; i < NUM_SENSES; i++) {
+		pxa_gpio_mode(icn_senses[i] | GPIO_IN);
+		set_irq_type(IRQ_GPIO(icn_senses[i]), IRQT_BOTHEDGE);
+		if (request_irq(IRQ_GPIO(icn_senses[i]), icn330kbd_interrupt,
+				0,
+				"iCNkbd Sense", input_dev))
+			printk(KERN_WARNING "spitzkbd: Can't get Sense IRQ: %d!\n", i);
+	}
+
+	return 0;
+}
+
+static void __exit icn330kbd_exit(void)
+{
+	int i;
+
+	for (i = 0; i < NUM_SENSES; i++)
+		free_irq(IRQ_GPIO(icn_senses[i]), input_dev);
+
+	input_unregister_device(input_dev);
+}
+
+module_init(icn330kbd_init);
+module_exit(icn330kbd_exit);
+
+MODULE_AUTHOR("Rasmus Rohde <rohde@duff.dk>");
+MODULE_DESCRIPTION("iCN330 Keyboard Driver");
+MODULE_LICENSE("GPLv2");
diff -uprN -X dontdiff linux-2.6.18-vanilla/drivers/input/keyboard/Kconfig linux-2.6.18/drivers/input/keyboard/Kconfig
--- linux-2.6.18-vanilla/drivers/input/keyboard/Kconfig	2006-09-20 05:42:06.000000000 +0200
+++ linux-2.6.18/drivers/input/keyboard/Kconfig	2006-10-01 20:30:05.000000000 +0200
@@ -132,6 +132,17 @@ config KEYBOARD_CORGI
 	  To compile this driver as a module, choose M here: the 
 	  module will be called corgikbd.
 
+config KEYBOARD_ICN330
+        tristate "iCN330 keyboard"
+        depends on ARCH_PXA_IDP
+        default y
+        help
+          Say Y here to enable a pseudo keyboard for the Navman iCN 330
+
+          To compile this driver as a module, choose M here: the
+          module will be called icn330kbd.
+
+
 config KEYBOARD_SPITZ
 	tristate "Spitz keyboard"
 	depends on PXA_SHARPSL
diff -uprN -X dontdiff linux-2.6.18-vanilla/drivers/input/keyboard/Makefile linux-2.6.18/drivers/input/keyboard/Makefile
--- linux-2.6.18-vanilla/drivers/input/keyboard/Makefile	2006-09-20 05:42:06.000000000 +0200
+++ linux-2.6.18/drivers/input/keyboard/Makefile	2006-10-01 20:24:49.000000000 +0200
@@ -4,6 +4,7 @@
 
 # Each configuration option enables a list of files.
 
+obj-$(CONFIG_KEYBOARD_ICN330)		+= icn330kbd.o
 obj-$(CONFIG_KEYBOARD_ATKBD)		+= atkbd.o
 obj-$(CONFIG_KEYBOARD_SUNKBD)		+= sunkbd.o
 obj-$(CONFIG_KEYBOARD_LKKBD)		+= lkkbd.o
diff -uprN -X dontdiff linux-2.6.18-vanilla/include/linux/utsrelease.h linux-2.6.18/include/linux/utsrelease.h
--- linux-2.6.18-vanilla/include/linux/utsrelease.h	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.18/include/linux/utsrelease.h	2006-09-30 09:11:35.000000000 +0200
@@ -0,0 +1 @@
+#define UTS_RELEASE "2.6.18"
diff -uprN -X dontdiff linux-2.6.18-vanilla/Makefile linux-2.6.18/Makefile
--- linux-2.6.18-vanilla/Makefile	2006-09-20 05:42:06.000000000 +0200
+++ linux-2.6.18/Makefile	2006-09-30 11:51:23.000000000 +0200
@@ -173,8 +173,8 @@ SUBARCH := $(shell uname -m | sed -e s/i
 # Default value for CROSS_COMPILE is not to prefix executables
 # Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
 
-ARCH		?= $(SUBARCH)
-CROSS_COMPILE	?=
+ARCH		?= arm
+CROSS_COMPILE	?= /home/rohde/develop/xscale/bin/arm-linux-
 
 # Architecture as present in compile.h
 UTS_MACHINE := $(ARCH)
