diff -urpN -X ../dontdiff linux-2.6.17-rc1/arch/arm/mach-s3c2410/Kconfig linux-2.6.17-rc1-smdkkeyb/arch/arm/mach-s3c2410/Kconfig
--- linux-2.6.17-rc1/arch/arm/mach-s3c2410/Kconfig	2006-04-03 13:03:30.000000000 +0100
+++ linux-2.6.17-rc1-smdkkeyb/arch/arm/mach-s3c2410/Kconfig	2006-05-02 01:23:30.000000000 +0100
@@ -100,6 +100,23 @@ config MACH_NEXCODER_2440
 	help
  	  Say Y here if you are using the Nex Vision NEXCODER 2440 Light Board
 
+config SMDK_KEYB
+	bool "SMDK24XX SPI Keyboard device registration"
+	depends on MACH_SMDK && SPI
+
+choice
+	prompt "SMDK Keyboard registration"
+	default SMDK_KEYB_SPIHW
+
+config SMDK_KEYB_SPIGPIO
+	bool "Register with GPIO SPI driver"
+	depends on SMDK_KEYB
+
+config SMDK_KEYB_SPIHW
+	bool "Register with SPI Hardware driver"
+	depends on MACH_SMDK && SPI && SMDK_KEYB
+endchoice
+
 endmenu
 
 config CPU_S3C2410
diff -urpN -X ../dontdiff linux-2.6.17-rc1/arch/arm/mach-s3c2410/Makefile linux-2.6.17-rc1-smdkkeyb/arch/arm/mach-s3c2410/Makefile
--- linux-2.6.17-rc1/arch/arm/mach-s3c2410/Makefile	2006-04-03 13:03:30.000000000 +0100
+++ linux-2.6.17-rc1-smdkkeyb/arch/arm/mach-s3c2410/Makefile	2006-05-02 01:24:02.000000000 +0100
@@ -49,4 +49,6 @@ obj-$(CONFIG_MACH_RX3715)	+= mach-rx3715
 obj-$(CONFIG_MACH_OTOM)		+= mach-otom.o
 obj-$(CONFIG_MACH_NEXCODER_2440) += mach-nexcoder.o
 
