 arch/arm/mach-pxa/lpc.c             |  152 +++++++++++++++++++++++++++++++++++
 drivers/input/serio/Kconfig         |    2 
 drivers/input/serio/i8042-ite8711.h |   89 ++++++++++++++++++++
 drivers/input/serio/i8042.h         |    2 
 include/asm-arm/hardware/it8711.h   |   33 ++++++++
 5 files changed, 277 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-pxa/lpc.c b/arch/arm/mach-pxa/lpc.c
new file mode 100644
index 0000000..3a9d960
Index: linux-2.6.17/drivers/input/serio/Kconfig
===================================================================
--- linux-2.6.17.orig/drivers/input/serio/Kconfig	2006-06-18 02:49:35.000000000 +0100
+++ linux-2.6.17/drivers/input/serio/Kconfig	2006-07-21 09:47:08.000000000 +0100
@@ -21,7 +21,7 @@
 config SERIO_I8042
 	tristate "i8042 PC Keyboard controller" if EMBEDDED || !X86
 	default y
-	depends on !PARISC && (!ARM || ARCH_SHARK || FOOTBRIDGE_HOST) && !M68K
+	depends on !PARISC && (!ARM || ARCH_SHARK || FOOTBRIDGE_HOST || CM_X255) && !M68K
 	---help---
 	  i8042 is the chip over which the standard AT keyboard and PS/2
 	  mouse are connected to the computer. If you use these devices,
Index: linux-2.6.17/drivers/input/serio/i8042-ite8711.h
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.17/drivers/input/serio/i8042-ite8711.h	2006-07-21 09:47:08.000000000 +0100
@@ -0,0 +1,89 @@
+#ifndef _I8042_CM_X_2XX_IO_H
+#define _I8042_CM_X_2XX_IO_H
+
+#include <linux/config.h>
+
+#include <asm/arch/hardware.h>
+#include <asm/arch/cm-x255.h>
+
+#include <asm/hardware/it8152.h>
+#include <asm/hardware/it8711.h>
+/*
+ * 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.
+ */
+
+/*
+ * Names.
+ */
+
+#define I8042_KBD_PHYS_DESC "it8711/serio0"
+#define I8042_AUX_PHYS_DESC "it8711/serio1"
+#define I8042_MUX_PHYS_DESC "it8711/serio%d"
+
+/*
+ * IRQs.
+ */
+# define I8042_KBD_IRQ	KEYBOARD_IRQ
+# define I8042_AUX_IRQ	MOUSE_IRQ
+
+
+/*
+ * Register numbers.
+ */
+
+#define I8042_COMMAND_REG	KBD_COMMAND
+#define I8042_STATUS_REG	KBD_COMMAND
+#define I8042_DATA_REG		KBD_DATA
+
+static inline int i8042_read_data(void)
+{
+	return inb(I8042_DATA_REG);
+}
+
+static inline int i8042_read_status(void)
+{
+	return inb(I8042_STATUS_REG);
+}
+
+static inline void i8042_write_data(int val)
+{
+	outb(val, I8042_DATA_REG);
+}
+
+static inline void i8042_write_command(int val)
+{
+	outb(val, I8042_COMMAND_REG);
+}
+
+static inline int i8042_platform_init(void)
+{
+/*
+ * On some platforms touching the i8042 data register region can do really
+ * bad things. Because of this the region is always reserved on such boxes.
+ */
+#if !defined(__sh__) && !defined(__alpha__) && !defined(__mips__) && !defined(CONFIG_PPC64)
+	if (!request_region(I8042_DATA_REG, 16, "i8042"))
+		return -EBUSY;
+#endif
+
+        i8042_reset = 1;
+
+#if defined(CONFIG_PPC64)
+	if (check_legacy_ioport(I8042_DATA_REG))
+		return -EBUSY;
+	if (!request_region(I8042_DATA_REG, 16, "i8042"))
+		return -EBUSY;
+#endif
+	return 0;
+}
+
+static inline void i8042_platform_exit(void)
+{
+#if !defined(__sh__) && !defined(__alpha__) && !defined(CONFIG_PPC64)
+	release_region(I8042_DATA_REG, 16);
+#endif
+}
+
+#endif /* _I8042_CM_X_2XX_IO_H */
Index: linux-2.6.17/drivers/input/serio/i8042.h
===================================================================
--- linux-2.6.17.orig/drivers/input/serio/i8042.h	2006-06-18 02:49:35.000000000 +0100
+++ linux-2.6.17/drivers/input/serio/i8042.h	2006-07-21 09:47:08.000000000 +0100
@@ -25,6 +25,8 @@
 #include "i8042-sparcio.h"
 #elif defined(CONFIG_X86) || defined(CONFIG_IA64)
 #include "i8042-x86ia64io.h"
+#elif defined(CONFIG_CM_X255)
+#include "i8042-ite8711.h"
 #else
 #include "i8042-io.h"
 #endif
Index: linux-2.6.17/include/asm-arm/hardware/it8711.h
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.17/include/asm-arm/hardware/it8711.h	2006-07-21 09:47:08.000000000 +0100
@@ -0,0 +1,33 @@
+#ifndef __IT8711_H__
+#define __IT8711_H__
+
+#define LPC_BASE_ADDR	IT8152_IO_BASE
+
+/* MB PnP configuration register  */
+#define LPC_KEY_ADDR	(LPC_BASE_ADDR + 0x2E)
+#define LPC_DATA_ADDR	(LPC_BASE_ADDR + 0x2F)
+
+/* Device LDN */
+#define LDN_NONE	0x00
+#define LDN_SERIAL1	0x01
+#define LDN_SERIAL2	0x02
+#define LDN_PARALLEL	0x03
+#define LDN_KEYBOARD	0x05
+#define LDN_MOUSE	0x06
+#define LDN_FLOPPY	0x07
+
+#define IT8711_UART1_PORT      (LPC_BASE_ADDR + 0x3F8)
+#define IT8711_UART2_PORT      (LPC_BASE_ADDR + 0x2F8)
+
+#define KBD_COMMAND	(LPC_BASE_ADDR + 0x64)
+#define KBD_DATA	(LPC_BASE_ADDR + 0x60)
+
+
+#ifndef ASM_ONLY
+
+void LPCSetConfig(char LdnNumber, char Index, char data);
+char LPCGetConfig(char LdnNumber, char Index);
+
+#endif
+
+#endif