-obj-$(CONFIG_MACH_SMDK)		+= common-smdk.o
\ No newline at end of file
+obj-$(CONFIG_MACH_SMDK)		+= common-smdk.o
+obj-$(CONFIG_SMDK_KEYB_SPIGPIO) += common-smdk-spigpio.o
+obj-$(CONFIG_SMDK_KEYB_SPIHW)	+= common-smdk-spihw.o
diff -urpN -X ../dontdiff linux-2.6.17-rc1/arch/arm/mach-s3c2410/common-smdk-spigpio.c linux-2.6.17-rc1-smdkkeyb/arch/arm/mach-s3c2410/common-smdk-spigpio.c
--- linux-2.6.17-rc1/arch/arm/mach-s3c2410/common-smdk-spigpio.c	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.17-rc1-smdkkeyb/arch/arm/mach-s3c2410/common-smdk-spigpio.c	2006-05-02 01:26:08.000000000 +0100
@@ -0,0 +1,83 @@
+/* arch/arm/mach-s3c2410/common-smdk-spigpio.c
+ *
+ * Copyright (c) 2006 Ben Dooks <ben-linux@fluff.org>
+ *
+ * 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/config.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/spinlock.h>
+#include <linux/platform_device.h>
+
+#include <linux/spi/spi.h>
+
+#include <asm/arch/hardware.h>
+
+#include <asm/arch/regs-gpio.h>
+#include <asm/arch/spi-gpio.h>
+
+#include <asm/mach-types.h>
+
+static void kbd_cs(struct s3c2410_spigpio_info *info, int cs)
+{
+	s3c2410_gpio_setpin(S3C2410_GPB6, cs == 1 ? 0 : 1);
+}
+
+static struct spi_board_info smdk_spi_board[] = {
+	[0] = {
+		.modalias	= "ur5hcspi_kbd",
+		.platform_data	= NULL,
+		.irq		= IRQ_EINT1,
+		.chip_select	= 1,
+		.max_speed_hz	= 500*1000,
+	},
+};
+
+/* keyboard controller spi pins connected to spi1 */
+
+static struct s3c2410_spigpio_info spi_platdata = {
+	.pin_clk		= S3C2410_GPG7,
+	.pin_mosi		= S3C2410_GPG6,
+	.pin_miso		= S3C2410_GPG5,
+	.chip_select		= kbd_cs,
+	.board_info		= smdk_spi_board,
+	.board_size		= ARRAY_SIZE(smdk_spi_board),
+};
+
+static struct platform_device spi_dev = {
+	.name		= "s3c24xx-spi-gpio",
+	.dev		= {
+		.platform_data	= &spi_platdata,
+	},
+};
+
+static int smdk_gpio_spi(void)
+{
+	if (machine_is_s3c2440() || machine_is_smdk2410()) {
+		printk("Registering SPI keyboard (GPIO)\n");
+
+		s3c2410_gpio_cfgpin(S3C2410_GPB6, S3C2410_GPIO_OUTPUT);
+		s3c2410_gpio_setpin(S3C2410_GPB6, 0);
+
+		/* wake the device up */
+		s3c2410_gpio_cfgpin(S3C2410_GPB0, S3C2410_GPIO_OUTPUT);
+		s3c2410_gpio_setpin(S3C2410_GPB0, 0);
+		msleep(1);
+		//s3c2410_gpio_setpin(S3C2410_GPB0, 1);
+
+		platform_device_register(&spi_dev);
+	}
+
+	return 0;
+}
+
+arch_initcall(smdk_gpio_spi);
+
+/*  bootp 0x30008000 smdk
+ *  bootm 0x30008000 root=/dev/ram console=ttySAC0,115200
+*/
diff -urpN -X ../dontdiff linux-2.6.17-rc1/arch/arm/mach-s3c2410/common-smdk-spihw.c linux-2.6.17-rc1-smdkkeyb/arch/arm/mach-s3c2410/common-smdk-spihw.c
--- linux-2.6.17-rc1/arch/arm/mach-s3c2410/common-smdk-spihw.c	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.17-rc1-smdkkeyb/arch/arm/mach-s3c2410/common-smdk-spihw.c	2006-05-02 01:26:14.000000000 +0100
@@ -0,0 +1,74 @@
+/* arch/arm/mach-s3c2410/common-smdk-spihw.c
+ *
+ * Copyright (c) 2006 Ben Dooks <ben-linux@fluff.org>
+ *
+ * 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/config.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/spinlock.h>
+#include <linux/platform_device.h>
+
+#include <linux/spi/spi.h>
+
+#include <asm/arch/hardware.h>
+
+#include <asm/arch/regs-gpio.h>
+#include <asm/arch/spi.h>
+
+#include <asm/mach-types.h>
+
+#include "devs.h"
+
+static struct spi_board_info smdk_spi_board[] = {
+	[0] = {
+		.modalias	= "ur5hcspi_kbd",
+		.platform_data	= NULL,
+		.irq		= IRQ_EINT1,
+		.chip_select	= 1,
+		.max_speed_hz	= 500*1000,
+	},
+};
+
+/* keyboard controller spi pins connected to spi1 */
+
+static struct s3c2410_spi_info spi_platdata = {
+	.pin_cs			= S3C2410_GPB6,
+	.board_info		= smdk_spi_board,
+	.board_size		= ARRAY_SIZE(smdk_spi_board),
+};
+
+static int smdk_gpio_spi(void)
+{
+	if (machine_is_s3c2440() || machine_is_smdk2410()) {
+		printk("Registering SPI keyboard (HW)\n");
+
+		s3c2410_gpio_cfgpin(S3C2410_GPB6, S3C2410_GPIO_OUTPUT);
+		s3c2410_gpio_setpin(S3C2410_GPB6, 0);
+
+		s3c2410_gpio_cfgpin(S3C2410_GPG5, S3C2410_GPG5_SPIMISO1);
+		s3c2410_gpio_cfgpin(S3C2410_GPG6, S3C2410_GPG6_SPIMOSI1);
+		s3c2410_gpio_cfgpin(S3C2410_GPG7, S3C2410_GPG7_SPICLK1);
+
+		/* wake the device up */
+		s3c2410_gpio_cfgpin(S3C2410_GPB0, S3C2410_GPIO_OUTPUT);
+		s3c2410_gpio_setpin(S3C2410_GPB0, 0);
+		msleep(1);
+		//s3c2410_gpio_setpin(S3C2410_GPB0, 1);
+
+		s3c_device_spi1.dev.platform_data = &spi_platdata;
+		platform_device_register(&s3c_device_spi1);
+	}
+
+	return 0;
+}
+
+arch_initcall(smdk_gpio_spi);
+
+/*  bootp 0x30008000 smdk
+ *  bootm 0x30008000 root=/dev/ram console=ttySAC0,115200
+*/

